TL;DR Offline reinforcement learning (RL) models often fail catastrophically when deployed in the real world due to noisy or missing sensor data. This paper introduces the Diffusion Model-Based Predictor (DMBP), a novel framework that uses conditional diffusion models to "denoise" or reconstruct the true state from perturbed observations before the RL agent makes a decision. By employing a custom non-Markovian training objective, DMBP prevents error accumulation over long trajectories and significantly boosts the robustness of standard offline RL algorithms.
The Challenge of State Observation Perturbations
Offline RL is highly attractive because it allows agents to learn from static, pre-collected datasets without requiring costly or dangerous trial-and-error interactions in the real world. However, a major roadblock to deploying offline RL is its vulnerability to state observation perturbations.
In the real world, sensors are noisy, they break, or they might even be subjected to adversarial attacks. If an autonomous vehicle's GPS glitches, or a robot arm's joint sensor drops a frame, a standard offline RL policy might execute a catastrophic action. In online RL, we can use adversarial training to teach the agent to handle these mismatches. But in offline RL, the agent cannot interact with the environment to learn these robust behaviors. Existing offline approaches try to train overly conservative policies, but their performance degrades rapidly as the noise scale increases.
Introducing DMBP: Diffusion as a Filter
To address this, the authors propose the Diffusion Model-Based Predictor (DMBP). Instead of using diffusion models to generate new trajectories or policies—a common trend in recent RL research—they use them as a real-time noise-reduction filter.
Here is how the framework operates:
- Conditional Denoising: At each timestep, DMBP takes the noisy current state, the agent's previous action, and the previously denoised state trajectory. It uses a conditional diffusion model to reverse the noise and predict the true, clean state. This clean state is then fed to the RL policy.
- U-Net + MLP Architecture: To capture the temporal relationship between the current noisy state and the past trajectory, DMBP uses a U-Net to extract trajectory features, which are then flattened and passed to an MLP for noise prediction.
- Non-Markovian Training Objective: Standard diffusion models are trained to denoise single, isolated images. If applied naively in an RL loop, tiny estimation errors compound over time, eventually causing the agent to drift completely off course. To fix this, the authors design a non-Markovian loss function that minimizes the sum entropy of denoised states across a sliding window of the RL trajectory. This trades off single-step perfection for long-horizon stability.
- State Infilling: Borrowing from image inpainting techniques, DMBP can also "infill" missing state dimensions if a sensor completely fails, combining the known forward-process data with the reverse-process predictions.
Key Insights and Performance
The authors evaluated DMBP using the standard D4RL Gym benchmark, focusing on MuJoCo (HalfCheetah, Hopper, Walker2d), Adroit (high-dimensional robotic hand manipulation), and Franka Kitchen (sparse-reward household tasks).
Massive Robustness Gains
Under standard Gaussian noise (std=0.10), baseline algorithms crash hard. For example, Hopper expert scores drop from ~100 to ~4. When wrapped with DMBP, the scores recover dramatically, jumping back to the 40-80+ range. DMBP also successfully defends against targeted adversarial attacks (maximum action-difference and minimum Q-value attacks), consistently outperforming state-of-the-art robust offline RL algorithms like RORL.
Surviving Sensor Failure
In tests where 1 to 5 dimensions of the state vector were completely masked to simulate broken sensors, DMBP successfully infilled the missing data. On "medium-replay" datasets, DMBP-strengthened algorithms incurred almost zero performance degradation compared to having perfect, fully observable states.
Synergy with Policy Regularization
DMBP works best when paired with "policy regularization" RL algorithms (which try to keep the agent's actions close to the dataset) rather than "conservative Q-learning" algorithms. Because diffusion models inherently pull noisy data back toward the training distribution, they naturally complement policies that expect in-distribution states.
Limitations and Future Work
While highly effective, DMBP has a few limitations to address in future research:
- Manual Noise Scaling: Currently, the number of diffusion steps used during inference must be manually defined based on the expected scale of the noise in the environment. Developing a self-adaptive diffusion timestep mechanism is a key next step.
- Unnormalized States: State observations were not normalized before adding noise. This could introduce bias, as adding the same scale of noise to a dimension with a naturally small range has a much larger corrupting effect than adding it to a dimension with a large range.
- Inference Speed: Because diffusion requires multiple iterative steps, DMBP increases the time it takes for the agent to make a decision. Future work will explore implicit sampling techniques (like DDIM) to reduce the number of reverse steps needed during testing.
Summary updated