Shae McFaddenSM

DRMD: Deep Reinforcement Learning for Malware Detection under Concept Drift

AAAI Proc. of the AAAI Conference on Artificial Intelligence, 2026

  • Shae McFadden
  • Myles Foley
  • Mario D'Onghia
  • Chris Hicks
  • Vasilios Mavroudis
  • Nicola Paoletti
  • Fabio Pierazzi
  • King’s College London
  • The Alan Turing Institute
  • University College London

Abstract

Malware detection in real-world settings must deal with evolving threats, limited labeling budgets, and uncertain predictions. Traditional classifiers, without additional mechanisms, struggle to maintain performance under concept drift in malware domains, as their supervised learning formulation cannot optimize when to defer decisions to manual labeling and adaptation. Modern malware detection pipelines combine classifiers with monthly active learning (AL) and rejection mechanisms to mitigate the impact of concept drift. In this work, we develop a novel formulation of malware detection as a one-step Markov Decision Process and train a deep reinforcement learning (DRL) agent, simultaneously optimizing sample classification performance and rejecting high-risk samples for manual labeling. We evaluated the joint detection and drift mitigation policy learned by the DRL-based Malware Detection (DRMD) agent through time-aware evaluations on Android malware datasets subject to realistic drift requiring multi-year performance stability. The policies learned under these conditions achieve a higher Area Under Time (AUT) performance compared to standard classification approaches used in the domain, showing improved resilience to concept drift. Specifically, the DRMD agent achieved an average AUT improvement of 8.66 and 10.90 for the classification-only and classification-rejection policies, respectively. Our results demonstrate for the first time that DRL can facilitate effective malware detection and improved resiliency to concept drift in the dynamic setting of Android malware detection.

Video

The Alan Turing Institute on YouTube

Introduction

Malware poses a significant and ever-evolving threat to mobile devices, personal computers, and enterprise systems. Every day, tens of thousands of new Android and Windows applications appear, far outpacing the capacity for manual analysis. Automated malware detection using machine learning approaches is therefore crucial to ensure user security.

A core challenge of malware detection arises from the scale of new samples that emerge daily and the limited capacity for manual review. Onwuzurike et al. estimated that an upper bound of 10,000 applications are submitted to the Google Play Store each day, while Miller et al. assumed the manual review capacity of an average company at only 80 samples per day. This significant gap necessitates the use of machine learning (ML) to accurately and consistently classify new applications based on previously labeled data.

Concept Drift

A key limitation of traditional Supervised Learning (SL) classifiers is their reliance on the assumption that data follows an Independent and Identically Distributed (IID) structure. However, this assumption does not hold in the domain of Android malware, due to the continuous evolution of both benign applications (goodware) and malware over time. Goodware evolves naturally as software developers introduce new features, while malware adapts to better mimic goodware and evade detection. This continual evolution leads to a divergence between training and testing data that expands over time, a phenomenon known as concept drift.

AL and Rejection Mechanisms

Approaches such as active learning (AL) to periodically retrain on a subset of new samples and classification with rejection to selectively abstain from classification can mitigate performance degradation caused by evolving threats. However, manual labeling in the malware domain is resource-intensive. Therefore, AL techniques must carefully balance selecting the most informative samples while minimizing labeling costs.

A single decision framework

We present the first approach in this domain that reformulates malware detection as a one-step MDP, or contextual bandit, where each episode corresponds to a single sample, thus avoiding spurious dependencies between states.

Traditional classifiers

  • Traditional supervised classifiers struggle to maintain malware detection performance in isolation as benign and malicious behaviors evolve over time.
  • Both AL and rejection mechanisms in Android malware detection are typically employed periodically to mitigate concept drift, with common evaluations considering monthly periods for these mechanisms.
  • While classification techniques from domains such as computer vision are effective on stationary data, they struggle to adapt to the dynamic nature of malware that actively seeks to evade detection.

DRMD

  • In this work, we unify classification, AL, and rejection within a single decision framework using deep reinforcement learning (DRL).
  • Leveraging this formulation, we train a DRL-based Malware Detection (DRMD) agent that directly optimizes the long-term trade-off between detection accuracy, labeling cost, and misclassification risk under realistic concept drift.

DRMD Design

