LGSep 30, 2025

Per-example gradients: a new frontier for understanding and improving optimizers

arXiv:2510.00236v11 citationsh-index: 11
Originality Incremental advance
AI Analysis

This work provides a new tool for understanding and designing optimization algorithms, with potential broad impact in machine learning, though it is incremental in advancing existing methods.

The paper tackles the challenge of efficiently computing per-example gradient statistics in deep learning, showing it can be done with minimal overhead, and uses this to analyze and improve optimizers like signSGD and Adam, revealing that optimal preconditioning depends on the mean rather than variance of gradients.

Training algorithms in deep learning usually treat a mini-batch of samples as a single object; they average gradients over the mini-batch, and then process the average in various ways. Computing other statistics beyond the average may have been seen as prohibitively resource intensive in automatic differentiation (AD) frameworks. We show that this is not the case. Generally, gradient statistics can be implemented through a surgery of the AD graph, which, in some cases, incur almost no computational and memory overheads compared to the mini-batch gradient computation. Additionally, we show that in certain classes of models, including transformers, JAX's vectorization transformation offers a viable implementation for prototyping and experimentation. We then revise our understanding of two nonlinear operations in optimization through the lens of per-example gradient transformations. We first study signSGD and show that the optimal placement of the sign operation in the gradient processing chain is crucial to success and can be predicted with a simple signal-to-noise ratio argument. Next we study per-example variations of the Adam preconditioner, and show that optimization is best served when the preconditioner is dominated by the mean rather than the variance of the gradient distribution - in contrast to conventional wisdom. Overall we demonstrate that per-example gradient information enables new analyses and possibilities for algorithm design.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes