Global curvature for second-order optimization of neural networks

Alberto BernacchiaICML 2025 · OpenReview

Second-order optimization methods—those that look at the "curvature" of the loss landscape rather than just the slope—have long been considered a holy grail for neural network training. In theory, they converge much faster than standard first-order methods like Gradient Descent or Adam. In practice, however, they are usually too computationally expensive to use because the curvature matrix (such as the Hessian) scales quadratically with the number of parameters. For a model with a million parameters, the curvature matrix contains a trillion elements.

A recent paper by Alberto Bernacchia from MediaTek Research, titled "Global curvature for second-order optimization of neural networks," proposes an elegant solution. By leveraging the inherent symmetries of neural networks, the author demonstrates that we can predict the exact structure of this massive matrix using only a handful of factors. This breakthrough makes exact second-order optimization surprisingly efficient.


The Computational Bottleneck of Curvature

Most deep learning models are trained using first-order methods that only evaluate the local gradient. Second-order methods use the curvature—how the gradient itself changes—to take more intelligent, direct steps toward the optimum.

The primary challenge is the computational burden. A curvature matrix for $p$ parameters is of size $p \times p$. For modern networks, storing and inverting this matrix is practically impossible. While existing approximations like KFAC or Shampoo use "Kronecker-factored" blocks to simplify the math, they often rely on block-diagonal assumptions that lack strong theoretical guarantees for non-linear networks. The authors of this paper sought to find the exact structure of the curvature without relying on these arbitrary assumptions.


The Solution: Leveraging Network Symmetry

The core breakthrough of the paper relies on applying group theory to network symmetry.

Permutation Symmetry: If you swap the positions of two neurons in a hidden layer—and swap their incoming and outgoing weights accordingly—the network's output remains completely identical.

Extracted figure from page 1 of Global curvature for second-order optimization of neural networks

Instead of looking at the curvature at one specific point in training (local curvature), the author analyzes the global curvature—the average curvature over the entire parameter space. By applying group theory to permutation symmetries, the author proves that the global curvature matrix is highly constrained.

For a Multi-Layer Perceptron (MLP), the curvature is not a random mess of $\mathcal{O}(p^2)$ numbers. It can be entirely described by a few small matrices related to the input/output dimensions ($d$) and the number of layers ($L$). This reduces the number of values needed to describe the curvature to just $\mathcal{O}(d^2 + L^2)$.

To operationalize this, the authors introduce the SymO (Symmetry-based Optimizer) algorithm. SymO estimates these small factors using momentum during training and employs a "surrogate matrix" trick to compute the second-order update without ever constructing the giant $p \times p$ matrix.


Key Insights and Results

The paper validates its theoretical framework using a Teacher-Student setup with synthetic data, specifically stressing the optimizer with a badly conditioned input covariance matrix.

Structural Accuracy

The theory shows that while the curvature matrix is highly structured, it is not strictly block-diagonal. It captures important inter-layer correlations that methods like KFAC miss. The authors empirically measured the gradient covariance of small networks and found it matched their theoretical "predicted" structure almost perfectly as training progressed.

Extracted figure from page 4 of Global curvature for second-order optimization of neural networks

Faster Convergence and Stability

In head-to-head tests against Gradient Descent, Adam, KFAC, and Shampoo, the SymO optimizer converged significantly faster, especially on ill-conditioned synthetic data. Furthermore, using the inverse square root of the curvature (similar to how Adam scales gradients) was found to be much more stable than using the standard Hessian inverse.


Limitations and Future Work

While the theory is a significant step forward, it currently has some boundaries:

  • Architecture Scope: The detailed derivations in this paper are specifically for MLPs. While the framework is general, specific "factor recipes" for CNNs, ResNets, or Transformers are left for future work.
  • Synthetic vs. Real World: The performance gains were demonstrated on synthetic tasks. Testing SymO on massive real-world datasets (like ImageNet or large-scale LLM training) is the next major hurdle.
  • Global vs. Local Trade-off: The method relies on global (averaged) curvature. If the local curvature at a specific point in training deviates wildly from the average, the SymO update might be less effective.

By proving that the exact global curvature of neural networks can be efficiently computed, this work paves the way for a deeper understanding of the loss landscape and the development of highly efficient second-order training methodologies.

Code available at: github.com/mtkresearch/symo_notebooks