Shae McFaddenSM

SoK: The Pitfalls of Deep Reinforcement Learning for Cybersecurity

USENIX Sec 35th USENIX Security Symposium (USENIX Security 26), 2026

  • Shae McFadden
  • Myles Foley
  • Elizabeth Bates
  • Ilias Tsingenopoulos
  • Sanyam Vyas
  • Vasilios Mavroudis
  • Chris Hicks
  • Fabio Pierazzi
  • King’s College London
  • The Alan Turing Institute
  • University College London
  • Cardiff University
  • KU Leuven
  • Devotion AI Labs

Abstract

Deep Reinforcement Learning (DRL) has achieved remarkable success in domains requiring sequential decision-making, motivating its application to cybersecurity problems. However, transitioning DRL from laboratory simulations to bespoke cyber environments can introduce numerous issues. This is further exacerbated by the often adversarial, non-stationary, and partially-observable nature of most cybersecurity tasks. In this paper, we identify and systematize 11 methodological pitfalls that frequently occur in DRL for cybersecurity (DRL4Sec) literature across the stages of environment modeling, agent training, performance evaluation, and system deployment. By analyzing 66 significant DRL4Sec papers (2018-2025), we quantify the prevalence of each pitfall and find an average of over five pitfalls per paper. We demonstrate the practical impact of these pitfalls using controlled experiments in (i) autonomous cyber defense, (ii) adversarial malware creation, and (iii) web security testing environments. Finally, we provide actionable recommendations for each pitfall to support the development of more rigorous and deployable DRL-based security systems.

Introduction

Deep Reinforcement Learning (DRL) has successfully improved the speed of matrix multiplication; discovered new protein structures; and, achieved superhuman performance at game playing. Through continuous interaction with a DRL environment (often simply referred to as the environment), DRL agents learn sequential decision-making policies by optimizing the expected cumulative reward over time. Unsurprisingly, these capabilities have motivated applications in cybersecurity, where systems must make adaptive decisions in dynamic, adversarial environments. DRL applications range from detecting malicious activity to evading detection and from autonomously defending networks to discovering vulnerabilities.

However, the transition to cybersecurity introduces fundamental challenges compared to traditional domains where DRL has previously excelled, such as game playing, robotics, and computer chip design. In cybersecurity, adversaries actively adapt their strategies to evade detection, systems evolve over time, and defenders typically observe limited information about attacker intentions and system state. These characteristics violate core assumptions of Markov Decision Processes (MDPs), the model for DRL learning tasks, that presume fixed transition dynamics and complete state observability, which can cause agents to be vulnerable to adversaries. In reality, most security tasks are better characterized as Partially Observable MDPs (POMDPs), where agents must infer hidden dynamics from incomplete knowledge: an observation of the system state. Further compounding these challenges are additional task-specific requirements, from information constraints (privacy and access limitations) to practical deployment capabilities (query budgets, real-time constraints). Failing to address these can produce agents that perform well in controlled simulations, however, fail unpredictably and dangerously when deployed in operational environments.

To the best of our knowledge, ours is the first work to delineate the pitfalls that arise when applying DRL in security. In 2022, Arp et al. identified 10 pitfalls in 30 supervised learning-based security research papers, finding at least three pitfalls in each paper. More recently, Evertz et al. extended this analysis to LLM-based security research. They identified nine pitfalls, finding at least one in each of the 72 papers reviewed. While there are some parallels between previously identified pitfalls and our work, the sequential decision-making paradigm of DRL is different. This means that although similar in spirit, these parallel ideas manifest in fundamentally different ways. For example, invalid environment modeling opposed to incorrect dataset construction: they have different causes, impacts, and mitigations.

Collectively, these pitfalls obscure whether reported improvements stem from genuine algorithmic advances or rather from artifacts of simplified environments and incomplete evaluations. More critically, they create a dangerous gap between simulated and operational reality, leading to systems that provide a false sense of security when deployed.

Our goal is not to discourage DRL applications in cybersecurity, as it holds genuine promise, but rather to establish methodological standards that enable the community to distinguish robust, deployable solutions from those that succeed only in idealized settings.

Foundational Concepts

