GPU-Accelerated Machine Learning Inference as a Service for Computing in Neutrino Experiments

Michael Wang, Tingjun Yang, Maria Acosta Flechas, Philip C. Harris, Benjamin Hawks, Burt Holzman, Kyle Knoepfel, Jeffrey D. Krupa, Kevin Pedro, Nhan Tran

TL;DR

Deep neural networks have become essential for neutrino event reconstruction, but running them on traditional CPU-only grid computing creates massive bottlenecks. This paper demonstrates SONIC (Services for Optimized Network Inference on Coprocessors), offloading neural network inference from CPU grid nodes to remote GPU clusters via a microservice architecture. By decoupling computing resources, the authors accelerate ProtoDUNE-SP hit classification by $17\times$, slashing total event reconstruction time by a factor of $2.7$ while requiring only 1 GPU per 68 CPU threads.

What Problem Does This Paper Address?

Next-generation particle physics detectors, such as the Liquid Argon Time Projection Chambers (LArTPCs) used in the Deep Underground Neutrino Experiment (DUNE) and its prototype ProtoDUNE-SP, generate vast data streams—continuous uncompressed readout for a single DUNE module approaches 1.5 TB/s.

Extracting physics from these high-resolution "images" increasingly relies on computer vision and convolutional neural networks (CNNs). However, in ProtoDUNE-SP’s offline reconstruction pipeline, a single CNN module (EmTrackMichelId) classifying reconstructed wire hits consumed 65% of the total CPU wall time. Direct 1:1 hardware pairing (placing a dedicated GPU inside every CPU compute node) is economically prohibitive and architecturally inflexible for high-throughput computing grids.

Methods

The authors deployed SONIC, a client–server heterogeneous computing model providing Machine Learning Inference as a Service (GPUaaS):

  • Client Integration: Implemented a new interface (tRTisModelInterface) within Fermilab’s shared C++ neutrino software framework (LArSoft). Instead of executing inference locally via standard TensorFlow C++ APIs, the CPU client formats input patches and sends synchronous, blocking Remote Procedure Calls (gRPC) over TCP/IP.
  • Server Setup: Deployed Nvidia Triton Inference Server instances managed by Google Kubernetes Engine (GKE) using Nvidia T4 GPUs.
  • Dynamic Batching: Triton combines requests arriving from multiple simultaneous, independent CPU worker jobs into optimal batch sizes (up to ~5,358 images) before launching GPU kernel execution, hiding network latencies and maximizing accelerator throughput.
[ Worker CPU Nodes (LArSoft) ] 
              │
         gRPC │ (TCP/IP)
              ▼
   [ GKE Load Balancer ]
              │
    [ Triton GPU Server ] (Dynamic Batching -> Inference)

Datasets

The study evaluated realistic ProtoDUNE-SP detector workloads:

  • Monte Carlo Simulation: Simulated cosmic ray events generated with the CORSIKA generator, integrated with radiological background models ($^{39}\text{Ar}$, $^{42}\text{Ar}$, $^{222}\text{Rn}$, and $^{85}\text{Kr}$) via LArSoft's RadioGen.
  • Data Scale: Each event covers a 3 ms readout window across 15,360 electronic channels, generating roughly 55,000 distinct $48 \times 48$ pixel hit patches that require neural network classification per event.

Key Insights and Ideas

  • Asymmetric Resource Balancing: Individual CPU workers cannot generate requests fast enough to keep a GPU busy, but attaching a dedicated GPU per CPU core is wasteful. Decoupling them as a web service enables an optimal consolidation ratio—specifically 68 CPU worker processes per single GPU.
  • Non-Disruptive Framework Adaptation: Rather than re-architecting legacy particle physics experiment code for multithreaded heterogeneous computing, SONIC treats the GPU as a remote service, abstracting framework dependencies away from client worker nodes.
  • Batch Size Trade-offs: Packing hits into larger client batches (1,693 vs. 235) significantly reduces round-trip request overhead ($t_{\text{travel}}$ drop from $2.6\text{ s}$ to $0.38\text{ s}$ per event), postponing GPU server saturation from 190 to 270 simultaneous jobs on a 4-GPU cluster.

Key Results

  • Module Acceleration: The inference and classification time for EmTrackMichelId fell from 220 seconds on CPU down to 13 seconds with GPUaaS—a $17\times$ speedup.
  • Overall Reconstruction Speedup: Total reconstruction wall time per event dropped from 330 seconds to 123 seconds, representing an overall $2.7\times$ speedup for the end-to-end processing pipeline.
  • Throughput: A 4-GPU server reached a saturated throughput of approximately 122,000–126,000 inferences per second (~31,000 inferences/sec/GPU), maintaining peak utilization near 60%.
Pipeline Stage CPU Baseline (s) CPU + GPUaaS (s) Speedup
ML Module 220 13 $17\times$
Non-ML Modules 110 110 $1\times$
Total Wall Time 330 123 $2.7\times$

Limitations and Future Work

  • Blocking Communication: The client currently executes synchronous RPC calls, idling the CPU during network transfer. Introducing asynchronous, task-based multithreading in LArSoft would reclaim this CPU idle time.
  • Cloud Infrastructure Volatility: The authors noted 30%–40% throughput variability in commercial cloud GPU instances due to black-box resource scheduling and shared network ingress constraints.
  • Precision and Pruning: Current models use unoptimized 32-bit floating point (FP32). Reduced-precision quantization (INT8/FP16) or quantization-aware training (e.g., QKeras, Brevitas) could yield further hardware efficiency.
  • Scaling and Deployment: Future efforts will focus on scaling from 400 simultaneous jobs to full-scale production (1,000–2,000 workers) and deploying locally hosted GPU servers in lab/university data centers and HPC facilities.

Summary updated

BibTeX
@inproceedings{wang2020gpu,
  author = {Michael Wang and Tingjun Yang and Maria Acosta Flechas and Philip C. Harris and Benjamin Hawks and Burt Holzman and Kyle Knoepfel and Jeffrey D. Krupa and Kevin Pedro and Nhan Tran},
  title = {{GPU-Accelerated Machine Learning Inference as a Service for Computing in Neutrino Experiments}},
  booktitle = {Frontiers Big Data},
  year = {2020},
  url = {https://openreview.net/forum?id=jfK4pHPEyc},
}

Loading related content...

Figure