Rethinking Out-of-Distribution Detection for Reinforcement Learning: Advancing Methods for Evaluation and Detection
Open accessAbstract
While reinforcement learning (RL) algorithms have been successfully applied across numerous sequential decision-making problems, their generalization to unforeseen testing environments remains a significant concern. In this paper, we study the problem of out-of-distribution (OOD) detection in RL, which focuses on identifying situations at test time that RL agents have not encountered in their training environments. We first propose a clarification of terminology for OOD detection in RL, which aligns it with the literature from other machine learning domains. We then present new benchmark scenarios for OOD detection, which introduce anomalies with temporal autocorrelation into different components of the agent-environment loop. We argue that such scenarios have been understudied in the current literature, despite their relevance to real-world situations. Confirming our theoretical predictions, our experimental results suggest that state-of-the-art OOD detectors are not able to identify such anomalies. To address this problem, we propose a novel method for OOD detection, which we call DEXTER (Detection via Extraction of Time Series Representations). By treating environment observations as time series data, DEXTER extracts salient time series features, and then leverages an ensemble of isolation forest algorithms to detect anomalies. We find that DEXTER can reliably identify anomalies across benchmark scenarios, exhibiting superior performance compared to both state-of-the-art OOD detectors and high-dimensional changepoint detectors adopted from statistics.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Novelty detection has not been well-studied in reinforcement learning.
“There are important applications that can benefit from RL novelty detection frameworks (Fu et al., 2017), yet novelty detection has not been well-studied in the realm of RL (Nasvytis et al., 2024).”
From Novelty Detection in Reinforcement Learning with World Models (2023) · cites this paper as Nasvytis et al., 2024
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
No references could be resolved yet.
Research works printed but not linked: 29
- OpenAI: Marcin Andrychowicz, Bowen Baker, Maciek Chociej, Rafal Jozefowicz, Bob McGrew, Jakub Pachocki, Arthur Petron, Matthias Plappert, Glenn Powell, Alex Ray, et al. 2020. Learning dexterous in-hand manipulation. The International Journal of Robotics Research (2020).
- George EP Box, Gwilym M Jenkins, Gregory C Reinsel, and Greta M Ljung. 2015. Time series analysis: forecasting and control. John Wiley & Sons.
- Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. 2016. OpenAI Gym. arXiv:arXiv:1606.01540 · arXiv
- Stephanie CY Chan, Samuel Fishman, John Canny, Anoop Korattikara, and Sergio Guadarrama. 2019. Measuring the reliability of reinforcement learning algorithms. arXiv preprint arXiv:1912.05663 (2019). · arXiv
- Yudong Chen, Tengyao Wang, and Richard J Samworth. 2022. High-dimensional, multiscale online changepoint detection. Journal of the Royal Statistical Society Series B: Statistical Methodology 84, 1 (2022), 234-266.
- Maximilian Christ, Nils Braun, Julius Neuffer, and Andreas W Kempa-Liehr. 2018. Time series feature extraction on basis of scalable hypothesis tests (tsfresh-a python package). Neurocomputing 307 (2018), 72-77.
- Mohamad H Danesh and Alan Fern. 2021. Out-of-Distribution Dynamics De- tection: RL-Relevant Benchmarks and Results. arXiv preprint arXiv:2107.04982 (2021). · arXiv
- Christian Schroeder de Witt and Thomas Hornigold. 2019. Stratospheric Aerosol Injection as a Deep Reinforcement Learning Problem. https://doi.org/10.48550/ arXiv.1905.07366 arXiv:1905.07366 [physics, stat]. · DOI · Paper page
- Jonas Degrave, Federico Felici, Jonas Buchli, Michael Neunert, Brendan Tracey, Francesco Carpanese, Timo Ewalds, Roland Hafner, Abbas Abdolmaleki, Diego de Las Casas, et al. 2022. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature 602, 7897 (2022), 414-419.
- Alfonso Delgado-Bonal and Alexander Marshak. 2019. Approximate entropy and sample entropy: A comprehensive tutorial. Entropy 21, 6 (2019), 541.
- Tim Franzmeyer, João F Henriques, Jakob N Foerster, Philip HS Torr, Adel Bibi, and Christian Schroeder de Witt. 2022. Illusionary Attacks on Sequential Decision Makers and Countermeasures. arXiv preprint arXiv:2207.10170 (2022). · arXiv
- Scott Fujimoto, Herke Hoof, and David Meger. 2018. Addressing function ap- proximation error in actor-critic methods. In International conference on machine learning. PMLR, 1587-1596.
- Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. 2018. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International conference on machine learning. PMLR.
- Tom Haider, Karsten Roscher, Felippe Schmoeller da Roza, and Stephan Günne- mann. 2023. Out-of-Distribution Detection for Reinforcement Learning Agents with Probabilistic Dynamics Models. In Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems. 851-859.
- Elia Kaufmann, Leonard Bauersfeld, Antonio Loquercio, Matthias Müller, Vladlen Koltun, and Davide Scaramuzza. 2023. Champion-Level Drone Racing Using Deep Reinforcement Learning. Nature 620, 7976 (Aug. 2023), 982-987. https: //doi.org/10.1038/s41586-023-06419-4 · DOI
- Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems 30 (2017).
- Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. 2008. Isolation forest. In 2008 eighth ieee international conference on data mining. IEEE, 413-422.
- Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. 2012. Isolation-based anomaly detection. ACM Transactions on Knowledge Discovery from Data (TKDD) 6, 1 (2012), 1-39.
- Aaqib Parvez Mohammed and Matias Valdenegro-Toro. 2021. Benchmark for out-of-distribution detection in deep reinforcement learning. arXiv preprint arXiv:2112.02694 (2021). · arXiv
- Robert Müller, Steffen Illium, Thomy Phan, Tom Haider, and Claudia Linnhoff- Popien. 2022. Towards Anomaly Detection in Reinforcement Learning. In Pro- ceedings of the 21st International Conference on Autonomous Agents and Multiagent Systems. 1799-1803.
- Charles Packer, Katelyn Gao, Jernej Kos, Philipp Krähenbühl, Vladlen Koltun, and Dawn Song. 2018. Assessing generalization in deep reinforcement learning. arXiv preprint arXiv:1810.12282 (2018). · arXiv
- E. S. Page. 1954. Continuous Inspection Schemes. Biometrika 41, 1/2 (1954), 100-115. https://doi.org/10.2307/2333009 Publisher: [Oxford University Press, Biometrika Trust]. · DOI
- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal Policy Optimization Algorithms. Technical Report. arXiv.
- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 (2017). · arXiv
- Andreas Sedlmeier, Thomas Gabor, Thomy Phan, Lenz Belzner, and Claudia Linnhoff-Popien. 2019. Uncertainty-based out-of-distribution classification in deep reinforcement learning. arXiv preprint arXiv:2001.00496 (2019). · arXiv
- Hui Yie Teh, I Kevin, Kai Wang, and Andreas W Kempa-Liehr. 2021. Expect the unexpected: unsupervised feature selection for automated sensor anomaly detection. IEEE Sensors Journal 21, 16 (2021), 18033-18046.
- Emanuel Todorov, Tom Erez, and Yuval Tassa. 2012. MuJoCo: A physics engine for model-based control. In 2012 International Conference on Intelligent Robots and Systems.
- A. Wald. 1945. Sequential Tests of Statistical Hypotheses. The Annals of Math- ematical Statistics 16, 2 (1945), 117-186. https://www.jstor.org/stable/2235829 Publisher: Institute of Mathematical Statistics.
- Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. 2021. Generalized out-of-distribution detection: A survey. arXiv preprint arXiv:2110.11334 (2021). · arXiv
Cited by
Sorted by citations
Open Challenges in Multi-Agent Security: Towards Secure Systems of Interacting AI Agents
de Witt, C. S., Krawiecka, K., Krawczuk, I., Hagag, B., Anderson, W. L., Belcak, P., Bucknall, B., Cai, X., Chopra, A., Cohen, D., et al. (2025) · arXiv · doi:10.48550/arxiv.2505.02077 · Cited by 2 · see citing works
Novelty Detection in Reinforcement Learning with World Models
Zollicoffer, G., Eaton, K., Balloch, J., Kim, J., Zhou, W., Wright, R., & Riedl, M. O. (2023) · arXiv · doi:10.48550/arxiv.2310.08731
- Authors
- Nasvytis, L., Sandbrink, K., Foerster, J., Franzmeyer, T., & Schroeder de Witt, C.
- Affiliations
- Harvard University (US)
- University of Oxford (GB)
- Venue
- International Joint Conference on Autonomous Agents and Multiagent Systems
- Publisher
- IEEE Computer Society
- Published
- 2024-05-06
- Pages
- 1445-1453
- ISSN
- 1548-8403 (ISSN-L)
- 1558-2914
- OpenAlex
- W7124265117
- Cited by
- 4
- References
- 0
- Citations by year
- 2026: 2 · 2025: 2
- FWCI
- 0.97
- Type
- conference paper
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- cc-by
- Locations
- Adaptive Agents and Multi-Agents Systems (publishedVersion)
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Funders
- Future of Life Institute
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Anomaly Detection Techniques and Applications
- Physical Sciences › Computer Science › Artificial Intelligence › Reinforcement Learning in Robotics
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Keywords
- out-of-distribution detection, reinforcement learning, generalization to unseen environments, temporal autocorrelation, anomaly detection, Dexter, change point detection, benchmark scenarios, agent-environment interaction
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review