Boosting Soft Actor-Critic: Emphasizing Recent Experience without Forgetting the Past

Che Wang, Keith RossarXiv 2019

Abstract

Soft Actor-Critic (SAC) is an off-policy actor-critic deep reinforcement learning (DRL) algorithm based on maximum entropy reinforcement learning. By combining off-policy updates with an actor-critic formulation, SAC achieves state-of-the-art performance on a range of continuous-action benchmark tasks. The off-policy method employed by SAC typically samples data uniformly from past experience. We propose Emphasizing Recent Experience (ERE), a simple but powerful off-policy sampling technique which emphasizes recently observed data while not forgetting the past. The ERE algorithm samples more aggressively from recent experience and orders updates to ensure that updates from old data do not overwrite updates from new data. We show that SAC+ERE is more sample efficient than vanilla SAC for continuous-action Mujoco tasks and outperforms combinations with Priority Experience Replay (PER).

Introduction

In off-policy Deep Reinforcement Learning (DRL), agents store their experiences—tuples of state, action, reward, and next state—in a replay buffer. Standard algorithms like Soft Actor-Critic (SAC) typically sample from this buffer uniformly. However, this approach treats a transition from a million steps ago as being just as important as one from ten steps ago. Intuitively, data generated by the agent’s current policy is more relevant for fine-tuning performance.

Simply reducing the buffer size to keep data "fresh" often leads to catastrophic forgetting, where the agent loses the stable foundation provided by older, diverse experiences. The challenge lies in prioritizing recent data without losing the benefits of historical experience. This paper introduces Emphasizing Recent Experience (ERE), a sampling strategy that dynamically narrows the sampling window to focus on recent data during update cycles, significantly improving sample efficiency while remaining computationally efficient.

The Emphasizing Recent Experience (ERE) Algorithm

ERE modifies the mini-batch selection process during the parameter update phase. Instead of uniform sampling across the entire buffer, ERE employs a dynamic windowing approach.

Suppose the agent performs $K$ updates after an episode. For the first update ($k=1$), the agent samples from the entire buffer. As $k$ increases toward $K$, the range of available data points ($c_k$) shrinks exponentially, focusing increasingly on the most recent transitions. The sampling range is defined as: $$c_k = \max\{N \cdot \eta^{k \frac{1000}{K}}, c_{min}\}$$ where $N$ is the buffer size and $\eta$ is a hyperparameter (typically $\approx 0.996$).

Visualizing the ERE mechanism: (a) shows the shrinking window $c_k$ for different $\eta$ values; (b) and (c) illustrate the resulting sampling expectations across the data points.

A critical component of ERE is the update order. Updates are sequenced from the "oldest data" (widest window) to the "newest data" (narrowest window). This ensures that gradients calculated from the most relevant, recent data are applied last, preventing them from being "overwritten" by updates based on older, potentially stale data.

Experimental Setup and Results

The algorithm was evaluated using the MuJoCo physics engine across several standard benchmarks: Hopper-v2, Walker2d-v2, HalfCheetah-v2, Ant-v2, Humanoid-v2, and Swimmer-v2. SAC+ERE demonstrated significant improvements in sample efficiency across all tested environments.

Average test return vs. environment interactions for SAC+ERE across various MuJoCo benchmarks.

In the Ant-v2 environment, SAC+ERE reached a performance milestone (score of 4500) three times faster than vanilla SAC. Compared to Prioritized Experience Replay (PER), ERE is both simpler to implement and more robust in continuous control tasks. While PER requires complex data structures like sum-trees ($O(\log N)$), ERE operates in $O(1)$ time. Furthermore, a hybrid SAC+ERE+PER approach often yielded the best results, suggesting that temporal freshness and TD-error surprise are complementary signals.

Discussion and Future Work

While ERE excels in standard benchmarks, its performance in environments with extremely sparse rewards remains an area for further study; in such cases, PER's focus on high-error transitions might still be advantageous. Future work will explore the application of ERE to other off-policy algorithms like DQN or DDPG, as well as its performance in real-time "one-step-update" regimes.

In summary, ERE provides a simple, computationally cheap, and highly effective method to boost the performance of off-policy RL agents by intelligently balancing the use of recent and historical experience.

Summary updated

BibTeX
@misc{wang2019boosting,
  author = {Che Wang and Keith Ross},
  title = {{Boosting Soft Actor-Critic: Emphasizing Recent Experience without Forgetting the Past}},
  year = {2019},
  eprint = {1906.04009},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.04009},
}
Figure