At its core, Reinforcement Learning (RL) problems learn optimal policies through environmental interaction formalized as MDPs. MDPs are defined by the tuple (S, A, R, T, γ), consisting of: a state space S, action space A, reward function R : S × A → ℝ, transition function T : S × A → Δ(S) (where Δ(S) denotes probability distributions over states), and discount factor γ ∈ [0, 1]. An RL ‘agent’ observes a state st, selects an action at according to the policy π, then receives a reward rt, and transitions to the next state st+1. The agent then learns a policy that maximizes expected cumulative discounted reward: E[∑t=0∞ γtrt].

Traditional RL algorithms such as Q-Learning maintain explicit tables of state-action values that do not generalize to unseen states, and become intractable for large state or action spaces, which is critical for cybersecurity applications. DRL addresses this limitation by using deep neural networks as function approximators, allowing generalization to unseen states and scalability to high-dimensional problems. The three primary paradigms of DRL are: value-based methods, which approximate the state-action values of Q-learning; policy-based methods, which directly approximate the action distribution of the policy; and, actor-critic methods that combine both paradigms.

The MDP formulation relies on the Markov property: that the future state depends only on the current state and action, not on the history of past states. This assumption is critical for DRL but can be violated in cybersecurity settings where attackers maintain a hidden state (e.g., compromised credentials, established persistence) not observable to defenders. In such cases, the problem is more accurately modeled as a POMDP, where the agent receives observations ot from an observation function Ω : S → O rather than directly receiving states. POMDPs require agents to maintain belief states or use recurrent architectures to infer the hidden state from observation histories.

MDP: WHAT DRL ASSUMES AGENT Policy π ENVIRONMENT fixed dynamics T state fully visible action at state st reward rt POMDP: WHAT SECURITY LOOKS LIKE DEFENDER AGENT Policy + memory ADVERSARY adapts to evade ENVIRONMENT HIDDEN STATE compromised credentials, established persistence NON-STATIONARY transitions T drift as systems change action at partial observation o = Ω(s) reward rt attacks
MDP and POMDP. In POMDPs, agents have only partial knowledge of an otherwise ‘hidden’ state. Treating a POMDP as fully observable when it does not model full system dynamics, can lead to suboptimal behavior and systematic blind spots in the learned policy.

Four stages of agent development

In this paper, we systematize 11 recurring methodological pitfalls that emerge when DRL is employed in cybersecurity (DRL4Sec). We organize these pitfalls across the four stages of agent development.

STAGE PITFALLS ENTERING AT THIS STAGE CASE STUDY Security problem security task ENVIRONMENT Modeling M-MS MDP Specification M-MC Modeling Correctness M-PO Partial Observability WEB SECURITY Link XSS payloads environment (MDP) AGENT Training T-HR Hyperparameter Reporting T-VA Variance Analysis T-PC Policy Convergence CYBER DEFENSE MiniCAGE network defense trained policies PERFORMANCE Evaluation E-AM Application Motivation E-GA Gain Attribution E-EC Environment Complexity AutoRobust, malware SQIRL, SQL injection evaluated agent SYSTEM Deployment D-UA Underlying Assumptions D-NS Non- Stationarity CYBER DEFENSE MiniCAGE network defense into operation Deployed DRL agent
Figure 1. Common pitfalls of DRL applied to cybersecurity, organized by development stage and separate case studies.
  1. Environment modeling

    The foundation of applying DRL is formulating a problem as an MDP. As a result of problem diversity, cybersecurity domains typically lack standardized DRL environments necessitating bespoke MDP formulations for each task. First, an incomplete MDP Specification hinders reproducibility and obscures potential flaws in DRL-based approaches. Second, Modeling Correctness issues arise when the underlying security task is incorrectly modeled as an MDP. Third, security problems often lack complete system information in practice; inadequately addressing this can lead to problems of Partial Observability.

  2. Agent training

    Unlike supervised learning, where training typically converges given sufficient data, DRL training is inherently more variable and sensitive to numerous factors including: hyperparameter choices, random initialization, sparsity of reward, and the stochastic nature of exploration. First, Hyperparameter Reporting issues arise when critical implementation details necessary for reproduction and validation are omitted. Second, when Variance Analysis is not performed across multiple training runs, the reliable performance of the proposed approach is in question. Third, when Policy Convergence is not achieved, due to premature training termination, it often leads to systems with inconsistent and unpredictable behavior when deployed.

  3. Performance evaluation

    DRL evaluations present unique challenges compared to traditional machine learning. First, Application Motivation issues occur when DRL is used without adequate justification over simpler domain-specific methods. Second, Gain Attribution issues arise when performance gains are due to the basic agent capabilities rather than the learned policy itself. Third, Environment Complexity creates misleading results when training and evaluation occur in overly simplified settings that do not capture real-world complexity.

  4. System deployment

    Avoiding pitfalls in modeling, training, and evaluation does not guarantee an agent’s reliable performance in the complexities and uncertainties of real-world systems. First, Underlying Assumptions issues arise when agent design or environment assumptions cannot be satisfied in practice. Second, Non-Stationarity problems occur when the evolving nature of security environments are not adequately captured.

