The problem with DDPG: understanding failures in deterministic environments with sparse rewards

Guillaume Matheron, Nicolas Perrin, Olivier Sigaud

Abstract

Deep Deterministic Policy Gradient (DDPG) is a foundational algorithm for reinforcement learning in continuous action spaces. However, it is notoriously finicky, often failing to solve even trivial tasks. This paper identifies a specific failure mode occurring in deterministic environments with sparse rewards: a "learning deadlock" caused by piecewise-constant value functions. We demonstrate that when the Critic becomes flat, actor gradients vanish, preventing improvement even after rewards are discovered. We propose DDPG-argmax as a diagnostic tool and solution, showing significant performance gains in sparse MuJoCo tasks.

Introduction

While Reinforcement Learning (RL) has achieved significant milestones, practitioners frequently encounter stability issues with DDPG. Previous literature has often attributed these failures to insufficient exploration or over-estimation bias. This work identifies a more fundamental issue: the interaction between deterministic dynamics and sparse reward structures. In such environments, a reward is typically binary (e.g., 1 for success, 0 otherwise), providing no local gradient information to guide the agent toward the goal.

The 1D-TOY Environment and the Deadlock

To isolate the failure mechanism, the authors introduce the 1D-TOY environment. In this setup, an agent starts at $s_0=0$ on a line $[0, 1]$. A reward is only granted if the agent moves to the left ($s < 0$).

The 1D-TOY environment setup and governing equations.

In this environment, the optimal value function $Q^\pi$ is piecewise-constant—it resembles a staircase. Because DDPG updates the Actor using the gradient of the Critic, a "flat" Critic provides a zero gradient almost everywhere. If the Actor drifts into a saturated state before finding the reward, the Critic learns that the current policy is valueless and flattens out. Once flat, the Actor receives no signal to change its behavior, even if a reward is eventually encountered.

Key Insights: The Critical Time Frame

The paper highlights a "critical time frame" at the start of training. If the agent does not find the reward before the Actor drifts too far and the Critic flattens, it may never recover. This is empirically supported by analyzing the relationship between the timing of the first reward and the eventual success of the run.

Normalized occurrence rate and percentage of failed runs relative to the step of the earliest reward found.

As shown in the figure above, runs that discover the reward later in the simulation have a significantly higher probability of failing permanently. This confirms that the deadlock is not merely an exploration problem but a failure of the gradient-based update mechanism to utilize discovered rewards once the Critic has flattened.

Methodology and Results

To circumvent the vanishing gradient problem, the authors propose DDPG-argmax. Instead of relying on the Critic's analytical gradient, this variant samples multiple actions, identifies the one with the highest predicted value, and moves the policy toward that action. This approach effectively ignores the local flatness of the Critic.

  • 1D-TOY Results: DDPG-argmax achieved a 100% success rate, compared to the 94-99% success rate of standard DDPG.
  • Scaling to Complex Tasks: In sparse-reward versions of MuJoCo benchmarks like Reacher and HalfCheetah, DDPG-argmax significantly outperformed standard DDPG.
  • Comparison with SAC: Soft Actor-Critic (SAC) was also found to avoid this deadlock, likely because its stochastic nature and entropy regularization "blur" the piecewise-constant edges, providing more useful gradients.

Conclusion

The study suggests that while neural network "smoothing" often helps DDPG in practice, it is an unreliable crutch. The "deadlock" isn't just a toy-problem quirk but a real issue in high-dimensional robotics simulations. Future research should focus on actor update rules that are robust to piecewise-constant value functions without the heavy computational overhead of extensive action sampling.

Summary updated

BibTeX
@inproceedings{matheron2020problem,
  author = {Guillaume Matheron and Nicolas Perrin and Olivier Sigaud},
  title = {{The problem with DDPG: understanding failures in deterministic environments with sparse rewards}},
  booktitle = {ICANN},
  year = {2020},
  doi = {10.1007/978-3-030-61616-8\_25},
}
Figure