An automatic system to detect equivalence between iterative algorithms

Shipu Zhao, Laurent Lessard, Madeleine UdellarXiv 2021 · DOI

Abstract

When are two algorithms the same? How can we be sure a recently proposed algorithm is novel, and not a minor twist on an existing method? In this paper, we present a framework for reasoning about equivalence between a broad class of iterative algorithms, with a focus on algorithms designed for convex optimization. We propose several notions of what it means for two algorithms to be equivalent, and provide computationally tractable means to detect equivalence. Our main definition, oracle equivalence, states that two algorithms are equivalent if they result in the same sequence of calls to the function oracles (for suitable initialization). Borrowing from control theory, we use state-space realizations to represent algorithms and characterize algorithm equivalence via transfer functions. Our framework can also identify and characterize some algorithm transformations including permutations of the update equations, repetition of the iteration, and conjugation of some of the function oracles in the algorithm. To support the paper, we have developed a software package named Linnaeus that implements the framework to identify other iterative algorithms that are equivalent to an input algorithm. More broadly, this framework and software advances the goal of making mathematics searchable.

Introduction: The Novelty Crisis in Optimization

The field of mathematical optimization is currently experiencing a "novelty" crisis. New algorithms are proposed constantly, but it is often difficult to tell if a "new" method is truly original or just a known algorithm written in a different form. For example, it took years for the community to fully realize the deep mathematical equivalence between the Alternating Direction Method of Multipliers (ADMM) and Douglas-Rachford splitting. Currently, establishing these connections requires manual, often tedious, algebraic manipulation. There is no automated way to "search" for an algorithm or verify its uniqueness. This paper aims to make mathematics searchable by providing a computational tool to detect oracle equivalence—the property where two algorithms make the exact same sequence of calls to a function's gradient or proximal operator.

Methodology: Algorithms as Control Systems

To address this problem, we borrow heavily from control theory. The approach follows three main steps to standardize algorithm representation and comparison:

  1. Standard Representation: An algorithm is parsed into a "state-space realization." This treats the algorithm as a Linear Time-Invariant (LTI) system $(A, B, C, D)$ in a feedback loop with a nonlinearity, which represents the "oracle" (such as a gradient $\nabla f$ or a proximal operator).
  2. Transfer Functions: We compute the system's transfer function $\hat{H}(z) = C(zI - A)^{-1}B + D$. In control theory, the transfer function uniquely characterizes the input-output behavior of a linear system, regardless of how the internal state variables are defined.
  3. Equivalence Checking: To see if two algorithms are the same, the system simply checks if their transfer functions are identical.
Feedback loop representation of an iterative algorithm as a linear system H in feedback with a nonlinearity Φ.

Defining Oracle Equivalence

We argue that Oracle Equivalence is the gold standard for algorithm comparison. If two algorithms produce the same sequence of oracle calls, they will have identical convergence rates and robustness properties, making them "the same" for most analytical purposes. By finding the "minimal" state-space representation, the framework can strip away redundant variables that might make an algorithm look more complex than it actually is.

A collection of iterative algorithms, such as Modified Arrow-Hurwicz and Optimistic Mirror Descent, which can be analyzed for equivalence using the proposed framework.

Our framework is robust enough to handle complex transformations, including cyclic permutations (reordering update equations), algorithm repetition (detecting if one algorithm is another run twice per iteration), and conjugation (using Moreau’s identity to swap between gradient and proximal forms).

The Linnaeus Software and Key Results

We developed an open-source Python package called Linnaeus that implements this framework. It allows researchers to input algorithm update equations in a user-friendly syntax and automatically identifies equivalent algorithms in the literature. By converting the problem into a comparison of rational matrices, we move algorithm analysis from the realm of human intuition to symbolic computation using the sympy library.

The system successfully identified the complex relationships between Douglas-Rachford, ADMM, and Chambolle-Pock—connections that originally required pages of dense mathematical proofs to establish. Furthermore, the framework can automatically solve for the specific parameter settings (e.g., step sizes $\eta$ or penalty parameters $\rho$) that make two different algorithms behave identically.

Limitations and Future Outlook

While powerful, the current framework has limitations. It is primarily restricted to algorithms that are linear in their state and oracle outputs. While this covers a vast majority of first-order methods, it cannot handle nonlinear state transformations. Additionally, the LTI assumption means the system struggles with algorithms that have time-varying parameters, such as diminishing step sizes or adaptive methods like Adam.

Future work will focus on extending the framework to Linear Parameter Varying (LPV) systems to handle adaptive algorithms and exploring "stochastic oracle equivalence" for randomized algorithms. This research represents a significant step toward making mathematical optimization more transparent and searchable.

Summary updated

BibTeX
@misc{zhao2021automatic,
  author = {Shipu Zhao and Laurent Lessard and Madeleine Udell},
  title = {{An automatic system to detect equivalence between iterative algorithms}},
  year = {2021},
  eprint = {2105.04684},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.04684},
}
Figure