Generalized Gaussian Temporal Difference Error For Uncertainty-aware Reinforcement Learning

Seyeon Kim, Joonhun Lee, Namhoon Cho, Sungjun Han, Seungeon Baek · DOI

Introduction

In Reinforcement Learning (RL), agents learn by minimizing the Temporal Difference (TD) error—the discrepancy between predicted and actual rewards. Most standard RL algorithms, such as Soft Actor-Critic (SAC) and Proximal Policy Optimization (PPO), rely on a squared error loss ($L_2$). Mathematically, this choice implies an underlying assumption that TD errors follow a standard Gaussian (normal) distribution.

However, this paper demonstrates that the Gaussian assumption is often fundamentally flawed in complex RL environments. Instead, TD errors frequently exhibit leptokurtic characteristics: they have sharper peaks and heavier tails than a bell curve. To address this, the authors introduce a framework based on the Generalized Gaussian Distribution (GGD), allowing models to adapt to the true shape of error distributions.

The Generalized Gaussian Framework

The core of the proposed method is replacing the rigid Gaussian log-likelihood with a GGD-based loss function. The GGD is defined by a shape parameter, $\beta$, which controls the "pointiness" of the distribution.

The Generalized Gaussian Distribution (GGD) for various values of the shape parameter β. When β=1, the distribution is Laplacian; when β=2, it is Gaussian.

By introducing a dynamic "Beta Head" to the neural network, the agent can estimate $\beta$ alongside the mean and variance. This allows the model to transition smoothly between different error models:

  • Laplacian ($\beta=1$): Highly peaked, robust to outliers.
  • Gaussian ($\beta=2$): The standard bell curve.
  • Uniform ($\beta \to \infty$): Flat-topped distribution.

Empirical Evidence: The Gaussian Myth

The researchers conducted an empirical analysis of TD errors in standard benchmarks like MuJoCo. As shown in the figures below, the empirical distribution of errors (grey) consistently features a sharp central peak that the Gaussian model (blue) fails to capture. The GGD (red), by contrast, provides a significantly more accurate fit.

Empirical TD error distributions in Ant-v4 and Hopper-v4 environments. The GGD (red) consistently outperforms the Gaussian (blue) and Gumbel (green) distributions in fitting the sharp, leptokurtic peak of the actual data.

Mitigating Uncertainty

Beyond better curve-fitting, the GGD framework provides a theoretical basis for managing two types of uncertainty:

  1. Aleatoric Uncertainty (Environmental Noise): The authors derived a closed-form expression for uncertainty using the GGD. They implemented a risk-averse weighting scheme that prioritizes samples with lower spread, effectively filtering out heteroscedastic noise that can derail training.
  2. Epistemic Uncertainty (Model Knowledge): To reduce bias in variance estimation, the paper introduces Batch Inverse Error Variance (BIEV) regularization. This scheme specifically accounts for kurtosis (the "tailedness" of the distribution) to ensure the agent remains robust even when encountering highly unreliable data points.

Key Results and Performance

The GGD-enhanced versions of SAC and PPO were evaluated across high-dimensional continuous control tasks (MuJoCo) and discrete control benchmarks (Gymnasium).

  • Enhanced Sample Efficiency: In environments like Hopper-v4 and HalfCheetah-v4, GGD-based agents reached peak performance significantly faster than their standard counterparts.
  • Robustness to Noise: When tested in "noisy" variants of environments (e.g., adding wind dynamics to LunarLander), the GGD framework maintained stability where Gaussian-based models faltered.
  • Numerical Stability: Interestingly, the authors found that estimating the shape parameter $\beta$ was often more numerically stable than estimating variance alone, leading to more reliable convergence across different seeds.

Conclusion and Future Directions

By moving beyond the Gaussian assumption, this research provides a more mathematically grounded approach to error modeling in RL. While the current work focuses on policy gradient methods, future applications could include integrating GGD into the entropy terms of Maximum Entropy RL to further optimize exploration. The results suggest that accounting for the shape of error—not just its magnitude—is a critical step toward building more robust and efficient autonomous agents.

Summary updated

BibTeX
@misc{kim2024generalized,
  author = {Seyeon Kim and Joonhun Lee and Namhoon Cho and Sungjun Han and Seungeon Baek},
  title = {{Generalized Gaussian Temporal Difference Error For Uncertainty-aware Reinforcement Learning}},
  year = {2024},
  eprint = {2408.02295},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.02295},
}
Figure