DRMD is a DRL-based approach that, in its most complete form, unifies classification, AL, and rejection in a single malware detection pipeline. DRMD first formulates the Malware Detection MDP (MD-MDP), then uses a deep neural network to learn an effective detection policy. Concretely, MD-MDP extends ICMDP with corrected episode definitions and integrates the mechanisms necessary for effective malware detection in practice.

Motivation

The application of DRL to detection tasks has been shown to improve performance in more complex domains with class imbalance. However, the use of DRL in malware detection has seen little work likely due to the drift and class imbalance of the domain. A policy for malware detection should consider the larger decision-making process of classification, rejection, and AL; thus allowing for the optimization of performance to be rejection-aware. Finally, the agent must adapt to concept drift within the domain constraints. As a result, DRL policies must move beyond the stationary perspectives of prior problem domains. Our MD-MDP and agent design achieve these considerations through a one-step episodic formulation that leverages an expanded reward function for temporal robustness and the integration of rejection.

MD-MDP

  • Episodes. In our formulation, each episode consists of a single step: classifying or rejecting one sample.
  • States. For episode e, the sample xe consists of d features, where F ⊆ ℝd represents the feature space, hence xe ∈ F. The state consists of the features of the current sample; therefore, the state space and state are defined as S = F and s = xe, respectively.
  • Actions. A chosen action a ∈ A represents the decision of the agent for the current state s. The action space is A = {agw, amw, arej}, where agw classifies the sample as goodware, amw as malware and arej rejects the sample, abstaining from classification. Active learning is integrated by retraining on samples for which the agent selected arej.
ONE EPISODE = ONE APP, ONE ACTION ACTION a EPISODE e New app raw app DREBIN / RAMDA Feature extractor state s = xe DRMD AGENT Policy π PPO actor + critic Goodware Malware Reject πcr only action a reward r rejected app Manual labelling if AL Labelled data sliding window labels REWARD FUNCTION USED IN TRAINING Rclf = Racc × Rtmp × Rimb goodware / malware Racc ±1 right / wrong Rtmp ½ max(1, Δ months) Rimb 1/σ̂ if malware Rrej reject action −Rcost − (1/σ̂)Rnml if Rnml ≤ 0 −Rcost − σ̂Rnml otherwise Rnml = Rclf(s, a ≠ arej), the next most likely action
Figure 1. Overview figure showing the one-step classification of a sample using DRMD.

Rewards

The rewards need to encapsulate the dynamics of classifications and rejection. The three underlying components of classification in the domain are the accuracy of the predictions, the natural imbalance in the distribution of the samples, and the evolution of samples over time.

Accuracy

Racc(s, a) =
+1 if a = y(s)
−1 if a ≠ y(s)

For prediction accuracy, correct classifications receive a positive reward and incorrect classifications incur a penalty.

Class imbalance

Rimb(s) =
1/σ̂ if y(s) = 1
1 if y(s) = 0

For class imbalance, since Android malware samples are the minority class (σ̂ ≈ 10%), the rewards and penalties for malware samples (y(s) = 1) are proportionally increased. We use upscaling instead of majority class reward downscaling used by Lin et al. as we introduce additional scaling factors for temporal and rejection values.

Time

Rtmp(s) =
½ max(1, Tpos(s) − Tpos(s0))
Tpos: relative temporal position, in months; s0: first training state

For temporal robustness, we upscale the rewards for the current state s.

Rejection

Rrej(s, a) =
−Rcost − (1/σ̂) Rnml if Rnml ≤ 0
−Rcost − σ̂ Rnml else

For rejection, the reward is comprised of a flat rejection cost (Rcost), the inverted reward of the next most likely action (Rnml = Rclf(s, a ≠ arej)), as well as a rejection scaling factor based on the value of Rnml and σ̂. The scaling factor balances the rewards for classifying and rejecting malware predictions while incentivizing rejection of uncertain goodware predictions. Together, these components penalize interference with correct classifications and incentivize rejection of incorrect classifications.

The classification (Rclf) and complete DRMD (Rcr) reward functions are defined as:

Rclf(s, a) = Racc(s, a) × Rtmp(s) × Rimb(s)
Rcr(s, a) = Rclf(s, a) if a ∈ {agw, amw}; Rrej(s, a) if a = arej

