Solving Stochastic Compositional Optimization is Nearly as Easy as Solving Stochastic Optimization

Tianyi Chen, Yuejiao Sun, Wotao YinIEEE TSP 2020 · DOI

Abstract

Stochastic Compositional Optimization (SCO) is traditionally more challenging than standard stochastic optimization due to the bias introduced by nested expectations. This paper introduces the Stochastically Corrected Stochastic Compositional (SCSC) gradient method, a single-loop approach that achieves the $O(k^{-1/2})$ convergence rate typical of standard Stochastic Gradient Descent (SGD). By utilizing a linear correction term derived from ODE analysis, SCSC eliminates the need for complex multi-loop structures or multi-timescale updates, effectively bridging the efficiency gap between compositional and non-compositional optimization.

Introduction

Solving nested stochastic expectations is notoriously harder than standard optimization. In many modern machine learning contexts—such as reinforcement learning (policy evaluation) and meta-learning (MAML)—the objective function takes a compositional form. Traditionally, these problems have required complex multi-loop algorithms or slow, multi-timescale updates that hinder performance. This paper introduces SCSC, a simple, single-loop method that matches the $O(k^{-1/2})$ convergence rate of standard Stochastic Gradient Descent (SGD).

The Challenge of Compositional Optimization

The paper addresses Stochastic Compositional Optimization (SCO), where the objective is to minimize a function of the form:

$$F(\theta) = f(g(\theta))$$

The fundamental challenge is that standard SGD cannot be applied directly. A random sample used to estimate the inner function $g(\theta)$ results in a biased stochastic gradient when plugged into the outer function $f$. Previous approaches, such as Stochastic Compositional Gradient Descent (SCGD), attempted to mitigate this by using two different "timescales," updating the inner function estimate significantly slower than the main parameters. However, this approach slows the learning rate to $O(k^{-1/4})$ or $O(k^{-4/9})$. While variance-reduction methods can achieve faster rates, they often rely on complex double-loop structures and increasing batch sizes, making them difficult to implement and tune.

The SCSC Methodology

The authors propose the Stochastically Corrected Stochastic Compositional (SCSC) gradient method. The core innovation is a linear correction term added to the variable tracking the inner function value ($y^k$). This correction ensures that the tracker stays close to the true value of $g(\theta^k)$ even as the parameters $\theta$ evolve rapidly.

Two versions of the correction are provided:

  1. SCSC-(7b): Utilizes a Hessian-gradient product, ideal for meta-learning where such products are already computed.
  2. SCSC-(7c): A "Hessian-free" alternative using a first-order Taylor expansion, requiring only two function evaluations.

By employing this correction, SCSC can operate on a single-time scale, allowing both the tracker and the parameters to move at the same speed. This simplicity also enables the creation of Adam SCSC, an adaptive variant of the algorithm.

Comparative Analysis

The theoretical benefits of SCSC are best understood when compared to existing literature. SCSC achieves the "gold-standard" convergence rate without the overhead of double loops or the instability of multi-timescale updates.

Comparison of SCSC with existing single-loop and double-loop methods.

As shown in the table above, SCSC matches the sample complexity of the most advanced single-loop methods ($\epsilon^{-2}$) while maintaining a constant batch size. This makes it significantly more practical than previous state-of-the-art methods like NASA or double-loop variance reduction techniques that require increasing batch sizes.

Empirical Validation

The authors evaluated SCSC across two distinct domains:

  • Risk-Averse Portfolio Management: Using the Industrial-49 and 100 Book-to-Market datasets, Adam SCSC consistently outperformed SCGD and NASA, achieving lower objective errors.
  • Model-Agnostic Meta-Learning (MAML): On a Sinewave Regression benchmark, SCSC demonstrated superior stability compared to the NASA algorithm, particularly when handling non-smooth components like ReLU activations.

Insights and Future Directions

The design of SCSC was informed by Ordinary Differential Equation (ODE) analysis. By examining the continuous-time "energy" of the system, the researchers identified the specific terms causing bias and instability, allowing them to design the stochastic correction to cancel these effects.

While SCSC excels on smooth, nonconvex functions, future work will focus on:

  • Non-smooth Analysis: Formalizing the performance of SCSC for strictly non-smooth compositional problems.
  • Distributed Systems: Adapting the method for decentralized and asynchronous environments.
  • Communication Efficiency: Implementing communication compression for large-scale training.

In conclusion, SCSC demonstrates that stochastic compositional optimization can be nearly as efficient and simple as standard stochastic optimization, providing a robust tool for complex machine learning tasks.

Summary updated

BibTeX
@article{chen2020solving,
  author = {Tianyi Chen and Yuejiao Sun and Wotao Yin},
  title = {{Solving Stochastic Compositional Optimization is Nearly as Easy as Solving Stochastic Optimization}},
  journal = {IEEE Trans. Signal Process.},
  year = {2020},
  doi = {10.1109/tsp.2021.3092377},
}
Figure