TL;DR
While most offline reinforcement learning (RL) research focuses on preventing agents from taking "illegal" actions, this paper highlights a second, equally dangerous threat: getting lost in unfamiliar states. The authors introduce SCAS, a method that unifies Out-of-Distribution (OOD) state correction and action suppression, nudging agents back toward high-value, familiar territory whenever they drift off-course.
The Challenge: Out-of-Distribution States
Offline RL is like learning to drive solely by watching dashcam footage—you never get to practice, so you have to learn a policy from a fixed dataset. The field has long obsessed over the OOD action issue: if an agent tries an action not in the dataset, the value function might hallucinate a massive reward, leading to a "death spiral" of overestimation.
However, the authors argue we’ve largely ignored the OOD state issue. Even if an agent takes "safe" actions, real-world noise, stochastic environments, or small errors can push the agent into states (situations) it never saw during training. Because the agent has no "map" for these regions, its behavior becomes uncontrolled, often leading to catastrophic failure. Existing solutions either ignore states or try to push the agent back to any known state, regardless of whether that state is actually helpful for completing the task.
As seen in the state distribution visualizations above, standard methods like CQL and TD3BC frequently drift into OOD regions (highlighted by dashed circles). In contrast, SCAS tightly aligns its state distribution with the dataset, specifically targeting the high-value regions.
Methodology: Introducing SCAS
The authors propose SCAS (OOD State Correction and OOD Action Suppression). The core idea is to train the policy not just to maximize reward, but to act as a "self-correcting" mechanism.
- Value-Aware Transitions: Instead of just trying to get back to the training data distribution, SCAS solves for an analytical "ideal" next state. This target state is both within the training data support and skewed toward high-value regions.
- KL Divergence Alignment: During training, the authors intentionally perturb (add noise to) the states in the dataset to create "synthetic" OOD states. They then regularize the policy so that the resulting dynamics align with the high-value "ideal" states via a KL divergence loss.
- Efficiency via Closed-Form Solutions: Unlike previous methods that require training complex, multi-modal generative models (like CVAEs) to model state transitions, SCAS uses a clever mathematical derivation to eliminate the need for an explicit transition model. This makes it faster and more stable.
- One-Step Dynamics: SCAS uses a simple one-step dynamics model to propagate gradients, which is computationally cheaper than the multi-step rollouts used in typical model-based RL.
Experimental Setup
The researchers evaluated SCAS on standard industry benchmarks for offline RL:
- D4RL: Includes "Gym" locomotion tasks (HalfCheetah, Hopper, Walker2d) and the much more difficult "AntMaze" tasks, which require long-term planning.
- NeoRL: A benchmark designed to mimic real-world industrial scenarios with conservative data collection.
- Perturbed Environments: A custom evaluation setup where Gaussian noise is added to actions during testing to see how well the "state correction" handles unexpected nudges.
Key Insights and Results
- The "Two-for-One" Property: The most elegant finding is that OOD state correction naturally leads to OOD action suppression. Theoretically and empirically, the authors show that by training an agent to return to familiar, high-value states, the agent inherently learns to avoid the "weird" actions that would have taken it OOD in the first place.
- Value Matters in Correction: Previous state-correction methods treated all "In-Distribution" states as equal. SCAS recognizes that if you're lost, you shouldn't just go back to any road—you should head toward the highway that leads to your destination.
- Hyperparameter Robustness: SCAS achieved state-of-the-art results using a single set of hyperparameters across all D4RL tasks, suggesting it is much more "plug-and-play" than its predecessors.
- Performance & Stability: On the D4RL locomotion suite, SCAS achieved a total score of 810.1, significantly outperforming popular baselines like IQL (718.8) and CQL (708.9). In the challenging AntMaze-Large tasks, SCAS nearly doubled the performance of several competitors.
Furthermore, SCAS exhibits remarkable training stability. As shown in the training curves above, while off-policy RL and other baselines can suffer from severe value overestimation and divergence, SCAS maintains stable, controlled learning throughout the gradient steps.
- Robustness: When researchers injected noise into the test environment (simulating a "windy" day for a robot), SCAS's performance remained stable while other methods saw their success rates plummet. It effectively "steered back" into the data distribution.
Limitations and Future Work
The authors note a few areas for growth:
- Continuous vs. Discrete: Currently, SCAS is optimized for continuous control (like robotics). Adapting the state perturbation strategies for discrete environments (like games or logic puzzles) would require a different mathematical approach.
- Model Complexity: While the current dynamics model is simple and effective, integrating more advanced models—like ensembles or diffusion models—could further boost accuracy in highly complex environments.
- Real-World Biases: As with all offline RL, the policy is only as good as the data. If the dataset contains harmful biases, the "correction" mechanism might reinforce them.
Paper Citation: Mao, Y., Wang, Q., Chen, C., Qu, Y., & Ji, X. (2024). Offline Reinforcement Learning with OOD State Correction and OOD Action Suppression. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).
Summary updated