Efficient Continual Finite-Sum Minimization

Ioannis Mavrothalassitis, Stratis Skoulakis, Leello Tadesse Dadi, Volkan Cevher

Introduction

In standard supervised learning, we typically minimize a fixed "finite-sum" objective: the average loss over a static dataset of $n$ points. However, in the real world, data often arrives in a stream. If we only train on new data, the model suffers from catastrophic forgetting—it loses its performance on older data. Conversely, retraining the model from scratch every time a new data point arrives is computationally ruinous, scaling quadratically ($O(n^2)$) with the number of points.

This paper introduces Continual Finite-Sum Minimization, a new optimization framework where a model must remain optimal for all data seen so far as new information arrives sequentially. The goal is to find a sequence of solutions $x_1, \dots, x_n$ such that each $x_i$ is an $\epsilon$-accurate minimizer of the prefix sum (the average of the first $i$ functions).

Methods: The CSVRG Algorithm

The authors propose CSVRG (Continual Stochastic Variance Reduction Gradient), a novel variance-reduced algorithm adapted for the moving target of a prefix sum. CSVRG builds on principles like SVRG or Katyusha but introduces several key components:

  • Sparse Full-Gradient Updates: Instead of computing a full gradient of the prefix sum at every step (costing $O(i)$), CSVRG only performs a full "reset" at a sparse, logarithmic sub-sequence of stages.
  • Novel Gradient Estimator: In most stages, the algorithm uses a 3-FO (First-Order Oracle) estimator that tracks the change in the prefix sum by combining the current function's gradient with a "memory" of previous gradients.
  • Frequent Update Method (FUM): An internal subroutine that performs stochastic gradient steps to ensure the model reaches the required accuracy $\epsilon$ before the next data point arrives.

Theoretical Complexity and Insights

A key insight of this work is the $O(n^{4/3})$ advantage. For a typical accuracy level of $\epsilon = 1/n$, previous state-of-the-art methods require $O(n^2)$ gradient computations. CSVRG slashes this to $\tilde{O}(n^{4/3})$, a massive saving for large-scale datasets.

Comparison of gradient complexity (Number of FOs) across different optimization methods for continual finite-sum minimization.

As shown in the table above, CSVRG achieves $\tilde{O}(n/\epsilon^{1/3} + 1/\sqrt{\epsilon})$ total FOs. For comparison, SGD requires $O(n/\epsilon)$ and naive SVRG requires $O(n^2 \log(1/ \epsilon))$. The authors also prove a lower bound of $\Omega(n/\epsilon^{1/4})$ for "natural" first-order methods, establishing that CSVRG’s complexity is nearly tight.

Empirical Performance

The researchers evaluated CSVRG on two main fronts:

  1. Ridge Regression: Using several standard datasets from the LIBSVM package (e.g., breast cancer, cod-rna). CSVRG performed the same number of gradient calls as SGD but achieved a significantly smaller suboptimality gap.
  2. Neural Networks: A 2-layer Neural Network trained on MNIST. In a sequential task where new digits (0-9) are introduced, CSVRG maintained much higher classification accuracy on previously seen digits compared to SGD, effectively mitigating catastrophic forgetting within the same computational budget.

Limitations and Future Work

While promising, the current theoretical guarantees rely on the prefix sums being strongly convex. While neural network experiments show empirical success, the theory for non-convex landscapes is not yet established. Additionally, there is still a small gap between the $\epsilon^{-1/3}$ upper bound and the $\epsilon^{-1/4}$ lower bound. Determining the "ultimate" optimal rate remains an open question.

Summary updated

BibTeX
@inproceedings{mavrothalassitis2024efficient,
  author = {Ioannis Mavrothalassitis and Stratis Skoulakis and Leello Tadesse Dadi and Volkan Cevher},
  title = {{Efficient Continual Finite-Sum Minimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=RR70yWYenC},
}
Figure