Using our formulation, we create two types of policies for evaluation. First, a Classification-Only Policy (πclf) using the classification actions (agw and amw), and reward Rclf(s, a). Second, a Classification-Rejection Policy (πcr) that uses all actions, and reward Rcr(s, a).

Agent Architecture

We use Proximal Policy Optimization (PPO), modified for one-step episodes, to train the DRMD agent. Additionally, PPO has seen successful application to several other security domains such as automated cyber defense, vulnerability discovery, and adversarial machine learning. The on-policy nature of PPO and its use of rollout updates facilitate learning on the most recent samples compared to experience replay buffers, used in off-policy methods, which would be more susceptible to concept drift.

While we have formulated the MD-MDP as a one-step MDP or contextual bandit problem, existing deep contextual bandits (DCBs) are not well-suited to our setting. First, DCBs assume stationary sub-Gaussian (bounded) reward noise, an assumption violated in malware domains due to concept drift. Furthermore, DRMD significantly outperforms DCBs, NeuralTS and NeuralUCB, over all settings for the classification–only policy with an average ∆Base of 9.77.

The agent employs separate actor and critic neural networks, each consisting of four hidden layers with 512 neurons per layer, using LeakyReLU activations and dropout for regularization. During training, each epoch consists of one episode per training sample using the current policy. The collected states, actions, and rewards are then used to compute the clipped policy and value losses to update the actor and critic networks over mini batches. When new samples become available after the initial training, the agent will be fine-tuned on a sliding window of the newest samples (instead of on all samples) to focus updates on adapting to changes in the domain.

MD-MDP vs ICMDP

Lin et al. formulated ICMDP, forming states as samples, actions as predicted labels, rewarding +1 for correct and -1 for incorrect classification of minority class samples with majority class sample rewards down-scaled according to the class distribution. SINNER builds on the ICMDP framework and extends its reward function to the multi-class setting, employing a Dueling Double DQN to classify the family of Windows PE malware samples. Although these approaches improve performance by harnessing DRL, they do not consider concept drift, a core problem in malware detection.

Prior work has applied the ICMDP to several domains such as malware family classification. However, the formulation of ICMDP assumes state transitions between classification samples, thus treating independent samples as sequentially dependent. To overcome this, we cast malware detection as a one-step MDP (aka contextual bandit).

ICMDP (PRIOR WORK): MANY APPS PER EPISODE App 1 state s₁ App 2 state s₂ App 3 state s₃ next state next state next state Episode ends when malware is misclassified or samples run out a₁, r₁ a₂, r₂ a₃, r₃ one episode chains independent apps in dataset order MD-MDP (DRMD): ONE APP PER EPISODE EPISODE 1 App 1 a₁, r₁ episode ends EPISODE 2 App 2 a₂, r₂ episode ends EPISODE 3 App 3 a₃, r₃ episode ends
Figure 2. In our formulation, each episode consists of a single step: classifying or rejecting one sample. This corrects the state transitions introduced by the ICMDP formulation by isolating each sample into its own episode.

Therefore, our MD-MDP formulation ensures that policy updates do not introduce spurious correlations as a result of artificial dependencies between independent samples.

To isolate the difference from MD-MDP compared to ICMDP, we train a version of the DRMD agent using the transitions and reward structure of ICMDP. Concretely, episodes continue until either a) malware is misclassified or b) the agent runs out of training samples. Otherwise, states and actions are the same as in the MD-MDP. As a result, the next states are based on the next sample from the dataset. Rewards are structured as in Racc, however, rewards from goodware samples are scaled down by σ̂. For fairness, we use the same PPO architecture and hyperparameters to train both our agent and the ICMDP agent.

Overall, the MD-MDP outperforms ICMDP in 97 out of 100 settings, with 45 settings being statistically significant, and achieves an average ∆IC of 1.94.

These results demonstrate that beyond theoretical modeling discussions, the MD-MDP is empirically better suited for integration into wider malware detection pipelines.

Experimental Settings

Time-Aware Evaluation

