Virne is a simulator and benchmark for resource allocation (RA) in Network Functions Virtualisation (NFV), with unified support for traditional and 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: Registers exact, heuristic, meta-heuristic, and learning-based solvers behind a common interface.
- 3️⃣ Reinforcement Learning Support: Provides standardized RL pipelines and Gymnasium-compatible 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
🎉 The Virne benchmark paper has been accepted at ICLR 2026. Welcome to check it out!
✨ If you have any questions, please open a new issue or contact me via email (wtfly2018@gmail.com)
❤️ If you find Virne helpful to your research, please feel free to cite our related papers.
[ICLR, 2026] Virne (paper)
@inproceedings{tfwang-2026-virne,
title={Virne: A Comprehensive Benchmark for RL-based Network Resource Allocation in NFV},
author={Wang, Tianfu and Deng, Liwei and Chen, Xi and Wang, Junyang and He, Huiguo and Hu, Zhengyu and Wu, Wei and Ding, Leilei and Fan, Qilin and Xiong, Hui},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
}[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},
}Create and activate a Python 3.12 or newer environment, then install the latest Virne release from PyPI:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install virneThe standard installation includes the complete Virne runtime and works without optional compiled PyG extensions. Verify the installed command with:
virne --versionTo select a specific CPU or CUDA build of PyTorch and install the matching
optional pyg_lib acceleration wheel, use the source installer instead. It
supports CPU environments on Linux and macOS, plus CUDA 12.6, 13.0, and 13.2
on Linux:
git clone https://github.com/GeminiLight/virne.git
cd virne
# CPU-only PyTorch and PyG
bash install.sh -c cpu
# CUDA 12.6 (use 13.0 or 13.2 when appropriate for your driver and GPU)
bash install.sh -c 12.6The script installs Virne in editable mode and prints the installed versions. You can verify them again with:
python -c "import torch, torch_geometric, virne; print(virne.__version__, torch.__version__, torch_geometric.__version__)"Use a fast heuristic and ten VN requests for the first run. Calling virne
without overrides starts the larger default RL experiment.
virne \
solver.solver_name=nrm_rank \
v_sim_setting.num_v_nets=10 \
training.use_cuda=false \
'logger.backends=[console]'The run finishes with Complete and writes its resolved configuration,
summary, and per-event records under:
results/virne/nrm_rank/<run-id>/
See the Quickstart for Hydra overrides and output details, and the solver registry for every valid solver command.
Start with a solver that matches the purpose of your experiment:
| Command | Use it for | Important note |
|---|---|---|
nrm_rank |
A fast, deterministic heuristic baseline | Recommended for the first end-to-end run |
random_rank |
A simple randomized baseline or sanity check | Set experiment.seed when comparing runs |
mip |
An exact-method baseline on small instances | Requires OR-Tools and can be substantially slower |
ppo_dual_gat+ |
An example of the RL training and inference pipeline | Requires the learning dependencies and training |
This table is intentionally limited to useful starting points. See the generated solver registry for every command registered by the current code, or follow the RL Pipeline for the learning-based workflow.