The Lingering of Gradients: How to Reuse Gradients Over Time

Zeyuan Allen-Zhu, David Simchi-Levi, Xinshang Wang

TL;DR

Standard optimization algorithms treat every gradient computation as a fresh, full-cost endeavor. This paper introduces the concept of "lingering gradients," observing that if you only move a small distance in the parameter space, many component gradients do not change at all. By strategically reusing these "lingering" values, the authors achieve a theoretical convergence boost for Gradient Descent from $O(1/T)$ to $O(\exp(-T^{1/3}))$ and demonstrate massive speedups on real-world revenue management datasets.

The Problem: The Cost of a "Blank Slate"

In large-scale machine learning, an algorithm's efficiency is typically measured by its "gradient complexity"—how many times a gradient must be calculated to reach a certain error level ($\epsilon$). The implicit assumption in classical first-order methods is that calculating a gradient at point $A$ costs exactly the same as calculating it at point $B$, regardless of how close $A$ and $B$ are.

However, in many practical problems—such as those using hinge loss or linear programming duals—the gradient is often "locally constant." If you move only a tiny amount, the gradient for a specific data point might not change at all. The authors argue that treating every iteration as a "blank slate" is computationally wasteful. They tackle the challenge of formally defining this "lingering" property and designing algorithms that skip redundant calculations without sacrificing accuracy.

Methods: Exploiting the Lingering Radius

The core theoretical tool introduced is the Lingering Radius, $\delta(x, i)$, which defines the maximum distance from a point $x$ within which the $i$-th component gradient $\nabla f_i$ remains perfectly constant. Building on this, the authors introduce two main algorithmic modifications:

  1. $GD^{lin}$ (Lingering Gradient Descent): Instead of a standard GD step, this version maintains a hierarchical decomposition of data indices. Using a mathematical tool called a "lowbit sequence," the algorithm tracks which gradients were updated recently. It performs "truncated" steps to ensure the optimizer doesn't move so far that too many gradients become "stale" at once.
Hierarchical decomposition of data indices using a lowbit sequence to track gradient updates.
  1. $SVRG^{lin}$ (Lingering SVRG): The authors adapt the popular Stochastic Variance Reduced Gradient (SVRG) method. In standard SVRG, you periodically compute a full gradient (a "snapshot") and then use random samples to estimate changes. $SVRG^{lin}$ improves this by only sampling from the set of indices whose gradients have actually changed since the last snapshot. This significantly reduces the variance of the estimator and the total number of computations.

Key Insights and Real-World Application

The "lingering" concept suggests that gradients have a lifespan. Instead of a binary "fresh vs. stale" view, the authors model the cost of a gradient update as a function of the distance traveled. They prove that if the number of "changed" gradients scales linearly with the distance moved, you can achieve super-polynomial convergence.

To validate this, the paper uses a Revenue Management Simulation based on the Yahoo! Front Page Today Module dataset (containing 4.6 million user visits). In pricing problems, a small change in "bid prices" usually doesn't change which item a customer prefers. Therefore, the gradients—which essentially indicate a customer's "best choice"—linger for a long time.

Key Results: Late-Stage Acceleration

The theoretical speedups translate impressively to empirical efficiency. On the Yahoo! dataset, $SVRG^{lin}$ reached an optimization error of $10^{-6}$ (and a dual error of $10^{-12}$) using only 6 passes over the dataset.

Optimization error comparison showing the dramatic late-stage acceleration of SVRG-lin.

The experiments reveal a phenomenon of late-stage acceleration. $SVRG^{lin}$ performs similarly to standard methods early on when the optimizer is taking large steps. However, as it nears the optimum and steps become smaller, the algorithm "takes off" because it can reuse almost all previous gradients, leading to a sharp drop in optimization error compared to standard SVRG and SAGA.

Limitations and Future Work

While powerful, the lingering gradient approach has limitations:

  • Computational Overhead: The method assumes that calculating the "lingering radius" $\delta(x, i)$ is as cheap as calculating the gradient itself. While true for piecewise linear structures like hinge loss or LPs, it might not hold for complex models like deep neural networks.
  • Memory Constraints: The algorithm requires storing index sets and potentially more state than standard SGD, leading to an $O(n \log n)$ space complexity.
  • Smoothness vs. Discreteness: The theory shines brightest on functions with "piecewise" linear structures. Future work could explore how to apply these principles to purely smooth, non-convex landscapes where gradients change continuously but slowly.

Summary updated

BibTeX
@inproceedings{allenzhu2018lingering,
  author = {Zeyuan Allen-Zhu and David Simchi-Levi and Xinshang Wang},
  title = {{The Lingering of Gradients: How to Reuse Gradients Over Time}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=BJELBv-O-r},
}
Figure