A Negative Result on Gradient Matching for Selective Backprop

Lukas Balles, Cedric Archambeau, Giovanni Zappella

TL;DR

Selective Backprop speeds up deep network training by running a forward pass over a minibatch and backpropagating only on an informative subset. This paper proposes a fast gradient-matching alternative using last-layer gradients and Orthogonal Matching Pursuit, but delivers a sobering negative result: neither the original loss-based heuristic nor gradient matching consistently outperforms trivial random subsampling.

What Problem Does This Paper Address?

In deep neural network training, backpropagation accounts for roughly two-thirds of the computational cost of a gradient step. Selective Backprop exploits this asymmetry by evaluating a full minibatch during the forward pass, but only computing backwards gradients for a subset of samples—conventionally prioritizing high-loss examples under the assumption that low-loss points contribute negligible gradient signal.

However, loss-based prioritization has obvious flaws: it greedily selects near-duplicate examples, inflates batch gradient error, and easily overfits to mislabeled data or outliers. The authors set out to fix this by selecting a weighted subset that explicitly matches the average gradient of the full minibatch, while also benchmarking against a critical baseline omitted in prior literature: randomly dropping examples.

Methods

Computing per-sample gradients across an entire network to select the best subset is prohibitively expensive. The authors introduce two primary algorithmic components to make gradient matching practical:

  • Last-Layer Gradient Proxy via Implicit Gram Matrix: Rather than computing full backpropagation gradients, the authors use gradients with respect to the final linear layer (weights $W$ and bias $b$) as a proxy. For last-layer representations $H \in \mathbb{R}^{M \times D}$ and loss derivatives w.r.t. logits $P \in \mathbb{R}^{M \times C}$, they prove that the sample-to-sample inner product Gram matrix $K \in \mathbb{R}^{M \times M}$ can be computed implicitly via matrix multiplication: $$K = (H H^T) \circ (P P^T) + P P^T$$ This adds virtually no overhead to the forward pass and avoids materializing individual gradients.

  • Orthogonal Matching Pursuit (OMP): Using $K$ and the mean gradient vector proxy, the authors frame subset selection as a sparse approximation problem ($\|w\|_0 \le m$). A Gram-matrix variant of OMP greedily selects the $m$ most representative samples and solves for optimal nonnegative-clipped, normalized sample weights $\gamma$.

  • Missing Baseline Comparison: Selective Backprop is compared against a simple baseline that draws a random subsample without replacement (equivalent to training with a smaller batch size or fewer update steps).

Datasets

The authors evaluate across five vision and text benchmarks using standard architectures:

  • CIFAR-10 & CIFAR-100: Trained on ResNet-18.
  • SVHN: Trained on WideResNet-16-4.
  • ImageNet-32 (32×32 downsampled ImageNet): Trained on WideResNet-28-2.
  • IMDB: Fine-tuning a pre-trained BERT model for binary sentiment classification.
  • Noisy label variants: CIFAR-10, CIFAR-100, SVHN, ImageNet-32, and IMDB with 10% and 20% synthetic label noise.

No new datasets were introduced.

Key Insights and Ideas

  • Better gradient estimates do not equal better training: At model initialization, gradient matching consistently achieves lower $L_2$ error to the true full-dataset gradient than random subsampling (while loss-based sampling actively inflates the error). Surprisingly, this improved gradient fidelity fails to translate into superior validation performance during training.
  • The power of missing baselines: Previous Selective Backprop studies demonstrated speedups relative to full-batch training, but omitted simple random subset selection. When compared directly, random selection achieves virtually identical final accuracy without any selection overhead.
  • Loss-based selection breaks under label noise: Because mislabeled examples produce persistently high loss, loss-based Selective Backprop heavily oversamples corrupted samples, degrading test accuracy severely at 10%–20% noise. In contrast, gradient matching and random sampling remain resilient.

Key Results

  • Computational Efficiency: Gradient matching adds less than 5% wall-clock overhead per epoch over vanilla Selective Backprop, with most of the minor delay stemming from CPU–GPU memory transfers.
  • Downstream Accuracy: Across subsampling fractions ($\rho \in [0.1, 0.5]$), gradient matching matches or outperforms loss-based Selective Backprop. However, across all five datasets and both fixed and scaled batch setups, neither method reliably beats random subsampling.
  • Robustness to Noise: On 10% and 20% corrupted labels, loss-based Selective Backprop collapses (e.g., dropping substantially on CIFAR-100 and ImageNet-32), whereas gradient matching remains close to full-batch and random baselines.
  • Learning Rate Tuning: Even after extensively sweeping a learning-rate scaling factor $\beta \in [10^{-1}, 10^1]$ across budgets, random subsampling matches or outperforms selective methods.

Limitations and Future Work

  • Algorithmic Refinements: The current formulation relies on post-hoc clipping to prevent negative OMP weights; true non-negative matching pursuit or weight regularization could prevent over-reliance on individual points.
  • GPU Implementation: The OMP solver was executed on the CPU using scikit-learn. Implementing Gram-based OMP natively in PyTorch on the GPU would eliminate data transfers.
  • Theoretical Puzzle: The paper leaves open the fundamental question of why better batch gradient approximations fail to improve optimization in deep learning over the stochastic noise inherent in random minibatch sampling.

Summary updated

BibTeX
@inproceedings{balles2023negative,
  author = {Lukas Balles and Cedric Archambeau and Giovanni Zappella},
  title = {{A Negative Result on Gradient Matching for Selective Backprop}},
  booktitle = {ICBINB @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=HnABvwYxc7},
}
Figure