Since concept drift in malware detection is inherently time-dependent, time-aware evaluations are essential to assess classifier performance in real-world scenarios. A valid time-aware evaluation must adhere to the following constraints. (C1) Training samples must always precede testing samples. (C2) All testing samples must be drawn from the same time window. (C3) The malware distribution in the testing set must reflect a realistic distribution. Violating these constraints can introduce biases that artificially inflate the performance of the classifier, leading to unrealistic expectations in practical deployments.

Datasets

We use two Android malware datasets in our evaluation: Transcendent and Hypercube. Transcendent provides an established Android malware dataset, while Hypercube is an updated dataset with newer malware samples. Transcendent consists of 259,230 applications collected between 2014 and 2018. Hypercube contains 159,839 applications between 2021 and 2023. Both datasets contain a malware distribution of ≈ 10% according to the spatial constraint of Tesseract, and the samples have been labeled using a standard VirusTotal detection threshold (VTT = 4).

TRAIN TEST, ONE WINDOW PER MONTH Transcendent 259,230 apps 2014 2015 2016 2017 2018 Hypercube 159,839 apps 2021 2022 2023 INSIDE EACH TEST MONTH New apps this month features Detector DRMD or baseline verdicts F1 score this month AUT over all months most uncertain retrain most uncertain Active learning label AL apps Rejection quarantine Rej apps budgets per month 0, 50, 100, 200 or 400
Figure 3. For both datasets, we use the first year for training and subsequent years for testing, allowing evaluation of performance under concept drift.

Feature Spaces

To ensure that the performance of DRMD is independent of a single feature representation, we evaluate it using two different Android malware feature spaces for each dataset. We use feature spaces that enable us to evaluate our approach across varying amounts of information per sample.

Drebin

First, we use the Drebin feature space, consisting of a sparse, high-dimensional binary vector, capturing static features extracted from the application’s metadata and bytecode, including permissions, API calls, and network addresses. For our experiments, we follow Kan et al. in selecting the 10,000 most informative Drebin features as it maintains performance while managing computational complexity. This representation has become the standard in Android malware detection.

Ramda

The second feature space that we use is Ramda, a compact feature space designed for adversarial robustness, which focuses on three critical static attributes: permissions, intent actions, and sensitive API calls. Each application is encoded as a 379-dimensional binary vector that captures the presence or absence of these features.

Area Under Time

In order to evaluate the performance of detectors, we use the Area Under Time (AUT) metric, introduced by Pendlebury et al., and defined as:

AUT(P, N) = 1/(N − 1) Σk=1…N−1 [P(Xk+1) + P(Xk)] / 2

where: P(Xk) is the performance on samples Xk using metric P, with P being the F1 score in our paper.

Baselines

To compare our novel MD-MDP with the ICMDP, we evaluate the two model designs using the same (our) DRL agent architecture, thereby isolating the effect of this factor on the performance. The difference in performance is denoted as ∆IC. Moreover, we compare DRMD with a version of our model architecture that uses Supervised Learning (SL) and standard cross-entropy loss, which we call SL-DRMD.

In addition to SL-DRMD, for baselines, we also evaluate commonly used classifiers in Android malware detection: Drebin, DeepDrebin, and Ramda. The Drebin classifier is a linear support vector machine (SVM) originally used for its corresponding feature space and serves as a foundational benchmark due to its simplicity. DeepDrebin applies a multilayer perceptron (MLP). Finally, the Ramda classifier, developed for its corresponding feature space, uses a variational autoencoder (VAE) and a MLP to classify samples. Together, Drebin, DeepDrebin, Ramda, and SL-DRMD are evaluated across five random seeds on the four dataset-feature-space pairs and the difference between DRMD and the best performing baseline, for that setting, is reported as ∆Base.

Evaluation

This evaluation aims not only to investigate the base performance of DRMD but also to assess the impact that including rejection and AL (both monthly and integrated) has on model performance over time. We evaluate DRMD using five seeds, following the work of Alam et al., for each combination of dataset, feature space, and configuration, totaling 172 settings. Our results demonstrate that DRMD, both classification-only and classification-rejection policies, consistently outperform considered baselines, achieving an average AUT improvement of 8.66 and 10.90, respectively.

+8.66average AUT improvement, classification-only policy
+10.90average AUT improvement, classification-rejection policy
75%of settings with statistically significant gains over the best baseline
172settings, each over five seeds

Average AUT gain over the best baseline (ΔBase), by pipeline setting

Average ΔBase in AUT points, over all dataset–feature-space pairs and budgets in each setting.

Classification-only policy (Table 1)
All settings +8.66
No AL, no rejection +6.94
Monthly rejection only +15.01
Monthly AL only +2.52
Monthly AL + rejection +8.71
Classification-rejection policy (Table 2)
All settings +10.90
Integrated rejection (IR) +16.15
IR with AL (IRAL) +11.60
IR with augmented AL (IRAAL) +10.75
Show as table
PolicySettingAvg ΔBaseSignificant
Classification-onlyAll settings+8.66–
Classification-onlyNo AL, no rejection+6.94–
Classification-onlyMonthly rejection only+15.0115 of 16
Classification-onlyMonthly AL only+2.529 of 16
Classification-onlyMonthly AL + rejection+8.7152 of 64
Classification-rejectionAll settings+10.90–
Classification-rejectionIntegrated rejection (IR)+16.159 of 12
Classification-rejectionIR with AL (IRAL)+11.607 of 12
Classification-rejectionIR with augmented AL (IRAAL)+10.7533 of 48

Classification–Only Policy

First, we consider DRMD trained to learn a Classification–Only policy (πclf), without the rejection action. Initially, when there is no AL or rejection, DRMD surpasses the best baselines by 6.94 on average across five runs and all dataset-feature-space pairs. These initial results are promising, yet do not consider a complete malware detection pipeline. Thus, we consider malware detection pipeline configurations using monthly budgets for the uncertainty-based AL and rejection (Rej).

Monthly Rejection. Here, we consider how integrating uncertainty-based monthly rejection affects performance when no AL is present. DRMD shows statistically significant improvements in performance over the best baseline in 15 of the 16 settings, with an average ∆Base of 15.01. Increasing the number of uncertain samples rejected leads to increased performance for both AUT and ∆Base. This means that the samples DRMD has high certainty on lead to more correct classifications than the baselines.

Monthly Active Learning. In the AL setting, both the DRMD policy and the baselines use monthly uncertainty-based AL to select samples for retraining at each testing month. DRMD demonstrates statistically significant improvements in 9 of the 16 settings (where AL > 0 and Rej = 0), achieving an average ∆Base of 2.52. As in the rejection-only setting, both DRMD and the baselines use the same AL mechanism and budgets. Note that the diminishing returns of AL as performance improves coupled with the initial performance gains of DRMD contribute to the decreasing ∆Base as AL rates increase.

Monthly Rejection & Active Learning. DRMD has statistically significant improvements in 52 of the 64 settings, achieving up to 29.07 AUT improvement (AL = 400 and Rej = 400), and an average ∆Base of 8.71. Thus, when the rejection of samples at high risk of misclassification and the cost-sensitive drift adaptation of AL are applied together on DRMD, this performs better than when only using either individually, highlighting how our approach can yield improvements in real world settings.

Table 1: ΔBase for every classification-only setting, by dataset and feature space

The AUT performance of DRMD across different settings, datasets, and feature spaces are reported alongside the performance differences compared to the best baseline (∆Base) and the ICMDP (∆IC). All results are conducted over five runs and paired t-tests are used for statistical significance testing (* p < 0.05, ** p < 0.01, *** p < 0.001).

Cells: DRMD minus the best baseline (ΔBase), in AUT points. Rows: AL per month. Columns: rejected per month. Hover or focus a cell for AUT and ΔIC.

Hypercube (2021–23)
Transcendent (2014–18)

Hypercube-Drebin

Hypercube with Drebin features: ΔBase for each monthly AL budget (rows) and rejection budget (columns)
Rejected per month
AL per month050100200400
0−1.15+0.66+3.59**+6.42***+9.98***
50+6.01**+7.91***+9.23***+10.78**+13.13***
100+5.56***+6.74***+8.23***+10.53***+12.27***
200+2.42*+4.76***+6.15***+8.07***+10.21***
400+1.42+2.56*+3.46**+5.21**+7.67**
Five runs per cell.

Classification-Rejection Policy

Extending from the Classification-only policy, the DRMD Classification-Rejection policy (πΣ) integrates the rejection action, arej. Importantly, this action enables the agent to abstain from making a decision on a sample if there is insufficient information, high uncertainty, or concept drift. Note how, previously, rejections occurred only at the end of each month; however, the rejection action provides real-time abstention as the samples are seen, thus opening up the potential for real-time detection systems in future work. To maintain the capability for such decision making while facilitating AL, the samples resulting from the rejection action are used for retraining. To ensure consistency in the number of rejections, the seed-wise average rejections (rounded up) of DRMD is used as the budget for baseline rejections.

Integrated Rejection (IR). The IR setting introduces the rejection action without any additional AL on rejected samples. The results show statistically significant improvements over all baselines in 9 of the 12 settings with an average ∆Base of 16.15. This shows that the agent can effectively learn a policy that rejects samples likely to be misclassified. When comparing the two feature spaces (Ramda and Drebin), we see a disparity in the average number of rejections. Specifically, policies trained on Ramda reject more samples than those trained on Drebin. We hypothesize that the reduction of information encapsulated by Ramda results in greater prediction uncertainty compared to the Drebin feature space. Increasing Rcost intuitively reduces the number of rejected samples with only a minimal effect on ∆Base. This implies that higher Rcost values lead DRMD to be more selective in rejection.

Integrated rejection (IR) results from Table 2, for each dataset–feature-space pair and rejection cost
PairRcostAUT ± stdΔBaseRejected / month
Hypercube-Drebin061.68 ± 1.71−2.4652.02
−0.163.17 ± 1.27−0.9058.17
−163.19 ± 2.51−1.1838.98
Hypercube-Ramda050.54 ± 2.82+30.69***533.80
−0.150.99 ± 4.94+31.14***529.27
−148.18 ± 3.91+28.83***353.58
Transcendent-Drebin060.70 ± 2.34+14.08**217.31
−0.158.51 ± 4.34+11.67*203.50
−158.96 ± 1.97+11.39***130.99
Transcendent-Ramda056.90 ± 0.74+23.98***599.47
−0.155.84 ± 1.09+22.91***595.97
−156.45 ± 1.36+23.67***541.41

Table 2, IR rows. DRMD performance and average monthly rejection/selection rates across cost levels. ∆Base uses the seed-wise average rejections as the monthly rejection budget.

IR with Active Learning (IRAL). To go beyond the mitigation of concept drift and allow self-adaptation, we include the samples rejected in each period for retraining DRMD by updating the fine-tuning sample sliding window. Compared with the best baseline for each setting, DRMD shows statistically significant improvements in 7 of the 12 settings with an average ∆Base of 11.60. In Hypercube-Drebin and Transcendent-Drebin, retraining on rejected samples leads to higher confidence in classification actions. As Rcost increases, this leads to a reduction in the number of rejected and, thus, retraining samples in subsequent periods causing the observed drop in performance.

IR with Augmented Active Learning (IRAAL). Augmented AL extends the rejection-based sampling used in IRAL with uncertainty sampling so that, given a predetermined budget for AL, the model samples up to the predetermined labeling budget for retraining if the agent was conservative in rejections, and downsamples to the budget if the agent is rejecting more samples. The results show statistically significant performance gains over the baseline approaches in 33 of 48 settings, with an average ∆Base of 10.75. Highlighting that the augmented AL budget improves stability and performance compared to the IRAL results.

Ablation Study

In Table 3 we present a cumulative component breakdown of the AUT performance of DRMD across the four dataset–feature-space pairs.

Ablation study from Table 3: DRMD AUT, mean ± std over five runs
Component addedHypercube-DrebinHypercube-RamdaTranscendent-DrebinTranscendent-Ramda
Basic DRMD59.22 ± 1.5822.34 ± 1.5246.53 ± 1.4837.75 ± 2.21
+ Temporal Reward Scaling56.15 ± 0.6425.74 ± 1.5546.18 ± 2.0737.39 ± 2.44
+ Malware Reward Scaling64.07 ± 1.7743.95 ± 0.8856.80 ± 0.6549.80 ± 1.90
+ 4 Hidden Network Layers63.56 ± 1.6943.44 ± 1.4357.69 ± 0.8349.90 ± 0.56
+ 512 Neuron Hidden Layers63.33 ± 1.1445.03 ± 0.6858.07 ± 0.5350.46 ± 0.87
+ Integrated Reject Action61.42 ± 0.9044.90 ± 0.7957.88 ± 2.2250.28 ± 1.22
+ Reward Reject Outcome61.68 ± 1.7150.54 ± 2.8260.70 ± 2.3456.90 ± 0.74
+ Reject Cost (Rcost = −0.1)63.17 ± 1.2750.99 ± 4.9458.51 ± 4.3455.84 ± 1.09
+ Integrated Rejection with AL64.24 ± 1.7852.49 ± 1.0759.47 ± 0.7962.90 ± 1.07
+ Sliding Retraining Window67.51 ± 5.4165.39 ± 1.8260.39 ± 8.2468.32 ± 6.43
+ Augmented Active Learning77.48 ± 1.9559.61 ± 0.6474.57 ± 0.5666.82 ± 1.49

Table 3. AUTs reported show the mean ± std performance of DRMD across five runs after adding the component, specified at the start of the row, to the version of DRMD from the previous row.

Starting from the basic DRMD (single 128-neuron layer, ±1 reward, no rejection), performance is uniformly low. Introducing temporal and malware reward scaling immediately increases AUT across all settings, highlighting the importance of incorporating both the spatial (malware distribution) and temporal aspects of the domain into the reward function. Increasing the capacity of the model, both by the number of hidden layers and by the number of their neurons, provides marginal improvements.

Adding the integrated reject action without reward Rrej leads to the model not rejecting any samples and to negligible performance differences. Crucially, rewarding rejected outcomes provides a large performance increase as it allows the agent to learn to balance abstention and misclassification risk, with the rejection cost further refining this trade-off. Subsequently, integrated rejection with AL enables the agent to adapt to drift over time and coupled with the sliding retraining window provides performance increases in all but the Transcendent-Drebin setting where DRMD becomes too conservative in rejection. By rectifying this, augmented active learning yields a increase in AUT performance across most settings.

Future work

In this work, we focus on the use of uncertainty-based AL and rejection. This paper aims to establish a foundational basis for DRL-based malware detection integrating AL and rejection.

Future work could extend the MD-MDP and DRMD to include additional aspects of the malware detection pipeline, such as feature retrieval, as done in the image domain. Additionally, extending the rejection reward design to integrate sources of information, such as conformal evaluation, explanation, or contrastive learning, provides a potentially valuable next step. Together these directions for future work represent the path forward to a DRL policy that unifies the complete Android malware detection problem.

Conclusion

We introduce a new one-step MDP formulation for malware detection, MD-MDP, which enables the unification of DRL, cost-aware rejection, and AL to counteract concept drift in temporally split evaluations. We use MD-MDP to train the DRMD agent. Our results demonstrate that across two Android malware datasets and two feature spaces, DRMD outperforms the baselines of Drebin, DeepDrebin, Ramda, and SL-DRMD (SL version of DRMD) by an average of 8.66 AUT using the classification-only policy. Furthermore, we show that DRMD learns effective strategies that enable real-time detection, rejection, and AL leading to an average 10.90 AUT increase over the best baselines for all settings using the classification-rejection policy.

Key contributions

  • Malware Detection MDP. We introduce a novel one-step MDP formulation of malware detection that treats each sample independently, named the MD-MDP. This rectifies the spurious dependencies between samples present in prior work.
  • Integrated Rejection. We extend the MD-MDP with a rejection action and reward structure, which enables learning a policy that balances classification accuracy and misclassification risk.
  • Time-Aware Evaluations. We demonstrate that the policies learned from the MD-MDP consistently outperform Android malware detection approaches considered across multiple feature spaces and datasets in time-aware evaluations, achieving a relative AUT gain of 8.66 and 10.90 for the classification-only and classification-rejection policies, respectively.

Cite

@inproceedings{McFadden2026DRMD,
      title={DRMD: Deep Reinforcement Learning for Malware Detection under Concept Drift},
      author={Shae McFadden and Myles Foley and Mario D'Onghia and Chris Hicks and Vasilios Mavroudis and Nicola Paoletti and Fabio Pierazzi},
      booktitle={Proc. of the {AAAI} Conference on Artificial Intelligence},
      year={2026}
}