Fast Traffic Engineering by Gradient Descent with Learned Differentiable Routing

Krzysztof Rusek, Paul Almasan, José Suárez-Varela, Piotr Cholda, Pere Barlet-Ros, Albert Cabellos-Aparicio

TL;DR

Routing By Backprop (RBB) is a novel traffic engineering method that uses Graph Neural Networks (GNNs) to make the non-differentiable process of network routing differentiable. By creating a "soft" surrogate of the shortest-path algorithm, RBB allows network operators to optimize link weights using standard gradient descent, achieving near-optimal performance in milliseconds rather than minutes.

What Problem Does This Paper Address?

In modern networking, Traffic Engineering (TE) is the art of steering data to avoid congestion and maximize resource use. The industry standard for this is OSPF (Open Shortest Path First), where routers send data along the "cheapest" path based on assigned link weights.

The challenge lies in finding the optimal set of weights to minimize the maximum link load (MinMaxLoad). This is an NP-hard problem. Currently, operators face a trade-off:

  1. Mathematical Solvers: Produce near-optimal results but are computationally expensive, often taking minutes to run—too slow for the sub-minute traffic shifts seen in modern Wide Area Networks (WANs).
  2. Heuristics: Fast and scalable, but often result in sub-optimal routing and wasted capacity.

The authors aim to bridge this gap, providing a solution that is as fast as a heuristic but as effective as a heavy-duty solver.

Methods

The core innovation is Routing By Backprop (RBB). The primary obstacle to using gradient descent for TE is that Dijkstra’s algorithm (used to find shortest paths) is discrete and non-differentiable; you can't calculate a gradient through a "yes/no" decision of whether a link is in a path.

To solve this, the authors use:

  • GNN as a Differentiable Surrogate: They train a GNN to approximate Dijkstra’s algorithm. Instead of a binary choice, the GNN outputs the probability that a link belongs to a shortest path. This "Soft Routing" creates a continuous, differentiable landscape.
  • Differentiable Programming: Using the JAX library, the authors build an end-to-end differentiable function of the network. They can then compute the gradient of the network load with respect to the link weights.
  • Gradient Descent Optimization: RBB iteratively updates link weights by "moving" them in the direction that minimizes the predicted maximum link load.
  • Softmax Relaxation: Since the "Max" function is also tricky for gradients, they use a "Softmax with temperature" to create a smooth approximation of the maximum link utilization.

Datasets

The researchers used a mix of synthetic and real-world data:

  • Training: The GNN was trained on synthetic graphs generated using the Barabási-Albert (BA) model (10–20 nodes), with link weights sampled from a scaled beta distribution.
  • Evaluation: To test generalization, they used four real-world topologies from the SNDLib repository: cost266 (37 nodes), geant (22 nodes), janos-us (26 nodes), and nobel-germany (17 nodes).
  • Traffic Matrices: They generated 12,000 samples (3,000 per real-world topology) using uniform distributions, scaled to ensure some links were overloaded to test the optimizer's mettle.

Key Insights and Ideas

  • The "Digital Twin" Approach: The GNN isn't meant to replace the router's logic. Instead, it acts as a differentiable "digital twin" used only during the optimization phase to find the best weights. Once found, these weights are deployed to standard OSPF routers.
  • Zero-Shot Generalization: Remarkably, the GNN was trained only on small synthetic graphs but generalized perfectly to larger, real-world topologies it had never seen before.
  • Bootstrapping Slower Solvers: RBB doesn't have to work alone. It can be used as a "warm start" for traditional, slower solvers (like IGP-WO). By starting with a good RBB-generated configuration, these solvers can reach high-quality solutions in a fraction of their usual time.

Key Results

  • Significant Optimization: RBB reduced the maximum link load by approximately 25% on average compared to default OSPF configurations.
  • Extreme Speed: The method operates at sub-second timescales. Median execution times for one optimization step ranged from 36ms (small networks) to 322ms (37-node networks).
  • Reliability: In the four real-world networks tested, RBB outperformed default OSPF in 99.4% to 100% of the cases.
  • Hybrid Success: When used to initialize the IGP-WO solver, the hybrid approach achieved a ~30% improvement in just 1 second of execution—a task that typically takes minutes for the solver to achieve from scratch.

Limitations and Future Work

  • Approximation Errors: Because the GNN is an approximation, there is a tiny chance (less than 0.6% in tests) that the final configuration is worse than the starting point. However, the authors note that these can be easily verified and discarded before deployment.
  • Training Time: While the optimization is fast, the initial training of the GNN took about 51 minutes. This is a one-time cost, but it must be factored into the deployment lifecycle.
  • Future Directions: The authors plan to extend the model to support Equal Cost Multi-Path (ECMP) routing and multi-objective optimization (e.g., simultaneously minimizing load, delay, and jitter).

Summary updated

BibTeX
@inproceedings{rusek2022fast,
  author = {Krzysztof Rusek and Paul Almasan and José Suárez-Varela and Piotr Cholda and Pere Barlet-Ros and Albert Cabellos-Aparicio},
  title = {{Fast Traffic Engineering by Gradient Descent with Learned Differentiable Routing}},
  booktitle = {Cnsm},
  year = {2022},
  doi = {10.23919/cnsm55787.2022.9964923},
}
Figure