Triggerless data acquisition pipeline for Machine Learning based statistical anomaly detection

G. Grosso, Nicolò Lai, Matteo Migliorini, J. Pazzini, Andrea Triossi, M. Zanetti, A. Zucchetta

Abstract

This work describes an online processing pipeline designed to identify anomalies in a continuous stream of data collected without external triggers from a particle detector. The processing pipeline begins with a local reconstruction algorithm, employing neural networks on an FPGA as its first stage. Subsequent data preparation and anomaly detection stages are accelerated using GPGPUs. As a practical demonstration of anomaly detection, we have developed a data quality monitoring application using a cosmic muon detector. Its primary objective is to detect deviations from the expected operational conditions of the detector. This serves as a proof-of-concept for a system that can be adapted for use in large particle physics experiments, enabling anomaly detection on datasets with reduced bias.

Introduction

In high-energy physics (HEP), the sheer volume of data generated by detectors necessitates aggressive reduction strategies. Traditionally, hardware-level "triggers" filter events in real-time, keeping only those that match predefined physical signatures. While effective, this approach introduces significant selection bias, potentially discarding rare or unexpected phenomena that do not fit existing models. This paper proposes a "triggerless" pipeline capable of processing raw data streams to identify statistical anomalies without the constraints of traditional triggers, facilitating unbiased discovery and robust detector health monitoring.

Pipeline Architecture

The proposed system utilizes a heterogeneous computing architecture to handle the massive throughput and low-latency requirements of real-time processing.

FPGA-based Local Reconstruction

The first stage involves an FPGA-based algorithm for local signal reconstruction. As raw hits stream from the detector, the FPGA performs initial clustering and solves the "left-right ambiguity" inherent in drift tube detectors. This is achieved using a hybrid method that incorporates neural networks trained with QKeras and implemented via HLS4ML to calculate muon track parameters, such as intercept and slope.

Schematic of the FPGA-based reconstruction algorithm

GPU-Accelerated Data Preparation and Analysis

Reconstructed data is transferred to a server via Direct Memory Access (DMA). To manage high-speed dataframe operations, the pipeline leverages the NVIDIA RAPIDS (cuDF) library on GPGPUs. This stage aggregates individual hits into events and computes high-level features necessary for statistical analysis.

The core anomaly detection is performed by the New Physics Learning Machine (NPLM) algorithm. NPLM compares incoming data batches against a reference sample representing standard detector behavior. By utilizing kernel methods accelerated by the Falkon library, the system calculates a log-likelihood ratio that serves as a test statistic for identifying anomalous data.

Experimental Validation

The pipeline was validated using a cosmic muon telescope at the INFN Legnaro National Laboratory. A reference dataset of approximately $3 \times 10^5$ events was collected under optimal conditions. To simulate malfunctions, the researchers intentionally induced anomalies by reducing cathodic strip voltages and front-end thresholds to 75%, 50%, and 25% of their nominal values.

Key Results

The system demonstrated exceptional performance across several metrics:

  • High Throughput: The GPU-based data preparation stage achieved a throughput exceeding 2 GB/s when processing large batches (millions of hits), proving its capability for high-intensity data streams.
  • Anomaly Detection Sensitivity: The NPLM algorithm successfully distinguished all induced malfunction classes from the reference data. As the severity of the malfunction increased, the test statistic distribution showed a clear and quantitative divergence from the reference distribution.
Distribution of the NPLM test statistic for different anomaly classes
  • Scalability: While training times for the anomaly detection model increase with batch size, they remain within a few seconds for batches of $10^5$ events, supporting near-real-time monitoring applications.

Conclusion and Future Work

This work provides a successful proof-of-concept for a triggerless, ML-based anomaly detection pipeline. By recasting the search for "New Physics" as a Data Quality Monitoring (DQM) task, the authors demonstrated that subtle statistical deviations can be identified in real-time. Future developments will focus on scaling this architecture for large-scale experiments like the CMS at CERN and optimizing data transfer between FPGAs and GPUs using zero-copy models to further reduce latency.

Summary updated

BibTeX
@inproceedings{grosso2024triggerless,
  author = {G. Grosso and Nicolò Lai and Matteo Migliorini and J. Pazzini and Andrea Triossi and M. Zanetti and A. Zucchetta},
  title = {{Triggerless data acquisition pipeline for Machine Learning based statistical anomaly detection}},
  booktitle = {EPJ},
  year = {2024},
  doi = {10.1051/epjconf/202429502033},
}
Figure