Introduction
Traffic Engineering (TE) is a critical operational task in modern networking, focused on steering data across a network to avoid congestion and maximize resource utilization. The industry standard for achieving this is Open Shortest Path First (OSPF), where routers direct traffic along the path with the lowest cumulative link weights. However, finding the optimal set of weights to minimize the maximum link load (MinMaxLoad) is an NP-hard problem.
Currently, network operators face a difficult trade-off. Mathematical solvers can produce near-optimal results but are computationally intensive, often requiring minutes to converge—a timeframe that is increasingly incompatible with the sub-minute traffic fluctuations seen in modern Wide Area Networks (WANs). Conversely, fast heuristics can be deployed quickly but often result in sub-optimal routing and wasted capacity. This paper introduces Routing By Backprop (RBB), a novel method that bridges this gap by making the routing process differentiable, allowing for near-optimal TE optimization in milliseconds.
The Challenge: Non-Differentiable Routing
The primary obstacle to using gradient-based optimization for TE is that the standard shortest-path algorithm (Dijkstra’s) is discrete and non-differentiable. Because you cannot calculate a gradient through the binary decision of whether a link is included in a path, standard gradient descent cannot be applied directly to link weights. To overcome this, RBB introduces a "soft" surrogate of the routing process.
Methodology: Routing By Backprop (RBB)
The core innovation of RBB lies in its use of Graph Neural Networks (GNNs) and differentiable programming to create a continuous optimization landscape. The method consists of several key components:
- GNN as a Differentiable Surrogate: The authors train a GNN to approximate Dijkstra’s algorithm. Instead of returning a binary path, the GNN outputs a probability distribution representing the likelihood that a link belongs to a shortest path. This "Soft Routing" mechanism allows gradients to flow through the routing logic.
- Differentiable Programming with JAX: By implementing the network model in JAX, the authors create an end-to-end differentiable function. This allows the system to compute the gradient of the network load with respect to the link weights directly.
- Softmax Relaxation: To handle the non-differentiable "Max" function in MinMaxLoad, the authors employ a "Softmax with temperature" approximation, creating a smooth objective function for the optimizer.
- Gradient Descent Optimization: RBB iteratively updates link weights by moving them in the direction that minimizes the predicted maximum link load, effectively "learning" the best configuration for a given traffic matrix.
Experimental Setup
The researchers evaluated RBB using a combination of synthetic and real-world data. The GNN was initially trained on small synthetic graphs (10–20 nodes) generated via the Barabási-Albert (BA) model. To test the model's ability to generalize, it was evaluated on four real-world topologies from the SNDLib repository: cost266 (37 nodes), geant (22 nodes), janos-us (26 nodes), and nobel-germany (17 nodes). The evaluation involved 12,000 traffic matrix samples, scaled to simulate varying levels of network congestion.
Key Results and Insights
Performance and Speed
RBB demonstrated significant improvements over default OSPF configurations, reducing the maximum link load by an average of 25%. Most notably, the method achieved these results at sub-second timescales. Median execution times for a single optimization step ranged from 36ms for small networks to 322ms for the 37-node cost266 network, making it suitable for real-time traffic shifts.
Generalization and Reliability
One of the most striking findings was the GNN's zero-shot generalization. Despite being trained only on small synthetic graphs, the model generalized perfectly to larger, real-world topologies it had never encountered during training. In the real-world test cases, RBB outperformed default OSPF in over 99.4% of scenarios.
The "Digital Twin" and Hybrid Solvers
The authors emphasize that the GNN is not intended to replace the router's internal logic. Instead, it serves as a differentiable "digital twin" used exclusively during the optimization phase. Once the optimal weights are found, they are deployed to standard OSPF routers. Furthermore, RBB can be used to "warm start" traditional solvers like IGP-WO. By providing a high-quality initial configuration, RBB allowed these solvers to achieve a ~30% improvement in just 1 second—a result that typically takes minutes to reach from a cold start.
Limitations and Future Work
While highly effective, RBB is an approximation. In approximately 0.6% of test cases, the final configuration was slightly worse than the starting point. However, because the results can be verified before deployment, these instances can be easily discarded. Additionally, while the optimization is fast, the initial GNN training requires a one-time investment (approximately 51 minutes in this study).
Future research will focus on extending RBB to support Equal Cost Multi-Path (ECMP) routing and multi-objective optimization, such as simultaneously minimizing load, latency, and jitter.
Summary updated