Measuring the Top Quark Mass With Machine Learning

Why Template Morphing Hits a Wall
If you have spent time on a top quark mass measurement, you know the workflow intimately: generate Monte Carlo samples at several discrete mass points, build templates of some sensitive observable, and then slide those templates against data using a likelihood fit. It works, and it has delivered precise results. But it also has real limitations. You are compressing a high-dimensional final state into one or two carefully hand-crafted observables, and the sensitivity you extract is only as good as the observables you chose. If there is additional mass information distributed across dozens of correlated kinematic quantities — and there is — template morphing leaves it on the table.
That is the opening that top quark mass machine learning approaches are designed to fill. Instead of fitting templates, you train a neural network to regress the top mass directly from the full event representation. This article walks through how that works in practice, what decisions matter, and where the genuine difficulties lie.
What Regression Means Here
In a template analysis the top mass is a parameter of the likelihood. In a regression approach it becomes the target variable during training. You show the network many simulated events, each labelled with the generator-level top mass used to produce it, and you ask the network to predict that mass from the observable inputs. After training, you run the network on real data and interpret the distribution of predictions as a measurement.
This is the same logic as any supervised regression in physics: you are teaching the network to map observables onto a quantity of interest. The difference from, say, a jet energy regression is that you are regressing a Lagrangian parameter rather than a detector-level correction. That distinction matters when you think about systematic uncertainties and generator dependence, which we will come to.
If you want a structured introduction to regression in the particle physics context, the complete HEP ML course covers both the conceptual framing and the implementation details.
Building the Training Dataset
Choose Your Input Representation
The network needs inputs that carry mass information. Common choices include:
- Lepton and jet four-momenta in the semi-leptonic channel
- Derived quantities such as reconstructed W and top candidates, but these can introduce bias if the reconstruction assumes a mass
- Low-level per-particle inputs fed through a graph network or particle-flow architecture, which avoids manual feature engineering
The cleanest approach is to give the network as much raw kinematic information as you can and let it learn which combinations are sensitive. Avoid inputs that already assume the top mass in their construction unless you are very careful about how that assumption propagates.
Label Events With Generator Mass
Generate events across a continuous range of top mass values — not just a handful of discrete points as in template morphing. A continuous training distribution lets the network interpolate smoothly and avoids the staircase artifacts you sometimes see in morphed templates. Weight or re-sample so the network sees roughly equal statistics at each mass value, otherwise it will anchor to the most common mass in your sample.
Training the Network
A straightforward starting point is a fully connected network with a single scalar output and a mean-squared-error loss. Graph neural networks and attention-based architectures often outperform this baseline because they handle variable-length jet lists naturally, but the simple version is worth getting right first.
Watch for overtraining — in physics language, the network fitting statistical fluctuations in the MC rather than the true mass dependence. Monitor your validation loss on a held-out sample throughout training. If validation loss stops improving while training loss continues to fall, you are overtraining. Regularisation, dropout, or simply reducing model capacity usually helps. This is conceptually identical to over-fitting a polynomial to a histogram: more parameters than the data can constrain.
For a deeper treatment of regularisation strategies in HEP contexts, the full course curriculum has dedicated material on this.
The Hard Part: Systematic Uncertainties
This is where top mass measurement ML via regression requires the most care. Because the network is trained on simulation, any mismatch between simulation and data will bias the mass prediction. The relevant systematics include:
- Colour reconnection and underlying event — they shift the measured mass because they alter soft radiation patterns the network may have learned to use
- Jet energy scale — standard, but the network may exploit jet substructure in ways that couple unexpectedly to JES uncertainties
- Generator modelling — training on Pythia and deploying on data generated more like Herwig can introduce shifts
The mitigation strategies mirror what you would do for any ML observable: propagate systematic variations through the trained network, compute the resulting shift in the predicted mass, and include it in your uncertainty budget. Some groups additionally use decorrelation techniques to sculpt the network away from inputs that are poorly modelled, at the cost of some statistical sensitivity. This is a genuine trade-off, not a free lunch.
Validating Before Unblinding
Run the trained network on MC pseudo-experiments across the mass range. Check that the median predicted mass tracks the true input mass linearly and that the pull distribution is well-behaved. Any bias you see here will appear in data too. Closure tests in control regions — where you know what the answer should be — are essential before you look at the signal region.
The core insight of regression top quark mass approaches is simple: give the network the full event and let it learn what matters, rather than deciding in advance which observables to compress.
References
Radovic, A., Williams, M., Rousseau, D., Kagan, M., Bonacorsi, D., Himmel, A., Aurisano, A., Terao, K., & Wongjirad, T. (2018). Machine learning at the energy and intensity frontiers of particle physics. Nature, 560, 41-48.
Want to go deeper?
Machine Learning for High Energy Physics: The Complete Course takes you from first principles to a defensible result in 6 structured modules. $97, 30-day guarantee.
See the course →Not ready yet? Grab Module 1 free →