GithubHelp home page GithubHelp logo

micdoh / xlron Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 4.76 MB

Accelerated Learning and Resource Allocation for Optical Networks

License: MIT License

Python 21.46% Jupyter Notebook 78.54%
anakin jax ppo reinforcement-learning reinforcement-learning-environments

xlron's Introduction

Code style: black codecov

See the documentation at https://micdoh.github.io/XLRON/

See the paper here


Accepted to Optical Fibre Communication Conference (OFC) - San Diego, CA, 24-28 March 2024


Accepted to Optical Fibre Communication Conference (OFC) - San Diego, CA, 24-28 March 2024


To recreate plots from papers follow instructions in /examples directory

๐ŸŒŽ Overview ๐ŸŒŽ

XLRON ("ex-el-er-on") is an open-source project that provides a suite of gym-style environments for simulating resource allocation problems in optical networks and applying reinforcement learning techniques. It is built on the JAX machine learning framework, enabling accelerated training on GPU and TPU hardware.

XLRON is a product of my PhD research, which is focused on the application of Reinforcement Learning (RL) to a set of combinatorial optimisation problems related to resource allocation in optical networks. The project is in active development.

Key Features

  • Gym-style environments for optical network resource allocation problems.
  • Powered by JAX for accelerated training on GPU and TPU.
  • Facilitates the development and discovery of optimised resource allocation policies.
  • Implementations of heuristics (kSP-FF, etc.) for benchmarking and comparison.
  • Ideal for research, experimentation, and innovation in optical network optimization.

๐ŸŽ๏ธ Speed-up ๐ŸŽ๏ธ

compared to Optical RL gym-style environments

tldr: Expect approximately 500x speed-up! ๐Ÿš€

xlron_diagram.png

XLRON is faster than CPU-based training because of the following factors:

  • End-to-end JAX implementation (both environment and RL algorithm) allows entire training loop to be compiled and optimised as a single program
  • GPU-compatiblity allows parallelisation to make maximum use of accelerator hardware (GPU or TPU)
  • Running entirely on GPU avoids CPU-GPU data transfer bottleneck and eliminates any overhead from Python interprete

For the comparisons shown, the CPU is 10-core Apple M1 Pro and the GPU is Nvidia A100.

Case study 1

To fairly assess the speed-up offered by XLRON, we implement a "DeepRMSA" environment and agent (exactly like in the canonical DeepRMSA paper) and compare with the equivalent example from optical-rl-gym, which uses stables_baselines3 (SB3) for training.

The below figure shows the training curves for both implementations, with 250 or 2000 parallel envs shown for XLRON. Shaded areas indicate the standard deviation of values across environments (each with a unique random seed) for XLRON and across 3 random seeds for SB3. The left figure shows the training progression with episode count, the right figure shows training progression with time on a log scale.

ofc2023_comp_all.png

Increasing the number of parallel environments decreases the time required to train on a given number of environment steps, but changes the training dynamics so hyperparameters should be tuned accordingly for different numbers of parallel environments.

Case study 2

For the virtual optical network embedding problem, XLRON is compared with the environments from an ECOC 2023 paper (publication pending). The below figure compares the time it takes to train on 1M environment steps for two different topologies (NSFNET or CONUS) and either 100 or 320 frequency slot units (FSU) per link.

There are 4 horizontal bars per experiment:

  • sb3 training with 1 vectorised environment on CPU
  • sb3 training with 10 vectorised environments on CPU
  • XLRON training with 1 vectorised environment on CPU
  • XLRON training with 2000 vectorised environments on GPU

Experiment names on y-axis follow the naming convention: topology name (NSFNET or CONUS) - number of FSU per link - JAX or numpy environment - device type - number of vectorised environments.

ofc2023_vone_comparison.png

Compilation times

See below figure for compilatiion times of different environments. Compilation typically takes a few seconds, therefore adds very little overhead to the training process. compilation_xlron.png


Acknowledgements

This work was supported by the Engineering and Physical Sciences Research Council (EPSRC) grant EP/S022139/1 - the Centre for Doctoral Training in Connected Electronic and Photonic Systems - and EPSRC Programme Grant TRANSNET (EP/R035342/1)

License

Copyright (c) Michael Doherty 2023. This project is licensed under the MIT License - see LICENSE file for details.

xlron's People

Contributors

micdoh avatar

Stargazers

 avatar Andrej Rode avatar Wei Cheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.