Overcoming Overfitting in Reinforcement Learning via Gaussian Process Diffusion Policy

Amornyos Horprasert, Esa Apriaskar, Xingyu Liu, Lanlan Su, Lyudmila S. Mihaylova · DOI

Abstract

Reinforcement learning (RL) agents often suffer from extreme brittleness when faced with distribution shifts—changes in environment dynamics not encountered during training. This paper presents Gaussian Process Diffusion Policy (GPDP), a novel algorithm that combines the generative flexibility of diffusion models with the formal uncertainty quantification of Gaussian Process Regression (GPR). By using GPR to guide action selection toward high-reward regions while allowing the policy to revert to exploration in unfamiliar states, GPDP addresses the fundamental problem of overfitting in offline RL. Experimental results on the Walker2d benchmark demonstrate that GPDP significantly outperforms state-of-the-art baselines, achieving up to a 123% improvement in reward under simulated hardware failures.

1. Introduction

Deep reinforcement learning has achieved remarkable success in simulated environments, yet transitioning these agents to real-world applications remains a challenge. A primary hurdle is the "distribution shift": a scenario where the testing environment differs from the training data. Standard deep RL policies, which typically output a single deterministic or stochastic action, lack a principled mechanism to recognize when they are in unfamiliar territory. Consequently, they often produce overconfident but incorrect actions, leading to catastrophic failure.

To mitigate this, we propose GPDP, a framework that integrates diffusion-based generative modeling with kernel-based regression. This combination allows the agent to "hallucinate" optimal actions in familiar states while automatically pivoting to exploration when the environment's dynamics shift.

2. Methodology

GPDP fuses three distinct machine learning paradigms to create a robust decision-making framework:

2.1 Diffusion Policies

Unlike standard policies that map states to single action vectors, diffusion models learn to iteratively refine Gaussian noise into high-quality actions. This allows the policy to represent complex, multi-modal action distributions, which is essential for capturing diverse strategies found in offline datasets.

2.2 GPR-Guided Diffusion

The core innovation lies in using Gaussian Process Regression (GPR) to guide the diffusion process. GPR is a kernel-based method that provides both a mean prediction and a variance (uncertainty) estimate. In GPDP, the GPR is trained to predict actions that maximize a learned Q-function. During the diffusion sampling process, the GPR acts as a "guide," nudging the generated actions toward those expected to yield the highest rewards.

2.3 Implicit Q-Learning (IQL)

To evaluate action quality without the risk of overestimating out-of-distribution actions—a common pitfall in offline RL—the framework utilizes Implicit Q-Learning (IQL). IQL provides the "critic" that informs the GPR which actions in the training set are most desirable, ensuring the guidance remains grounded in realistic expectations.

3. The Mechanism of Automatic Exploration

A unique property of GPDP is its response to unfamiliar states. In GPR, as the input state moves further away from the training data, the predictive guidance naturally diminishes (the guidance term vanishes).

When the agent is in a familiar state, the GPR guidance is strong, pushing the diffusion model toward high-reward actions. However, when a distribution shift occurs, the GPR's influence wanes, and the policy reverts to a standard diffusion model. This effectively triggers an automatic switch from "exploitation" to "exploration," allowing the agent to sample a wider variety of actions to find a new solution for the altered environment.

4. Experimental Setup

The algorithm was evaluated using the Walker2d benchmark. To test robustness, the authors established two distinct conditions:

  1. Normal: Standard walking dynamics using a mix of expert and medium-quality offline trajectories.
  2. Distribution Shift: A "broken leg" scenario where all joints in one leg are disabled mid-run, requiring the agent to adapt its gait to remain upright and moving.

5. Results and Discussion

GPDP demonstrated substantial resilience compared to state-of-the-art baselines such as Soft Actor-Critic (SAC) and Diffusion-QL.

  • Performance Leap: In the distribution shift scenario, GPDP achieved between 67.74% and 123.18% improvement in maximum reward over competing algorithms. While baseline agents typically collapsed upon the loss of a limb, GPDP often discovered novel balancing behaviors.
  • Stability: Under normal conditions, GPDP performed on par with top-tier algorithms, indicating that its robustness does not come at the expense of standard efficiency.
  • Mathematical Safety: The kernel-based nature of GPR provides a grounded "safety net," preventing the wild, overconfident predictions often seen in deep neural networks when exposed to unseen data.

6. Limitations and Future Work

Despite its performance, GPDP faces computational challenges. GPR involves inverting a kernel matrix with a time complexity of $O(H^3)$, where $H$ is the number of data points. This currently limits the model's memory to a few thousand samples. Additionally, the high variance between average and maximum scores suggests that while the model can find optimal recovery strategies, it does not yet do so with perfect consistency. Future research will focus on sparse GPR methods to handle larger datasets and techniques to reduce performance stochasticity in robotics applications.

7. Conclusion

GPDP represents a significant step toward creating RL agents that can survive the unpredictability of the real world. By mathematically coupling uncertainty-aware guidance with expressive generative modeling, the framework provides a principled path for agents to recognize their own limitations and adapt their behavior accordingly.

Summary updated

BibTeX
@inproceedings{horprasert2025overcoming,
  author = {Amornyos Horprasert and Esa Apriaskar and Xingyu Liu and Lanlan Su and Lyudmila S. Mihaylova},
  title = {{Overcoming Overfitting in Reinforcement Learning via Gaussian Process Diffusion Policy}},
  booktitle = {SSP},
  year = {2025},
  doi = {10.1109/ssp64130.2025.11073292},
}
Figure