Recursive Least Squares Advantage Actor-Critic Algorithms

Yuan Wang, Chunyuan Zhang, Tianzong Yu, Meng Ma · DOI

TL;DR

This paper introduces two novel reinforcement learning algorithms, RLSSA2C and RLSNA2C, which integrate Recursive Least Squares (RLS) optimization into the Advantage Actor-Critic (A2C) framework. By replacing standard first-order gradient descent with RLS-based updates for deep neural networks, the authors achieve significantly higher sample efficiency and faster convergence across 51 benchmark tasks while maintaining a lower computational overhead than state-of-the-art methods like PPO and ACKTR.

What Problem Does This Paper Address?

In Deep Reinforcement Learning (DRL), the Advantage Actor-Critic (A2C) algorithm is a popular baseline, but it often suffers from poor sample efficiency—it requires a massive amount of interaction with the environment to learn an effective policy.

While traditional "shallow" reinforcement learning often used Recursive Least Squares (RLS) to accelerate convergence in linear models, applying RLS to Deep Neural Networks (DNNs) is notoriously difficult. The high dimensionality of DNNs makes the matrix inversions required by RLS computationally prohibitive. Consequently, most modern DRL relies on first-order optimization (like RMSProp or Adam), which is easier to compute but takes a "noisier" and slower path to the optimal solution. The authors seek to bridge this gap by making RLS viable for deep architectures.

Methods

The authors propose two variants of RLS-based A2C:

  1. RLSSA2C (Standard): Uses RLS to train the critic and the hidden layers of the actor, but employs a standard policy gradient for the final output layer.
  2. RLSNA2C (Natural): Uses RLS for the entire network and incorporates the Natural Policy Gradient (NPG). To make this computationally feasible, they use Kronecker-factored approximation, which breaks down massive matrices into smaller, manageable pieces.

Key Innovations: * Average-Approximation Method: Instead of calculating a unique RLS update for every single sample in a batch (which is slow), they use the average of the batch to update the "autocorrelation matrix." * Sherman-Morrison Formula: They use this mathematical identity to avoid direct matrix inversion, turning a complex $O(N^3)$ operation into a much faster $O(N^2)$ update. * Time-Variant Scaling: They introduce decaying scaling factors ($k$ and $\mu$). This allows the agent to make large, aggressive updates early in training (when the policy is "infantile") and smaller, stabilizing updates as it nears perfection.

Datasets

The algorithms were evaluated on two major DRL benchmarks:

  • Atari 2600 (40 games): Used to test discrete control from raw pixel inputs (e.g., Pong, Breakout, Alien).
  • MuJoCo (11 tasks): Used to test continuous control in physics-based simulations (e.g., Ant, HalfCheetah, Walker2d).

Key Insights and Ideas

  • RLS as "Smart" SGD: The authors frame RLS not just as a least-squares solver, but as a specialized form of Stochastic Gradient Descent (SGD) that uses second-order information to find a more direct path to the optimum.
  • Efficiency vs. Complexity: A major "aha" moment is demonstrating that while RLS derivation is mathematically dense, the final implementation is only 10–30% slower per iteration than vanilla A2C. However, because it learns so much faster (better sample efficiency), it reaches high performance in much less total time than PPO or ACKTR.
  • Layer-Specific Tuning: The paper suggests that deeper layers in a DNN are more prone to gradient vanishing, and thus benefit from higher initial scaling factors ($\mu_0$) in the RLS update.

Key Results

  • Superior Performance: RLSSA2C outperformed vanilla A2C on 30 out of 40 Atari games and 10 out of 11 MuJoCo tasks.
  • Massive Score Multipliers: On certain Atari games like Assault and BattleZone, the RLS-based versions achieved scores 2.4x to 3.6x higher than standard A2C within the same 10 million timesteps.
  • Computational Speedup: While slightly slower than vanilla A2C, RLSSA2C was roughly 600% faster than PPO and 30% faster than ACKTR in terms of wall-clock execution time on Atari benchmarks.
  • Sample Efficiency: The RLS variants reached "solved" status or high-score plateaus much earlier in the training process compared to first-order baselines.

Limitations and Future Work

  • Stability Issues: The RLSNA2C (Natural Gradient) variant, while theoretically more powerful, was found to be less stable than the standard RLSSA2C on some games. The authors noted that NPG updates can sometimes be too aggressive.
  • Theoretical Gap: While the paper provides a theoretical analysis, a rigorous convergence proof for RLS in non-linear, deep architectures remains an open challenge in the broader field.
  • Future Directions: The authors plan to investigate ways to improve the stability of the Kronecker-factored RLS updates and explore applying these techniques to other DRL architectures beyond A2C.

Summary updated

Abstract

As an important algorithm in deep reinforcement learning, advantage actor critic (A2C) has been widely succeeded in both discrete and continuous control tasks with raw pixel inputs, but its sample efficiency still needs to improve more. In traditional reinforcement learning, actor-critic algorithms generally use the recursive least squares (RLS) technology to update the parameter of linear function approximators for accelerating their convergence speed. However, A2C algorithms seldom use this technology to train deep neural networks (DNNs) for improving their sample efficiency. In this paper, we propose two novel RLS-based A2C algorithms and investigate their performance. Both proposed algorithms, called RLSSA2C and RLSNA2C, use the RLS method to train the critic network and the hidden layers of the actor network. The main difference between them is at the policy learning step. RLSSA2C uses an ordinary first-order gradient descent algorithm and the standard policy gradient to learn the policy parameter. RLSNA2C uses the Kronecker-factored approximation, the RLS method and the natural policy gradient to learn the compatible parameter and the policy parameter. In addition, we analyze the complexity and convergence of both algorithms, and present three tricks for further improving their convergence speed. Finally, we demonstrate the effectiveness of both algorithms on 40 games in the Atari 2600 environment and 11 tasks in the MuJoCo environment. From the experimental results, it is shown that our both algorithms have better sample efficiency than the vanilla A2C on most games or tasks, and have higher computational efficiency than other two state-of-the-art algorithms.
BibTeX
@misc{wang2022recursive,
  author = {Yuan Wang and Chunyuan Zhang and Tianzong Yu and Meng Ma},
  title = {{Recursive Least Squares Advantage Actor-Critic Algorithms}},
  year = {2022},
  eprint = {2201.05918},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.05918},
}
Figure