README.md

August 22, 2025 · View on GitHub

Virne Logo

A Comprehensive Simulator & Benchmark for NFV-RA

Ask DeepWiki

✨ Benchmark Paper   •   Documentation   •   Citations   •   SDN-NFV Papers


Virne is a simulator and benchmark designed to address resource allocation (RA) problems in network function virtualization (NFV), with a highlight on supporting reinforcement learning (RL)-based algorithms.

In the literature, RA in NFV is often termed Virtual Network Embedding (VNE), Virtual Network Function (VNF) placement, service function chain (SFC) deployment, or network slicing in 5G.

Virne offers a unified and comprehensive framework for NFV-RA, with the following key features:

  • 1️⃣ Highly Customizable Simulations: Simulates diverse network environments (e.g., cloud, edge, 5G), with user-defined topologies, resources, and service requirements.
  • 2️⃣ Extensive Algorithm Suite: Implements 30+ NFV-RA algorithms (including exact, heuristics, meta-heuristics, and RL-based methods) in a modular, extensible architecture.
  • 3️⃣ Reinforcement Learning Support: Provides standardized RL pipelines and Gym-style environments for rapid development and benchmarking of RL-based solutions.
  • 4️⃣ In-depth Evaluation Aspects: Enables insightful analysis beyond effectiveness, covering multiple practicality perspectives (e.g., solvability, generalization, and scalability).

Important

🎉 We have released the benchmark paper of Virne. Welcome to check it out!

✨ If you have any questions, please open a new issue or contact me via email (wtfly2018@gmail.com)

Citations

❤️ If you find Virne helpful to your research, please feel free to cite our related papers.

Benchmark Paper

[arXiv, 2025] Virne (paper) & code

@article{tfwang-2025-virne,
  title={Virne: A Comprehensive Benchmark for Deep RL-based Network Resource Allocation in NFV},
  author={Wang, Tianfu and Deng, Liwei and Chen, Xi and Wang, Junyang and He, Huiguo and Ding, Leilei and Wu, Wei and Fan, Qilin and Xiong, Hui},
  journal={arXiv preprint arXiv:2507.19234},
  year={2025},
}

Algorithmic Papers

[IJCAI, 2024] FlagVNE (paper & code)

@INPROCEEDINGS{ijcai-2024-flagvne,
  title={FlagVNE: A Flexible and Generalizable Reinforcement Learning Framework for Network Resource Allocation},
  author={Wang, Tianfu and Fan, Qilin and Wang, Chao and Ding, Leilei and Yuan, Nicholas Jing and Xiong, Hui},
  booktitle={Proceedings of the 33rd International Joint Conference on Artificial Intelligence},
  year={2024},
}

[TSC, 2023] HRL-ACRA (paper & code)

@ARTICLE{tsc-2023-hrl-acra,
  author={Wang, Tianfu and Shen, Li and Fan, Qilin and Xu, Tong and Liu, Tongliang and Xiong, Hui},
  journal={IEEE Transactions on Services Computing},
  title={Joint Admission Control and Resource Allocation of Virtual Network Embedding Via Hierarchical Deep Reinforcement Learning},
  volume={17},
  number={03},
  pages={1001--1015},
  year={2024},
}

[ICC, 2021] DRL-SFCP (paper & code)

@INPROCEEDINGS{icc-2021-drl-sfcp,
  author={Wang, Tianfu and Fan, Qilin and Li, Xiuhua and Zhang, Xu and Xiong, Qingyu and Fu, Shu and Gao, Min},
  booktitle={ICC 2021 - IEEE International Conference on Communications}, 
  title={DRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement Learning}, 
  year={2021},
  pages={1-6},
}

Table of Contents

Quick Start

Installation

  1. Create a new conda environment
conda create -n virne python=3.10
conda activate virne
  1. Install with script
# use cpu
bash install.sh -c 0

# use cuda (only support cuda=12.4 and torch=2.6.0)
bash install.sh -c 12.4

Running Examples

  1. Run the default example

Before running the example, you could update the configuration file in settings/ directory to set the parameters on simulation and algorithm.

python main.py
  1. Run with custom configuration

Virne is built on Hydra, which allows you to override configuration parameters directly from the command line.

python main.py CONFIG_NAME=NEW_VALUE

Some examples of command line arguments are:

# Run with a specific nfv-ra algorithm
python main.py solver.solver_name=nrm_rank

# Run with a specific physical topology
python main.py p_net_setting.topology.file_path=../../datasets/topology/Geant.gml

# Run with a specific network system
python main.py system.if_offline_system=true

Implemented Algorithms

Virne has implemented the rich heuristic-based and learning-based algorithms for NFV-RA. Some of them are listed in the following tables.

Learning-based Solvers

