Packet-Window Anomaly Detection at the Edge: Latency and Energy Trade-Offs of a Distilled Transformer
Deploying Transformer-based anomaly detection at the network edge requires jointly configuring input representation and model execution under monitoring and resource constraints. We characterize the encoder–regressor component of a previously defined distilled MiniLM packet-window detector, linking token budget, packet-window stride, and device operating mode to detection quality, scoring capacity, and energy cost. Using 5GAD-2022 and NVIDIA Jetson Nano and Xavier NX, we characterize four token budgets across five device–power-mode configurations through detection metrics, mean inference latency from 14.2 to 466.6 ms, latency distributions, and internal input-rail energy from 0.265 to 2.840 J per evaluated window. The analysis reveals diminishing detection gains as token budget increases while execution cost continues to grow, making representation budget a practical deployment control. Power-mode scaling introduces a platform-dependent trade-off: faster execution increases energy per decision on Nano, whereas Xavier NX provides substantial latency reductions with comparatively small energy changes. We translate these measurements into operating envelopes and configuration-selection criteria that relate model scoring capacity to packet-window stride and monitoring demand. Detection quality supplies a task-specific reference; the separate supervised classification head is outside the execution boundary. The resulting analysis provides a quantitative framework for configuring a Transformer-based anomaly-sensing component within an edge monitoring architecture, identifying how representation and execution choices can be coordinated to satisfy application requirements.
Authors
- Nicola Tonellotto (ORCID: https://orcid.org/0000-0002-7427-1001)
- Alberto Gotta (ORCID: https://orcid.org/0000-0002-8134-7844)
- Giuseppe Soriano
Institutions
- University of Pisa (IT)
- Istituto di Scienza e Tecnologie dell'Informazione "Alessandro Faedo" (IT)
- National Research Council (IT)
Publication Details
- Journal
- Sensors
- Published
- 2026-11-19
- DOI
- https://doi.org/10.3390/s26227306
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00