This interactive visualization demonstrates the core ideas from our paper Efficient Network Reconfiguration by Randomized Switching, joint work with Dmitrii M. Ostrovskii and Daniel K. Molzahn.
Reconfigure your own network now at the live demo page:
Consider a network with nodes and edges. There is a fixed vector of edge weights and a fixed vector of nodal demands that sums to zero, . The fixed demand of each node is positive for sinks and negative for sources, and each edge has a weight that represents some fixed, physical quantity. For example, in power systems, is the susceptance of a transmission line.
A network reconfiguration problem is to determine a vector of switching statuses . The goal is to select which edges to "close" (activate) to minimize the congestion:
where
is the weighted graph Laplacian with indicating whether edge is closed, and is the elementary Laplacian for edge . See my blog post for more on working with Laplacians in Julia.
This is a challenging mixed-integer non-linear optimization problem. Our key insight is the following: instead of finding a single best configuration, we design a distribution over configurations, and then sample from it.
We assume:
there is a budget of at most edges that can be closed
there is a connected subgraph that must always remain closed (to ensure connectivity)
Then, we relax to and solve the convex optimization problem
where is the edge budget. The relaxed problem has a generalized self-concordant structure, which we exploit using a Frank-Wolfe style algorithm.
After optimization, we obtain the fractional where represents the probability that edge should be closed. We then sample configurations by randomized rounding: independently close edge with probability .
The visualization below shows:
Network diagram: A 7-node network with randomly assigned edge weights and balanced demands. After optimization, edges are colored by their switching probability . Green nodes are loads (positive demand), red nodes are generators (negative demand).
Congestion histogram: Distribution of congestion values from sampled configurations . The red dashed line shows the optimal relaxed congestion .
Click Optimize Switching to run the Frank-Wolfe algorithm
Click Generate Config to sample a binary configuration via randomized rounding
Use Generate Batch to sample many configurations at once and see the distribution concentrate around the optimum
As you generate more samples, the histogram should show:
Concentration: Provided you have sufficient budget, most samples cluster near the optimal relaxed value .
Quality: The mean congestion is close to (within a small factor of) the relaxed optimum
This demonstrates the power of randomization: instead of searching over binary configurations, we optimize a continuous relaxation and then sample.
Our Frank-Wolfe type algorithm proceeds as follows:
Initialize with a spanning tree (the "backbone" to guarantee connectivity)
At each iteration, compute the gradient entries for each edge , where
Returns a solution of the linear approximation of the objective over the constraint polytope, i.e., the "linear minimization oracle"
Take a convex combination step, but only accept if objective decreases (monotonicity)
The gradient computation only requires solving a Laplacian system, which we analyze using the pseudoinverse formula
Fast solvers are available to do this efficiently (see references below). For the full theoretical analysis and large-scale experiments (up to 10,000 nodes), see our paper.
The Frank-Wolfe type algorithm used here is based on:
A. Carderera and M. Besançon, "Scalable Frank–Wolfe on Generalized Self-Concordant Functions via Simple Steps", SIAM Journal on Optimization, vol. 34, 2024.
P. Dvurechensky, K. Safin, S. Shtern, and M. Staudigl, "Generalized Self-Concordant Analysis of Frank–Wolfe Algorithms", Mathematical Programming, vol. 198, 2023.
For fast Laplacian system solvers that enable scaling to large networks:
R. Kyng and S. Sachdeva, "Approximate Gaussian Elimination for Laplacians - Fast, Sparse, and Simple", FOCS 2016.
Y. Gao, R. Kyng, and D. A. Spielman, "AC(k): Robust Solution of Laplacian Equations by Randomized Approximate Cholesky Factorization", to appear in SIAM Journal on Scientific Computing (SISC), 2025. (arXiv version)
The Laplacians.jl Julia package implements these solvers.
@misc{talkington2025efficientnetworkreconfigurationrandomized,
title={{Efficient Network Reconfiguration by Randomized Switching}},
author={Samuel Talkington and Dmitrii M. Ostrovskii and Daniel K. Molzahn},
year={2025},
eprint={2510.24458},
archivePrefix={arXiv},
primaryClass={math.OC},
url={https://arxiv.org/abs/2510.24458}
} Try with your own network - Draw your own graph and optimize
This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-2039655. Any opinion, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.