NameCommandTypeMappingTitlePublicationYearNote
PG-CNN2pg_cnn2learningtwo-stageA Virtual Network EmbeddingAlgorithm Based On Double-LayerReinforcement LearningThe Computer Journal2022
A3C-G3C-Seq2Seq*a3c_gcn_seq2seqlearningjoint_prDRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement LearningICC2021
PG-CNN-QoSpg_cnn_qoslearningtwo-stageResource Management and Security Scheme of ICPSs and IoT Based on VNE AlgorithmIoTJ2021
PG-Seq2Seqpg_seq2seqlearningjoint_prA Continuous-Decision Virtual Network Embedding Scheme Relying on Reinforcement LearningTNSM2020
GAE-Clusteringgae_clusteringlearningbfs_trialsAccelerating Virtual Network Embedding with Graph Neural NetworksCNSM2020Clustering
PG-MLPpg_mlplearningjoint_prNFVdeep: adaptive online service function chain deployment with deep reinforcement learning.IWQOS2019
Hopfield-Networkhopfield_networklearningtwo-stageNeuroViNE: A Neural Preprocessor for Your Virtual Network Embedding AlgorithmINFOCOM2018Subgraph Extraction
PG-CNNpg_cnnlearningtwo-stageA Novel Reinforcement Learning Algorithm for Virtual Network EmbeddingNeurocomputing2018
MCTSmctslearningtwo-stageVirtual Network Embedding via Monte Carlo Tree SearchTCYB2018MultiThreading Support

* means that the algorithm only supports chain-shape virtual networks embedding

Meta-heuristics Solvers

NameCommandTypeMappingTitlePublicationYearNote
NodeRanking-MetaHeuristic**_**meta-heuristicsjointVirtual network embedding through topology awareness and optimizationCN2012MultiThreading Support
Genetic-Algorithmgameta-heuristicstwo-stageVirtual network embedding based on modified genetic algorithmPeer-to-Peer Networking and Applications2019MultiThreading Support
Tabu-Searchtsmeta-heuristicsjointVirtual network forwarding graph embedding based on Tabu SearchWCSP2017MultiThreading Support
ParticleSwarmOptimizationpsometa-heuristicstwo-stageEnergy-Aware Virtual Network EmbeddingTON2014MultiThreading Support
Ant-Colony-Optimizationacometa-heuristicsjointLink mapping-oriented ant colony system for virtual network embeddingCEC2017MultiThreading Support
AntColony-Optimizationacometa-heuristicsjointVNE-AC: Virtual Network Embedding Algorithm Based on Ant Colony MetaheuristicICC2011MultiThreading Support
Simulated-Annealingsameta-heuristicstwo-stageFELL: A Flexible Virtual Network Embedding Algorithm with Guaranteed Load BalancingICC2011MultiThreading Support

Other Related Papers

  • Particle Swarm Optimization
    • Xiang Cheng et al. "Virtual network embedding through topology awareness and optimization". CN, 2012.
    • An Song et al. "A Constructive Particle Swarm Optimizer for Virtual Network Embedding". TNSE, 2020.
  • Genetic Algorithm
    • Liu Boyang et al. "Virtual Network Embedding Based on Hybrid Adaptive Genetic Algorithm" In ICCC, 2019.
    • Khoa T.D. Nguyen et al. "An Intelligent Parallel Algorithm for Online Virtual Network Embedding". In CITS, 2019.
    • Khoa Nguyen et al. "Efficient Virtual Network Embedding with Node Ranking and Intelligent Link Mapping". In CloudNet, 2020.
    • Khoa Nguyen et al. "Joint Node-Link Algorithm for Embedding Virtual Networks with Conciliation Strategy". In GLOBECOM, 2021.
  • Ant Colony Optimization
    • N/A

Heuristics-based Solvers

NameCommandTypeMappingTitlePublicationYearNote
PL (Priority of Location)pl_rankheuristicstwo-stageEfficient Virtual Network Embedding of Cloud-Based Data Center Networks into Optical NetworksTPDS2021
NRM (Node Resource Management)nrm_rankheuristicstwo-stageVirtual Network Embedding Based on Computing, Network, and Storage Resource ConstraintsIoTJ2018
GRC (Global resource capacity)grc_rankheuristicstwo-stageToward Profit-Seeking Virtual Network Embedding Algorithm via Global Resource CapacityINFOCOM2014
RW-MaxMatch (NodeRank)rw_rankheuristicstwo-stageVirtual Network Embedding Through Topology-Aware Node RankingACM SIGCOMM Computer Communication Review2011
RW-BFS (NodeRank)rw_rank_bfsheuristicsbfs_trialsVirtual Network Embedding Through Topology-Aware Node RankingACM SIGCOMM Computer Communication Review2011

Exact Solvers

NameCommandTypeMappingTitlePublicationYearNote
MIP (Mixed-Integer Programming)mipexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012
D-Rounding (Deterministic Rounding)d_roundingexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012
R-Rounding (Random Rounding)r_roundingexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012

Simple Baseline Solvers

NameCommandMapping
Random Rankrandom_ranktwo-stage
Random Joint Place and Routerandom_joint_prjoint_pr
Random Rank Breath First Searchrandom_bfs_trialsbfs_trials
Order Rankorder_ranktwo-stage
Order Joint Place and Routeorder_joint_prjoint_pr
Order Rank Breath First Searchorder_bfs_trialsbfs_trials
First Fit Decreasing Rankffd_ranktwo-stage
First Fit Decreasing Joint Place and Routeffd_joint_prjoint_pr
First Fit Decreasing Rank Breath First Searchffd_bfs_trialsbfs_trials