Machine Learning for Communication Networks
5G RAN · O-RAN RIC · Attack detection · Synthetic data
NetSim is a system-level simulator for generating data and training AI/ML algorithms, and for closing the loop between a learning agent and a live network model. Interface your Python or RIC algorithm, run the simulation, and measure how it changes network performance.
How NetSim fits an ML workflow
Use the simulator as a data source, as a training environment, or as a test bench for control algorithms.
Generate synthetic data
Produce labelled training data at low cost and vast scale, written to CSV and ready for your pipeline.
Close the loop with RL
Exchange state, action, and reward with a Python agent each step, so the network responds to the algorithm in real time.
Verify RIC algorithms
Test Non-Real-Time, Near-Real-Time, and Real-Time control loops against a RAN model, equivalent to the O-RAN E2 interface.
Own the source
Protocol algorithms in C, RL in Python through Gymnasium. Modify the provided source to test your own ideas.
AI/ML in the 5G RAN
NetSim is a system-level simulator for generating data and training AI/ML algorithms across a wide range of RAN problems.
RAN use cases
Traffic steering, load balancing, throughput scaling, MAC scheduling, link adaptation, power control, beamforming, and interference mitigation.
Digital twin and RIC
Build a 5G network digital twin and verify RAN Intelligent Controller algorithms. NetSim simulates the RAN from your r-app or x-app control inputs, the O-RAN E2 equivalent.
Network slicing
In-built online learning for dynamic PRB sharing, using constrained optimisation with Lagrange multipliers. Check whether the network meets UE-level and slice-level SLAs.
Reinforcement learning
Connect NetSim to a Python RL algorithm through Gymnasium, with Q-learning, DQN, A2C, PPO, and more.
The reinforcement-learning loop
NetSim and your algorithm exchange information every step, so you can see how the policy improves network performance.
State
NetSim passes the state: UE measurements, network measurements, and UE context.
Action
The RL algorithm returns an action, such as a handover or a power-control decision.
Reward + next state
NetSim simulates the action and returns the reward (throughput, latency, and other KPIs) and the next state.
Worked RAN examples
Reference projects, with documentation, that apply learning to concrete RAN control problems.
Downlink power control
Multi-gNB downlink power control to maximise sum throughput, solved with reinforcement learning.
Detailed PDF →Load balancing
A framework for algorithm development against the 3GPP Release 17 AI/ML for NG-RAN load balancing use case.
Detailed article →Delay-constrained scheduling
Scheduling for delay-constrained throughput maximisation in 5G NR, using reinforcement learning.
Detailed PDF →AI/ML for attack detection
Generate attack and normal traffic in NetSim, extract features, and train classifiers to tell them apart.
Rank attacks in an RPL-based IoT network
- RPL implemented per RFC 6550, with DODAG formation and rank calculations
- Attack scenarios with 2 to 15 malicious nodes across networks of 6 to 42 nodes
- Features from packet traces: DAO and DIO sent/received, and data packets received
- Classifiers: KNN, Naive Bayes, SVM, and Logistic Regression
- Result: above 95% accuracy, precision, and recall
▶
21:27
ML-Based Attack Detection in RPL IoT
Sybil attacks in VANETs
- VANET scenarios based on IEEE 802.11p and IEEE 1609
- Attack scenarios with 1 to 3 Sybil nodes across networks of 5 to 14 nodes
- RSSI-based features: power, difference, and similarity
- Classifiers: Random Forest, KNN, XGBoost, and Decision Tree
- Result: 95 to 97% accuracy across classifiers
Generate synthetic data for ML
Machine learning needs ever larger amounts of data. A simulator produces it cheaply, perfectly labelled, and free of sensitive information.
The trouble with real data
- Difficult and expensive to collect, especially for complex or specialised cases
- Time consuming to label, and labelling needs costly expert knowledge
- May contain sensitive or confidential information
- Often unbalanced, lacking examples of certain classes or phenomena
Synthetic data from a simulator
- Generated at very low cost and in vast quantities
- Perfectly labelled, so it can train neural nets directly
- Covers a wide variety of scenarios and edge cases for robustness
- Free of sensitive or confidential information
Automated utilities drive scenario generation and execution. NetSim writes large amounts of labelled data to CSV, including:
Performance metrics
Instantaneous and average throughput per link and application, buffer occupancy over time, and TCP congestion window over time.
Packet trace
More than 30 parameters per packet: arrival, queuing, and departure times, payload, overhead, errors, and collisions.
Radio measurements
SINR, path loss, shadowing, fast fading, LOS/NLOS state, O2I loss, MCS, CQI, BS-UE distances, and UE-gNB association.
Radio resource allocation
Buffer fill (queue size), scheduling weights, and PRBs allocated per scheduling interval.
Research publications featuring AI/ML with NetSim
A selection of peer-reviewed work that built and validated AI/ML methods in NetSim.
Useful links
Guides, the AI/ML brochure, and the worked network-slicing example, plus a way to take a project further.