Abstract
Transformers are very effective in capturing both global and local correlations within high-energy particle collisions, but they present deployment challenges in high-data-throughput environments, such as the CERN LHC. The quadratic complexity of transformer models demands substantial resources and increases latency during inference. In order to address these issues, we introduce the Spatially Aware Linear Transformer (SAL-T), a physics-inspired enhancement of the linformer architecture that maintains linear attention. Our method incorporates spatially aware partitioning of particles based on kinematic features, thereby computing attention between regions of physical significance. Additionally, we employ convolutional layers to capture local correlations, informed by insights from jet physics. In addition to outperforming the standard linformer in jet classification tasks, SAL-T also achieves classification results comparable to full-attention transformers, while using considerably fewer resources with lower latency during inference. Experiments on a generic point cloud classification dataset (ModelNet10) further confirm this trend.
Introduction: The Challenge of Real-Time Jet Tagging
At the CERN Large Hadron Collider (LHC), proton collisions occur at a rate of 40 million times per second, generating a data volume that exceeds storage capacities. To manage this, physicists employ a "trigger" system—a real-time filter that must decide within microseconds which events to preserve. A critical task for this system is "jet tagging," the identification of the origin of particle showers.
While attention-based Transformers are the gold standard for accuracy in these tasks, their computational cost grows quadratically ($O(n^2)$) with the number of particles. This scaling makes them prohibitively slow for the low-latency trigger environment. Previous attempts to utilize Linear Transformers, such as the Linformer, reduced computational complexity but often lost the spatial intuition necessary to interpret the geometry of a particle jet. SAL-T addresses this gap by integrating physics-aware components into a linear-complexity architecture.
The SAL-T Methodology
SAL-T builds upon the Linformer architecture, introducing three key enhancements to restore spatial context while maintaining efficiency.
Locality-Aware Sorting and Partitioning
Standard Transformers are often permutation invariant, but in hardware-constrained environments, input order can be leveraged. SAL-T sorts particles using the $k_T$ metric, which accounts for both momentum ($p_T$) and angular distance. This ensures that particles physically near each other in the detector are adjacent in the input sequence.
Following sorting, the model employs Spatially Aware Partitioning. The particle sequence is divided into $p$ groups, and each attention head is restricted to attending only to its specific spatial partition. This strategy enforces locality and reduces complexity from $O(n^2)$ to $O(np)$.
The LPP-MHA Module
At the core of SAL-T is the Linear Partitioned Particle Multi-Head Attention (LPP-MHA) module. To capture interactions between immediate neighbors without reintroducing quadratic costs, the architecture applies depthwise 2D convolutions directly to the attention logits. This allows the model to "smooth" the boundaries between partitions and capture fine-grained local correlations.
Experimental Evaluation
Physics Benchmarks
The model was evaluated on several high-energy physics datasets, including the hls4ml jet classification dataset (5-class), as well as Top Tagging and Quark-Gluon datasets. On the hls4ml benchmark, SAL-T achieved an accuracy of 81.18%, nearly matching the full-attention Transformer's 81.27% and significantly outperforming the standard Linformer (79.90%).
Hardware Efficiency and Generalizability
SAL-T demonstrates substantial improvements in resource utilization, reducing peak GPU memory usage by over 14x compared to standard Transformers (303 MB vs 4,357 MB). Furthermore, as the number of particles increases, SAL-T's computational cost grows linearly, avoiding the quadratic explosion of traditional models.
To test generalizability, the model was applied to the ModelNet10 3D point cloud dataset. SAL-T outperformed the standard Linformer by over 2% in accuracy, confirming that its spatial awareness is beneficial for general geometric tasks beyond particle physics.
Conclusion and Future Directions
SAL-T represents a significant step toward deploying high-performance Transformers in real-time physics environments. By combining linear attention with spatial partitioning and convolutions, it achieves a balance of accuracy and efficiency. Future work will explore adaptive partitioning strategies and the translation of the model into hardware description language (HDL) for FPGA implementation in the LHC's Level-1 trigger systems.
Summary updated