Memory-sample tradeoffs for linear regression with small error

Vatsal Sharan, Aaron Sidford, Gregory Valiant

TL;DR

This paper provides the first formal proof that linear regression faces a fundamental "memory-sample tradeoff." If an algorithm uses less than quadratic memory ($< d^2$), it is mathematically guaranteed to converge slower than algorithms that can store the full covariance matrix, requiring significantly more samples to reach high precision.

What Problem Does This Paper Address?

Linear regression is the cornerstone of statistics and machine learning. In practice, we usually choose between two worlds:

  1. First-order methods (like SGD): These are memory-efficient, using only $O(d)$ space, but they often require many iterations/samples to converge to a very small error $\epsilon$.
  2. Second-order methods (like Newton's method): These converge extremely quickly but require $O(d^2)$ memory to store and invert a covariance matrix.

For years, researchers suspected that this gap was fundamental—that you must use quadratic memory to get the best possible sample efficiency. While this "memory-sample tradeoff" had been proven for discrete problems (like learning a parity bit over finite fields), it remained unproven for the continuous, real-valued world of convex optimization. This paper finally bridges that gap, showing that subquadratic memory limits the rate of convergence for linear regression.

Methods

The authors employ a theoretical framework called Branching Programs to model memory-constrained algorithms. A branching program with width $w$ represents an algorithm using $\log_2 w$ bits of memory.

To prove the lower bound, they use several sophisticated mathematical tools:

  • Truncated Computation Paths: They analyze how much an algorithm can "know" about the hidden vector $x$ at any given time.
  • Potential Functions: They define a progress measure (a potential function) that tracks how much the posterior distribution of the estimate $x$ concentrates toward the truth.
  • Information "Slicing": They show that each new measurement $(a_i, b_i)$ provides a "slice" of information. If the algorithm doesn't have enough memory to store the "shape" of previous slices (the covariance), it cannot effectively combine new measurements to refine its estimate at an optimal rate.
  • High-Dimensional Geometry: A key technical contribution (Lemma 1 and 12) is a new concentration theorem for projections of high-dimensional distributions. It shows that for any distribution with a small $\ell_2$ norm, its projection onto a random direction looks "flat" or Gaussian-like, making it hard for a memory-limited observer to extract precise information.

Datasets

As a theoretical work, the paper does not use real-world datasets. Instead, it evaluates the problem using a standard synthetic generative model:

  • Features ($a_i$): Drawn independently from a $d$-dimensional isotropic Gaussian $N(0, I_d)$.
  • Labels ($b_i$): Generated as $b_i = \langle a_i, x \rangle + \eta_i$, where $x$ is a fixed unit vector.
  • Noise ($\eta_i$): Drawn uniformly from a very small interval $[-2^{-d/5}, 2^{-d/5}]$.

This setup is designed to be "easy" for an unconstrained algorithm (which could solve it with just $d$ samples), making the proven hardness for memory-constrained algorithms even more striking.

Key Insights and Ideas

  • The $d^2$ Threshold: The paper identifies $d^2$ (the size of the covariance matrix) as the critical phase transition. Below this amount of memory, you are fundamentally "blind" to certain geometric properties of the data.
  • Precision Matters: The tradeoff becomes most apparent when you want "small error" ($\epsilon$). The lower bound shows that as $\epsilon \to 0$, the sample complexity for memory-limited algorithms grows as $\Omega(d \log \log 1/\epsilon)$.
  • First-Order vs. Second-Order: The results provide a theoretical justification for why second-order methods are qualitatively different from first-order methods. It’s not just about the algorithm design; it’s about the physical memory available to store the curvature of the optimization landscape.

Key Results

  • The Main Lower Bound: Any algorithm using at most $d^2/4$ bits of memory requires at least $\Omega(d \log \log 1/\epsilon)$ samples to approximate the target vector to $\ell_2$ error $\epsilon$.
  • The Gap: In contrast, an algorithm with sufficient memory ($O(d^2 \log 1/\epsilon)$ bits) can solve the same problem using only $d$ samples.
  • First of its Kind: This represents the first nontrivial lower bound for regression with "super-linear" memory (memory significantly larger than the size of a single data point but smaller than the covariance matrix).

Limitations and Future Work

  • Tightening the Bound: There is still a gap between the authors' lower bound ($\log \log 1/\epsilon$) and the performance of the best-known first-order methods like randomized Kaczmarz, which scale with $\log 1/\epsilon$. Closing this gap is a primary goal for future research.
  • Ill-Conditioned Data: The current proof assumes "nice" (isotropic) data. The authors conjecture that for "ill-conditioned" data (where some features are much more frequent than others), the memory-sample tradeoff will be even more severe, potentially requiring $d \cdot \text{poly}(\text{condition number})$ samples.
  • Beyond Regression: The authors hope this framework can be extended to more complex continuous optimization problems, such as deep learning or non-convex optimization, where memory constraints are even more pressing in practice.

Summary updated

BibTeX
@inproceedings{sharan2019memory,
  author = {Vatsal Sharan and Aaron Sidford and Gregory Valiant},
  title = {{Memory-sample tradeoffs for linear regression with small error}},
  booktitle = {STOC},
  year = {2019},
  url = {https://openreview.net/forum?id=uzf39k3zIAs},
}

Loading related content...

Figure