WorksPhysics and Astronomy
Transformer-Based Approach to Enhance Positron Tracking Performance in MEG II
Abstract
We developed a Transformer-based pattern recognition method for positron track reconstruction in the MEG II experiment. The model acts as a classifier to remove pileup hits in the MEG II drift chamber, which operates under a high pileup occupancy of 35 - 50 %. The trained model significantly improved hit purity, leading to enhancements in tracking efficiency and resolution by 15 % and 5 %, respectively, at a muon stopping rate of /sec. This improvement translates into an approximately 10 % increase in the sensitivity of the branching ratio measurement.
Introduction
The MEG II experiment searches for the charged lepton flavor-violating muon decay, [1]. Data collection began in 2021, and analysis of the first two years of data (up to 2022) set a 90 % C.L. upper limit of on the branching ratio [2]. The experiment is scheduled to continue until 2026, aiming to achieve an upper-limit sensitivity of , with its scientific motivation and impact discussed in Ref. [3]. Located at the E5 beam line of PSI [4], the experiment stops a continuous muon beam in a thin plastic target at a rate of /s, and measures positrons and photons from muon decays using a positron spectrometer and a liquid xenon detector, respectively (Figure 1).

Figure 1. An event display for a simulated event, showing the coordinate definition together. Inside the CDCH volume (cyan volume), the positron track (black solid line) makes 2.5 turns leaving red-marked hits. After leaving the CDCH volume, the positron makes hits on four (blue solid tiles) out of the 512 scintillation counters of the pTC (yellow transparent tiles). The photon, emitted in the direction opposite to that of the positron, is also shown as the magenta dashed line, together with the C-shaped liquid xenon detector.
In this paper, we aim to improve the performance of the positron spectrometer, thereby enhancing the sensitivity of the experiment. The positron spectrometer must achieve high positron detection efficiency and resolution even at a high muon stopping rate on the target. The efficiency and the stopping rate directly determine the number of muon decays measured effectively, while the resolution helps suppress background events. The dominant source of background is accidental coincidences of positrons and photons from different muon decays, where the positron–photon pairs have neither time nor angular correlations and exhibit continuous energy spectra up to 52.8 MeV. With excellent resolution, such events can be kinematically distinguished from the two-body kinematics of the signal: a time-coincident positron and photon, each with 52.8 MeV energy, emitted back-to-back.
The latest MEG II result [2] adopted the positron spectrometer analysis method described in Ref. [5]. In that study, Ref. [5] concluded that a muon stopping rate of /s maximizes
the sensitivity. This value is lower than the rate limit of , which is determined by constraints from the liquid xenon photon detector. The reduced muon rate was chosen because an increase in the stopping rate was observed to degrade the positron tracking efficiency. Since the single-hit efficiency of the tracking detector remains nearly constant across different stopping rates, this degradation was attributed to an inefficiency in the reconstruction algorithm. In particular, the tracking algorithm is inefficient in the track-finding stage, where pattern recognition is highly sensitive to contamination from pileup hits. This underscores the importance of improving the algorithm to make it more robust against pileup.
This paper presents a novel Transformer-based machine learning method [6] for tracker hit filtering, which enhances the performance of the MEG II positron track reconstruction. Sec. 2 provides a brief introduction to the positron spectrometer design and the conventional reconstruction method detailed in Ref. [5]. Next, Sec. 3 reviews related work in the literature on applying machine learning techniques to track reconstruction and discusses the specific tracking requirements of MEG II. Sec. 4 describes the Transformer model architecture adapted for the MEG II experiment. Sec. 5 evaluates the tracking performance achieved with the proposed method. Finally, Sec. 6 discusses the results, and Sec. 7 summarizes the conclusions of this paper.
Review of MEG II positron spectrometer
The design, analysis methods, and performance of the positron spectrometer are detailed in Ref. [1, 5]. In the following subsections, Sec. 2.1 introduces the definition of the coordinate system, which will be used throughout this paper. The spectrometer hardware and the conventional reconstruction method are concisely described in Sec. 2.2 and Sec. 2.3, respectively. Finally, Sec. 2.4 explains the performance evaluation method.
Notation and coordinate system
The coordinate system, shown in Figure 1, is defined with its origin at the center of the MEG II detector, where the muon stopping target is installed (See also Figure 1 of Ref. [1]). The axis is aligned with the muon beam direction, and the axis points upward. The remaining axis completes the right-handed coordinate system and is oriented opposite to the C-shaped liquid xenon photon detector. In this paper, denotes the radial coordinate in the usual cylindrical system, and denotes the coordinates in the spherical system.
Spectrometer hardware
The MEG II positron spectrometer consists of a cylindrical drift chamber (CDCH) for tracking and a pixelated scintillation timing counter (pTC) for timing measurements, both placed inside a gradient magnetic field generated by the COBRA superconducting magnet. As exemplified by the black line in Figure 1, the helical positron trajectories within the magnet include multiple turns along their flight from the muon stopping target to the pTC, and these must be reconstructed without missing any segment. Hereafter, a single turn refers to a pair of track segments: one outgoing (i.e., increasing in ) and one incoming, whereas a half turn refers to either the incoming or outgoing segment alone. About 85% of positrons complete 1.5 turns before reaching the pTC, while the remaining tracks, with a positron emission angle of , make 2.5 turns, or more rarely, 3.5 turns.
The COBRA magnet generates a gradient magnetic field ranging from 1.27 T at the center to 0.5 T at the ends. This gradient field configuration enhances (or suppresses) the track radius of positrons emitted with small (large) and correspondingly small (large) transverse momenta. As a result, the track radii of positrons with the same energy remain nearly constant regardless of the emission angle, which helps in selecting positrons close to 52.8 MeV.
The CDCH (the cyan volume in Figure 1) is a single-volume wire chamber with an inner radius of cm, an outer radius of cm, and a length of 191 cm. It consists of nine drift-cell layers arranged in a stereo configuration, where the wire direction alternates between neighboring layers, enabling precise determination during track reconstruction. Each layer contains 192 cells arranged symmetrically in rotation. For each hit, the track impact parameter relative to the wire is determined from the drift time with a resolution of 150 m. The maximum drift time is approximately 300 ns, within which pileup hit occupancy in each cell reaches 35–50% (lower occupancy in the outer layers) when operating at a muon stopping rate of . In addition, the hit position along the wire direction (corresponding to when neglecting the stereo angle) is measured with a resolution of 7.5 cm using the charge ratio and time difference of signals detected at both ends. Although the track parameter is primarily determined by the geometrical constraints of the stereo configuration, the 7.5 cm hit resolution helps mitigate the effects of high pileup occupancy.
The pTC consists of 512 plastic scintillation counters (the yellow transparent tiles in Figure 1), each coupled to silicon photomultipliers (SiPM) on both ends. These counters are divided into upstream and downstream sectors, which are mirror-symmetric to each other. Each sector is pixelated along the and directions, forming a 16×16 array arranged symmetrically in rotation. The positron impact time on each counter can be measured with an average precision of 110 ps, and the positron emission time from the muon stopping target is reconstructed by combining multiple hits, each corrected for time-of-flight (TOF). For signal positrons with energy 52.8 MeV, the average number of pTC hits is 9, resulting in an overall positron time resolution of about 40 ps. An example hit cluster is shown as the blue solid tiles in Figure 1.
Conventional positron reconstruction
Positron reconstruction begins with the analysis of pTC hits. Hits are clustered into groups based on their timing and position, which separates pileup hits originating from different positrons (See Sec. 5 of Ref. [1]). Thanks to the time resolution of each hit and the segmented detector design, this clustering algorithm is robust against pileup hits, with the inefficiency from mis-clustering being below 1 %. After clustering, the hit position within each counter region is estimated with a precision of approximately 1 cm, using the time difference between the two SiPM readout channels and the hit pattern within the cluster. The cluster time and position are then used in the subsequent tracking algorithm with the CDCH.
The first algorithm using CDCH hits performs pattern recognition for track finding, aiming to identify sets of hits belonging to the same turn segment (either a full single turn or a half turn) of positron trajectories. The initial step constructs a track seed from four hits, with two neighboring layers each providing two nearby hits. A valid seed corresponds to a trajectory that consistently resolves the left–right ambiguity and satisfies the drift distance for all four hits. For drift distance determination, the pTC cluster provides a time reference for calculating the drift time, with a 5 ns uncertainty due to TOF. Once seeds are found, they are propagated forward and backward through the CDCH layers, adding new hits when they are consistent with the trajectory. Propagation continues until reaching the boundary of the active volume, thereby forming a single- or half-turn candidate. For clarity in later sections, note that this method does not exploit patterns between distant hits, particularly those belonging to different turn segments.
The candidate track segments identified by pattern recognition are fitted and then merged with other turn segments to reconstruct multi-turn trajectories. The fitting algorithm uses the deterministic annealing filter implemented in the GENFIT package [7, 8]. During the merging step, trajectories are propagated forward and backward using the refined track fit results, and turn segments with consistent kinematics are combined. Further tracking refinements are then applied, including updating the drift distance with a TOF-corrected reference time, recovering missing hits in the fitted tracks, matching CDCH tracks with pTC clusters, and performing track selection. Although this refinement step is essential for tracking performance, it is less relevant to this paper, which focuses primarily on improving the efficiency at the pattern recognition stage. Readers can refer to Ref. [5] for details and to Ref. [2] for recent updates.
Tracking performance evaluation
The tracking efficiency is evaluated by counting the number of reconstructed and selected tracks in a dedicated dataset collected with an unbiased trigger logic. This data-driven method is also used to normalize the dataset when calculating the branching ratio in Ref. [2]. The efficiency is computed by dividing this count by the expected number of positron tracks emitted in the direction opposite to the acceptance region of the liquid xenon photon detector. This expectation is obtained as the product of the muon stopping rate on the target, the branching ratio of positrons in the energy range of interest, and the detector acceptance. In Ref. [5], using the tracking method described in Sec. 2.3, the tracking efficiency was reported as () at a muon stopping rate of /s (/s), indicating efficiency degradation at higher pileup rates. The quoted uncertainty is dominated by that of the muon stopping rate (see Ref. [1] for its evaluation), which enters the denominator of the efficiency calculation.
The evaluation of tracking resolution uses two methods: fitting the Michel end-point spectrum of the muon Standard Model decay , and double-turn analysis. The first method evaluates the momentum resolution and is fully data-driven. The fit compares the observed Michel end-point spectrum in data with the sharp 52.8 MeV upper edge of the theoretical Michel spectrum [9], which in practice is smeared by the finite detector resolution. The fit function is obtained by multiplying the theoretical spectrum by an efficiency function, which accounts for variations in detector acceptance at different momenta, and then convolving it with a resolution function. The second method, double-turn analysis, evaluates the resolution of angle and position at the positron emission point on the muon stopping target. Tracks with 2.5 turns are split into the first single turn and the last 1.5 turns, and their kinematics are compared after fitting each turn individually. This method requires corrections for differences in the number of hits between the original and split tracks, which involves MC-based adjustments. The most up-to-date resolution estimates are reported in Ref. [2].
Related machine learning works for track reconstruction
Machine learning technique for charged particle tracking
Machine learning techniques for charged particle tracking have been extensively studied in the literature and are summarized in the living review [10]. Among these, graph neural networks (GNNs) are the most widely adopted approach [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], due to their ability to model irregular detector geometries and exploit relational information between hits. Although these models have demonstrated promising performance in various experiments, they suffer from a critical bottleneck in the initial graph construction stage, which becomes increasingly expensive as pileup occupancy rises. More recently, Transformer-based models — motivated by their success in computer vision and natural language processing and inspiring the approach in this study — have emerged for vertexing and tracking tasks [22, 23, 24, 25]. These approaches aim to overcome the combinatorial complexity of tracking by leveraging attention mechanisms.
Specific demands of the MEG II tracking task
This work aims to develop an ML-based hit filtering method for the MEG II CDCH to overcome tracking performance limitations caused by the harsh pileup environment, which restricted the muon stopping rate on the target to /s [5]. However, applying ML techniques developed in other studies is not straightforward for the MEG II drift chamber. Unlike silicon detectors used at the LHC, for example, the drift chamber cannot directly measure the three-dimensional position of hits, making tracking more challenging as it relies only on wire position and drift distance estimation. Even compared with other experiments using drift chambers, the MEG II chamber is characterized by a high cell occupancy of 35–50 % within the drift time window. In addition, positrons in MEG II traverse only up to nine drift-cell layers, resulting in shorter path lengths that can easily be obscured by pileup hits. Moreover, TOF measurement requires complete tracking of multiple-turn trajectories between the muon stopping target and the pTC, even though these trajectories exit the CDCH volume ( cm) between different turn segments and leave no hits there. As a comparison, Ref. [13] discusses tracking a similar topology, referred to as “curling tracks”, where the trajectories found by the GNN are not associated with hits after re-entering the chamber volume.
Positron tracking with Transformer model
Concept of the model design
In this study, we developed a Transformer-based model for the CDCH hit filtering task, which leverages global patterns of pTC and CDCH hits across different turn segments. The key idea is that an algorithm exploiting correlations between distant hits is more robust against pileup than the local algorithm described in § 2.3 (i.e., connecting nearby CDCH hits on the same turn). By taking advantage of the separation of pileup pTC hits through the clustering algorithm, the model aims to identify CDCH hits belonging to the positron track associated with a given pTC cluster. One inference is performed for each pTC cluster, and this process can be repeated multiple times within an event.
The model is designed as a classifier with multiple output class labels, . The label corresponds to pileup or noise hits, while the other labels represent hits on the track of interest, defined by the track turn segment as shown in Figure 2. Here, the index increases as the track is back-propagated by one turn: corresponds to the last half-turn before the pTC, to the preceding turn, and so on. The subscripts in and out divide a single turn into its incoming and outgoing half-turn segments. With the maximum set to four, the model targets tracks of up to 3.5 turns, as events with positron tracks exceeding 3.5 turns would not be efficiently collected by the time-coincidence trigger logic (see Ref. [1]). Note that the model only distinguishes signal hits from pileup hits — it neither sorts CDCH hits along the track direction nor directly estimates track kinematics.

