Optimization Algorithm Design via Electric Circuits

Stephen P. Boyd, Tetiana Parshakova, Ernest K. Ryu, Jaewook J. Suh

Introduction

Optimization algorithms are the hidden engines of modern machine learning and engineering. Yet, designing a new algorithm that is both fast in practice and theoretically guaranteed to converge is notoriously difficult. A new methodology proposed by researchers at Stanford, UCLA, and Rice University treats optimization like an electric circuit, bridging the gap between physical intuition and mathematical rigor.

Methodology

The proposed framework consists of a two-stage design process: continuous-time circuit design followed by automated discretization.

Continuous-time Circuit Design

The researchers map an optimization problem to a "static interconnect" (a set of ideal wires). They then design a "dynamic interconnect"—an RLC (resistor-inductor-capacitor) circuit—that relaxes to this static state at equilibrium. In this framework, the subdifferential operator $\partial f$ of the objective function is treated as a grounded nonlinear resistor.

Circuit topology and its corresponding incidence matrix A, representing the physical structure of the optimizer.

Within this circuit:

  • Resistors represent the gradient descent component of the algorithm.
  • Inductors and Capacitors introduce "momentum," allowing the circuit to reach equilibrium faster, much like Nesterov acceleration.

Automated Discretization

To transform a continuous-time circuit into a numerical algorithm, time must be discretized. The authors use a computer-assisted approach, formulating the search for discretization parameters (such as step size) as a Performance Estimation Problem (PEP). By solving a non-convex optimization problem (a QCQP), they identify parameters that ensure the discrete algorithm "dissipates energy" similarly to the physical circuit, thereby guaranteeing convergence.

Key Insights: Optimization as Physics

The core insight of this work is that KKT optimality conditions are exactly equivalent to Kirchhoff’s laws in a static circuit. Finding the minimum of a function is physically equivalent to a circuit reaching its lowest energy state.

Full dynamic RLC circuit connected to the subdifferential operator ∂f, illustrating the interaction between the optimizer and the objective function.

This physical intuition allows for direct translation of circuit modifications into algorithmic improvements. For instance, adding a capacitor can smooth out oscillations. Furthermore, this framework recovers many standard algorithms—including Nesterov acceleration, ADMM, and Douglas-Rachford splitting—as specific circuit configurations.

Results and Benchmarks

The methodology was evaluated on several benchmark optimization setups, including decentralized geometric median, decentralized quadratic programming, and Huber penalty minimization.

  • New Algorithms: The researchers discovered DADMM+C (Distributed ADMM with an added capacitor). In decentralized median problems, DADMM+C reached a relative error of $10^{-10}$ in 66 iterations, significantly outperforming standard DADMM (87 iterations) and P-EXTRA (294 iterations).
  • Software Tool: The open-source Python package ciropt was released, allowing users to define circuits and automatically generate provably convergent algorithms.

Limitations and Future Work

The current framework is primarily limited to convex optimization. Extending this to non-convex problems, such as deep neural network training, remains a challenge due to the difficulty of sustaining energy dissipation arguments. Future work aims to extend the methodology to stochastic settings, where circuit noise represents mini-batch gradients, and to handle more complex circuits that may increase the computational cost of the discretization step.

Summary updated

BibTeX
@inproceedings{boyd2024optimization,
  author = {Stephen P. Boyd and Tetiana Parshakova and Ernest K. Ryu and Jaewook J. Suh},
  title = {{Optimization Algorithm Design via Electric Circuits}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=9Jmt1eER9P},
}
Figure