Closing the gap between SVRG and TD-SVRG with Gradient Splitting

Arsenii Mustafin, Alex Olshevsky, Ioannis Ch. Paschalidis

TL;DR

This paper bridges a long-standing gap between reinforcement learning and convex optimization by showing that Temporal Difference (TD) learning with variance reduction (SVRG) can achieve the same fast, linear convergence rates as standard optimization. By reinterpreting TD learning through the lens of "gradient splitting," the authors provide new theoretical bounds that allow for practical, implementable batch sizes—reducing them by many orders of magnitude compared to previous theories.

What Problem Does This Paper Address?

In Reinforcement Learning (RL), Temporal Difference (TD) learning is the workhorse for policy evaluation (estimating how good a strategy is). However, TD learning suffers from a "variance problem": as the algorithm gets closer to the correct answer, the noise in its updates doesn't disappear, preventing it from converging quickly.

To fix this, researchers have borrowed a technique from convex optimization called Stochastic Variance Reduced Gradient (SVRG). While standard SVRG is known to converge "geometrically" (very fast) with a complexity that scales linearly with the problem's difficulty (the condition number), previous versions of TD-SVRG appeared much weaker. Their theoretical proofs suggested a quadratic scaling with the condition number, leading to "theoretically required" batch sizes so astronomical (e.g., $10^{24}$ samples) that they were useless in practice. This paper asks: can we make TD-SVRG as efficient as standard SVRG?

Methods

The authors utilize a novel perspective called gradient splitting. In standard optimization, you follow the negative gradient of a cost function. In TD learning, there isn't a single objective function whose gradient matches the TD update. However, the authors show that the TD update can be viewed as "splitting" the gradient of a specific quadratic function $f(\theta)$.

As shown in Figure 1, while the TD update (represented by $-h(\theta)$) is not the true gradient, it is "almost as good" because its projection toward the optimal solution $\theta^*$ is identical to that of the true gradient.

Figure 1: Illustration of gradient splitting. All gradient splittings of the function f(θ) will lie on line l. In addition, if we have a constraint on the 2-norm of the matrix A, all gradient splittings will lie on an interval I, thus suggesting that an update in the direction of gradient splitting is almost as good, is an update in the direction of the true gradient.

Using this insight, they developed Algorithm 1 (TD-SVRG), which uses two nested loops:

  1. Outer Loop (Epoch): Periodically computes a full "mean-path" update to anchor the estimates.
  2. Inner Loop (Iteration): Performs fast, stochastic updates using the anchor to cancel out variance.

Crucially, they prove that a simple, fixed learning rate of 1/8 is sufficient for convergence in the finite sample case.

Datasets

The authors evaluated their approach on several benchmarks:

  • Random MDPs: Synthetic Markov Decision Processes used to test theoretical limits.
  • OpenAI Gym: Classic control tasks including Acrobot-v1, CartPole-v1, and MountainCar-v0.
  • DQN Features: To test more realistic scenarios, they used features extracted from the hidden layers of a pre-trained Deep Q-Network (DQN).

Key Insights and Ideas

  • Closing the Complexity Gap: The most significant "aha moment" is proving that TD-SVRG scales linearly ($\lambda_A^{-1}$) rather than quadratically ($\lambda_A^{-2}$) with the minimum eigenvalue of the system matrix. This aligns RL theory perfectly with convex optimization theory.
  • Practical Batch Sizes: By improving the theory, the authors show that the batch sizes needed for guaranteed convergence are actually small enough to use on a standard computer.
  • Unbalanced Datasets: The paper identifies a subtle issue where finite datasets are "unbalanced" (the distribution of starting states doesn't match the ending states). They provide a specific correction term ($J$) to handle this real-world data quirk.

Key Results

The theoretical improvements are massive. As shown in Table 1, the new complexity bounds (in blue) remove several extraneous factors found in previous work (PD-SVRG and VRTD).

Table 1: Comparison of algorithmic complexities, where ϵ is a desired expected accuracy, λA is a minimum eigenvalue of the matrix A, πmin is a minimum state probability of the MDP stationary distribution, γ is a discount factor and N is a dataset size. The complexity is reported as the number of samples required to shrink a distance function on average by a factor of ϵ, where the distance function is a quadratic of the quantity θ−θ∗, similar to previous works (Du et al., 2017; Xu et al., 2020). The definitions of other quantities and a table with additional algorithms and details of the comparison might be found in Appendix K

The impact on batch sizes is even more dramatic. In Table 2, for a simple MDP with 41 features, previous theories (PD-SVRG) required a batch size of $5.77 \cdot 10^{24}$ to guarantee convergence. This paper's analysis reduces that requirement to just 54,688—a difference of 20 orders of magnitude.

Table 2: This table gives the output of formulas from Table 1 on the simplest possible MDP (a random MDP) to show the magnitude of the improvement. Specifically, we compare theoretically suggested batch sizes for a random MDP with 400 states, 10 actions and γ = 0.95. Values in the first row indicate the dimensionality of the feature vectors. Values in the other rows show the batch size required by the corresponding method. Values are averaged over 10 generated datasets and environments.

Empirically, the authors found that their TD-SVRG method converged 132 times faster on average than the previous state-of-the-art SVRG-based algorithm (PD-SVRG).

Limitations and Future Work

  • Markovian Sampling: While the paper improves bounds for Markovian sampling (where samples are collected in a sequence), this case remains significantly more complex than i.i.d. sampling and requires non-constant learning rates or projections.
  • Linear Approximation: The current theory relies on linear function approximation. Extending these tight, linear-scaling bounds to non-linear models like deep neural networks is a major open challenge.
  • Parameter Knowledge: The optimal batch size $M$ depends on $\lambda_A$ (the minimum eigenvalue of the transition matrix), which may not be known in advance for all environments.

Summary updated

BibTeX
@misc{mustafin2022closing,
  author = {Arsenii Mustafin and Alex Olshevsky and Ioannis Ch. Paschalidis},
  title = {{Closing the gap between SVRG and TD-SVRG with Gradient Splitting}},
  year = {2022},
  eprint = {2211.16237},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.16237},
}
Figure