5G Core Signalling Fault Diagnosis
Faults are injected into a lab 5G core and the signalling is captured; a fine-tuned vision-language model reads the event table and sequence diagram and names the failed stage, the first abnormal frame and the cause code.
Sole designer and experimenter, coded with AI assistance
- free5GC
- UERANSIM
- Qwen2.5-VL-3B
- LLaMA-Factory QLoRA
- BM25 + vector retrieval
- LangGraph
- FastAPI
- React
- Docker Compose
- Colab
Background
When a 5G device fails to register or set up a session, someone has to find which of dozens of NAS / NGAP messages between the AMF, SMF and UE went wrong, which frame it was and what the cause code means, then explain it against the 3GPP specifications. This is usually done by reading captures by hand. Handing it to a model runs into data first: public datasets have no fault samples with ground truth.
What the system does
- Upload the events.csv of one procedure and replay the diagnosis: failed stage, first abnormal frame, cause code and the cited 3GPP clauses
- IMSI / SUPI are masked on upload
- Without a model endpoint it falls back to rule mode and still returns a result
My work
- Data: injected 14 kinds of configuration fault into a free5GC v4.3.0 + UERANSIM lab network and captured the signalling of 57 separate runs. Labels come from what was injected and where the procedure stopped, not from a model. Each run is rendered as 3 evidence views (N2 only, event table only, full), and the training runs get 3 extra plot styles so the model cannot memorise the drawing.
- Retrieval: split TS 23.502 and TS 24.501 (V18.14.0) into 17,741 chunks, with BM25 plus multilingual-e5-small vectors.
- Fine-tuning: QLoRA on Qwen2.5-VL-3B with LLaMA-Factory (4-bit, LoRA rank 16) on a Colab L4; a 7B run on an A100 as a comparison.
- Application: FastAPI, a LangGraph agent and a React front end, deployed with Docker Compose.
- Evaluation protocol: 180 held-out samples: 108 regular test, 24 from an unseen fault family and 48 from blind fault families. The 4 blind families were labelled only after the rules were frozen, the closest thing to real generalisation here.
Problems and fixes
The rule baseline had seen the answers. The rules were written after looking at the first 10 fault families and score close to perfect on them, so they only serve as a ceiling. Four new families were added and labelled after the rules were frozen, and all three systems are compared on those.
The model invents a cause when evidence is thin. Giving a specific cause without supporting evidence is counted and tracked as its own metric.
Results
- On the blind families, key frame correct: fine-tuned 3B with retrieval 40/48, frozen rules 24/48, base 3B 20/48; failed stage 36/48 against 24/48 for the rules.
- Across all 180 held-out samples the key frame rose from 88 to 153 correct; among the 96 evidence-poor samples, unsupported causes fell from 27 to 2.
- All of this is a single training run with no extra seeds, so small gaps prove nothing.
Retrospective
- Training covers only 27 runs, which is still small; more fault families and more seeds come next.
- Vector retrieval on root-cause descriptions written in Chinese is weak, and the retrieval layer needs work.
- The data comes from a lab network, not an operator network.