In the landscape of deep learning, first-order optimizers like SGD and Adam are the standard workhorses. They are computationally cheap, requiring only the gradient of the loss to update model weights. However, these methods are "geometry-blind": they treat the loss landscape as if it has the same curvature in every direction. In reality, neural network landscapes are full of narrow valleys and flat plateaus where first-order methods either oscillate wildly or crawl at a snail's pace.
Second-order methods, such as Newton’s method, solve this by using the Hessian matrix—the second derivative of the loss—to account for curvature. By scaling updates by the inverse of the Hessian, these methods can take direct paths to the optimum. The catch is the cost: for a model with $d$ parameters, the full Hessian has $d^2$ elements, making it impossible to store or invert for modern Large Language Models (LLMs).
A growing body of research suggests a powerful middle ground: Diagonal Hessian Approximation. By considering only the diagonal elements of the Hessian, researchers can capture essential curvature information with the same linear memory and time complexity as first-order methods.
The Intuition: Adaptive Scaling per Parameter
The core idea behind diagonal methods is to treat each parameter as if its contribution to the loss curvature is independent of the others. While this ignores the off-diagonal interactions (how changing one weight affects the sensitivity of another), it provides a crucial "per-coordinate" scaling factor.
As Felix Benning explores in High Dimensional Optimization through the Lens of Machine Learning, many popular heuristics like RMSProp are actually implicit forms of diagonal rescaling. By dividing the gradient by a running average of its magnitude, these optimizers approximate the local curvature. Jean Lafond, Leon Bottou, and Nicolas Vasilache formalize this in Diagonal Rescaling For Neural Networks, showing that these "tricks" are essentially second-order updates in disguise.
Efficiently Estimating the Diagonal
Calculating even just the diagonal of a Hessian is not trivial, as standard backpropagation only provides first derivatives. Researchers have developed three primary ways to estimate these values without the $O(d^2)$ cost:
1. Stochastic Probing (Hutchinson’s Algorithm)
Amir Gholami and Zhewei Yao introduced ADAHESSIAN (arxiv 2020, aaai 2021), which uses Hutchinson’s algorithm. By computing a Hessian-vector product—which costs about the same as one extra backpropagation step—and using a random probing vector, the algorithm can extract an unbiased estimate of the Hessian's diagonal. This allows the optimizer to be as scalable as Adam while being much more robust to hyperparameters.
2. Zeroth-Order Perturbations
For extremely large models where backpropagation itself is too memory-intensive, "zeroth-order" methods estimate the diagonal using only forward passes. Yanjun Zhao and colleagues developed HiZOO (arxiv 2024, iclr 2025), which perturbs the weights and measures the change in loss to infer curvature. Similarly, Hanzhen Zhao introduced PaZO (neurips 2025), proving that these diagonal estimates can significantly accelerate the fine-tuning of 66B-parameter models by identifying which directions in the loss landscape are most sensitive.
3. Gradient-Based Proxies
In some contexts, the element-wise product of gradients serves as a proxy for second-order information. Xuanhua Yang and Jianxin Zhao use this in Gradient Coordination for Quantifying and Maximizing Knowledge Transference in Multi-Task Learning to manage task interference without the overhead of full Hessian calculations.
Applications Across the Lifecycle
The utility of the diagonal Hessian extends beyond simple training speedups:
- LLM Pre-training: Hong Liu and Tengyu Ma proposed Sophia (iclr 2024), a second-order optimizer that achieves a 2x speedup over AdamW. Sophia uses a lightweight diagonal Hessian estimate combined with per-coordinate clipping to handle the non-convexity of language modeling.
- Machine Unlearning: When a model needs to "forget" specific data, Jinghan Jia and Yihua Zhang show in SOUL (emnlp 2024) that second-order information is vital. It allows the model to erase targeted knowledge while preserving general reasoning by understanding the geometric sensitivity of the weights.
- Model Compression: In Fishing For Cheap And Efficient Pruners At Initialization, Ivo Gollini Navarrete and Martin Takác demonstrate that diagonal Hessian estimates can identify which weights are safe to prune before training even begins.
Why it Works: The Efficiency-Accuracy Tradeoff
The success of these methods stems from a pragmatic realization: while the full Hessian is more accurate, the diagonal is "accurate enough" to provide a massive improvement over first-order methods. As Hugo Van hamme noted in The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization, reducing complex matrix inversions to element-wise divisions allows for rapid convergence on modern hardware.
By capturing the relative scale of different parameters, diagonal Hessian approximations allow optimizers to navigate the "ill-conditioned" landscapes of deep neural networks—where some directions are thousands of times more sensitive than others—without the prohibitive cost of full second-order optimization.