Remark

This work identifies recurring pitfalls in DRL4Sec literature. These are not failures of individual researchers but systematic challenges that emerge when adapting DRL to cybersecurity. We frame our analysis around pitfall patterns over critiquing specific papers, and while we list the papers reviewed, we do not report the per-paper pitfalls.

Review Methodology

We conducted a systematic literature collection using IEEE Xplore, ACM DL, and Google Scholar. We performed our collection in two rounds, first in April 2025 using only Google Scholar for initial pitfall identification and second in December 2025 using all search tools to complete the corpus and update citation counts.

Significance Criteria. To ensure academic impact and quality, papers must satisfy at least one of the following criteria: (1) published in a first- or second-tier (CORE-ranked A* or A) venue in machine learning, software engineering, or security; or (2) demonstrate significant research impact by averaging more than 10 citations per year since publication from a reputable publisher.

Topic Criteria. We define the scope of papers to be included in our work as: direct applications of DRL to cybersecurity problems and have DRL as the primary methodological contribution. We then excluded several categories of related but out-of-scope work: (1) secondary studies (surveys, systematic reviews, etc.); (2) research on the security of DRL systems, i.e., non-DRL-based attacks against DRL agents (which are not applied to cybersecurity problems); (3) pure game-theoretic approaches without DRL; (4) non-deep RL methods (e.g., tabular Q-learning, which fail in complex environments); and (5) Multi-Agent RL (MARL) systems, a separate research domain (which require distinct formulations and analysis).

1,603 papers after de-duplication IEEE Xplore, ACM DL, Google Scholar collected April and December 2025 Significance Criteria CORE A* or A venue, or > 10 citations a year 363 papers Topic Criteria DRL is the primary contribution; English; > 4 pages 66 papers 37 April + 29 December Two independent reviewers rate all 11 pitfalls: present, partial, not present κ = 0.712 81.5% initial agreement Disagreements resolved by discussion; ambiguous cases get the less severe rating
Collection. After the final collection, we performed de-duplication, resulting in 1,603 papers. Then, we performed the Significance Criteria filtering to arrive at 363 papers. Finally, we screened the papers for Topic Criteria filtering alongside requirements for language (English) and length (> 4 pages) to produce the final 66 papers used in our work, with 37 from the April and 29 from the December collection.

Review Process. We began with a pilot review of the 37 papers from the April collection to identify themes and commonalities. Using this review, we isolated the reoccurring issues in DRL4Sec papers and formalized the 11 pitfalls discussed in this work. We then evaluated the complete 66 papers for each of the identified pitfalls. Each paper was independently evaluated by two reviewers using the pitfall definitions.

Present

Clearly and completely exhibited.

Partially present

Partial manifestations or acknowledged but unaddressed.

Not present

Adequately handled or not applicable.

Following the independent reviews, the initial prevalence scores achieved substantial agreement, according to a Cohen’s κ of 0.712 and the Landis–Koch interpretation. With a 81.5% total agreement on pitfall prevalence, the remaining disagreements (18.5%) around the severity of pitfalls for the papers reviewed were resolved through discussion between the reviewers. When evidence was ambiguous, we gave the benefit of the doubt to the paper by using the less severe pitfall classification to resolve the disagreement (e.g., marking as not present if reviews were split between not present and partially present).