Figure 2. CDCH hit label for the 2.5 turn positron trajectory presented in Fig. 1. Red markers, indicating CDCH hits, are labelled by the turn segment it belongs to. Emitted from the muon stopping target (brown), the positron leaves hits on the first turn, then hits on the second turn, and finally hits on the last half turn before leaving hits on the pTC (blue tiles).
The model output is then used as a hit filter to discard pileup CDCH hits; only the selected hits are used for track candidate construction and fitting, which reuses the methods described in § 2.3. The hit selection and track candidate construction procedure is repeated turn-by-turn; one attempt is made for hits predicted to be , another for those with . This is because hits belonging to different segments contaminate the track candidate construction algorithm, which can associate only hits on the same turn. The hit selection criteria for the track turn segment are
where is the -prediction score of each CDCH hit, and is a threshold defined later in § 4.6. In addition to the use in the track finding, the selected hits and their labels are referred to again during the tracking refinement after the initial track fitting, attempting to recover hits that are selected by the model but not included in the fitted tracks.
Model architecture
The architecture of the Transformer model is shown in Figure 3. The attention blocks are divided into two parts: one for pTC and one for CDCH, with model outputs attached only to the latter. The pTC block processes hits belonging to a specific pTC cluster, and its outputs cross-attend to CDCH hits. The CDCH block receives all CDCH hits in an event, performs self-attention among CDCH hits followed by cross-attention with pTC hits, and finally outputs the class probabilities. The key idea is that connections between CDCH hits are identified through self-attention, including those from different turn segments, while CDCH hits are matched to pTC hits via cross-attention. To obtain high dot-product values — which serve as a similarity measure in the attention mechanism — between hits from the same positron, we approached this problem by finding geometrical transformations to the hit coordinates which would efficiently align them in the embedding vector space, as will be detailed in § 4.3 and § 4.4. The input feature vectors obtained by this geometrical transformation are then processed by the input embedding layers, which are feed-forward networks (FFNs) that transform the input feature vectors into vectors of the Transformer embedding dimension. The output class probabilities are computed using an FFN followed by softmax functions [26].

