The evolution of 5G networks has significantly expanded the attack surface, exposing telecommunication infrastructures to unknown threats and Zero-Day attacks. Traditional Intrusion Detection Systems (IDS) based on supervised Machine Learning exhibit inherent limitations: they rely heavily on exhaustively labeled datasets and struggle to generalize to unseen attack patterns. Furthermore, the static and isolated analysis of individual network flows often fails to capture the coordinated and distributed nature of modern threats. To overcome these challenges, this thesis proposes a novel real-time IDS architecture based on a Self-Supervised Transformer approach. The model is trained exclusively on the statistical features of legitimate 5G traffic (extracted from the 5G-NIDD dataset), learning to model the normal network "grammar" without relying on labels. The core methodological contribution of this work lies in the integration of a Sliding Window mechanism, which endows the Transformer with spatiotemporal awareness via Inter-sample Attention. This study systematically evaluates the system's performance across varying window sizes, analyzing the critical trade-off between the detection accuracy of complex attacks and the detection delay, ultimately ensuring compliance with the stringent low-latency requirements of 5G networks.

L'evoluzione delle reti 5G ha ampliato significativamente la superficie di attacco, rendendo le infrastrutture di telecomunicazione sempre più esposte a minacce ignote e attacchi Zero-Day. I tradizionali IDS basati su Machine Learning supervisionato mostrano limiti intrinseci: dipendono fortemente da dataset rigorosamente etichettati e faticano a generalizzare su pattern di attacco mai visti. Inoltre, l'analisi statica e isolata dei singoli flussi di rete spesso fallisce nel catturare la natura coordinata e distribuita delle minacce moderne. Per superare queste criticità, questa tesi propone un'architettura IDS basata su un approccio Self-Supervised. Il modello viene addestrato esclusivamente su feature statistiche di traffico 5G legittimo (estratto dal dataset 5G-NIDD), imparando a modellarne la normale "grammatica" di rete senza la necessità di etichette. Il contributo metodologico principale del lavoro risiede nell'integrazione di una Sliding Window, che dota il Transformer di consapevolezza spaziotemporale tramite l'attenzione tra i campioni. Il lavoro valuta sistematicamente le prestazioni del sistema al variare della dimensione della finestra, analizzando il delicato compromesso tra l'accuratezza nel rilevamento di attacchi complessi e la latenza di identificazione, al fine di garantire i rigorosi requisiti di reattività imposti dalle reti 5G.

REAL-TIME IDS IN 5G NETWORKS: A SELF-SUPERVISED TRANSFORMER APPROACH BASED ON TEMPORAL WINDOWING

MATARANGOLO, MICHELE
2025/2026

Abstract

The evolution of 5G networks has significantly expanded the attack surface, exposing telecommunication infrastructures to unknown threats and Zero-Day attacks. Traditional Intrusion Detection Systems (IDS) based on supervised Machine Learning exhibit inherent limitations: they rely heavily on exhaustively labeled datasets and struggle to generalize to unseen attack patterns. Furthermore, the static and isolated analysis of individual network flows often fails to capture the coordinated and distributed nature of modern threats. To overcome these challenges, this thesis proposes a novel real-time IDS architecture based on a Self-Supervised Transformer approach. The model is trained exclusively on the statistical features of legitimate 5G traffic (extracted from the 5G-NIDD dataset), learning to model the normal network "grammar" without relying on labels. The core methodological contribution of this work lies in the integration of a Sliding Window mechanism, which endows the Transformer with spatiotemporal awareness via Inter-sample Attention. This study systematically evaluates the system's performance across varying window sizes, analyzing the critical trade-off between the detection accuracy of complex attacks and the detection delay, ultimately ensuring compliance with the stringent low-latency requirements of 5G networks.
2025
REAL-TIME IDS IN 5G NETWORKS: A SELF-SUPERVISED TRANSFORMER APPROACH BASED ON TEMPORAL WINDOWING
L'evoluzione delle reti 5G ha ampliato significativamente la superficie di attacco, rendendo le infrastrutture di telecomunicazione sempre più esposte a minacce ignote e attacchi Zero-Day. I tradizionali IDS basati su Machine Learning supervisionato mostrano limiti intrinseci: dipendono fortemente da dataset rigorosamente etichettati e faticano a generalizzare su pattern di attacco mai visti. Inoltre, l'analisi statica e isolata dei singoli flussi di rete spesso fallisce nel catturare la natura coordinata e distribuita delle minacce moderne. Per superare queste criticità, questa tesi propone un'architettura IDS basata su un approccio Self-Supervised. Il modello viene addestrato esclusivamente su feature statistiche di traffico 5G legittimo (estratto dal dataset 5G-NIDD), imparando a modellarne la normale "grammatica" di rete senza la necessità di etichette. Il contributo metodologico principale del lavoro risiede nell'integrazione di una Sliding Window, che dota il Transformer di consapevolezza spaziotemporale tramite l'attenzione tra i campioni. Il lavoro valuta sistematicamente le prestazioni del sistema al variare della dimensione della finestra, analizzando il delicato compromesso tra l'accuratezza nel rilevamento di attacchi complessi e la latenza di identificazione, al fine di garantire i rigorosi requisiti di reattività imposti dalle reti 5G.
5G
Self-Supervised L.
Transformer
File in questo prodotto:
File Dimensione Formato  
Tesi Matarangolo.pdf

File consultabile da postazioni biblioteca

Descrizione: Implementation of a Self-Supervised Transformer pipeline for Real-Time Anomaly Detection in 5G Networks based on Temporal Windowing. Master's Thesis @ Politecnico di Bari.
Dimensione 4.77 MB
Formato Adobe PDF
4.77 MB Adobe PDF

I documenti in UNITESI 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/20.500.14253/110809