Abstract: Stochastic compositional optimization arises in many important machine learning tasks such as value function evaluation in reinforcement learning and portfolio management. The objective function is the composition of two expectations of stochastic functions, and is more challenging to optimize than vanilla stochastic optimization problems. In this paper, we investigate the stochastic compositional optimization in the general smooth non-convex setting. We employ a recently developed idea of Stochastic Recursive Gradient Descent to design a novel algorithm named SARAH-Compositional, and prove a sharp Incremental First-order Oracle (IFO) complexity upper bound for stochastic compositional optimization: $\mathcal{O}((n+m)^{1/2} \varepsilon^{-2})$ in the finite-sum case and $\mathcal{O}(\varepsilon^{-3})$ in the online case. Such a complexity is known to be the best one among IFO complexity results for non-convex stochastic compositional optimization, and is believed to be optimal. Our experiments validate the theoretical performance of our algorithm.
Introduction
The authors address the challenge of stochastic compositional optimization, where the objective function takes the form $\Phi(x) = f(g(x))$. In this setting, both the outer function $f$ and the inner function $g$ are expectations of stochastic functions. This structure is prevalent in reinforcement learning (e.g., Bellman equation-based value evaluation), risk-averse portfolio management, and deep learning.
Unlike standard stochastic optimization, the gradient of a compositional function depends directly on the value of the inner function $g(x)$. Since $g(x)$ is an expectation, computing it exactly is often computationally prohibitive or impossible in online settings. Previous approaches like Stochastic Compositional Gradient Descent (SCGD) or SVRG-based methods have struggled with slow convergence or high oracle complexity.
The SARAH-Compositional Algorithm
The proposed algorithm, SARAH-Compositional, integrates the Stochastic Recursive Gradient Descent (SARAH) framework into the compositional optimization landscape. The core innovation is the use of recursive variance reduction for three distinct components:
- Inner Function Value ($g$): A recursive estimator tracks the inner function's value.
- Inner Jacobian ($\partial g$): Variance reduction is applied to the derivative of the inner mapping.
- Total Gradient ($\nabla \Phi$): The algorithm maintains a variance-reduced estimate of the overall compositional gradient.
By employing a two-time-scale approach—alternating between periodic large-batch updates and frequent, small recursive updates—SARAH-Compositional maintains low-variance gradient estimates. This allows for larger step sizes and faster convergence compared to vanilla stochastic methods.
Theoretical Complexity and Results
The primary contribution of this work is the establishment of new state-of-the-art complexity bounds for smooth non-convex compositional problems. The authors demonstrate that SARAH-Compositional achieves an Incremental First-order Oracle (IFO) complexity of $O((n + m)^{1/2}\epsilon^{-2})$ for finite-sum problems and $O(\epsilon^{-3})$ for online problems.
As shown in the table above, these results represent a significant improvement over existing methods. In the finite-sum case, the complexity is reduced from the previous best of $O((n + m)^{2/3}\epsilon^{-2})$. In the online case, the improvement from $O(\epsilon^{-3.6})$ to $O(\epsilon^{-3})$ is substantial. These bounds are currently the best known in the literature and are conjectured to be optimal.
Experimental Validation
The theoretical gains were validated through experiments across three distinct domains:
- Portfolio Management: Using both synthetic data and real-world datasets from the Ken French library, the algorithm demonstrated faster convergence to lower objective values and smaller gradient norms.
- Reinforcement Learning: In a simulated Markov Decision Process (MDP) with 400 states, SARAH-Compositional efficiently evaluated value functions via the Bellman equation.
- Dimension Reduction: On the MNIST dataset using Stochastic Neighbor Embedding (SNE), the algorithm exhibited superior numerical stability and faster descent compared to SCGD and VRSC-PG, particularly within the inner loops of the optimization process.
Conclusion and Future Work
SARAH-Compositional sets a new benchmark for stochastic compositional optimization in non-convex settings. By leveraging recursive variance reduction, it achieves optimal theoretical complexity and demonstrates robust empirical performance. The authors acknowledge that while this work covers smooth functions, many real-world problems involve non-smooth components (like ReLU activations), providing a clear path for future research. Additionally, while the upper bounds are now sharp, the formal theoretical lower bound for this class of optimization remains an open question.
Summary updated