Is Tokenization Needed for Masked Particle Modelling?

Matthew Leigh, Samuel Klein, Francois Charton, Tobias Golling, Lukas Heinrich, Michael Kagan, Margarita Osadchy · DOI

Abstract

Masked Particle Modelling (MPM) is a self-supervised learning technique for high-energy physics. This work introduces MPMv2, which improves upon the original framework by adopting a Transformer-based decoder and exploring continuous generative reconstruction methods such as Conditional Flow-Matching (CFM). By eliminating the need for discrete tokenization and optimizing the architecture, MPMv2 achieves significant performance gains in jet classification and tracking tasks, demonstrating that powerful decoders can effectively model continuous particle data directly.

Introduction

In high-energy physics (HEP), "foundation models" are increasingly sought after to process the massive amounts of unlabeled data generated by particle accelerators. These models, pre-trained on large datasets, can be fine-tuned for specific tasks like jet classification. However, particle data presents unique challenges: unlike the structured grids of images or sequences of text, a jet is an unordered set of particles defined by continuous variables such as momentum and energy.

Previous iterations, such as MPMv1, attempted to map this data into a discrete "language" format using Vector Quantized Variational Autoencoders (VQVAE) to create tokens. This process is computationally expensive, lossy, and often unstable. This paper investigates whether such tokenization is necessary or if physics can be modeled more directly through continuous reconstruction.

Methods: From MPMv1 to MPMv2

The researchers introduced MPMv2, which incorporates several architectural shifts to improve efficiency and performance.

Comparison of MPMv1 and MPMv2 architectures. MPMv2 adopts a "drop" strategy for masked particles and replaces the MLP decoder with a Transformer.

Key changes include:

  1. MAE-style Encoding: Following the Masked Autoencoder (MAE) strategy, MPMv2 drops masked particles entirely during the encoding phase, reintroducing them only at the decoder. This optimization reduced GPU memory usage by approximately 40%.
  2. Transformer Decoders: The basic Multi-Layer Perceptron (MLP) decoder was replaced with a full Transformer decoder, enabling the model to capture complex inter-particle relationships during reconstruction.
  3. Continuous Reconstruction: The model moved away from predicting discrete token IDs. Instead, it utilizes continuous methods such as Direct Regression, Conditional Normalizing Flows (CNF), and Conditional Flow-Matching (CFM). A novel Set-to-set Flow-Matching (SSFM) approach was also introduced to generate entire sets of missing particles simultaneously.

Key Insights

A primary finding is that architecture trumps tokenization. The transition to a Transformer decoder provided the most significant performance boost. Once the architecture was sufficiently expressive, the specific reconstruction method (discrete tokens vs. continuous regression) became less critical.

Furthermore, generative methods like Flow-Matching were found to avoid the "mean-seeking" trap of simple regression. While regression tends to predict the average particle—which may be unphysical—generative models learn the full probability distribution, allowing for the reconstruction of realistic and diverse particle sets.

Results and Performance

MPMv2 demonstrated substantial improvements over its predecessor. On the JetClass classification task, accuracy rose from ~49% in MPMv1 to over 83% in the fully optimized MPMv2.

Accuracy vs. number of training samples for various reconstruction methods. Pre-training provides a massive boost in data efficiency compared to training from scratch.

The model also showed exceptional data efficiency. As shown in the performance curves, a pre-trained MPMv2 model using only 10,000 jets can match the performance of a randomly initialized model trained on 1,000,000 jets. In secondary vertex finding tasks, continuous generative methods (CNF/CFM) significantly outperformed baselines, indicating that the model successfully learned deep structural features of the jets.

Conclusion

The results suggest that costly VQVAE tokenization is optional for masked particle modelling. Simpler discretization methods or continuous generative approaches like Flow-Matching perform equally well or better while being easier to implement. Future work will focus on scaling these models further and exploring their potential for generating synthetic physics data directly, reducing the current dependency on Monte Carlo simulations.

Summary updated

BibTeX
@article{leigh2025is,
  author = {Matthew Leigh and Samuel Klein and Francois Charton and Tobias Golling and Lukas Heinrich and Michael Kagan and Margarita Osadchy},
  title = {{Is Tokenization Needed for Masked Particle Modelling?}},
  journal = {Mach. Learn. Sci. Technol.},
  year = {2025},
  doi = {10.1088/2632-2153/addb98},
}
Figure