Corpus Characteristics. The 66 papers in our corpus were published between 2018 and 2025 across a diverse set of cybersecurity tasks.

The 66 reviewed papers by security domain

Papers per domain, 2018–2025. Red: domains of the case studies.

Adversarial sample creation 15
Intrusion detection 15
Fuzzing and web security 10
Autonomous cyber defense 7
Penetration testing 6
Cyber-physical systems security 4
Malware detection 4
Blockchain security 3
Hardware security 2
Show as table
DomainPapersShare
Adversarial sample creation1522.7%
Intrusion detection1522.7%
Fuzzing and web security1015.2%
Autonomous cyber defense710.6%
Penetration testing69.1%
Cyber-physical systems security46.1%
Malware detection46.1%
Blockchain security34.5%
Hardware security23.0%

These domains represent the major application areas of DRL4Sec, showing concentration in areas requiring complex sequential decision-making. First, we consider Autonomous Cyber defense (ACD) as these environments are well established and often reused across subsequent works. Then, we consider adversarial malware generation and web security testing as they are some of the most prominent applications of DRL4Sec across the 66 papers studied (22.7% and 15.2%, respectively).

Prevalence Analysis

Through systematic analysis of 66 DRL4Sec papers, published between 2018 and 2025, we quantify the prevalence and severity of each pitfall. Our review reveals widespread issues where every paper contains at least two pitfalls, with an average of 5.8. Furthermore, across the individual pitfalls, 28.8% of papers fall victim to the least common pitfall (Underlying Assumptions), with the most common being present in 71.2% of papers (Policy Convergence).

5.8pitfalls per paper, on average; every paper contains at least two
71.2%lack clear evidence of policy convergence
28.8%fall victim to the least common pitfall (Underlying Assumptions)

How often each pitfall appears

Share of the 66 papers with each pitfall present or partially present, grouped by stage.

M-MSMDP Specification 59.1%
M-MCModeling Correctness 34.9%
M-POPartial Observability 60.6%
T-HRHyperparameter Reporting 68.2%
T-VAVariance Analysis 66.7%
T-PCPolicy Convergence 71.2%
E-AMApplication Motivation 43.9%
E-GAGain Attribution 50.0%
E-ECEnvironment Complexity 40.9%
D-UAUnderlying Assumptions 28.8%
D-NSNon-Stationarity 54.5%
n = 66. Totals are present plus partially present.
Show as table
CodePitfallStagePresentPartialTotal
M-MSMDP SpecificationModeling43539 (59.1%)
M-MCModeling CorrectnessModeling17623 (34.9%)
M-POPartial ObservabilityModeling202040 (60.6%)
T-HRHyperparameter ReportingTraining212445 (68.2%)
T-VAVariance AnalysisTraining38644 (66.7%)
T-PCPolicy ConvergenceTraining281947 (71.2%)
E-AMApplication MotivationEvaluation82129 (43.9%)
E-GAGain AttributionEvaluation151833 (50.0%)
E-ECEnvironment ComplexityEvaluation121527 (40.9%)
D-UAUnderlying AssumptionsDeployment10919 (28.8%)
D-NSNon-StationarityDeployment231336 (54.5%)

Most commonly, we find that: 71.2% lack clear evidence of policy convergence, 60.6% fail to address partial observability, 66.7% neglect variance analysis, and 40.9% evaluate in oversimplified environments.

The gap in convergence reporting suggests that although the need for convergence may be understood, the concrete demonstration of policy convergence and stability is often under-emphasized. Such prevalence indicates that partial observability is a pervasive challenge in DRL applications to cybersecurity. While the number of papers acknowledging the issue show that some awareness exists, it does not match the high prevalence of partial observability in cybersecurity tasks.

Pitfall Taxonomy

Environment modeling
Agent training
Performance evaluation
System deployment

M-MSMDP Specification

The MDP is ill-defined, so that one or more components (state space, action space, reward function, and transition dynamics) remain unclear.

