Active Probabilistic Inference on Matrices for Pre-Conditioning in Stochastic Optimization

Filip de Roos, Philipp Hennig

Abstract

This paper introduces a probabilistic algorithm to actively infer low-rank Hessian approximations from noisy Hessian-vector products. By treating matrix estimation as a Bayesian inference problem, the authors successfully adapt classic iterative linear algebra techniques to the highly stochastic environment of modern machine learning. This approach yields robust pre-conditioners and automatic learning-rate adapters that remain stable even when standard numerical methods diverge.

Introduction

In optimization, pre-conditioning transforms a problem's input space to reduce its condition number—the ratio of the largest to smallest eigenvalues of the Hessian. A lower condition number leads to faster and more stable convergence. While deterministic optimization can use iterative methods like Conjugate Gradients (CG) to build pre-conditioners, contemporary machine learning relies on stochastic optimization (e.g., mini-batch SGD). In these settings, we only have access to noisy, batch-sampled approximations of the Hessian. Classic iterative solvers are notoriously brittle under such conditions, often diverging when fed noisy matrix-vector products. This research addresses the challenge of constructing a stable iterative solver capable of estimating a pre-conditioner despite the heavy structured noise inherent in mini-batch training.

Methodology

The authors propose an active probabilistic inference algorithm that maintains a Gaussian posterior measure over the objective function's Hessian.

Matrix Inference with Structured Noise

The core mathematical contribution involves extending matrix-variate Gaussian inference to handle structured observation noise. Unlike simple i.i.d. noise, mini-batch noise scales with the batch's empirical covariance. The authors formulate the posterior update as a "matrix pencil" problem, solved efficiently via generalized eigen-decomposition.

Active Inference

Rather than randomly sampling directions to probe the Hessian, the algorithm actively selects non-redundant projection directions to maximize information gain. This process is structurally similar to classic solvers like GMRES but replaces standard Gram-Schmidt orthogonalization with explicit Gaussian inference.

High-Dimensional Adaptation

For deep learning, computing a full pre-conditioner is computationally intractable. The authors approximate the Hessian as a layer-wise block matrix. In these high-dimensional spaces, the algorithm simplifies into an automatic scalar learning-rate adapter for each layer, capturing the general scale of curvature without the overhead of full matrix operations.

Experimental Evaluation

The method was evaluated across three distinct tasks:

  • SARCOS: A robotics dataset for 21-dimensional (expanded to 253) ill-conditioned linear regression.
  • MNIST: A convex, non-linear logistic regression task for digit classification.
  • CIFAR-10: A high-dimensional deep learning task using a Convolutional Neural Network (CNN).

Key Results

Robustness to Noise

On the SARCOS regression task, standard CG diverged immediately due to mini-batch noise. In contrast, the proposed probabilistic solver remained stable across various batch sizes, significantly accelerating convergence compared to standard SGD.

Robustness of the probabilistic solver (prec-sgd) across various batch sizes compared to standard SGD and Conjugate Gradients (CG).

Performance and Auto-scaling

On the MNIST task, the pre-conditioned SGD matched the performance of an SGD baseline perfectly tuned with an oracle optimal step-size. For deep learning on CIFAR-10, the algorithm achieved performance comparable to well-tuned SGD regardless of the initial learning rate, automatically finding the correct trajectory even when initialized with rates spanning orders of magnitude.

Comparison of training loss and test accuracy for prec-sgd against optimally tuned SGD and an oracle.

Discussion and Conclusion

By viewing iterative linear solvers through the lens of probabilistic inference, numerical methods can be made robust to the stochasticity of machine learning. The algorithm naturally suppresses search directions co-linear with previous samples, focusing on new information. While the method currently relies on some heuristic hyperparameters and layer-wise approximations for deep learning, it demonstrates that active probing can drastically outperform simple averaging in noisy settings. This work opens the door for applying probabilistic numerical methods to other large-scale machine learning problems where structured noise currently limits the use of efficient numerical algorithms.

Summary updated

BibTeX
@inproceedings{roos2019active,
  author = {Filip de Roos and Philipp Hennig},
  title = {{Active Probabilistic Inference on Matrices for Pre-Conditioning in Stochastic Optimization}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
}
Figure