5G Radio Access Networks (RANs) are increasingly populated with heterogeneous devices that generate high-rate traffic streams, demanding security functions that operate close to the traffic source under strict latency and privacy constraints. However, most Network Intrusion Detection Systems (NIDSs) rely on centralized training and architectures such as CNN-based or shallow neural models, which (i) introduce bandwidth and latency overhead due to traffic aggregation, and (ii) struggle to capture long-range dependencies in attack patterns that unfold across multiple packets or flows. To address these issues, this paper proposes a packet-level Federated Learning framework for decentralized NIDS in 5G RANs, where network flows are modeled as sequences of packet tokens and processed using a Transformerbased architecture. The framework enables gNB-level collaborative training via FedAvg without sharing raw traffic, and supports real-time operation through an incremental Key-Value (KV) cache mechanism that reduces the computational cost of updating flow classifications as packets arrive. Experiments in an Industrial Internet of Things scenario exploiting the Edge-IIoTset dataset show that the transformer keeps an accuracy of about 94% across long packet sequences, consistently outperforming a CNN baseline. Federated training preserves most of the centralized performance while eliminating raw-traffic transfer, and KVcached inference achieves ≈ 1 ms per-packet latency (up to 90× speedup over standard self-attention), compatible with edge-level deployment in 5G RAN environments.

Federated Intrusion Detection with Key-Value Cached Transformers in 5G RANs

Andriolli, Nicola
2026-01-01

Abstract

5G Radio Access Networks (RANs) are increasingly populated with heterogeneous devices that generate high-rate traffic streams, demanding security functions that operate close to the traffic source under strict latency and privacy constraints. However, most Network Intrusion Detection Systems (NIDSs) rely on centralized training and architectures such as CNN-based or shallow neural models, which (i) introduce bandwidth and latency overhead due to traffic aggregation, and (ii) struggle to capture long-range dependencies in attack patterns that unfold across multiple packets or flows. To address these issues, this paper proposes a packet-level Federated Learning framework for decentralized NIDS in 5G RANs, where network flows are modeled as sequences of packet tokens and processed using a Transformerbased architecture. The framework enables gNB-level collaborative training via FedAvg without sharing raw traffic, and supports real-time operation through an incremental Key-Value (KV) cache mechanism that reduces the computational cost of updating flow classifications as packets arrive. Experiments in an Industrial Internet of Things scenario exploiting the Edge-IIoTset dataset show that the transformer keeps an accuracy of about 94% across long packet sequences, consistently outperforming a CNN baseline. Federated training preserves most of the centralized performance while eliminating raw-traffic transfer, and KVcached inference achieves ≈ 1 ms per-packet latency (up to 90× speedup over standard self-attention), compatible with edge-level deployment in 5G RAN environments.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11568/1377868
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact