Accelerating Stochastic Composition Optimization

by   Mengdi Wang, et al.
Princeton University

Consider the stochastic composition optimization problem where the objective is a composition of two expected-value functions. We propose a new stochastic first-order method, namely the accelerated stochastic compositional proximal gradient (ASC-PG) method, which updates based on queries to the sampling oracle using two different timescales. The ASC-PG is the first proximal gradient method for the stochastic composition problem that can deal with nonsmooth regularization penalty. We show that the ASC-PG exhibits faster convergence than the best known algorithms, and that it achieves the optimal sample-error complexity in several important special cases. We further demonstrate the application of ASC-PG to reinforcement learning and conduct numerical experiments.



There are no comments yet.


page 1

page 2

page 3

page 4


Nonconvex Stochastic Nested Optimization via Stochastic ADMM

We consider the stochastic nested composition optimization problem where...

Improved Oracle Complexity of Variance Reduced Methods for Nonsmooth Convex Stochastic Composition Optimization

We consider the nonsmooth convex composition optimization problem where ...

Improved Incremental First-Order Oracle Complexity of Variance Reduced Methods for Nonsmooth Convex Stochastic Composition Optimization

We consider the nonsmooth convex composition optimization problem where ...

Duality-free Methods for Stochastic Composition Optimization

We consider the composition optimization with two expected-value functio...

On the Iteration Complexity Analysis of Stochastic Primal-Dual Hybrid Gradient Approach with High Probability

In this paper, we propose a stochastic Primal-Dual Hybrid Gradient (PDHG...

Multi-Level Composite Stochastic Optimization via Nested Variance Reduction

We consider multi-level composite optimization problems where each mappi...

A Logarithmic Barrier Method For Proximal Policy Optimization

Proximal policy optimization(PPO) has been proposed as a first-order opt...

Code Repositories


This project collects the different accepted papers and their link to Arxiv or Gitxiv

view repo
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The popular stochastic gradient methods are well suited for minimizing expected-value objective functions or the sum of a large number of loss functions. Stochastic gradient methods find wide applications in estimation, online learning, and training of deep neural networks. Despite their popularity, they do not apply to the minimization of a nonlinear function involving expected values or a composition between two expected-value functions.

In this paper, we consider the stochastic composition problem, given by


where denotes the function composition, and are continuously differentiable functions,

are random variables, and

is an extended real-valued closed convex function. We assume throughout that there exists at least one optimal solution to problem (1). We focus on the case where and are smooth, but we allow to be a nonsmooth penalty such as the -norm. We do no require either the outer function or the inner function to be convex or monotone. The inner and outer random variables can be dependent.

Our algorithmic objective is to develop efficient algorithms for solving problem (1) based on random evaluations of , and their gradients. Our theoretical objective is to analyze the rate of convergence for the stochastic algorithm and to improve it when possible. In the online setting, the iteration complexity of stochastic methods can be interpreted as sample-error complexity of estimating the optimal solution of problem (1).

1.1 Motivating Examples

One motivating example is reinforcement learning (Sutton and Barto, 1998)

. Consider a controllable Markov chain with states

. Estimating the value-per-state of a fixed control policy is known as on-policy learning. It can be casted into an system of Bellman equations:

where is a discount factor,

is the transition probability from state

to state , and is the expected state transition reward at state . The solution

to the Bellman equation is the value vector, with

being the total expected reward starting at state . In the blackbox simulation environment, are unknown but can be sampled from a simulator. As a result, solving the Bellman equation becomes a special case of the stochastic composition optimization problem:


where are random matrices and random vectors such that and . It can be viewed as the composition of the square norm function and the expected linear function. We will give more details on the reinforcement learning application in Section 4.

Another motivating example is risk-averse learning

. For example, consider the mean-variance minimization problem

where is some loss function parameterized by random variables and , and is a regularization parameter. Its batch version takes the form

Here the variance term is the composition of the mean square function and an expected loss function. Indeed, the stochastic composition problem (1) finds a broad spectrum of applications in estimation and machine learning. Fast optimization algorithms with theoretical guarantees will lead to new computation tools and online learning methods for a broader problem class, no longer limited to the expectation minimization problem.

1.2 Related Works and Contributions

Contrary to the expectation minimization problem, “unbiased" gradient samples are no longer available for the stochastic composition problem (1). The objective is nonlinear

in the joint probability distribution of

, which substantially complicates the problem. In a recent work by Dentcheva et al. (2015)

, a special case of the stochastic composition problem, i.e., risk-averse optimization, has been studied. A central limit theorem has been established, showing that the

-sample batch problem converges to the true problem at the rate of in a proper sense. For the case where , Wang et al. (2016) has proposed and analyzed a class of stochastic compositional gradient/subgradient methods (SCGD). The SCGD involves two iterations of different time scales, one for estimating by a stochastic quasi-gradient iteration, the other for maintaining a running estimate of . Almost sure convergence and several convergence rate results have been obtained.

The idea of using two-timescale quasi-gradient traced back to the earlier work Ermoliev (1976). The incremental treatment of proximal gradient iteration has been studied extensively for the expectation minimization problem, see for examples Nedić and Bertsekas (2001); Bertsekas (2011); Nedić (2011); Wang and Bertsekas (2014); Beck and Teboulle (2009); Gurbuzbalaban et al. (2015); Rakhlin et al. (2012); Ghadimi and Lan (2015); Shamir and Zhang (2013). However, except for Wang et al. (2016), all of these works focus on the expectation minimization problem and do not apply to the stochastic composition problem (1).

In this paper, we propose a new accelerated stochastic compositional proximal gradient (ASC-PG) method that applies to the more general penalized problem (1). We use a coupled martingale stochastic analysis to show that ASC-PG achieves significantly better sample-error complexity in various cases. We also show that ASC-PG exhibits optimal sample-error complexity in two important special cases: the case where the outer function is linear and the case where the inner function is linear.

Our contributions are summarized as follows:

  1. [noitemsep,topsep=0pt, leftmargin=*]

  2. We propose the first stochastic proximal-gradient method for the stochastic composition problem. This is the first algorithm that is able to address the nonsmooth regularization penalty without deteriorating the convergence rate.

  3. We obtain a convergence rate for smooth optimization problems that are not necessarily convex, where is the number of queries to the stochastic first-order oracle. This improves the best known convergence rate and provides a new benchmark for the stochastic composition problem.

  4. We provide a comprehensive analysis and results that apply to various special cases. In particular, our results contain as special cases the known optimal rate results for the expectation minimization problem, i.e., for general objectives and for strongly convex objectives.

  5. In the special case where the inner function is a linear mapping, we show that it is sufficient to use one timescale to guarantee convergence. Our result achieves the non-improvable rate of convergence . It implies that the inner linearity does not bring fundamental difficulty to the stochastic composition problem.

  6. We show that the proposed method leads to a new on-policy reinforcement learning algorithm. The new learning algorithm achieves the optimal convergence rate for solving Bellman equations based on observed state transitions.

In comparison with Wang et al. (2016), our analysis is more succinct and leads to stronger results. To the best of our knowledge, results in this paper provide the best-known rates for the stochastic composition problem.

Paper Organization.

Section 2 states the sampling oracle and the accelerated stochastic compositional proximal gradient algorithm (ASC-PG). Section 3 states the convergence rate results in the case of general nonconvex objective and in the case of strongly convex objective, respectively. Section 4 describes an application of ASC-PG to reinforcement learning and gives numerical experiments.

Notations and Definitions.

For , we denote by its transpose, and by its Euclidean norm (i.e., ). For two sequences and , we write if there exists a constant such that for each . We denote by the indicator function, which returns “value” if the “condition” is satisfied; otherwise . We denote by the optimal objective function value for (1), denote by the set of optimal solutions, and denote by the Euclidean projection of onto for any convex set . We let and .

2 Algorithm

We focus on the blackbox sampling environment. Suppose that we have access to a stochastic first-order oracle, which returns random realizations of first-order information upon queries. This is a typical simulation oracle that is available in both online and batch learning. More specifically, assume that we are given a Sampling Oracle (SO) such that

  • Given some , the SO returns a random vector and a noisy subgradient

  • Given some , the SO returns a noisy gradient

Now we propose the Accelerated Stochastic Compositional Proximal Gradient (ASC-PG) algorithm, see Algorithm 1. ASC-PG is a generalization of the SCGD proposed by Wang et al. (2016), in which a proximal step is used to replace the projection step.

0:  , , SO, , stepsize sequences , and .
1:  for  do
2:     Query the SO and obtain gradient samples ,
3:     Update the main iterate by
4:     Update auxillary iterates by an extrapolation-smoothing scheme:
where the sample is obtained via querying the SO.
5:  end for
Algorithm 1 Accelerated Stochastic Compositional Proximal Gradient (ASC-PG)

In Algorithm 1, the extrapolation-smoothing scheme (i.e., the -step) is critical for convergence acceleration. The acceleration is due to the fast running estimation of the unknown quantity . At iteration , the running estimate of is obtained using a weighted smoothing scheme, corresponding to the -step; while the new query point is obtained through extrapolation, corresponding to the -step. The updates are constructed in a way such that

is a nearly unbiased estimate of

To see how the extrapolation-smoothing scheme works, we define the weights as


Then we can verify the following important relations:

Now consider the special case where is always a linear mapping and . Then we have

In this way, we can see that the scaled error

is a zero-mean and zero-drift martingale. Under additional technical assumptions, we have

Note that the zero-drift property of the error martingale is the key to the fast convergence rate. The zero-drift property comes from the near-unbiasedness of , which is due to the special construction of the extrapolation-smoothing scheme. In the more general case where is not necessarily linear, we can use a similar argument to show that is a nearly unbiased estimate of . As a result, the extrapolation-smoothing ()-step ensures that tracks the unknown quantity efficiently.

3 Main Results

We present our main theoretical results in this section. Let us begin by stating our assumptions. Note that all assumptions involving random realizations of hold with probability 1.

Assumption 1.

The samples generated by the SO are unbiased in the following sense:

  1. .

  2. .

Note that and are not necessarily independent.

Assumption 2.

The sample gradients and values generated by the SO satisfy

Assumption 3.

The sample gradients generated by the SO are uniformly bounded, and the penalty function has bounded gradients.

Assumption 4.

There exists such that the inner and outer functions satisfying the following Lipschitzian conditions

  1. .

Our first main result concerns with general optimization problems which are not necessarily convex.

Theorem 1 (Smooth Optimization).

Let Assumptions 1, 2, 3, and 4 hold. Denote by for short and suppose that in (1) and is bounded from above. Choose and where and in Algorithm 1. Then we have


If and , choose and , yielding


If or , then the optimal and can be chosen to be , yielding


The result of Theorem 1 strictly improves the corresponding results in Wang et al. (2016). First the result in (5) improves the convergence rate from to for the general case. This improves the best known convergence rate and provides a new benchmark for the stochastic composition problem.

Our second main result concerns strongly convex objective functions. We say that the objective function is optimally strongly convex with parameter if


(see Liu and Wright (2015)). Note that any strongly convex function is optimally strongly convex, but the reverse does not hold. For example, the objective function (2) in on-policy reinforcement learning is always optimally strongly convex (even if is a rank deficient matrix), but not necessarily strongly convex.

Theorem 2.

(Strongly Convex Optimization) Suppose that the objective function in (1) is optimally strongly convex with parameter defined in (7). Set and where , , , and in Algorithm 1. Under Assumptions 1, 2, 3, and 4, we have


If and , choose and , yielding


If or , choose and , yielding


Let us discuss the results of Theorem 2. In the general case where and , the convergence rate in (9) is consistent with the result of Wang et al. (2016). Now consider the special case where , i.e., the inner mapping is linear. This result finds an immediate application to Bellman error minimization problem (2) which arises from reinforcement learning problem in (and with norm regularization). The proposed ASC-PG algorithm is able to achieve the optimal rate without any assumption on . To the best of our knowledge, this is the best (also optimal) sample-error complexity for on-policy reinforcement learning.


Theorems 1 and 2 give important implications about the special cases where or . In these cases, we argue that our convergence rate (10) is “optimal" with respect to the sample size . To see this, it is worth pointing out the the rate of convergence is optimal for strongly convex expectation minimization problem. Because the expectation minimization problem is a special case of problem (1), the convergence rate must be optimal for the stochastic composition problem too.

  • [noitemsep,topsep=0pt]

  • Consider the case where , which means that the outer function is linear with probability 1. Then the stochastic composition problem (1) reduces to an expectation minimization problem since . Therefore, it makes a perfect sense to obtain the optimal convergence rate.

  • Consider the case where , which means that the inner function is a linear mapping. The result is quite surprising. Note that even is a linear mapping, it does not reduce problem (1) to an expectation minimization problem. However, the ASC-PG still achieves the optimal convergence rate. This suggests that, when inner linearity holds, the stochastic composition problem (1) is not fundamentally more difficult than the expectation minimization problem.

The convergence rate results unveiled in Theorems 1 and 2 are the best known results for the composition problem. We believe that they provide important new result which provides insights into the complexity of the stochastic composition problem.

4 Application to Reinforcement Learning

Figure 1: Empirical convergence rate of the ASC-PG algorithm and the GTD2-MP algorithm under Experiment 1 averaged over 100 runs, where denotes the solution at the -th iteration.

In this section, we apply the proposed ASC-PG algorithm to conduct policy value evaluation in reinforcement learning through attacking Bellman equations. Suppose that there are in total states. Let the policy of interest be . Denote the value function of states by , where denotes the value of being at state under policy . The Bellman equation of the problem is

where denotes the reward of moving from state to , and the expectation is taken over all possible future state conditioned on current state and the policy . We have that the solution to the above equation satisfies that . Here a moderately large

will make solving the Bellman equation directly impractical. To resolve the curse of dimensionality, in many practical applications, we approximate the value of each state by some linear map of its feature

, where to reduce the dimension. In particular, we assume that for some .

To compute , we formulate the problem as a Bellman residual minimization problem that

where ; is a discount factor, and is the random reward of transition from state to state . It is clearly seen that the proposed ASC-PG algorithm could be directly applied to solve this problem where we take

We point out that the function here is a linear map. By our theoretical analysis, we expect to achieve a faster rate of convergence, which is justified empirically in our later simulation study.

We consider three experiments, where in the first two experiments, we compare our proposed accelerated ASC-PG algorithm with SCGD algorithm (Wang et al., 2016) and the recently proposed GTD2-MP algorithm (Liu et al., 2015). Also, in the first two experiments, we do not add any regularization term, i.e. . In the third experiment, we add an -penalization term . In all cases, we choose the step sizes via comparison studies as in Dann et al. (2014):

  • Experiment 1: We use the Baird’s example (Baird et al., 1995), which is a well-known example to test the off-policy convergent algorithms. This example contains states, and two actions at each state. We refer the readers to Baird et al. (1995) for more detailed information of the example.

  • Experiment 2: We generate a Markov decision problem (MDP) using similar setup as in White and White (2016). In each instance, we randomly generate an MDP which contains states, and three actions at each state. The dimension of the Given one state and one action, the agent can move to one of four next possible states. In our simulation, we generate the transition probabilities for each MDP instance uniformly from and normalize the sum of transitions to one, and we generate the reward for each transition also uniformly in .

  • Experiment 3: We generate the data same as Experiment 2 except that we have a larger dimensional feature space, where only the first components of are non-zeros. We add an -regularization term, , to the objective function.

Denote by the solution at the -th iteration. For the first two experiments, we report the empirical convergence performance and , where and , and all ’s are averaged over 100 runs, in the first two subfigures of Figures 1 and 2. It is seen that the ASC-PG algorithm achieves the fastest convergence rate empirically in both experiments. To further evaluate our theoretical results, we plot vs. (or averaged over 100 runs for the first two experiments in the second two subfigures of Figures 1 and 2. The empirical results further support our theoretical analysis that for the ASC-PG algorithm when is a linear mapping.

For Experiment 3, as the optimal solution is unknown, we run the ASC-PG algorithm for one million iterations and take the corresponding solution as the optimal solution , and we report and averaged over 100 runs in Figure 3. It is seen the the ASC-PG algorithm achieves fast empirical convergence rate.

Figure 2: Empirical convergence rate of the ASC-PG algorithm and the GTD2-MP algorithm under Experiment 2 averaged over 100 runs, where denotes the solution at the -th iteration.
Figure 3: Empirical convergence rate of the ASC-PG algorithm with the -regularization term under Experiment 3 averaged over 100 runs, where denotes the solution at the -th iteration.

5 Conclusion

We develop a proximal gradient method for the penalized stochastic composition problem. The algorithm updates by interacting with a stochastic first-order oracle. Convergence rates are established under a variety of assumptions, which provide new rate benchmarks. Application of the ASC-PG to reinforcement learning leads to a new on-policy learning algorithm, which achieves faster convergence than the best known algorithms. For future research, it remains open whether or under what circumstances the current can be further improved. Another direction is to customize and adapt the algorithm and analysis to more specific problems arising from reinforcement learning and risk-averse optimization, in order to fully exploit the potential of the proposed method.


  • Baird et al. [1995] L. Baird et al. Residual algorithms: Reinforcement learning with function approximation. In Proceedings of the twelfth international conference on machine learning, pages 30–37, 1995.
  • Beck and Teboulle [2009] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1):183–202, 2009.
  • Bertsekas [2011] D. Bertsekas. Incremental proximal methods for large scale convex optimization. Mathematical Programming, Ser. B, 129:163–195, 2011.
  • Dann et al. [2014] C. Dann, G. Neumann, and J. Peters. Policy evaluation with temporal differences: A survey and comparison. The Journal of Machine Learning Research, 15(1):809–883, 2014.
  • Dentcheva et al. [2015] D. Dentcheva, S. Penev, and A. Ruszczynski. Statistical estimation of composite risk functionals and risk optimization problems. arXiv preprint arXiv:1504.02658, 2015.
  • Ermoliev [1976] Y. Ermoliev. Methods of Stochastic Programming. Monographs in Optimization and OR, Nauka, Moscow, 1976.
  • Ghadimi and Lan [2015] S. Ghadimi and G. Lan. Accelerated gradient methods for nonconvex nonlinear and stochastic programming. Mathematical Programming, pages 1–41, 2015.
  • Gurbuzbalaban et al. [2015] M. Gurbuzbalaban, A. Ozdaglar, and P. Parrilo. On the convergence rate of incremental aggregated gradient algorithms. arXiv preprint arXiv:1506.02081, 2015.
  • Liu et al. [2015] B. Liu, J. Liu, M. Ghavamzadeh, S. Mahadevan, and M. Petrik. Finite-sample analysis of proximal gradient td algorithms. In

    Proc. The 31st Conf. Uncertainty in Artificial Intelligence, Amsterdam, Netherlands

    , 2015.
  • Liu and Wright [2015] J. Liu and S. J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM Journal on Optimization, 25(1):351–376, 2015.
  • Nedić [2011] A. Nedić. Random algorithms for convex minimization problems. Mathematical Programming, Ser. B, 129:225–253, 2011.
  • Nedić and Bertsekas [2001] A. Nedić and D. Bertsekas. Incremental subgradient methods for nondifferentiable optimization. SIAM Journal on Optimization, 12:109–138, 2001.
  • Rakhlin et al. [2012] A. Rakhlin, O. Shamir, and K. Sridharan. Making gradient descent optimal for strongly convex stochastic optimization. In Proceedings of the 29th International Conference on Machine Learning, pages 449–456, 2012.
  • Shamir and Zhang [2013] O. Shamir and T. Zhang. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In Proceedings of The 30th International Conference on Machine Learning, pages 71–79, 2013.
  • Sutton and Barto [1998] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT press, 1998.
  • Wang and Bertsekas [2014] M. Wang and D. Bertsekas. Incremental constraint projection-proximal methods for nonsmooth convex optimization. SIAM Journal on Optimization, to appear, 2014.
  • Wang et al. [2016] M. Wang, E. X. Fang, and H. Liu. Stochastic compositional gradient descent: Algorithms for minimizing compositions of expected-value functions. Mathematical Programming Series A, 2016.
  • White and White [2016] A. White and M. White. Investigating practical, linear temporal difference learning. arXiv preprint arXiv:1602.08771, 2016.