Figure 3. Transformer model adapted to the MEG II positron spectrometer. Two sets of queries, pTC hits and CDCH hits, are input to the model. The model outputs the probability of each CDCH hit being associated with the pTC hits.
Input feature from pTC
Each pTC hit feature is represented by a 6-dimensional vector:
: coordinate of the counter center (the center of the rectangular counter),
: where is the coordinate of the counter center and is that of the first pTC hit tile,
, ,
, : conformal-mapped coordinates of the hit position (defined by Eq. (2)), estimated with 1 cm precision in § 2.3, and then rotated by .
The rotation by takes advantage of the detector’s rotational symmetry. Although the full acceptance of the detector is defined as , this rotation forces tracks to pass through at the entry point to the pTC. This reduces the phase space of the positron topology in the training samples, effectively increasing the number of training samples within the available phase space volume. This rotation is also applied for hits from the CDCH, as will be discussed in § 4.4.
The conformal mapping,
transforms a circle passing through the origin into a straight line in the space. In the COBRA magnet, positron trajectories are not perfectly circular due to the gradient magnetic field. Nevertheless, hits within the same turn segment (i.e., the same index) are well aligned, as shown in Figure 4. In particular, the pTC hits are supposed to be aligned with the CDCH hits.
Figure 4. Distribution of hit positions for an example 1.5-turn positron track in MC samples, shown in conformal coordinates. The left panel shows the true hit positions, where hits in the same turn segment are well aligned. The right panel shows the reconstructed hit positions incorporating the finite detector resolution, where CDCH hit alignment deteriorates due to the limited resolution and the unsolved left-right ambiguity.
Input feature from CDCH
Each CDCH hit input feature is constructed from its coordinates and represented as a 47-dimensional vector. Among these, 12 elements are:
: the value of the wire at the center (),
, : the estimated drift distance and time,
: from the hit reconstruction,
: where is the of the first pTC hit tile,
: where is the wire at ,
, ,
, : conformal coordinates of the wire at after rotation by ,
, : derivatives of the conformal coordinates with respect to .
The remaining 35 elements come from seven sets of 5-dimensional features, each dependent on the turn segment index described in § 4.1, :
, : where is the typical of hits on the -th turn segment,
: where is the typical of hits on the -th turn segment,
, .
The conformal coordinate calculable at the hit reconstruction level has a limited resolution because of the limited resolution and the left-right ambiguity. The resolution of 7.5 cm (see § 2.2) on the stereo-configured wires results in a few centimeter resolution in the estimate. In addition, due to the unsolved left-right ambiguity at the hit level, the conformal coordinate is naively calculated from the wire position at . Without incorporating the drift distance, we have an additional uncertainty of 6 – 8 mm, which is the typical drift cell size. In Figure 4, we see that the alignment quality on the conformal coordinate is limited at the hit level, which is particularly significant for hits because of the worse resolution for hits closer to the wire ends. As a possible compensation measure, we included and in the feature vector.
The -dependent and patterns were introduced to leverage dot-product attention between distant hits belonging to different turn segments. These patterns were calibrated using Michel positron tracks, as shown in Figure 5. The use of is motivated by its narrower track-by-track variation compared to the simple distribution, as well as its symmetry between downstream (positive ) and upstream (negative ). The dependence of this pattern on the drift-cell layer, as seen in Figure 5, was also taken into account when constructing the feature vector. The -corrected distribution is compared between in Figure 6, where hits from shows narrower distribution than the other classes of hits.
Figure 5. Distribution of vs. in data samples, which was used for and calibration, shown for different combinations of layer and index. Track-fitted and coordinates of each hit are used in these plots. The left (right) three plots correspond to the innermost (outermost) layer.
Figure 6. Distribution of for , 1, , and hits. The narrower distribution for indicates that the correction of can efficiently extract the feature of hits out of the others. The total number of entries for each label is normalized to the hit rate at rate, where hits (i.e. pileup) accounts for 90 % of hits within a 300 ns window.
Training scheme
The training dataset, consisting of one million samples, was primarily based on MC samples of both 52.8 MeV and Michel positrons. As the model inference is given for each pTC cluster (see § 4.1), one training sample consists of a set of hits from the associated positron trajectory (CDCH hits annotated as and pTC hits in the cluster of interest) and a set of pileup CDCH hits (). Here, the pileup hits are created by different close-in-timing positrons that leave no pTC hit (if outside the pTC acceptance) or different pTC clusters. With the MC samples, hits in the training data can be correctly annotated by the MC truths. However, the detector alignment assumed in the MC production can be different from that in the data within the calibration precision of a few hundred m. With concerns that the model may overfit to the specific alignment assumed in the MC samples, we included Michel positron data samples collected at low muon stopping rate (less than /s). In these data samples, the CDCH hit labels were annotated by the result of the conventional track reconstruction described in § 2.3. According to our simulations at such a low rate, the conventional reconstruction can correctly label the -indices for more than 95 % of CDCH hits of reconstructed tracks. Though imperfect, we judged that the quality of this annotation with data samples is enough as supplementary training samples. To emulate a high pileup environment, these data-driven annotations at low intensity were then event-mixed with CDCH hits in data samples collected for background studies (triggered at random time), which were labelled as . MC samples (complementary data samples) accounted for 90 % (the remaining 10 %) of the entire training dataset. We prepared the training samples at four different pileup rates, which correspond to the muon stopping rate of below /s, /s, /s, and /s.
The model, which outputs multiple class labels, was trained using a weighted cross-entropy loss function, where class-specific weights depend on the target label . These weights were introduced to compensate for the imbalance in sample counts across different class labels, as (pileup or noise) dominates. We split the training process into the following two steps. In the first step, the model was trained only with samples at the low pileup rate, namely the one corresponding to the muon stopping rate below /s. In the following second step, all the samples, including pileup hits at various muon stopping rates, /s, were used to fully tune the model parameters. With the split training procedure, we observed faster convergence of the loss value than a single step training using the high-rate samples from the beginning. In our understanding, the first step allowed the model to efficiently learn the correlation between hits, which simplifies the second step as learning how to discriminate from hits.
The model hyperparameters were decided mainly considering the available RAM resource in the offline data processing running on CPU machines (mentioned later in § 4.7), where we aimed to contain the whole tracking algorithm within 2 GB. The trained model in this study contains 35 million parameters (i.e., trainable weights and biases), with the total model size being 140 MB. We compared this choice with different choices with increased model complexity (the number of attention heads, the number of layers, and the dimension of hidden layers), observing no further improvement in the loss value. On the other hand, the model size of 140 MB is not a major part of the allowed 2 GB space (Kalman filter algorithms in the track fitting dominate after all), not demanding intensive studies for the size reduction. We therefore decided to deploy the model with a reasonable model size, which also leaves little room for further improvement in the hit filtering performance.
Efficiency and purity
The signal-hit efficiency and the false positive rate for pileup were studied at various thresholds of the ML output. Their values in the validation dataset at muon stopping rates of
and are shown in Figure 7. The selected threshold ( in Eq. (1)) was obtained by scanning the tracking efficiency at different values, with the scan interval of being 0.025. The markers in Figure 7 indicate the performance at the adopted threshold: 98 % efficiency and 13 % false positive rate at . With the marginal dependences of purity and efficiency on the muon beam rate, the pileup hit occupancy is proportional to the muon beam rate. Here, as presented in Figure 6, the pileup hits count up nine times more than signal hits at . When the filtering is applied at this rate, 50 % of the filtered hits are signal hits from trajectories of interest, which thereby benefits the subsequent track candidate construction and fitting. Examples of ML-based hit selection at the adopted threshold (for ) are shown in Figure 8.
Figure 7. Correlation between signal-hit efficiency and false positive rate for pileup in the validation dataset at (red solid line) and (black dashed line). The marker on each line indicates the values at the adopted ML output threshold of .
Figure 8. Model outputs for an example 1.5-turn track in the validation dataset, compared with the MC truth. The and in the legend indicate the label with the MC truth and that predicted by the model, respectively. The hits are pileup hits simulated with the rate of . In this event, all signal hits (36 hits in total) are correctly predicted, while 52 out of 377 pileup hits become false positives.
Software implementation
The Transformer model was trained using PyTorch, while the offline reconstruction for the MEG II experiment is implemented in C++. The trained model was integrated into the C++ code with the aid of the ONNX framework [27], and model inference during reconstruction runs on CPU processors.
Tracking performance improvement
As discussed in § 4.1, we updated the track reconstruction, with the ML-based hit filtering applied before running the track finding and fitting algorithms. In the following subsections, we present the tracking efficiency, resolution, and CPU efficiency obtained with the updated method and compare them with those without hit filtering.
Efficiency
The impact on tracking efficiency was evaluated using the positron counting method described in § 2.4. Figure 9 compares the efficiencies of the conventional and proposed methods at different muon stopping rates, ranging between μ/s. We observed a larger improvement in efficiency at higher muon stopping rates. In particular, an efficiency gain of % was achieved at μ/s. These results obtained from data were cross-checked with MC samples, showing agreement within %.
Figure 9. Comparison of tracking efficiency with and without the use of ML in the reconstruction for MC and data samples. The efficiency without ML corresponds to the result presented in [1]. The error bars for the data are dominated by the uncertainty in the beam rate estimation discussed in [1], where the errors at different rates are fully correlated to each other. The error bars for the MC samples are from the statistical uncertainty with the produced number of MC samples, and the errors are independent of each other.
As discussed in § 4.6, the hit filtering performs with the hit level signal efficiency of % while discarding % of pileup hits. The impact of the inefficient % hits on the tracking efficiency was studied by reconstructing tracks in MC samples at μ/s with the following two configurations:
Hit selection by ML without any modification ( % efficiency and % false positive).
After selection by ML, mis-identified signal hits are recovered by means of MC truth ( % efficiency and % false positive).
As a result, we observed an approximately % higher tracking efficiency with the recovery of % signal hits. Nevertheless, this difference is not as large as the improvement presented in Figure 9, which is the difference between the first configuration and no hit filtering (i.e. % efficiency with % false positive). Therefore, the tracking efficiency improvement can be attributed to the reduced pileup hits, while the % signal hit inefficiency potentially leaves room for an additional % improvement.
In addition to the direct comparison of the tracking efficiency, we studied the number of CDCH hits on fitted tracks that match well the MC truth (i.e., hits that are actually on the trajectory of interest, not that of a pileup). In Figure 10, we see an improvement thanks to the ML-based hit filtering. This again indicates that the tracking algorithm can efficiently identify hits from trajectories of interest with the reduced number of pileup hits, which the authors understand contributes to the tracking efficiency improvement.
Figure 10. The number of hits on the fitted tracks actually associated with MC truth. The distribution is compared between the reconstruction with (red solid line) and without (black dotted line) ML-based hit filtering.
Resolution
Figure 11 illustrates the -resolution improvement observed using the double-turn analysis method introduced in § 2.4. The plot shows the distribution of differences between independently fitted track values for the first and later turns of split double-turn tracks. The overall -resolution, estimated by fitting a Gaussian to the distribution and correcting the differences between the original tracks and the split tracks (see Sec. 11.1 of Ref. [5] for the full procedure), improved by % with the Transformer-based model. Similar analyses of other position () and angle variables ( and ) consistently showed improvements of approximately % overall.
Figure 11. Comparison of -resolution obtained in the double-turn analysis between the conventional tracking algorithm and the ML-based approach, including detailed comparisons between subsets of ML-reconstructed tracks: those also found by the conventional algorithm and those newly identified. The graphs show the distribution, where and correspond to independent fits of the first and second turns of split double-turn tracks. The histograms were scaled so that all have equal area, providing a clearer visual comparison of resolution. The shown in the legend is the standard deviation of each distribution obtained by a Gaussian fitting. Results indicate an overall 5 % improvement in resolution with ML tracking, and an even greater 10 % improvement for tracks already reconstructed by the conventional algorithm.
Figure 11 also compares the -resolution for subsets of ML-reconstructed tracks: those also found by the conventional algorithm and those newly identified (i.e., those contributing to the efficiency improvement shown in Figure 9). ML-reconstructed tracks that were also found by the conventional algorithm exhibit even better resolution, % higher than the average resolution of the conventional algorithm. Conversely, tracks newly identified by the ML approach show % worse resolution than the conventional average. This indicates that ML-based track ing improves efficiency primarily by recovering low-quality tracks that were difficult for the conventional algorithm to reconstruct. These improvements in efficiency and resolution are understood to result from the purity enhancement presented in Figure 7.
The improvement in momentum resolution can be observed in the 52.8 MeV endpoint spectrum of Michel positrons. Figure 12 compares the reconstructed positron energy spectra obtained with the ML-based and conventional methods. As shown, the number of tracks exceeding 52.8 MeV is reduced with ML reconstruction. Since the theoretical endpoint lies strictly at 52.8 MeV, tracks with MeV originate from the finite tracking resolution. Therefore, this demonstrates the improvement in momentum resolution. The observed end-point spectra were fitted with the theoretical spectrum convolved with a sum of Gaussian modeling of the detector resolution (introduced in Sec. 2.4 and detailed in Sec. 11.1 of Ref. [5]). The fitted values of the detector resolution indicate an approximately 10 % improvement with the ML-based tracking approach.
Figure 12. Comparison of the 52.8 MeV endpoint spectrum for the same set of tracks reconstructed by both the ML-based and conventional algorithms. The number of tracks above 52.8 MeV, which is kinematically forbidden, is smaller with ML reconstruction, indicating an improvement in resolution. The blue dashed lines show the fitted line, obtained by convolving the theoretical spectrum with the finite detector resolution. The in the plot indicates the fitted value of the detector resolution.
CPU time
Table 1 shows the computing time necessary to process one event. With the hit filtering by the Transformer-based model, the total computing time for the entire positron reconstruction sequence was reduced to 70–80 % of that required by the conventional approach. In particular, the cost of track seeding and candidate construction — steps that are especially sensitive to
| Task | Without ML | With ML |
| Positron track reconstruction time () | ||
| Waveform analysis | 3 s | |
| ML inference | — | 1 s |
| Seed & candidate construction | 15.5 s | 7.5 s |
| Track fitting & refinement | 4 s | 6 s |
| Total | 22.5 s | 17.5 s |
| Simulation time | ||
| Single generation | 17 s | |
| Single beam muon generation | 3.5 s | |
| Event mixing | 6 s |
Table 1. Time to process one event for both reconstruction (for pileup rate of ) and simulation with AMD EPYC 7713, and its breakdown into sub-tasks. Note that when simulating one event, one sample is event-mixed with O(100) beam muon simulation samples.
pileup occupancy — was halved thanks to the improved hit purity. Nevertheless, the track finding and subsequent fitting algorithms still dominate the total computing time, while the model’s inference accounts for 5 %. In Table 1, the increase in the computing time for the track fitting arises from the additional post-fit track refinement using the ML-prediction (mentioned in Sec. 4.1), as well as the increase in the number of tracks to be fitted.
Discussion
The Transformer-based model improved both the efficiency and resolution of positron measurements, as presented in the previ-
ous section. Both improvements are understood to result from enhanced hit purity during track finding and track fitting. In track finding, improved purity facilitates the construction of correct seeds, leading to higher efficiency. In track fitting, residual impurities are understood to remain even after applying the DAF, introducing additional errors in determining track kinematics. Thus, removing such impure hits also contributes to improved tracking resolution.
With these performance improvements, the MEG II experiment has decided to apply this algorithm to the already collected dataset, including reprocessing the data previously analyzed in Ref. [2]. In addition, the muon stopping rate has been increased to since the start of the 2025 DAQ as a result of re-optimization. Together, these two updates are expected to improve the experimental sensitivity by approximately 10 %.
Given the highly encouraging results presented in this paper, it would be valuable to further extend the model for application to a broader range of tasks. Currently, the most promising extension is to develop an end-to-end model capable of directly estimating track kinematics while resolving hit-level ambiguities. Such a model could improve track candidate construction, thereby reducing CPU time and increasing tracking efficiency. Moreover, with better-constructed track candidates, more accurate initial values for DAF-based track fitting could be obtained, potentially leading to further improvements in tracking resolution.
Conclusion
In the MEG II experiment searching for , efficient and precise positron measurements are essential to achieve high sensitivity. In this context, this paper presented a successful application of a Transformer-based model to enhance positron tracking performance. The tracking algorithm must fully reconstruct multiple turns under a high pileup occupancy of 35 – 50 % in the CDCH. To address this challenge, the model was designed as a classifier to filter out pileup hits. At the selected threshold on the Transformer outputs, the model achieved 98 % efficiency for signal hits while discarding 87 % of pileup hits, providing a purity-enhanced set of hits for the track seeding algorithm. This contributed to improvements in positron tracking efficiency and resolution by 15 % and 5 %, respectively, compared to the results reported in Ref. [5]. Given these performance gains, the experiment has decided to increase the muon stopping rate and reprocess the already collected dataset. As a result, the sensitivity of the branching ratio measurement is expected to improve by approximately 10 %, representing a significant scientific gain. In the next MEG II publication on the search for , positrons will be reconstructed using the method described in this paper.
Acknowledgement
We gratefully acknowledge the technical support and cooperation provided by PSI as the host institute. This work particularly benefited from access to GPU resources on the Merlin cluster. We also thank the MEG II collaboration members for ensuring stable detector operation and for collecting the dataset used in this study. This work was supported by JSPS KAKENHI Grant Numbers 21H04991 and 22K21350 (Japan); Leverhulme Trust LIP-2021-014 (UK).
References
- [1]K. Afanaciev, et al., Operation and performance of the MEG II detector, Eur. Phys. J. C 84 (2) (2024) 190. arXiv:2310.1902, doi:10.1140/epjc/s10052-024-12415-3.DOI
- [2]K. Afanaciev, et al., New limit on the μ+ → e+γ decay with the MEG II experiment, Eur. Phys. J. C 85 (10) (2025) 1177. arXiv:2504.15711, doi:10.1140/epjc/s10052-025-14906-3.DOI
- [3]A. M. Baldini, et al., The design of the MEG II experiment, Eur. Phys. J. C 78 (5) (2018) 380. arXiv:1801.04688, doi:10.1140/epjc/s10052-018-5845-6.DOI
- [4]πE5 Beam Line. URL https://www.psi.ch/en/sbl/pie5-beamline
- [5]A. M. Baldini, et al., Performances of a new generation tracking detector: the MEG II cylindrical drift chamber, Eur. Phys. J. C 84 (5) (2024) 473. arXiv:2310.12865, doi:10.1140/epjc/s10052-024-12711-y.DOI
- [6]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, I. Polosukhin, Attention is all you need 30 (2017) 5998–6008. URL https://neurlps.ccarxiv.org/abs/1706.03762
- [7]C. Hoppner, S. Neubert, B. Ketzer, S. Paul, A Novel Generic Framework for Track Fitting in Complex Detector Systems, Nucl. Instrum. Meth. A 620 (2010) 518–525. arXiv:0911.1008, doi:10.1016/j.nima.2010.03.136.DOI
- [8]J. Rauch, T. Schlüter, GENFIT — a Generic Track-Fitting Toolkit, J. Phys. Conf. Ser. 608 (1) (2015) 012042. arXiv:1410.3698, doi:10.1088/1742-6596/608/1/012042.DOI
- [9]T. Kinoshita, A. Sirlin, Radiative corrections to Fermi interactions, Phys. Rev. 113 (1959) 1652–1660. doi: 10.1103/PhysRev.113.1652.DOI
- [10]M. Feickert, B. Nachman, A Living Review of Machine Learning for Particle PhysicsarXiv:2102.02770.arxiv.org/abs/2102.02770
- [11]A. Correia, F. I. Giasemis, N. Garroum, V. V. Gligorov, B. Granado, Graph Neural Network-based track finding in the LHCb vertex detector, JINST 19 (12) (2024) P12022. arXiv:2407.12119, doi:10.1088/1748-0221/19/12/P12022.DOI
- [12]X. Ju, et al., Performance of a geometric deep learning pipeline for HL-LHC particle tracking, Eur. Phys. J. C 81 (10) (2021) 876. arXiv:2103.06995, doi:10.1140/epjc/s10052-021-09675-8.DOI
- [13]L. Reuter, et al., End-to-End Multi-track Reconstruction Using Graph Neural Networks at Belle II, Comput. Softw. Big Sci. 9 (1) (2025) 6. arXiv:2411.13596, doi:10.1007/s41781-025-00135-6.DOI
- [14]S. Caillou, P. Calafiura, X. Ju, D. Murnane, T. Pham, C. Rougier, J. Stark, A. Vallier, Physics Performance of the ATLAS GNN4ITk Track Reconstruction Chain, EPJ Web Conf. 295 (2024) 03030. doi:10.1051/epjconf/202429503030.DOI
- [15]S. Caillou, C. Collard, C. Rougier, J. Stark, H. Torres, A. Vallier, Novel fully-heterogeneous GNN designs for track reconstruction at the HL-LHC, EPJ Web Conf. 295 (2024) 09028. doi:10.1051/epjconf/202429509028.DOI
- [16]N. Choma, et al., Track Seeding and Labelling with Embedded-space Graph Neural Networks, 2020. arXiv:2007.00149.arxiv.org/abs/2007.00149
- [17]R. Liu, P. Calafiura, S. Farrell, X. Ju, D. T. Murnane, T. M. Pham, Hierarchical Graph Neural Networks for Particle Track Reconstruction, in: 21th International Workshop on Advanced Computing and Analysis Techniques in Physics Research: AI meets Reality, 2023. arXiv:2303.01640.arxiv.org/abs/2303.01640
- [18]K. Lიერet, G. DeZoort, D. Chatterjee, J. Park, S. Miao, P. Li, High Pileup Particle Tracking with Object Condensation, 2023. arXiv:2312.03823.arxiv.org/abs/2312.03823
- [19]K. Lieret, G. DeZoort, An Object Condensation Pipeline for Charged Particle Tracking at the High Luminosity LHC, EPJ Web Conf. 295 (2024) 09004. arXiv:2309.16754, doi:10.1051/epjconf/202429509004.DOI
- [20]A. Akram, X. Ju, Track Reconstruction using Geometric Deep Learning in the Straw Tube Tracker (STT) at the PANDA Experiment, 2022. arXiv:2208.12178.arxiv.org/abs/2208.12178
- [21]X. Jia, X. Qin, T. Li, X. Huang, X. Zhang, N. Yin, Y. Zhang, Y. Yuan, BESIII track reconstruction algorithm based on machine learning, EPJ Web Conf. 295 (2024) 09006. doi:10.1051/epjconf/202429509006.DOI
- [22]S. Van Stroud, P. Duckett, M. Hart, N. Pond, S. Rettie, G. Facini, T. Scanlon, Transformers for Charged Particle Track Reconstruction in High Energy Physics arXiv:2411.07149.DOI
- [23]S. Van Stroud, N. Pond, M. Hart, J. Barr, S. Rettie, G. Facini, T. Scanlon, Secondary vertex reconstruction with MaskFormers, Eur. Phys. J. C 84 (10) (2024) 1020. arXiv:2312.12272, doi:10.1140/epjc/s10052-024-13374-5.DOI
- [24]A. Huang, Y. Melkani, P. Calafiura, A. Lazar, D. T. Murnane, M.-T. Pham, X. Ju, A Language Model for Particle Tracking, in: Connecting The Dots 2023, 2024. arXiv:2402.10239.arxiv.org/abs/2402.10239
- [25]Y. Melkani, X. Ju, TrackSorter: A Transformer-based sorting algorithm for track finding in High Energy Physics, in: 22nd International Workshop on Advanced Computing and Analysis Techniques in Physics Research: Foundation Models for Physics - Nexus of Computation and Physics through Embracing the Era of Foundation Models, 2024. arXiv:2407.21290.arxiv.org/abs/2407.21290
- [26]J. S. Bridle, Probabilistic interpretation of feedforward classification network outputs, with relationships to statistical pattern recognition (1990) 227–236.
- [27]ONNX Community, Onnx: Open neural network exchange, https://onnx.ai/, accessed: November 25, 2025 (2017).