Prevalence
Across the 66 papers reviewed, we observed fully unspecified MDP definitions in 4 papers (6.1%), partially unspecified definitions in 35 papers (53.0%), and complete definitions in the remaining 27 papers (40.9%). Among the full and partial cases the distribution of under-specified components are as follows: the state space was the most frequent (22 papers, 33.3%), followed by transitions (18 papers, 27.3%), action space (14 papers, 21.2%), and reward function (10 papers, 15.2%). The high prevalence indicates a significant documentation issue in DRL4Sec literature, reflecting the inherent difficulty of translating complex security scenarios into fully specified environments.
Security implications
The risks that ambiguous definitions can cause in real-world deployments is threefold. First, it obfuscates other pitfalls in the problem formulation, e.g., state spaces that do not address partial observability allow attacks to go undetected despite causing harm to the system. Second, it hinders reproducibility, as attempts at reconstruction may yield different MDPs. For instance, ‘rewards for attack detection with penalties for false positives’ can produce vastly different behaviors due to variations in relative reward magnitudes. Finally, assessing the real-world viability of the proposed solution becomes significantly harder.
Recommendations
Complete MDP specification requires unambiguous definition of: (1) the state space, including available information, dimensionality, and semantic meaning of individual state values; (2) the action space, specifying all available actions and connection to the security task; (3) the transition function, describing how actions influence state changes, including stochasticity and terminal conditions; and (4) the reward function, providing the complete formulation with rationale for the contribution of each component to the overall objective. Crucially, assumptions, approximations, or simplifications must be explicitly discussed.
Case study
Link (XSS payloads)

Case Study Environments

We conducted controlled experiments across three DRL4Sec domains to demonstrate the practical impact of the identified pitfalls. For all environments, their full MDP specifications are included in our repositories. To highlight pitfalls we performed didactic case studies, these are intended as illustrative examples where pitfalls have measurable, concrete, consequences in security environments. The specific consequence of a pitfall depends on the security problem, how it is modeled, implemented, algorithm chosen, and numerous other factors.

MiniCAGE Autonomous cyber defense

The enterprise network to be defended comprises 13 hosts across three subnets: a user subnet (5 hosts), an enterprise subnet (3 hosts plus 1 defender host), and an operational subnet (4 hosts including a critical server). The defensive (blue) agent must prevent an attacker (red) from reaching the critical server. MiniCAGE contains two attacker strategies: the B-Line attacker proceeds directly through the network to compromise the critical server as quickly as possible, while the Meander attacker attempts to compromise the entire network while en route to the critical server.

AutoRobust Adversarial malware creation

In this environment, the agent is presented with a detected malware sample, and must transform it so that it is misclassified. Rather than modifying the executable, the agent operates on a structured behavioral representation extracted from sandbox execution, consisting of system interactions such as file accesses, registry modifications, executed commands, and API usage. At each step, the agent edits or adds report entries to cross the decision boundary while maintaining a plausible behavioral trace.

Link Web security testing: XSS

The Link DRL agent uses a hand-crafted state-action space to iteratively build XSS payloads. We retrain Link on WAVSEP, a collection of deliberately vulnerable web-applications, following the settings from the original work. WAVSEP contains 32 XSS vulnerabilities.

SQIRL Web security testing: SQL injection

The SQIRL DRL agent uses embeddings of SQL payloads, and statements to handle a dynamic action space, to generate payloads. We retrain SQIRL on its training benchmark, the SMB, which includes 20 training samples, and 10 testing samples (including 5 reproduced CVEs), following the original training and settings of the work.

10.1%increase in the percentage of vulnerabilities found by Link with Distinct States
47.4%drop in vulnerabilities found for the Combined SQIRL agent on sanitized vulnerabilities
−72.7score of the blue then red defender when the assumed order changes (zero is the theoretical max)
−104.1score of the defender trained against B-Line, evaluated against Meander

Case Study of Modeling Pitfalls

We use the Link XSS payload generation environment to show how modeling decisions impact performance. Although the original environment contains valid Markovian transitions, its design introduces unnecessary partial observability and misalignment with the practical security task. This arises from overlapping features in the state space, whereby multiple XSS payloads can be mapped to identical DRL states. For example, a single feature is used to indicate multiple HTML tags (e.g., img, video, audio or svg tags). The unintentional pitfalls introduced by this design can be rectified through reformulation of the MDP.

