Patch Hierarchical Attention Transformer for Efficient Particle Jet Tagging

Aaron Wang, Zihan Zhao, Alan Xia, Chang Sun, Abhijith Gandrakota, Jennifer Ngadiuba, Richard Cavanaugh, Javier Duarte

TL;DR

PHAT-JeT is a novel, resource-constrained transformer architecture designed for ultra-low-latency particle jet tagging in the real-time trigger systems of the Large Hadron Collider (LHC). By combining a physics-inspired geometric message-passing module with a hierarchical patch-based attention mechanism, it achieves state-of-the-art accuracy and background rejection within strict microsecond-level hardware budgets.

What Problem Does This Paper Address?

At the Large Hadron Collider (LHC), proton beams collide 40 million times per second, generating an overwhelming data stream of over 1 Petabyte per second. Because storing all this data is impossible, real-time "trigger" systems must decide within microseconds ($\mathcal{O}(10\ \mu\text{s})$) which collision events are worth saving and which to discard.

A central task in this filtering process is jet tagging—identifying the parent particle (such as a top quark or W boson) that produced a collimated spray of subatomic particles called a "jet." While full-scale Transformer models achieve incredible accuracy at this task, their computational cost scales quadratically ($\mathcal{O}(N^2)$) with the number of particles. This makes them far too heavy to run on the dedicated Field-Programmable Gate Arrays (FPGAs) that power real-time triggers. Existing compact models fit the hardware budget but suffer from poor classification performance because they discard fine-grained particle-to-particle interactions.

Methods

The authors introduce the Patch Hierarchical Attention Transformer (PHAT-JeT) to bridge the gap between high accuracy and ultra-low computational complexity. The architecture relies on two core innovations:

  1. Geometric Message Passing (GMP): To inject spatial awareness without expensive graph construction, the GMP module projects particles onto a coarse 2D detector grid based on their angular coordinates $(\eta, \phi)$. It sums the particle features within each grid cell and applies a lightweight depthwise 2D convolution to share context between neighboring regions. These geometry-aware features are then sampled back to the individual particle locations.
  2. Hierarchical Patch-Based Self-Attention: Instead of computing attention across all particles globally, PHAT-JeT partitions the particles into small, fixed-size patches (e.g., size $P=10$). It computes exact, pairwise self-attention only within each patch, dropping the complexity to a near-linear $\mathcal{O}(N \cdot P)$. To restore global context, the model mean-pools each patch into a single "patch token," runs a lightweight global attention pass across these patch tokens, and broadcasts the global context back to the individual particles.
Figure 2: Architecture of PHAT-JeT. (Left) The PHAT block partitions input particles into patches before projection. (Right) The full pipeline includes geometric message passing (GMP) prior to the attention block.

Datasets

The model was trained and evaluated across four distinct jet-tagging benchmarks:

  • HLS4ML LHC Jet Dataset: A 5-class dataset specifically designed to emulate the hardware constraints of the CMS detector's Level-1 trigger.
  • JetClass: A large-scale, highly challenging 10-class dataset containing 100 million simulated jets.
  • Top Tagging: A binary classification dataset focused on distinguishing top quarks from standard quantum chromodynamics (QCD) background jets.
  • Quark–Gluon (QG): A binary dataset used to evaluate out-of-distribution transfer performance by separating quark-initiated jets from gluon-initiated jets.

Key Insights and Ideas

  • Geometry as a Cheap Position Encoder: Standard transformers require explicit positional encodings. For particle physics, PHAT-JeT proves that a simple, coarse grid convolution (GMP) acts as an incredibly cheap yet highly effective geometric prior, capturing the multi-prong energy deposits characteristic of heavy particle decays.
  • Patches as Computational Abstractions: In computer vision, patches represent distinct spatial neighborhoods. In PHAT-JeT, patches are purely a computational tool to bound attention size. The authors discovered that the model is highly robust to how particles are ordered into patches, provided the sorting method (like sorting by transverse momentum, $p_T$) remains consistent between training and testing.
  • The Power of Hierarchical Communication: Splitting the attention mechanism into exact local blocks and a highly compressed global token-passing layer allows the model to retain fine-grained relational physics while staying well within a strict trigger-scale FLOP budget.

Key Results

PHAT-JeT was evaluated against other trigger-feasible baselines, with all models scaled to a strict budget of roughly 1.2–1.5 Million FLOPs:

  • HLS4ML Benchmark: PHAT-JeT achieved 81.80% accuracy and an average background rejection score of 71.6, significantly outperforming the strongest prior FPGA-deployable baseline, JEDI-Linear (81.56% accuracy, 68.7 background rejection).
  • JetClass Benchmark: On this much harder 10-class problem, PHAT-JeT demonstrated a massive performance leap, scoring 65.38% accuracy compared to Linformer (62.64%) and a standard single-layer Transformer (56.18%).
  • Ablation Studies: Removing the global patch-token communication stage caused background rejection to drop by 1–3 points, while removing the GMP module severely weakened background suppression, proving that both components are vital to the model's success.

Limitations and Future Work

While PHAT-JeT is designed from the ground up to be "FPGA-compatible" in terms of parameter count and FLOP efficiency, the authors have not yet performed full end-to-end hardware firmware synthesis (e.g., writing the actual VHDL/Verilog code via hls4ml). Actual deployment and hardware validation on physical FPGAs remain an item for future work. Additionally, because the model relies on a consistent sorting scheme to maintain its patch stability, it is not fully permutation-invariant at deployment time; a mismatch between training and testing particle orderings degrades performance.

Summary updated

BibTeX
@inproceedings{wang2026patch,
  author = {Aaron Wang and Zihan Zhao and Alan Xia and Chang Sun and Abhijith Gandrakota and Jennifer Ngadiuba and Richard Cavanaugh and Javier Duarte},
  title = {{Patch Hierarchical Attention Transformer for Efficient Particle Jet Tagging}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=q2cOojxQAv},
}
Figure