Reliable edge machine learning hardware for scientific applications

Tommaso Baldi, Javier Campos, Benjamin Hawks, Jennifer Ngadiuba, Nhan Tran, Daniel Diaz, Javier M. Duarte, Ryan Kastner, Andres Meza, Melissa Quinnan, Olivia Weng, Caleb Geniesse, Amir Gholami, Michael W. Mahoney, Vladimir Loncar, Philip C. Harris, Joshua Agar, Shuyu Qin

Introduction

Modern scientific experiments, particularly in high-energy physics and materials science, operate at scales that push the boundaries of conventional computing. Instruments like the Large Hadron Collider (LHC) generate data at rates exceeding tens of terabytes per second. To manage this deluge, researchers are increasingly turning to "extreme edge" machine learning (ML)—deploying models directly onto sensors and triggers using Field-Programmable Gate Arrays (FPGAs) and Application-Specific Integrated Circuits (ASICs). This paper outlines a co-design methodology for developing ML hardware that is not only ultra-fast but also resilient to the harsh, radiation-heavy environments typical of scientific facilities.

The Challenge of Extreme Edge Science

The primary hurdle for scientific ML is the sheer scale of data production. For instance, the High-Granularity Calorimeter (HGCAL) upgrade at CERN requires processing data from millions of channels every 25 nanoseconds. This creates a unique set of constraints:

  1. Latency and Throughput: Models must execute in nanoseconds to keep up with the 40 MHz collision rate.
  2. Radiation Hardness: High-radiation environments cause Single Event Effects (SEEs), such as bit-flips in memory, which can lead to catastrophic model failure.
  3. Hardware-Software Gap: Traditional ML frameworks operate on high-precision floating-point numbers, whereas edge hardware requires low-precision fixed-point arithmetic.
Comparison of data rates and computation times across various scientific benchmark tasks, highlighting the extreme requirements of LHC sensors and triggers.

As shown in the figure above, scientific tasks like LHC triggers and sensor readouts occupy a unique corner of the design space, requiring both extremely high data rates and minimal computation time compared to consumer IoT or mobile devices.

Methodology: A Co-Design Workflow

To bridge the gap between high-level ML design and low-level hardware implementation, the researchers developed a comprehensive workflow centered on several key tools:

  • hls4ml: This compiler translates neural networks into hardware description languages. It provides a "bit-accurate" C++ representation, allowing physicists to simulate hardware behavior within their standard software frameworks (like CMSSW) before fabrication.
  • Quantization-Aware Training (QAT): Using tools like QKeras, models are trained with reduced bit-precision (e.g., 4-bit or 6-bit integers). This significantly reduces the area and power consumption of the resulting ASIC.
  • Fault-Injection (FKeras): By simulating bit-flips during the design phase, researchers can identify which specific weights or neurons are most sensitive to radiation-induced errors.

Key Insights: Reliability and Landscape Analysis

One of the most significant findings is the "6% Rule" for fault tolerance. In the ECON-T ASIC encoder model, the researchers discovered that only approximately 6% of the weight bits were highly sensitive to faults. This insight allows for selective hardening—protecting only the most critical components—rather than triplicating the entire circuit, which would be prohibitively expensive in terms of chip area.

Furthermore, the study utilized loss landscape analysis to understand the relationship between quantization and model stability. By visualizing the mathematical "terrain" the model navigates, the authors demonstrated how precision affects the smoothness of the solution space.

Loss landscape visualizations at varying bit-precisions. Lower precision (e.g., 2-bit) results in a jagged, unstable terrain, while higher precision (4-bit to 8-bit) yields smoother, more robust landscapes.

As illustrated in the surface plots, 2-bit models exhibit highly irregular landscapes, explaining their susceptibility to noise and bit-flips. In contrast, 4-bit and 6-bit models provide a "smoother" terrain, which correlates with better generalization and reliability.

Results and Future Directions

The evaluation focused on the ECON-T ASIC, designed for CERN's HGCAL. The resulting two-layer neural network encoder successfully met the 25 ns inference budget within a compact 4 mm² area. Additionally, the application of Jacobian Regularization during training improved resilience to sensor noise by smoothing decision boundaries.

While these results are promising, future work aims to explore the interplay between model pruning and fault tolerance. The ultimate goal is to automate the design space optimization, enabling AI tools to balance the complex trade-offs between performance, power efficiency, and radiation hardness for the next generation of scientific instruments and space-based sensors.

Summary updated

BibTeX
@inproceedings{baldi2024reliable,
  author = {Tommaso Baldi and Javier Campos and Benjamin Hawks and Jennifer Ngadiuba and Nhan Tran and Daniel Diaz and Javier M. Duarte and Ryan Kastner and Andres Meza and Melissa Quinnan and Olivia Weng and Caleb Geniesse and Amir Gholami and Michael W. Mahoney and Vladimir Loncar and Philip C. Harris and Joshua Agar and Shuyu Qin},
  title = {{Reliable edge machine learning hardware for scientific applications}},
  booktitle = {VTS},
  year = {2024},
  doi = {10.1109/vts60656.2024.10538639},
}
Figure