Neural Architecture Codesign for Fast Physics Applications
Jason Weitz, Dmitri Demler, Luke McDermott, Nhan Tran, Javier Duarte
TL;DR
This work introduces Neural Architecture Codesign (NAC), a two-stage, hardware-aware framework that extends neural architecture search to optimize both accuracy and FPGA-friendly efficiency for physics tasks. By coupling a global search with a local search that includes training optimization and aggressive compression, NAC identifies architectures that balance performance with hardware constraints and then synthesizes them into FPGA implementations via hls4ml. The authors demonstrate the approach on two case studies—Bragg peak finding in materials science and jet tagging in high-energy physics—achieving significant reductions in bit operations and resource usage while preserving or improving accuracy, and delivering very low-latency FPGA deployments. The framework emphasizes modular search spaces, Pareto-based optimization, and open-source tooling to enable broad applicability across domains with limited ML expertise.
Abstract
We develop a pipeline to streamline neural architecture codesign for physics applications to reduce the need for ML expertise when designing models for novel tasks. Our method employs neural architecture search and network compression in a two-stage approach to discover hardware efficient models. This approach consists of a global search stage that explores a wide range of architectures while considering hardware constraints, followed by a local search stage that fine-tunes and compresses the most promising candidates. We exceed performance on various tasks and show further speedup through model compression techniques such as quantization-aware-training and neural network pruning. We synthesize the optimal models to high level synthesis code for FPGA deployment with the hls4ml library. Additionally, our hierarchical search space provides greater flexibility in optimization, which can easily extend to other tasks and domains. We demonstrate this with two case studies: Bragg peak finding in materials science and jet classification in high energy physics, achieving models with improved accuracy, smaller latencies, or reduced resource utilization relative to the baseline models.