Thus, we consider two formulations of the MDP for this task: (1) Original, that have merged states; (2) Distinct States, that unrolls the conflated payload features into distinct values, increasing the state dimensionality by 12.8% from 47, to 53.

Table 1: Link on WAVSEP

Percent of vulnerabilities found (VF%) and 95% CI results for Link over 20 runs demonstrating the impact of modeling choices.

MDPVF (%)95% CI
Original75.2(59.4, 90.9)
Distinct States85.3(76.7, 94.0)

Modeling Correctness & Partial Observability. Introducing Distinct States for each possible payload aligns the MDP with the underlying security task avoiding M-MC. Therefore, the agent can develop correct payloads by selecting actions and observing the distinct impact they have on the current payload. Thus, removing the unnecessary partial observability, M-PO, from the environment. This effect can be observed concretely in Table 1 where including Distinct States increases the percentage of vulnerabilities found over Original by 10.1% and the raising lower bound performance by 17.3%. Therefore, through minor changes in the state space to remove the M-MC and M-PO pitfalls, we can observe significant improvements in performance.

MDP Specification. Although originally defined clearly, the performance difference between MDP formulations in Table 1 demonstrates that when components are left unclear, MDP Specification can severely impact final performance.

Case Study of Training Pitfalls

To evaluate the impact of pitfalls in policy training, we use MiniCAGE. Specifically, we evaluate four hyperparameter settings for T-HR, investigate variance and convergence for T-VA and T-PC, respectively.

Hyperparameter settings in MiniCAGE

The four PPO settings whose training curves (20 runs each, 95% CI) the paper plots, and what it reports for each.

SettingWhat changesAt 2.5 million steps
Default HPsStable Baselines 3 defaults for PPORelative convergence at 2.0–2.5M steps, minor variance
Alt ClippingPPO’s loss clippingRelative convergence at 2.0–2.5M steps, minor variance
Alt Learning RateLearning rateStill increasing, higher variance
Alt Discount FactorDiscount factor for future rewardsStill increasing, higher variance

Impact of Hyperparameters. We examine the final performance at 2.5 million steps and see how changing a single hyperparameter results in drastically different performance, highlighting how hyperparameter transparency is needed to ensure reproducibility.

Analyzing Variance. Concretely, at 500k the upper CI bound of the ‘Alt Learning Rate’ appears to be the second best performing agent. However, we see from the variance that an agent at this upper CI bound is not representative of the (lower) mean performance. By evaluating over multiple runs and reporting 95% CI, we obtain a more accurate picture of actual performance.

Demonstrating Policy Convergence. The ‘Default HPs’ and ‘Alt Clipping’ settings show relative convergence at 2.0-2.5 million steps where plateauing performance curves and minor variance can be seen. In contrast, the ‘Alt Learning Rate’ and ‘Alt Discount Factor’ are still increasing in performance with higher variance at 2.5 million steps.

Case Study of Evaluation Pitfalls

Here we consider the three pitfalls we identified in evaluating agents: first, the attribution of gains in the AutoRobust environment; second, the theoretical motivation of DRL in adversarial malware generation; third, environment complexity comparisons in the SQIRL environment for SQL injection.

Identifying the Source of Gains. To assess the impact of the E-GA pitfall, the goal in the AutoRobust environment is to disentangle the contributions of different elements in the approach. First, we train and evaluate policies with full access to the internal state of the malware detection model, referred to as MDP. Second, we consider policies without internal state access, named POMDP, to evaluate the performance of learning under a more restrictive and realistic threat model. Finally, we evaluate Random policies that sample actions at random, to isolate the intrinsic efficacy of the action space itself. There are two key takeaways. First, full observability does not guarantee better performance, as agents can struggle to learn the task even with fully observable information. Second, while trained policies (MDP & POMDP) have the potential to achieve better performance, the random baseline is already strong. This demonstrates the importance of E-GA as the action space alone provides a large portion of overall performance.

