Automatic heterogeneous quantization of deep neural networks for low-latency inference on the edge for particle detectors
Claudionor N. Coelho, Aki Kuusela, Shan Li, Hao Zhuang, Thea Aarrestad, Vladimir Loncar, Jennifer Ngadiuba, Maurizio Pierini, Adrian Alan Pol, Sioni Summers
TL;DR
The paper addresses the challenge of deploying ultra-low-latency deep learning on resource-constrained FPGA hardware for particle detectors by proposing automatic heterogeneous quantization at the per-layer and per-parameter level. It introduces QKeras for quantization-aware training, AutoQKeras for hardware-aware automatic quantization with an energy/bit-size objective and a forgiving factor, and QTools for energy estimation, all integrated with hls4ml to produce on-chip firmware. The approach achieves substantial resource reductions (up to ~50×) with minimal accuracy loss, and demonstrates nanosecond-scale inference suitable for LHC trigger systems, highlighting practical impact for edge AI in physics experiments. The work also outlines paths for broader applicability and future energy modeling enhancements, including cross-hardware integration and more precise device-specific estimates.
Abstract
Although the quest for more accurate solutions is pushing deep learning research towards larger and more complex algorithms, edge devices demand efficient inference and therefore reduction in model size, latency and energy consumption. One technique to limit model size is quantization, which implies using fewer bits to represent weights and biases. Such an approach usually results in a decline in performance. Here, we introduce a method for designing optimally heterogeneously quantized versions of deep neural network models for minimum-energy, high-accuracy, nanosecond inference and fully automated deployment on chip. With a per-layer, per-parameter type automatic quantization procedure, sampling from a wide range of quantizers, model energy consumption and size are minimized while high accuracy is maintained. This is crucial for the event selection procedure in proton-proton collisions at the CERN Large Hadron Collider, where resources are strictly limited and a latency of ${\mathcal O}(1)~μ$s is required. Nanosecond inference and a resource consumption reduced by a factor of 50 when implemented on field-programmable gate array hardware are achieved.
