Introduction
Reinforcement Learning (RL) agents often exhibit significant brittleness when deployed in real-world scenarios that differ from their training environments. Detecting these out-of-distribution (OOD) dynamics—such as sensor drift, friction changes, or mechanical failures—is critical for safety-critical applications like autonomous driving. However, existing OOD detection methods are often computationally prohibitive, relying on complex generative models or high-dimensional feature extraction libraries that impede real-time application.
Methodology: A Minimalist Approach
The proposed method, DEEDEE (Fast and Scalable Out-of-Distribution Dynamics Detection), simplifies OOD detection by focusing on two fundamental statistical properties of time-series data:
- Windowed Mean: Captures "level" shifts or global changes in the signal, such as a persistent offset in an agent's position.
- RBF Kernel Similarity: Measures "shape" deviations by comparing current observations to previous ones within a window, identifying local changes like increased jitter or oscillations.
These two features are processed by an ensemble of Isolation Forests, one for each state-space dimension. This "less is more" philosophy avoids the overhead of learning transition models or extracting hundreds of hand-crafted features, making the system "plug-and-play" for existing RL agents.
Experimental Evaluation
DEEDEE was evaluated on Cartpole, Reacher, and Pusher environments using three benchmark suites:
- ARNO (Autoregressive Noised Observation): Simulating sensory anomalies.
- ARNS (Autoregressive Noised State): Simulating semantic/dynamics anomalies where underlying physics change.
- Haider et al. Benchmarks: Testing physical changes like mass and force vector modifications.
Results and Discussion
DEEDEE demonstrates a significant advantage in computational efficiency. In the Pusher environment, DEEDEE requires only ~2.17 seconds for training, representing a near 600x speedup over feature-heavy baselines like DEXTER and a substantial improvement over probabilistic models like PEDM.
Beyond speed, DEEDEE matches or exceeds the accuracy of state-of-the-art detectors. In Autoregressive Noised State (ARNS) scenarios, it achieved a 10% average improvement in AUROC over DEXTER. For instance, in the Cartpole environment under light noise, DEEDEE reached an AUROC of 0.90, significantly outperforming contemporary model-based and feature-based detectors which ranged between 0.55 and 0.81.
Conclusion
DEEDEE proves that high-performance OOD detection in RL does not require complex modeling or massive feature libraries. By targeting "Level" and "Shape" statistics, it provides a robust, scalable solution that is orders of magnitude faster than existing methods. Future work will explore automated hyperparameter tuning and robustness against adversarially constructed anomalies.
Summary updated