Motivating the Application. As an example of theoretical motivation, in the domain of adversarial malware creation, DRL has several key capabilities over existing gradient-based attacks. Concretely, gradient-based methods assume a fixed input size, limiting exploration to only a very small subset of the actual transformations an adversary can make. Similarly in malware, gradient-based perturbations on the feature representation do not have a consistent and reliable method for being mapped to valid changes in the problem-space, i.e., the actual program. In contrast, DRL can operate directly on malware samples, bypassing the need for feature to problem-space mapping. Furthermore, given an adversary with a well defined sets of actions, at convergence DRL can additionally confer probabilistic guarantees on the level of vulnerability/robustness.

Changing Environment Complexity. To show the effect of E-EC we use the SMB benchmark from SQIRL. Using the SMB we train two policies, one on the default SMB with a Combined sanitized and non-sanitized vulnerability set, and one policy with the same vulnerabilities without sanitization (Non-Sanitized). We evaluate both trained policies on the SMB test set of sanitized and non-sanitized vulnerabilities; Table 2 shows the percentage of vulnerabilities found across 20 runs with 95% CI.

Table 2: SQIRL on the SMB

Percent of vulnerabilities found (VF%) and 95% CI for SQiRL across 20 runs and evaluations each setting. Showing the impact of evaluating on low-complexity environments.

Training environment (rows) against evaluation environment (columns)

Training environmentSanitizedNon-Sanitized
Combined41.10(33.9, 48.4)88.5(85.4, 91.6)
Non-Sanitized29.80(22.9, 36.8)88.7(85.5, 91.9)
VF (%) with 95% CI.

We see both the Combined and Non-Sanitized agents are capable of discovering vulnerabilities in the simplified non-sanitized settings. However, when changing the evaluation set to the more challenging Sanitized vulnerabilities we see a 47.4% drop in vulnerabilities found for the Combined agent, with a further 11.3% for the non-sanitized agent. This demonstrates how simplified evaluation environments can inflate performance, producing promising results that fail to translate into real-world capabilities.

Case Study of Deployment Pitfalls

We evaluate the impact of pitfalls in deploying DRL agents using MiniCAGE. First, we consider Underlying Assumptions by modifying the assumed fixed action order between attacker and defender during testing, blue then red (B→R) in the original formulation. Second, we study Non-Stationarity by changing the fixed attacker strategy between training and testing.

Table 3: MiniCAGE deploying agents

Experimental results for MiniCAGE deploying agents case study. The top section shows blue agent performance when training and evaluation action orders differ. The bottom section shows blue agent performance against different red adversaries. Zero is the theoretical max score.

Training order (rows) against evaluation order (columns)

Training orderR→BB→RMixed
R→B−15.8(−14.8, −16.7)−21.0(−19.0, −23.1)−18.3(−17.0, −19.6)
B→R−72.7(−65.6, −79.9)−17.2(−16.7, −17.7)−45.5(−42.0, −49.0)
Mixed−28.4(−25.6, −31.2)−19.9(−19.2, −20.6)−24.6(−22.9, −26.2)

Training red agent (rows) against evaluation adversary (columns)

Training red agentB-lineMeanderMixed
B-line−19.0(−20.9, −17.2)−104.1(−120.7, −87.6)−61.4(−70.5, −52.3)
Meander−79.0(−97.2, −60.9)−61.0(−74.7, −47.3)−70.2(−83.5, −56.9)
Mixed−40.2(−47.1, −33.4)−79.2(−86.5, −71.9)−60.2(−65.8, −54.7)
Score with 95% CI; bold where training and evaluation match.

Breakdown of Underlying Assumption. The first section of Table 3 shows the average reward of the DRL defender when varying the action order of red and blue agents in training and testing (e.g., R→B indicates red then blue and Mixed indicates random turn order). As expected, agents perform comparably when tested on the same training order (−17.2 for B→R and −15.8 for R→B). When the assumed order changes, performance degrades: minimally for R→B agent (−21.0) and drastically for the B→R agent (−72.7). These results highlight how minor design choices can degrade performance if the assumptions they rely on do not hold in practice.

Changing Attacker Strategy. Table 3 shows the average reward of defender agents under varying attacker strategies: B-Line and Meander. The agent order is kept constant as B→R. We see a degradation in performance when any stationary blue agent is evaluated against unseen or mixed attacker strategies. This degradation can be mitigated by including non-stationary attacker strategies during training as the Mixed blue agent outperforms the stationary defenders in both mixed and cross evaluations. These results show that policies can be brittle to changing conditions when trained without accounting for non-stationarity.

