Failure-Based Testing for Deep Reinforcement Learning Agents

📅 2026-06-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing reward-based testing methods struggle to effectively detect failure behaviors of deep reinforcement learning agents that perform near-optimally, particularly in critical scenarios. This work proposes Prior Random Testing (PRT), a black-box testing approach that, for the first time, leverages task difficulty as a failure prior to guide test generation. By preferentially sampling from high-difficulty regions of the task space, PRT enhances failure discovery efficiency while preserving test diversity. The method operates without access to the agent’s internal architecture or training process, relying solely on black-box interactions. Experimental evaluation across four standard benchmarks demonstrates that PRT reduces the testing cost to first failure by over 50% compared to random testing and consistently outperforms state-of-the-art baselines in both diversity and failure detection efficiency.
📝 Abstract
Deep Reinforcement Learning (DRL) agents have been widely adopted across diverse domains to address challenging decision-making problems, such as autonomous driving and robotic control. Given that many of these applications are safety- and security-critical, rigorous testing of DRL agents is indispensable. Existing testing methods are typically guided by reward signals to detect failures. However, for well-trained agents, whose performance approaches optimal levels in standard operating conditions, reward signals remain generally high, making current methods ineffective at uncovering critical failures. To address these challenges, we propose a novel failure-based method that leverages task-induced failure insights to enhance failure detection capability while reducing the number of tests required. Since DRL agents are inherently designed with human-defined tasks, they provide valuable cues about task difficulty. Intuitively, a DRL agent is more likely to fail when confronted with a more difficult task; therefore, PRT prioritizes these tasks. Building on this foundation, we propose Prior Random Testing, a black-box failure-based testing method that enables targeted prioritization while preserving the diversity of generated test cases. Guided by task-induced failure insights, PRT prioritizes failure-prone regions of the input domain, thereby facilitating efficient failure detection. PRT is evaluated on four widely used benchmarks and compared with different state-of-the-art methods including fuzzing, search-based and generative-based methods. PRT ranks among the top performers in terms of both the cost of finding the first failure and the diversity of test cases. Notably, compared to random testing, PRT achieves better diversity and reduces the testing cost by over 50%.
Problem

Research questions and friction points this paper is trying to address.

Deep Reinforcement Learning
Failure Detection
Testing
Reward Signal
Safety-Critical Systems
Innovation

Methods, ideas, or system contributions that make the work stand out.

failure-based testing
deep reinforcement learning
task-induced failure insights
Prior Random Testing
black-box testing
🔎 Similar Papers
No similar papers found.