Unbiased Simulation for Optimizing Stochastic Function Compositions

José Blanchet, Donald Goldfarb, Garud Iyengar, Fengpei Li, Chaoxu ZhouarXiv 2017 · DOI · arXiv

Abstract: In this paper, we introduce an unbiased gradient simulation algorithms for solving convex optimization problem with stochastic function compositions. We show that the unbiased gradient generated from the algorithm has finite variance and finite expected computation cost. We then combined the unbiased gradient simulation with two variance reduced algorithms (namely SVRG and SCSG) and showed that the proposed optimization algorithms based on unbiased gradient simulations exhibit satisfactory convergence properties. Specifically, in the SVRG case, the algorithm with simulated gradient can be shown to converge linearly to optima in expectation and almost surely under strong convexity. Finally, for the numerical experiment,we applied the algorithms to two important cases of stochastic function compositions optimization: maximizing the Cox's partial likelihood model and training conditional random fields.

The Challenge of Stochastic Compositions

In standard machine learning, the goal is typically to minimize an empirical risk of the form $\min \frac{1}{n} \sum f_i(x)$. Stochastic Gradient Descent (SGD) is highly effective here because sampling a random index $i$ provides an unbiased estimate of the total gradient. However, many modern problems—such as reinforcement learning (Bellman equations), risk-averse optimization, and survival analysis—involve stochastic compositions. These are structured as:

$$F(x) = \mathbb{E}_v[f_v(\mathbb{E}_w[g_w(x)])]$$

The nested nature of these functions presents a significant hurdle: if one simply samples $w$ to estimate the inner expectation and plugs that into the outer function $f_v$, the resulting gradient estimate is biased. Historically, researchers relied on biased stochastic gradient oracles, which often lead to sub-linear convergence rates or heavy dependencies on the number of component functions. This paper addresses the fundamental question: Can we generate a truly unbiased gradient for these nested functions without infinite computation?

Unbiased Gradient Simulation

The core innovation of this work is a framework that bridges simulation and optimization using a "bias removal" randomization scheme based on Multilevel Monte Carlo (MLMC).

By sampling a geometric random variable $N$ and constructing a telescoping sum of estimators with increasing precision, the authors produce a gradient estimate that is unbiased in expectation. The key insight is that one does not need to compute the inner expectation perfectly. Instead, by cleverly weighting differences between estimators of different "levels" (sample sizes), the bias of lower levels is cancelled out by the expectation of higher levels.

Algorithm 1: The core unbiased gradient simulation procedure using Multilevel Monte Carlo.

The authors prove that as long as parameters like the rate parameter $\gamma$ of the geometric distribution are chosen correctly ($1 < \gamma < 2$), this estimator maintains both finite variance and finite expected computational cost. Remarkably, the computational cost of generating these unbiased gradients is independent of the dimension of the objective function.

Integration with Variance Reduction

To achieve high-performance optimization, the authors integrate this unbiased "simulated" gradient into two popular variance-reduction frameworks:

  1. Simulated SVRG: A variant of Stochastic Variance Reduced Gradient that uses the unbiased simulation to anchor gradients.
  2. Simulated SCSG: Stochastically Controlled Stochastic Gradient, which is particularly useful when full gradients are too expensive to compute.
Algorithm 3: The SimulatedGradient procedure used within variance-reduced optimization frameworks.

Because the simulated gradients are unbiased, the authors can leverage the theoretical strengths of SVRG. They prove that for strongly convex functions, the algorithm converges linearly—meaning the error drops exponentially—to the optimum. This is a significant improvement over previous biased methods that often struggled to reach high precision.

Experimental Results

The algorithms were evaluated on two primary tasks:

  • Cox’s Partial Likelihood: A standard model in survival analysis. Using simulated data with $n=10,000$ observations and $p=1,000$ features, the authors demonstrated that Simulated SVRG significantly outperformed standard Gradient Descent and prior state-of-the-art biased methods. On log-scale plots of error versus iterations, the proposed method showed a much steeper and more consistent downward slope.
  • Conditional Random Fields (CRF): Using the Optical Character Recognition (OCR) dataset, the authors showed that their method effectively trains complex graphical models where the partition function naturally creates a composition structure.

While Simulated SCSG performed well without requiring full gradient evaluations—making it a viable "lightweight" alternative for massive datasets—it was slightly less stable than the SVRG variant due to the lack of full gradient anchoring.

Conclusion and Future Directions

This work provides a robust theoretical and practical framework for optimizing stochastic compositions. By combining MLMC-based unbiased simulation with variance reduction, the authors achieve linear convergence for a class of problems previously limited by bias. While the strongest results currently require strong convexity, extending this framework to non-convex problems, such as those found in deep reinforcement learning, remains a promising avenue for future research.

Summary updated

Abstract

In this paper, we introduce an unbiased gradient simulation algorithms for solving convex optimization problem with stochastic function compositions. We show that the unbiased gradient generated from the algorithm has finite variance and finite expected computation cost. We then combined the unbiased gradient simulation with two variance reduced algorithms (namely SVRG and SCSG) and showed that the proposed optimization algorithms based on unbiased gradient simulations exhibit satisfactory convergence properties. Specifically, in the SVRG case, the algorithm with simulated gradient can be shown to converge linearly to optima in expectation and almost surely under strong convexity. Finally, for the numerical experiment,we applied the algorithms to two important cases of stochastic function compositions optimization: maximizing the Cox's partial likelihood model and training conditional random fields.
BibTeX
@misc{blanchet2017unbiased,
  author = {José Blanchet and Donald Goldfarb and Garud Iyengar and Fengpei Li and Chaoxu Zhou},
  title = {{Unbiased Simulation for Optimizing Stochastic Function Compositions}},
  year = {2017},
  eprint = {1711.07564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.07564},
}
Figure