Autoencoders on field-programmable gate arrays for real-time, unsupervised new physics detection at 40 MHz at the Large Hadron Collider

Ekaterina Govorkova, Ema Puljak, Thea Aarrestad, Thomas James, Vladimir Loncar, Maurizio Pierini, Adrian Alan Pol, Nicolò Ghielmetti, Maksymilian Graczyk, Sioni Summers, Jennifer Ngadiuba, Thong Q. Nguyen, Javier M. Duarte, Zhenbin WuNat. Mach. Intell 2022 · DOI

Abstract

The Large Hadron Collider (LHC) produces data at a rate of 40 MHz, necessitating real-time filtering via the Level-1 Trigger (L1T). Traditional triggers are supervised and theory-biased, potentially discarding novel physics. This work explores the deployment of unsupervised deep learning autoencoders on FPGAs to detect anomalies in real-time. By leveraging model compression and quantization-aware training, these models achieve latencies as low as 80 ns while maintaining high detection efficiency for various new physics benchmarks.

Introduction

The LHC generates hundreds of terabytes of data per second. The L1T, implemented on FPGAs, must decide within 1 $\mu$s which events to keep. While current triggers look for specific predicted particles, an unsupervised approach—flagging any "weird" event—could uncover unexpected phenomena like dark matter. The primary challenge is implementing complex neural networks within the strict latency and resource constraints of FPGA hardware.

Methodology

The researchers evaluated two primary architectures: Fully Connected Deep Neural Networks (DNNs) and Convolutional Neural Networks (CNNs). Both were implemented as Autoencoders (AEs) and Variational Autoencoders (VAEs). These models learn to compress and reconstruct "background" proton-proton collision data; high reconstruction error or anomalous latent space representations serve as anomaly scores.

To meet hardware constraints, several techniques were employed:

  • hls4ml: A library that translates neural networks into FPGA firmware.
  • Model Compression: 50% pruning of weights to reduce resource usage.
  • Quantization-Aware Training (QAT): Using QKeras to train models with low-precision fixed-point arithmetic (e.g., 4-bit to 16-bit) without sacrificing accuracy.
  • Latent Space Inference: For VAEs, the Kullback-Leibler divergence ($D_{KL}$) in the latent space was used as a score, allowing the decoder to be omitted during inference to save significant hardware resources.
Architecture diagrams for the DNN (top) and CNN (bottom) models, showing layers and data flow.

Results and Performance

The models were tested against four benchmark signal models: Leptoquarks ($LQ \to b\tau$), Neutral Scalar Bosons ($A \to 4\ell$), Scalar Bosons ($h^0 \to \tau\tau$), and Charged Scalar Bosons ($h^\pm \to \tau\nu$).

Key findings include:

  • Latency and Resources: The DNN VAE achieved a latency of 80 ns and used less than 3% of the FPGA's logic resources. In contrast, the CNN AE had a higher latency of 1480 ns, exceeding the L1T budget.
  • Quantization Robustness: Performance remained stable down to 8-bit precision. As shown in Figure 4, the True Positive Rate (TPR) relative to the baseline is maintained across various bit widths, with 8-bit identified as the optimal balance for hardware efficiency.
  • Detection Efficiency: The models demonstrated the ability to enhance new physics signatures by up to three orders of magnitude compared to standard selection methods.
Summary of performance metrics (TPR and AUC) and the impact of quantization on detection efficiency across different signal models.

Conclusion

This research demonstrates that unsupervised anomaly detection is viable for the LHC's L1T. While DNN-based VAEs are currently the most practical due to their low resource footprint and latency, future work will focus on optimizing CNNs and using techniques like knowledge distillation to further enhance real-time discovery potential at 40 MHz.

Summary updated

BibTeX
@article{govorkova2022autoencoders,
  author = {Ekaterina Govorkova and Ema Puljak and Thea Aarrestad and Thomas James and Vladimir Loncar and Maurizio Pierini and Adrian Alan Pol and Nicolò Ghielmetti and Maksymilian Graczyk and Sioni Summers and Jennifer Ngadiuba and Thong Q. Nguyen and Javier M. Duarte and Zhenbin Wu},
  title = {{Autoencoders on field-programmable gate arrays for real-time, unsupervised new physics detection at 40 MHz at the Large Hadron Collider}},
  journal = {Nat. Mach. Intell.},
  year = {2022},
  doi = {10.1038/s42256-022-00441-3},
}
Figure