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.

5G RAN optimisation Reinforcement learning Network security Digital twin
NetSim · AI/ML techniques
Machine learning techniques applied across the NetSim network simulation workflow

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.

NetSim → Agent

State

NetSim passes the state: UE measurements, network measurements, and UE context.

Agent → NetSim

Action

The RL algorithm returns an action, such as a handover or a power-control decision.

NetSim → Agent

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.

IoT · RPL

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
Detailed PDF →
Video Thumbnail 21:27

ML-Based Attack Detection in RPL IoT

VANET · IEEE 802.11p / 1609

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
Detailed PDF →

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.

Independent validation

Research publications featuring AI/ML with NetSim

A selection of peer-reviewed work that built and validated AI/ML methods in NetSim.

IEEE Xplore NetSimGym: the Gymnasium for Reinforcement Learning in Networking Research View paper → IEEE Xplore DETONAR: Detection of Routing Attacks in RPL-Based IoT View paper → IEEE Xplore Reinforcement-Learning-based IDS for 6LoWPAN View paper → IEEE Xplore ELNIDS: Ensemble Learning based Network Intrusion Detection System for RPL based Internet of Things View paper → Elsevier Q-Learning Relay Placement for Alert Message Dissemination in Vehicular Networks View paper → arXiv Adaptive Hybrid Heterogeneous IDS for 6LoWPAN View paper → IET Exploring cybersecurity issues in 5G enabled electric vehicle charging station with deep learning View paper → IEEE Xplore Adversarial RL-Based IDS for Evolving Data Environment in 6LoWPAN View paper → IEEE Xplore Advancing 6G Network Performance: AI/ML Framework for Proactive Management and Dynamic Optimal Routing View paper → IEEE Xplore An Intelligence-Based Framework for Managing WLANs: The Potential of Non-Contiguous Channel Bonding View paper → JCOMSS Learning-Based Road Link Quality Estimation for Intelligent Alert-Message Dissemination View paper → IEEE Xplore Malicious Node Detection in VANETs via Enhanced DSR and ML View paper → Thesis Performance Analysis of 5G DDoS Attack using Machine Learning View paper → IEEE Xplore SIGMAML: SNR-Guided 5G Mobility Management using Machine Learning Algorithms View paper → IEEE Xplore Intelligent QoS Agent Design for QoS Monitoring and Provisioning in 6G Network View paper → IEEE Xplore A Novel Two-Step Bayesian Hyperparameter Optimization Strategy for DoS Attack Detection in IoT View paper → IEEE Xplore Flexibly Controlled 5G Network Slicing View paper →

Guides, the AI/ML brochure, and the worked network-slicing example, plus a way to take a project further.