Open Science

To support open science and promote reproducibility, we provide the following repositories. GitHub and Zenodo. Each case study directory contains the modified environment, the training/evaluation scripts, the MDP specification, and a case_study.diff documenting all changes from the original open-source repository released with their respective papers. The full reproduction of 20 seeds is computationally-intensive, therefore, we recommend running a single seed.

Actionable Recommendations

We encourage researchers to carefully consider the pitfalls of DRL for cybersecurity and, where applicable, apply the recommendations from this work.

  • Environment modeling
  • M-MSMDP Specification. Crucially, assumptions, approximations, or simplifications must be explicitly discussed. When space constraints prevent full specification in the main text, this should be provided in appendices or supplementary materials.
  • M-MCModeling Correctness. The state transitions must reflect genuine sequential structure (next states are consequences of current state and action) rather than artificially chaining independent decisions.
  • M-POPartial Observability. Partial observability may be inherent to security tasks which often feature incomplete, delayed, or deliberately concealed information. In such cases it should be explicitly formulated as a POMDP.
  • Agent training
  • T-HRHyperparameter Reporting. Complete hyperparameter reporting is necessary for reproducible, trustworthy research in cybersecurity as DRL algorithms are highly sensitive to hyperparameter choices.
  • T-VAVariance Analysis. We recommend a minimum of N ≥ 5, and encourage higher runs (N ≥ 20 or N ≥ 50) for stronger statistical claims.
  • T-PCPolicy Convergence. We recommend the inclusion of figures showing episodic reward or task-specific metrics as clear evidence of stabilization before training termination.
  • Performance evaluation
  • E-AMApplication Motivation. Applying DRL to a novel task should be justified theoretically and, when possible, empirically.
  • E-GAGain Attribution. Evaluating performance under random action sampling isolates the contribution of policy learning and establishes a baseline performance in the environment.
  • E-ECEnvironment Complexity. As a result of transferability issues from the sim-to-real gap, it is best practice to train and evaluate DRL in the most realistic environment feasible.
  • System deployment
  • D-UAUnderlying Assumptions. Realistic deployment settings should be used by constraining observation/action spaces, and enforcing practical limits on query budgets and computation.
  • D-NSNon-Stationarity. Cybersecurity tasks are inherently dynamic, so DRL agents must be explicitly exposed to such variability during training.

Conclusion

The autonomous and adaptive decision-making that DRL can offer in complex environments has significant potential for cybersecurity applications. However, our review of 66 DRL4Sec papers published between 2018-2025 reveals 11 common methodological challenges (pitfalls) that undermine DRL4Sec research. Through case studies in autonomous cyber defense, adversarial malware creation, and web security testing, we demonstrate these pitfalls directly impact performance and create potentially brittle policies.

  • Prevalence Analysis. We systematically examine 66 DRL4Sec papers published between 2018 and 2025, quantifying the occurrence and severity of pitfalls across diverse security domains.
  • Pitfall Taxonomy. We define 11 pitfalls when adapting DRL to cybersecurity, organized across four stages of development (modeling, training, evaluation, and deployment).
  • Impact Demonstration. Through experiments using existing DRL4Sec environments in three representative domains, we provide empirical evidence of the impact caused by these pitfalls.
  • Actionable Recommendations. We provide concrete guidance to mitigate each pitfall, supporting the development of more rigorous and reliable DRL4Sec research.

Through the identification of 11 DRL4Sec pitfalls and recommendations for their mitigation, this work establishes higher methodological standards for future applications of DRL to cybersecurity.

Cite

@inproceedings{McFadden2026Pitfalls,
      title={SoK: The Pitfalls of Deep Reinforcement Learning for Cybersecurity},
      author={Shae McFadden and Myles Foley and Elizabeth Bates and Ilias Tsingenopoulos and Sanyam Vyas and Vasilios Mavroudis and Chris Hicks and Fabio Pierazzi},
      booktitle={35th USENIX Security Symposium (USENIX Security 26)},
      year={2026}
}