GO Hessian for Expectation-Based Objectives

Yulai Cong, Miaoyun Zhao, Jianqiao Li, Junya Chen, Lawrence Carin

Abstract

An unbiased low-variance gradient estimator, termed GO gradient, was proposed recently for expectation-based objectives $\mathbb{E}_{q_\gamma(y)} [f(y)]$, where the random variable (RV) $y$ may be drawn from a stochastic computation graph (SCG) with continuous (non-reparameterizable) internal nodes and continuous/discrete leaves. Based on the GO gradient, we present for $\mathbb{E}_{q_\gamma(y)} [f(y)]$ an unbiased low-variance Hessian estimator, named GO Hessian, which contains the deterministic Hessian as a special case. Considering practical implementation, we reveal that the GO Hessian in expectation obeys the chain rule and is therefore easy-to-use with auto-differentiation and Hessian-vector products, enabling efficient cheap exploitation of curvature information over deep SCGs. As representative examples, we present the GO Hessian for non-reparameterizable gamma and negative binomial RVs/nodes. Leveraging the GO Hessian, we develop a new second-order method for $\mathbb{E}_{q_\gamma(y)} [f(y)]$, with challenging experiments conducted to verify its effectiveness and efficiency.

Introduction

In machine learning, many objectives are formulated as expectations: $\min_\gamma \mathbb{E}_{q_\gamma(y)}[f(y)]$. This framework is central to Variational Inference (VI), Reinforcement Learning (RL), and Generative Adversarial Networks (GANs). However, optimizing these objectives faces two significant hurdles. First, the distribution $q_\gamma$ depends on the parameters $\gamma$ (Framework II complexity). Second, many useful distributions, such as Gamma, Beta, and Negative Binomial, are non-reparameterizable. Standard alternatives like the "log-trick" (REINFORCE) suffer from extreme variance, making second-order optimization—which requires the Hessian—historically impractical due to noise.

The GO Hessian Framework

The GO Hessian (General and One-sample Hessian) addresses these challenges by extending the pathwise "GO gradient" framework. By applying the GO gradient twice, the authors derive an unbiased estimator with significantly lower variance than log-trick-based methods.

A key theoretical contribution is that the GO Hessian in expectation obeys the chain rule. This allows it to act like a deterministic Hessian within backpropagation frameworks. By defining "variable-nabla" (first-order) and "variable-hess" (second-order) building blocks for specific distributions, the GO Hessian can be integrated into modern auto-differentiation (AD) tools. This enables the use of Hessian-vector products (HVP) for "Hessian-free" optimization, avoiding the need to store large matrices while still exploiting curvature information.

Additionally, for Gamma distributions, the authors introduce a $\mu-\sigma$ reparameterization of shape and rate parameters. This decorrelates the objective surface, making it easier to navigate during optimization. To further improve stability, they propose the SCR-GO algorithm, which combines the GO Hessian with Stochastic Cubic Regularization (SCR). This second-order method is designed to navigate pathological curvatures, such as narrow valleys in the loss landscape, more effectively than first-order optimizers like Adam.

Key Results and Empirical Validation

The effectiveness of the GO Hessian was evaluated on synthetic Gamma distributions and MNIST-based tasks like Poisson Factor Analysis (PFA).

Comparison of Hessian estimation error between GO Hessian and the log-trick for Gamma and Negative Binomial distributions.

In head-to-head variance tests, the GO Hessian demonstrated orders of magnitude lower variance compared to the log-trick estimator for both Gamma and Negative Binomial distributions. This stability allows the estimator to work effectively with just a single sample per node.

Convergence of KL divergence versus oracle calls for SCR-GO compared to SGD and Adam.

On the MNIST PFA task, the SCR-GO method reached superior Evidence Lower Bound (ELBO) values in significantly fewer computational steps (oracle calls) than a well-tuned Adam optimizer. The experiments highlight that non-reparameterizable objectives often possess tricky geometry where first-order methods struggle, whereas second-order information from the GO Hessian allows for more direct paths to the optimum.

Conclusion and Future Work

The GO Hessian provides a robust tool for second-order optimization in stochastic computation graphs with non-reparameterizable nodes. While it offers superior convergence, it does introduce some computational overhead; a GO-HVP call is approximately 3x more expensive than a standard gradient call. Current limitations include the lack of support for discrete internal nodes and the requirement for analytically accessible PDF/CDFs. Future research may extend this framework to broader classes of stochastic models and further optimize the computational efficiency of the Hessian-vector products.

Summary updated

BibTeX
@inproceedings{cong2021go,
  author = {Yulai Cong and Miaoyun Zhao and Jianqiao Li and Junya Chen and Lawrence Carin},
  title = {{GO Hessian for Expectation-Based Objectives}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  url = {https://openreview.net/forum?id=oLIkHYXJ_D},
}
Figure