Approximate Newton-based statistical inference using only stochastic gradients

Tianyang Li, Anastasios Kyrillidis, Liu Liu, Constantine Caramanis

Introduction

In modern machine learning, optimization algorithms are primarily designed to find point estimates—the single best set of weights for a model. However, in scientific research and high-stakes decision-making, point estimates are rarely enough. We require statistical inference: the ability to quantify uncertainty through confidence intervals and p-values.

Traditionally, extracting these uncertainty metrics requires the inverse Fisher information matrix (the inverse Hessian). For a model with $p$ parameters, this involves storing and computing a $p \times p$ matrix, which is computationally prohibitive for large-scale models. Alternative methods like the Bootstrap require retraining the model hundreds of times, which is equally expensive. This paper introduces a highly scalable framework that performs inference using only first-order information—stochastic gradients—avoiding the massive memory and computational costs of traditional second-order methods.

Methodology: Inference via First-Order Information

The core innovation of this work is the use of a finite difference approximation of the Hessian-vector product. Instead of explicitly computing the full Hessian $\nabla^2 f(\theta)$, the authors approximate its product with a vector $v$ using two gradient steps:

$$\nabla^2 f(\theta)v \approx \frac{\nabla f(\theta+\delta v) - \nabla f(\theta)}{\delta}$$

This trick allows the authors to extract second-order uncertainty information without ever building a $p \times p$ matrix. This approach is applied across three distinct domains:

  1. Unregularized M-estimation: A nested-loop algorithm where the outer loop takes approximate stochastic Newton steps, and the inner loop uses Stochastic Gradient Descent (SGD) to solve the Newton step via the finite difference trick.
  2. High-dimensional LASSO: To handle the degenerate Hessian of standard LASSO, the authors propose a modified $\ell_1$-regularized objective that replaces the Hessian with a soft-thresholded covariance estimate, solved using Proximal SVRG.
  3. Time Series: To handle dependent data, the authors utilize block sampling (similar to a circular bootstrap) to capture temporal dependencies.
Algorithm 1: The proposed nested-loop framework for unregularized M-estimation statistical inference.

Key Insights

  • First-order is enough: Rich uncertainty information (the statistical error covariance) can be extracted without explicitly building second-order matrices.
  • SVRG as a Newton Method: The authors provide an intuitive view of the popular SVRG optimization algorithm, demonstrating that its inner loops can be viewed as using SGD to solve proximal Newton steps.
  • Adversarial Detection: The authors show that adversarial perturbations push gradients into the Hessian's null space. This provides a novel, statistically grounded mechanism for detecting attacks on neural networks.

Empirical Results

The proposed method was validated across synthetic and real-world datasets, including Fashion MNIST, genomic data (HIV drug resistance), and financial time-series.

On low-dimensional synthetic tasks, the "Approximate Newton" method matched the coverage and interval length of computationally expensive Bootstrap and Jackknife methods while requiring significantly fewer numerical operations. As shown in the table below, the method maintains high coverage (near the 0.90 target) with competitive interval lengths compared to standard benchmarks.

Performance comparison on synthetic linear regression datasets (Lin1, Lin2). Values represent (coverage, interval length).

In high-dimensional settings, the method successfully identified verified drug-resistance mutations in an HIV genetic dataset while strictly controlling the family-wise error rate at 0.05. For adversarial detection on Fashion MNIST, the statistical score for perturbed images was an order of magnitude higher than for random noise, allowing for clear separation.

Limitations and Future Work

While highly efficient, the primary algorithm (Algorithm 1) does not guarantee strict asymptotic normality for the average of iterates in all scenarios. To address this, the authors designed a more robust SVRG-based variant, though it requires a full gradient evaluation in each outer loop. Additionally, the sample complexity for high-dimensional LASSO intervals is slightly higher than some state-of-the-art methods, representing a trade-off for better optimization convergence guarantees. Future work will focus on a deeper theoretical understanding of Edgeworth expansions to further refine these algorithmic variants.

Summary updated

BibTeX
@misc{li2018approximate,
  author = {Tianyang Li and Anastasios Kyrillidis and Liu Liu and Constantine Caramanis},
  title = {{Approximate Newton-based statistical inference using only stochastic gradients}},
  year = {2018},
  eprint = {1805.08920},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.08920},
}
Figure