Abstract
In modern machine learning, many optimization problems involve objective functions that are compositions of two functions, typically represented as a function of an expectation. These Finite-Sum Compositional Optimization (FS-CEVF) problems are prevalent in fields ranging from portfolio management to reinforcement learning. However, they present unique challenges due to the bias introduced when estimating gradients of composite functions. This paper introduces Compositional Stochastic Average Gradient (C-SAG), a memory-based optimization algorithm that achieves linear convergence while significantly reducing the computational cost per iteration compared to existing state-of-the-art methods like C-SVRG.
Introduction
Optimization problems where the objective function takes the form $f(x) = F(G(x))$ are increasingly common. In these scenarios, both $F$ and $G$ are typically averages of many component functions. While standard Stochastic Gradient Descent (SGD) works well for simple sums, it struggles with compositions. The gradient of $F(G(x))$ requires an estimate of the inner term $G(x)$; using a random sample to estimate $G(x)$ and then passing it through the non-linear function $F$ results in a biased gradient estimate.
Existing approaches to mitigate this bias often fall into two categories: sub-linear methods like SCGD, which are slow to converge, or variance-reduced methods like C-SVRG, which achieve faster convergence but require a high number of "oracle queries" (function and gradient evaluations) at every step. C-SAG is proposed as a middle ground that maintains the fast convergence of variance-reduced methods while drastically lowering the per-iteration computational overhead.
The C-SAG Algorithm
The core innovation of C-SAG is the adaptation of the Stochastic Average Gradient (SAG) method to the compositional setting. Unlike methods that re-evaluate functions from scratch, C-SAG utilizes a memory-based approach to store and reuse information. The algorithm maintains three distinct memory buffers:
- $J$ (Jacobians): Stores the derivatives of the inner functions.
- $V$ (Values): Stores the values of the inner functions.
- $Q$ (Gradients): Stores the gradients of the outer functions.
During each iteration, C-SAG randomly selects a component function to update in its memory. It then constructs a gradient estimate by averaging the newly computed "fresh" update with the "stale" values already stored in the buffers. To prevent the accumulation of error from these biased, stale estimates, the algorithm incorporates a periodic refresh mechanism that recomputes the full gradient.
Computational Efficiency and Convergence
A key advantage of C-SAG is its efficiency in terms of oracle queries. While the previous gold standard, C-SVRG, typically requires $2A+4$ queries per iteration (where $A$ is the mini-batch size), C-SAG requires only approximately $A+2$. This effectively halves the computational effort required for each step.
Despite the use of stale data and biased estimates, the authors provide a rigorous theoretical framework proving that C-SAG maintains a linear convergence rate for strongly convex functions. This allows it to match the theoretical speed of more expensive algorithms while remaining more practical for large-scale applications.
Experimental Evaluation
The researchers evaluated C-SAG using a Mean-Variance Portfolio Optimization task. This classic problem involves maximizing expected returns while minimizing the variance (risk) of the portfolio, a structure that fits the FS-CEVF framework perfectly. The experiments used two synthetic datasets:
- D1: 2,000 time points and 200 assets ($n=2000, N=200$).
- D2: 5,000 time points and 300 assets ($n=5000, N=300$).
These datasets were generated using multi-variate Gaussian distributions with controlled condition numbers to test the algorithm's robustness across different scales.
Key Results
The experimental results demonstrated several advantages for C-SAG:
- Superior Convergence: C-SAG converged substantially faster than both the Full Gradient (FG) method and various C-SVRG implementations.
- Resource Efficiency: When measured against a fixed "computational budget" (total number of oracle queries), C-SAG consistently reached a lower objective value than its competitors, indicating it makes better use of every calculation.
- Hyperparameter Dynamics: The algorithm showed better performance with smaller mini-batch sizes. Additionally, the update period ($K$) presented a clear trade-off: larger values of $K$ accelerated initial convergence but risked instability if the memory was not refreshed frequently enough.
Limitations and Future Outlook
While C-SAG offers significant speedups, it introduces a memory overhead of $O(np)$ to store Jacobians and values for every data point. Although the authors suggest this can be optimized to $O(n)$ in certain cases, it remains a consideration for extremely large datasets. Furthermore, the current theoretical guarantees are limited to strongly convex functions; extending the proof to non-convex settings—common in deep learning—is a priority for future research.
Future work may also involve developing a distributed version of C-SAG using the ADMM framework to further scale the algorithm for massive, decentralized machine learning tasks.
Summary updated