Abstract
Advanced Persistent Threats (APTs) are particularly challenging for enterprise intrusion detection because they are time-evolving, distributed, and difficult to detect under changing network conditions. Conventional machine-learning-based intrusion detection systems (IDSs) often rely on node-level features and may be vulnerable to concept drift, topological changes, and severe class imbalance, potentially achieving high overall accuracy while overlooking rare but critical malicious activities. This study proposes a Graph-Aware Deep Reinforcement Learning (GADRL) framework that integrates Graph Neural Networks (GNNs), Double Deep Q-Networks (DDQNs), and Prioritized Experience Replay (PER) for adaptive APT detection. Network traffic is modeled as a temporal graph to learn spatial–temporal relational representations of communication patterns and neighborhood interactions. These representations are then provided to a DDQN-based threat-hunting agent, while PER prioritizes high-severity and rare attack experiences during training. The framework is evaluated using five temporally ordered snapshots of enterprise network traffic to examine its performance under evolving network conditions. On an unseen future snapshot, GADRL achieves 100.00% recall, outperforming both a Random Forest baseline and a graph-agnostic reinforcement-learning ablation. This improvement in recall is accompanied by increased false-positive alerts, indicating a deliberate trade-off that prioritizes minimizing missed intrusions over reducing false alarms. Overall, the results demonstrate that combining topology-aware graph representation learning with priority-aware reinforcement learning can improve adaptive detection of evolving APTs under temporally changing network conditions.
1. Introduction
Advanced Persistent Threats (APTs) represent one of the most sophisticated and persistent categories of cyber threats targeting modern enterprise networks [1]. Unlike conventional attacks, APTs are characterized by long-term, multi-stage attack campaigns that continuously adapt their tactics to evade detection. These attacks typically involve lateral movement, command-and-control (C2) communications, privilege escalation, and data exfiltration, making them difficult to distinguish from legitimate network activities [1,2].
As enterprise infrastructures become increasingly distributed, dynamic, and heterogeneous, Security Operations Centers (SOCs) require intelligent mechanisms capable of identifying coordinated malicious activities in real time [2,3]. Traditional Intrusion Detection Systems (IDSs) and many classical machine learning approaches generally analyze hosts, packets, or network flows independently, overlooking the relational dependencies and temporal evolution of attack behaviors [4,5]. This limitation becomes particularly critical in dynamic environments, where continuously changing network topologies and concept drift significantly degrade detection performance [2,3].
Another major challenge in network intrusion detection is the severe class imbalance inherent in real-world traffic, where malicious events constitute only a very small fraction of all observations [6,7]. Consequently, many conventional classifiers achieve high overall accuracy while exhibiting poor detection performance on minority attack classes, resulting in the well-known accuracy paradox, where apparently accurate models fail to detect critical security incidents [8].
To address these limitations, this paper proposes a Graph-Aware Deep Reinforcement Learning (GADRL) framework that integrates Graph Neural Networks (GNNs) with a Double Deep Q-Network (DDQN) [9,10]. Rather than proposing a new graph-learning or reinforcement-learning algorithm, the primary contribution of this integration is the joint, end-to-end coupling of topology-aware graph representation with sequential, reward-driven decision making for APT threat hunting; this integration is evaluated against non-graph and non-sequential baselines in Section 4 and positioned relative to prior work in Table 1. Network traffic is represented as a sequence of temporal graphs, enabling the GNN encoder to learn spatial–temporal relational embeddings that capture communication topology, neighborhood interactions, and evolving attack patterns [11]. These graph representations are subsequently provided to a DDQN-based threat-hunting agent, enabling adaptive decision making under dynamically changing network conditions [12,13].
To further improve the detection of rare yet high-impact attacks, the proposed framework incorporates Prioritized Experience Replay (PER), which assigns higher sampling priority to critical APT-related experiences during reinforcement learning [14]. This strategy mitigates the adverse effects of severe class imbalance and encourages the learning policy to minimize false negatives rather than simply maximizing overall classification accuracy, making the proposed framework more suitable for real-world SOC deployment [15].
Table 1.
Comparative analysis of representative APT detection approaches.
The main contributions of this paper are summarized as follows:
Graph-aware threat-hunting architecture: We integrate dynamic temporal graph construction with Graph Neural Network-based topology-aware relational representation learning for APT detection. This is a system-level combination of established components rather than a new graph-learning algorithm, and its added value is quantified against graph-agnostic baselines in Section 4 [16,17].
Adaptive reinforcement learning-based threat hunting: We develop a Double Deep Q-Network (DDQN)-based threat-hunting agent capable of adaptive decision making in continuously evolving network environments [18].
PER-driven learning strategy for imbalanced cybersecurity data: We introduce a Prioritized Experience Replay training mechanism that emphasizes high-severity APT experiences, effectively alleviating severe class imbalance and improving detection sensitivity to rare attacks [19].
Experimental evaluation: Experiments on the DARPA OpTC benchmark show that the proposed framework achieves higher recall and substantially fewer false negatives than a Random Forest baseline and a graph-agnostic reinforcement-learning ablation across five temporal snapshots, albeit with additional false-positive alerts, a precision–recall trade-off that is quantified in Section 4 [8,20].
2. Related Work and Research Gap
The stealthy, persistent, and multi-stage nature of APTs makes them one of the most advanced and challenging categories of cybersecurity threats. Unlike traditional cyberattacks, which unfold in a few discrete stages, APT incursions develop slowly and deliberately, in carefully staged steps designed to minimize observable signs of intrusion. Such long-term attack campaigns are therefore often undetectable by mainstream intrusion detection systems (IDSs), which mostly rely on signature matching or static behavior analysis. In addition to the recent rise in APT attacks, the interconnectedness of enterprise networks, growth of cloud computing, Internet of Things (IoT) and software-defined infrastructures (SDIs) has further compounded the challenge of real-world detection of robust APT attacks [21,22,23]. To overcome these issues, a lot of research work has been explored that focuses on intelligent cyber threat detection using machine learning techniques, deep learning, graph learning, and reinforcement learning techniques. While considerable advances have been made, certain important shortcomings in either topology awareness, temporal modeling, or the ability to make adaptive decisions still exist. The next few subsections summarize some key studies and detail the research gaps resolved by using the proposed framework.
2.1. Machine Learning and Deep Learning for APT Detection
Early IDSs were primarily based on traditional machine learning techniques that process large numbers of manually engineered statistical features to detect malicious traffic. For example, popular supervised learning methods such as Support Vector Machines (SVMs), Random Forests (RFs), Decision Trees (DTs), and Gradient Boosting models have shown good results on benchmark intrusion detection datasets while requiring relatively little computation [4,5,6]. They are simple to implement and computationally efficient, which makes them attractive for practical use in enterprise security systems. Despite these advantages, traditional machine learning methods have notable drawbacks. Their performance is tightly coupled to hand-crafted feature engineering, which requires substantial domain knowledge and often generalizes poorly across heterogeneous network environments. They also generally rely on well-balanced training sets, whereas real-world cybersecurity data is highly imbalanced, since malicious events constitute only a small fraction of overall network traffic. This imbalance often produces classifiers with high overall accuracy but low detection rates for rare, high-impact attacks [6,7,8]. Furthermore, conventional classifiers typically assume independence among individual traffic records, neglecting the identities of the communicating hosts, and therefore struggle to detect stealthy multi-stage attack propagation. To address these shortcomings, deep learning approaches have increasingly been applied to automated feature extraction from network traffic. Recent deep learning models such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), autoencoders, and transformer-based architectures have shown considerable promise in capturing high-level traffic patterns directly from raw data with minimal feature engineering [15]. These techniques offer notable advantages over traditional machine learning in modeling nonlinear relationships and complex temporal dependencies, improving detection performance under noisy or incomplete traffic signals. However, most current deep learning models operate on packet-level sequential features or aggregate statistical traffic characteristics, treating network observations as independent samples. They do not explicitly leverage the communication links between entities and therefore have limited ability to model attack propagation across dynamic network topologies. Consequently, they are poorly suited to identifying advanced APT activity that unfolds through coordinated, multi-stage behavior.
2.2. Graph Neural Networks for Network Security
Recent advances in Graph Neural Networks (GNNs) have brought about a new approach to cybersecurity that allows the learning process to take advantage of the relational nature of communication networks. Unlike network traffic being vectorized as feature vectors, GNNs describe enterprise environments as a graph of entities as nodes and edges that indicate communication relations. Neighborhood information is gathered to form topology-aware embeddings of the nodes, which capture both local behavioral traits and higher-order structures, using iterative message passing [24,25]. Graph Convolutional Networks (GCNs) [26], Graph Attention Networks (GATs) [17], and GraphSAGE models [18] have recently proven successful in some detection tasks such as detecting malicious traffic, anomaly detection, malware classification and network forensics. More recently, provenance-graph-based systems such as FLASH, MEGR-APT, Kairos, and MAGIC have applied graph representation learning directly to APT attack-investigation and detection tasks [20,21,22]. These models explicitly model network structure, which makes them generally superior to traditional deep learning techniques in cases where structure is a strong determinant of the problem. Spatial–temporal graph learning techniques have demonstrated great potential in discovering and diagnosing evolving cyber threats that considers both spatial connectivity and temporal communication dynamics [11]. As promising as these results are, current GNN-based cybersecurity systems are largely supervised classification systems. Most studies produce independent predictions for each graph snapshot only and do not incorporate a sequential decision-making mechanism that is able to adapt to continuously evolving attack behaviors. Moreover, most current graph learning methods only generate node or graph embedding and then the threat response is carried out separately from the learning process. Consequently, they are unable to optimize defense strategies on their own in any dynamic enterprise environment where the patterns of attack change frequently over time.
2.3. Deep Reinforcement Learning for Adaptive Threat Hunting
The application of Deep Reinforcement Learning (DRL) has recently attracted considerable interest in cybersecurity as a paradigm for adaptive defense, capable of continually learning effective defensive policies through trial-and-error interaction with dynamic networks. Unlike supervised learning, which typically requires large volumes of labeled data, reinforcement learning aims to learn an optimal decision policy by maximizing cumulative long-term reward from interaction with the environment. This property is well suited to adaptive threat handling, since defensive actions in a network environment must continually adjust to changing attacker behavior, network conditions, and security goals [10,12,14,27]. Among current DRL algorithms, the Deep Q-Network (DQN) and Double Deep Q-Network (DDQN) have proven effective in several cybersecurity applications owing to their ability to learn stable action-value functions in high-dimensional state spaces. By decoupling action selection from action evaluation, DDQN mitigates the overestimation bias of conventional DQN and thus achieves more stable policy performance and convergence during training [10,12]. DRL methods more broadly have been explored across a range of cybersecurity applications, including intrusion response and adaptive threat mitigation [12]. To further improve training efficiency, reinforcement-learning-based methods have adopted Prioritized Experience Replay (PER), which assigns higher sampling probability to experiences associated with larger temporal-difference (TD) error. Compared with uniform replay, PER improves convergence and policy robustness by focusing training on more informative transitions [14]. Despite this progress, current reinforcement learning methods typically encode network states as manually designed statistical features or flat traffic vectors, neglecting the underlying communication topology. As a result, the RL agent has only limited contextual information about the dependencies between communicating entities, which reduces its ability to detect stealthy multi-stage attack propagation. Moreover, graph representation learning is rarely incorporated into the reinforcement learning pipeline, so the agent cannot exploit higher-order structural information when making security decisions. These limitations motivate the unified graph-aware reinforcement learning framework developed in this paper, which jointly models communication topology and adaptive sequential decision making.
2.4. Research Gap and Motivation
From this literature review, substantial progress has been made in leveraging machine learning, deep learning, Graph Neural Networks, and reinforcement learning for cyber threat detection. However, current approaches individually address only part of what is required to detect Advanced Persistent Threats (APTs) in changing enterprise networks. Conventional machine learning algorithms can perform adequately given hand-crafted features and a fixed data distribution, but they generalize poorly to unseen attack behaviors [4,5,6]. Traditional deep learning approaches substantially improve automatic feature extraction, but they primarily learn temporal traffic patterns while overlooking the structural relationships between communicating entities [15]. Consequently, they frequently fall short at capturing multi-stage attack propagation across an enterprise communication network. Graph Neural Networks (GNNs) partially address this gap by learning topology-aware representations that capture relationships between entities [16,17,18]; however, most current GNN-based cybersecurity systems remain static supervised classifiers applied to individual graph snapshots, without long-term policy optimization or adaptive response to evolving attacker behavior. Deep Reinforcement Learning [12,13] offers a flexible mechanism for sequential decision optimization that can adapt through continuous interaction with the environment, but most current DRL-based threat-hunting systems represent states using topology-agnostic statistical features, discarding useful graph-structural information. As a result, the RL agent cannot fully exploit the communication dependencies that are important for detecting advanced APT campaigns. This gap—the absence of a system that jointly models communication topology and adaptive sequential decision making within a single end-to-end framework—is the central motivation for this paper. To address it, we propose a Graph-Aware Deep Reinforcement Learning (GADRL) framework that integrates a dynamic graph-construction module, a Graph Neural Network (GNN) for representation learning, a Double Deep Q-Network (DDQN) for policy optimization, and Prioritized Experience Replay (PER) for imbalance-aware training, positioned against the related work discussed above in Table 1. As detailed in Section 1, the contribution lies in integrating these established components into a unified, topology-aware sequential decision-making pipeline rather than in a new graph-learning or reinforcement-learning algorithm; Section 4 quantifies the resulting gains against graph-agnostic and non-sequential baselines.
The qualitative APT-hunting capability ratings in Table 1 reflect how many of the four preceding capability dimensions (topology awareness, temporal modeling, adaptive decision making, and graph representation learning) each method category satisfies: categories satisfying none of the four dimensions are rated Low; one dimension, Medium; two dimensions (including partial support), High; and all four dimensions, Very High. This criterion is applied consistently across all rows of Table 1.
Most existing APT detection methods address only part of these requirements, as summarized in Table 1. Conventional machine learning algorithms cannot capture communication topology or support adaptive decision making. Deep learning models represent features hierarchically but typically operate on traffic records without considering explicit relations between communicating entities. Graph Neural Networks capture the structural dependencies of communication networks well, but most existing work treats the problem as a static classification task rather than a continually adapting security policy. Reinforcement learning, in turn, supports adaptive sequential decision making, but typically relies on topology-independent state representations that disregard the relational structure of enterprise network components. The proposed GADRL framework addresses these limitations by combining dynamic graph construction, topology-aware graph representation learning, and deep reinforcement learning within a single pipeline, offering a topology-aware, adaptive, and scalable approach to APT threat hunting in dynamic enterprise environments.
3. Methodology
3.1. Dataset Profile and Characterization
Experiments were performed using the DARPA Operationally Transparent Cyber (OpTC) dataset, a large-scale enterprise cybersecurity benchmark developed under DARPA’s Transparent Computing program and its Cyber Hunting at Scale (CHASE) follow-on effort to evaluate host-instrumentation and threat-detection technologies at enterprise scale [24]. The evaluation instrumented approximately 500 enterprise hosts over a two-week period, during which continuous benign user activity was combined with multi-stage attack campaigns injected by a red team. The raw dataset, together with its accompanying red-team ground-truth documentation, is publicly released by DARPA at https://github.com/FiveDirections/OpTC-data (accessed on 7 July 2026). Unlike conventional intrusion detection datasets that treat network flows as independent, unordered records, OpTC preserves the full temporal sequence of host-to-host communications and system-level provenance, which makes it well suited to graph-based and sequential reinforcement-learning approaches to APT detection [24].
To support dynamic, temporal graph modeling, the aggregated communication stream was partitioned into five sequential, non-overlapping temporal segments, denoted Conn00 through Conn04, each corresponding to a contiguous observation window within the two-week OpTC evaluation period. Each segment constitutes an independent snapshot containing a continuous stream of communication events for its corresponding window. This temporal partitioning enables the proposed framework to construct a sequence of dynamic communication graphs that evolve over time, jointly preserving both the structural topology and the temporal evolution of communication relationships across the successive stages of a typical APT campaign.
Unlike static, pre-aggregated benchmark datasets, OpTC traffic is generated continuously by real user activity within the simulated enterprise environment, with adversarial behavior interleaved into this background traffic as the red team progresses through a realistic multi-stage attack sequence: reconnaissance, initial compromise, privilege escalation, lateral movement, credential abuse, and command-and-control (C2) communication. Because the resulting temporal graph sequence reflects this naturalistic evolution, it constitutes a realistic evaluation environment for assessing adaptive, graph-based learning algorithms under topology evolution, temporal concept drift, and evolving attacker behavior.
Another key characteristic of the selected dataset is its extreme class imbalance, which closely mimics real-world Security Operations Center (SOC) conditions. Malicious APT traffic represents a very small fraction of the total communication logs, with the bulk of records corresponding to legitimate enterprise activity. This imbalance makes malicious behavior difficult to detect and, at the same time, makes it challenging to keep the false-positive alarm rate low enough for practical deployment: even a small per-record false-positive rate translates into a large absolute number of false alerts once applied across millions of benign records, a tension that is quantified directly in Section 4. This makes OpTC substantially more representative of practical SOC conditions than the artificially balanced intrusion-detection benchmarks commonly used in prior work.
Four lightweight yet informative attributes of the nodes in each network, derived from raw communication flows, are used to represent each network entity: Connection Duration, Total Byte Volume, Weighted In-Degree, and Weighted Out-Degree. These attributes are a combination of the communications behavior and the local structural connectivity within the enterprise network. To construct the graph during runtime, the node features extracted from the graph are assigned to graph vertices and then fed into the Graph Neural Network (GNN) encoder, which computes topology-aware node embeddings that subsequently form the reinforcement-learning agent’s state representation, as detailed in Section 3.4.
Table 2 provides some statistics related to the adopted temporal data set. The entire dataset comprises 6,657,500 communication records broken up into five sequential “snapshot windows” in time, as shown. Of these observations, just 985 correspond to malicious APT activity, with an attack ratio between 0.01% and 0.02%. This distribution is clearly skewed, but is a good representation of actual enterprise network environments where an attack is extremely uncommon when compared with typical communication events. Therefore, the proposed framework should tackle topology learning, evolution of the network, as well as high information imbalance, thus offering an appropriate assessment of its adaptive threat-hunting ability.
Table 2.
Statistical profile and class distribution of the temporal dataset.
Data Splitting, Preprocessing, and Leakage Prevention
To prevent information leakage between training and evaluation, and to support the claim of generalization to an unseen future network state, the five temporal snapshots are used under a strict chronological, expanding-window protocol: at each evaluation step, the GNN encoder and DDQN policy are trained exclusively on snapshots that temporally precede the snapshot under evaluation, and no information from a later snapshot is used during training, hyperparameter selection, or normalization-statistic estimation for an earlier one. Concretely, Conn00 is used only for initial training; Conn01 is evaluated after training on Conn00; Conn02 is evaluated after training on Conn00–Conn01; Conn03 is evaluated after training on Conn00–Conn02; and Conn04, the final and fully unseen future-state evaluation snapshot, is evaluated only after training on Conn00–Conn03. All feature-normalization statistics (for connection duration, byte volume, and weighted in-/out-degree) are computed exclusively on the training portion of each split and then applied unchanged to the corresponding evaluation snapshot, so that no test-time statistics influence the learned representation.
Malicious ground-truth labels are assigned by matching communication records against the host, timestamp, and process identifiers documented in DARPA’s officially released red-team ground-truth report accompanying the OpTC data (OpTCRedTeamGroundTruth.pdf); any record whose host and time window overlaps a documented red-team action is labeled malicious, and all other records are labeled benign.
3.2. Overall Framework
Advanced Persistent Threats (APTs) represent one of the most severe forms of modern cybersecurity threat: stealthy, persistent, multi-stage attacks that unfold gradually rather than in the single, clearly anomalous event characteristic of traditional cyberattacks. A typical APT campaign progresses through reconnaissance, initial compromise, privilege escalation, lateral movement, persistence, and data exfiltration. Accurately identifying such activity therefore requires real-time modeling of network topology, real-time communication sequencing, and adaptive decision-making, rather than static traffic features alone. To address these challenges, this study introduces an adaptive threat-hunting system built on a Graph-Aware Deep Reinforcement Learning (GADRL) framework fused with a Double Deep Q-Network (DDQN). In the proposed architecture, the relational learning capability of Graph Neural Networks (GNNs) and the sequential decision-making capability of deep reinforcement learning jointly enable the system to continuously track changes in network structure and select an appropriate defensive response. By leveraging both the structural relationships between network entities and long-term reward optimization, the proposed framework improves the detection of stealthy attack behaviors that are difficult for traditional machine learning and signature-based methods to recognize. The overall architecture is presented in Figure 1. It is a tightly coupled, end-to-end learning system composed of four modules: (i) dynamic graph construction, (ii) graph representation learning, (iii) adaptive threat hunting via DDQN, and (iv) policy optimization via Prioritized Experience Replay. All four modules are jointly optimized end to end: the graph embeddings computed by module (ii) directly parameterize the state used by module (iii), and the gradients from the DDQN’s loss (Section 3.5) propagate back through the GNN encoder, so no intermediate representation is stored or frozen independently of the others. This allows the framework to update its detection policy incrementally as the network evolves over time.
Figure 1.
Overall architecture of the proposed Graph-Aware Deep Reinforcement Learning (GADRL) framework for Adaptive Advanced Persistent Threat (APT) threat hunting in a Dynamic Enterprise Network. The framework incorporates three key components, namely dynamic graph construction, Graph Neural Network-based representation learning, DDQN-based decision making, Prioritized Experience Replay, and adaptive policy optimization in a co-predefined end-to-end architecture. The dashed arrow indicates the feedback loop in which performance evaluation results are used to update the DDQN policy during training.
Raw enterprise network traffic is first preprocessed to remove missing or duplicate records and is then partitioned into sequential, non-overlapping temporal windows using a fixed-size sliding-window procedure (Section 3.3). Within each window, communicating entities are represented as graph vertices and observed communication events between them as directed edges, yielding one dynamic communication graph per window. For each vertex, the four traffic-derived attributes introduced in Section 3.1 are computed to characterize both the entity’s communication behavior and its local structural connectivity, and both the topology and its evolution are preserved across the observation period. Each resulting graph snapshot is passed to a two-layer Graph Neural Network (Section 3.4), which iteratively aggregates neighborhood information and applies graph convolution to combine higher-order structural dependencies with local node properties into a compact, low-dimensional embedding. This graph embedding is therefore able to represent the communication structures underlying multi-stage attack propagation more compactly than raw, high-dimensional traffic features. These graph embeddings define the DDQN agent’s environment state (Section 3.5). Based on this state, the agent estimates the long-term utility of each candidate defensive response and, using an ε-greedy exploration strategy, selects between continuing routine monitoring and escalating a host for active investigation or isolation; Section 3.5 formalizes this choice as a binary decision and relates it to the four qualitative response categories—monitoring, active inspection, isolation, and policy continuation—used operationally to describe the framework’s intended SOC-facing behavior. After each action, the environment returns a reward that reflects the effectiveness of that action, allowing the policy to self-correct through trial and error. For training efficiency and stability, each transition is stored in a Prioritized Experience Replay (PER) buffer and sampled in proportion to its temporal-difference (TD) error, so that training concentrates on the most informative experiences rather than redundant ones. The online Q-network is trained by minimizing a weighted Huber loss, while a slowly updated target network reduces value overestimation and stabilizes convergence (Section 3.5). Overall, the proposed framework forms a closed-loop, graph-aware reinforcement learning system that continuously adapts to changes in network configuration, jointly modeling communication topology, temporal traffic dynamics, and sequential decision-making within a single, scalable pipeline for adaptive APT threat hunting. The framework is also modular, allowing straightforward integration with existing network security infrastructure and deployment across a range of enterprise environments.
For clarity and consistency, the mathematical symbols employed throughout the proposed framework are summarized in Table 3. These notations are used consistently in the subsequent sections to formulate the dynamic graph construction process, graph representation learning, and reinforcement learning optimization.
Table 3.
Mathematical notation used throughout the proposed framework.
3.3. Dynamic Graph Construction
As communication relationships change over time among hosts, servers, gateways and other entities that exist on the network, enterprise networks continually change. By therefore breaking network traffic into individual flow records, this approach can of course not take into account the structural dependencies in the case of sophisticated multi-stage attacks like Advanced Persistent Threats (APTs). In order to maintain network topology and temporal evolution, the proposed framework virtually converts the raw enterprise traffic into a stream of dynamically changing communication graphs to allow the learning model to explicitly reflect interactions observed between the communicating entities within consecutive observation windows. The pipeline of dynamic creation of graphs is described in Figure 2.
Figure 2.
Dynamic construction of graphs and graph representation pipeline with topology consideration. The enterprise network traffic is divided into successive temporal segments and converted to dynamic communication graphs. Every graph snapshot is processed by the Graph Neural Network (GNN) encoder to create topology-aware embeddings for nodes to be used in adaptive threat hunting.
The graph corresponding to the temporal observation window t is represented as
where
Gt = (Vt, Et, Xt)
- Vt denotes the set of network entities;
- Et represents the communication edges observed during temporal window t;
- Xt denotes the node feature matrix.
While conventional intrusion detection methods only look at traffic records one by one, the proposed graph formulation explicitly keeps communication links between enterprise hosts, while also ensuring consistency over time for consecutive observation intervals. A fixed-size, non-overlapping sliding-window procedure is used to convert the continuous enterprise traffic stream into a sequence of discrete graph snapshots, with stride equal to the window length ω (i.e., consecutive windows share no communication events). In this study, the five windows correspond exactly to the Conn00–Conn04 partitions defined in Section 3.1, so that the graph-construction windows and the chronological train/evaluation splits (Section Data Splitting, Preprocessing, and Leakage Prevention) always coincide and no evaluation snapshot’s events leak into an earlier training window.
W = {W1, W2, …, Wt}
Here, one communication graph is created for each temporal window. This approach allows the framework to detect evolutions of the topology that happen over the course of lengthy APT campaigns, not just short samples of traffic. Each communicating host observed within a window is represented as a vertex, so the vertex set V_t is window-specific: hosts that generate no traffic in a given window are simply absent from that window’s graph rather than padded as isolated nodes, and the framework does not require a fixed vertex set across snapshots. Each graph is directed, since a communication initiated by host v_i toward host v_j is recorded separately from the reverse direction; when multiple communication events occur between the same ordered pair of hosts within a window, they are aggregated into a single directed edge, and the corresponding event count and byte volume feed directly into the weighted in-/out-degree node features of Section 3.1, keeping the edge-aggregation and node-feature computations consistent. For GNN message passing, edge existence is captured by a binary adjacency matrix.
whose elements are defined as
A ∈ {0, 1} N×N
The four node attributes extracted from the data set published by DARPA OpTC (see Section 3.1) are associated with each vertex in the graph. These combine to describe the nature of the communication pattern and also define the level of connectivity of the locale in the enterprise network. The unit of analysis for both labeling and prediction throughout this framework is the host-level node within a given temporal snapshot: a node v_i in window t is labeled malicious if any communication record involving v_i in that window matches the red-team ground-truth criteria defined in Section Data Splitting, Preprocessing, and Leakage Prevention, and benign otherwise. The GNN encoder produces one embedding per node per snapshot (Section 3.4), and it is this per-node, per-snapshot embedding, aggregated into the state s_t (Section 3.5), that the DDQN agent acts on and that the reported confusion matrices (Section 4) are computed over—not individual flows or edges.
where the feature vector associated with node vi is expressed as
where di, bi, ini, and outi denote the communication duration, total transmitted byte volume, weighted in-degree, and weighted out-degree of node vi, respectively. The overall procedure for constructing the dynamic communication graphs described above is summarized in Algorithm 1.
xi = [di, bi, ini, outi] ∈ R4
| Algorithm 1 Dynamic Graph Construction |
| Input: Enterprise network traffic logs Sliding window size ω Output: Dynamic graph sequence G = {G1, G2, …, GT} 1: Partition the network traffic logs into consecutive temporal windows of size ω. 2: for each temporal window do 3: Identify all communicating entities. 4: Construct graph vertices. 5: Generate communication edges. 6: Extract node features: 7: Duration 8: Byte Volume 9: Weighted In-Degree 10: Weighted Out-Degree 11: Build the adjacency matrix. 12: Generate graph snapshot Gt. 13: end for 14: return G |
By representing enterprise traffic as a series of dynamic communication graphs, this construction preserves structural connectivity that flow-level records discard. This graph representation naturally captures malicious propagation patterns embedded in the network topology, such as reconnaissance, lateral movement, and coordinated multi-host attack activity. The resulting graph sequence therefore offers richer context for representation learning than static feature vectors alone. However, these graphs remain high-dimensional and structurally complex, and cannot be used directly by the reinforcement-learning agent. Therefore, the next subsection introduces a GNN encoder to represent each dynamic graph into compact embeddings related to the graph topology, which can be robustly used as graph-related context for adaptive, sequential decision making.
3.4. Spatial–Temporal Graph Neural Network Encoder
Each dynamic communication graph produced in Section 3.3 is passed to a Graph Neural Network (GNN) to learn topology-aware node representations. Unlike conventional machine-learning approaches, which analyze network flows independently and discard the directed structural relationships between communicating entities, GNNs explicitly model this structure by iteratively aggregating information from each node’s neighborhood. As a result, the learned representations capture not only the attributes of individual hosts, but also the relational patterns that emerge between hosts during a multi-stage APT attack.
Figure 3 shows the architecture of the proposed GNN encoder as applied to the OpTC-derived communication graphs: within each temporal snapshot, neighboring nodes exchange information bidirectionally through a shared two-layer Graph Convolutional Network (GCN), so that a single encoder is reused across all snapshots rather than training a separate network per graph. At each propagation step, every node aggregates its neighbors’ feature vectors, applies a nonlinear transformation, and updates its own representation accordingly. The addition of each node’s feature vector and nonlinear transformation are considered as an overall transformation for the entire network. This iterative aggregation mechanism enables capturing higher-order dependencies in the communications and suppression of noisy observations from the local area, given the encoder.
Figure 3.
Dynamic communication graph-based relational node embeddings learning with message passing and graph convolution-based topology-aware Graph Neural Network encoder.
Let
denote the initial node feature matrix extracted from the preprocessed communication graph, where each row corresponds to one network entity described by four normalized traffic attributes. The propagation rule of the Graph Convolutional Network is formulated as
H(0) = X
There, Ã = A + I denotes the adjacency matrix with self-loops, represents the corresponding degree matrix, W(l) is the trainable weight matrix of the l-th graph convolution layer, and σ(⋅) denotes the Rectified Linear Unit (ReLU) activation function.
In densely connected topologies, such as enterprise communication networks with high-degree hub hosts (e.g., domain controllers or gateways), stacking many graph convolution layers risks numerically unstable, over-smoothed embeddings that become biased toward these hub nodes at the expense of local, attack-relevant structure. To limit this risk while still capturing multi-hop dependencies, the encoder is restricted to exactly two sequential graph convolution layers, giving every network entity a two-hop receptive field. As a result, each node not only collects local communication statistics, but also higher-order topological dependencies that often arise from lateral movement or privilege escalation, both common in the execution stages of Advanced Persistent Threats (APTs). This two-layer encoder produces a 16-dimensional embedding for each network entity, which is used as described below.
Z = H(2)
The two-layer GCN in Equation (8) is applied independently to each temporal graph snapshot; by itself it has no recurrent or attention-based mechanism linking consecutive snapshots, and its output Zt is therefore a purely spatial, per-snapshot embedding. To give the state a genuine temporal component, each node’s embedding is additionally propagated across snapshots via an exponential moving average (EMA), so that the representation used by the DDQN reflects both the current topology and a short history of the node’s recent behavior:
where λ ∈ (0,1) is a fixed smoothing coefficient and i indexes an individual network entity (host) within snapshot t. This resolves the unit of analysis for the reinforcement-learning stage of the framework: the DDQN does not act on the whole graph snapshot as a single decision, nor does it consume the full N × 16 node-embedding matrix at once; instead, each network entity is treated as a separate decision instance, and the DDQN receives one 16-dimensional, temporally smoothed embedding Zt[i] per host per snapshot as its state, consistent with the 16-dimensional state reported in Table 4. Consequently, all confusion-matrix-based results in Section 4 are computed at host granularity, not at the level of individual flow records.
Zt[i] = λ · Zt−1[i] + (1 − λ) · Zt[i]
Each embedding summarizes both node-level telemetry and graph topology in a compact continuous representation. These learned embeddings constitute the environment state supplied to the reinforcement learning agent described in the following subsection.
3.5. Adaptive DDQN-Based Threat Hunting with Prioritized Experience Replay
The topology-aware node embeddings generated by the Graph Neural Network are then fed to a Double Deep Q-Network (DDQN) to effectively and adaptively make topology-aware sequence decisions regarding dynamically changing enterprise communication graphs. The proposed framework of reinforcement learning continuously refines its policy to fight threats because the network topology or communication pattern constantly changes. The structure of the reinforcement learning system is displayed in Figure 4.
Figure 4.
Architecture of the DDQN-based threat-hunting agent, showing the online and target Q-networks, Prioritized Experience Replay (PER), weighted Huber loss optimization, and the soft target-network update.
A Markov Decision Process (MDP) is used to represent the threat-hunting problem.
(S, A, P, R, γ)
This sets up the state, S; the action set, A; the reward function, R; the state transition probability, P; and the discount factor, γ, that impact the optimization of the future reward. The graph embedding learnt by the Graph Neural Network (GNN) encoder is used as the environment state at time step t, which is directly used,
st = zt
It includes maintaining the topology of a communications network and the behavior of nodes which may be combined into a single state representation. Explored using an ε-greedy exploration strategy, a DDQN agent predicts the appropriate defensive action the security state should take. The options available are to monitor suspicious hosts, monitor suspicious communications actively, isolate compromised devices, or maintain the existing monitoring policy. The attack behavior changes continuously with the adaptive action space providing the ability to deploy a framework that can respond to changes in attack behavior and only make a single binary prediction. After the action takes place, the environment gives back a state st+1 and an immediate reward rt. Each interaction is stored in a memory repository called the memory of the replay.
(st, at, rt, st+1)
Each transition is stored as a tuple in a replay buffer so that past experiences can be reused during optimization, rather than discarded after a single update. In place of a conventional Deep Q-Network, which is prone to overestimating action values, two structurally identical Q-networks are maintained: an online network parameterized by θ, used to select actions and to compute gradients, and a target network parameterized by θ′, used only to evaluate the selected action; this separation is the defining feature of Double DQN (DDQN) and mitigates the overestimation bias of standard DQN.
Operationally, the SOC-facing policy is described qualitatively in terms of four response categories—monitor, actively inspect, isolate, or maintain current policy—reflecting the escalating levels of analyst attention each entails. For the purposes of formal MDP definition and the evaluation reported in Section 4, these four categories are grouped into the two-element action space A = {0, 1} of Table 3: a_t = 0 (“continue”) covers monitor and maintain, while a_t = 1 (“escalate”) covers active inspection and isolation. This binary grouping is what Table 4 reports and what the confusion matrices in Section 4 are computed over; the finer four-way distinction is a policy-presentation layer on top of the same underlying binary decision, not a separate action space.
The reward function must be explicit about which entity computes the reward and what information it requires, following the feasibility-oriented framing of Miuccio et al. [25]. In this study, the reward is computed by the offline training/evaluation environment, which has access—for each historical transition being replayed—to the red-team ground-truth label of the corresponding host and time window (Section Data Splitting, Preprocessing, and Leakage Prevention). The reward is defined as shown in Table 4.
Table 4.
Reward structure for the DDQN action space.
The reward function follows the magnitude ordering |r_FN| > r_TP > |r_FP| > r_TN ≥ 0 (Table 4: r_TP ≈ 89.9, r_FN = −450.0, r_FP ≈ −3.1, r_TN = +0.1), so that missing an active attack (false negative) is penalized roughly five times more heavily than the reward for correctly escalating one, and roughly two orders of magnitude more heavily than the cost of a false alarm. This is consistent with the PER mechanism’s emphasis on rare, high-severity APT experiences, described below. It is important to state plainly that this reward computation depends on ground-truth labels that are available only retrospectively, through the OpTC red-team documentation; it is used here for offline training and evaluation on historical data, not for live decision-making. Deploying this framework online would require a substitute mechanism for a timely reward signal (for example, delayed reward following SOC analyst confirmation, or a self-supervised proxy signal such as subsequent alert escalation). This feasibility gap is acknowledged as a limitation to be addressed in future work rather than resolved by the present offline evaluation.
After each action, the environment returns the next state s_{t+1} and reward r_t, and the transition is stored in a Prioritized Experience Replay (PER) buffer for reuse during training:
where the action that maximizes the online network Q(·;θ) is selected, but its value is evaluated using the target network Q(·;θ′); this decoupling of selection from evaluation is what distinguishes DDQN from vanilla DQN and reduces value overestimation. The corresponding temporal-difference (TD) error is
yt = rt + γ Q(st+1, argmax Q(st+1, a; θ), θ′)
δ = yt − Q(st, at; θ)
Since the DARPA OpTC dataset is highly imbalanced, uniform random sampling from the replay buffer would result in the agent overwhelmingly learning from benign transitions while rarely encountering the sparse markers of APT activity. Prioritized Experience Replay (PER) addresses this by sampling transitions in proportion to the magnitude of their TD error, so that training concentrates on the most informative, typically the most surprising or under-learned, transitions. The priority assigned to transition i is
where ε > 0 is a small constant (Table 3) ensuring every transition retains a nonzero sampling probability. The sampling probability of transition i is then
where α ∈ [0, 1] (Table 3) controls the strength of prioritization (α = 0 recovers uniform sampling). Because prioritized sampling biases the gradient estimate toward high-priority transitions, an importance-sampling correction is applied:
where N is the current replay-buffer size and β ∈ [0, 1] (Table 3, annealed toward 1 over training) controls the strength of the bias correction; normalizing by max_j w_j keeps updates numerically stable. The online network is then trained by minimizing the importance-weighted Huber loss over a sampled minibatch of size B:
with the standard Huber function L(δ) = 0.5δ2 for |δ| ≤ κ and L(δ) = κ(|δ| − 0.5κ) otherwise, which behaves quadratically for small TD errors and linearly for large ones, limiting the influence of outlier transitions on the gradient. Finally, to stabilize training, the target network is not copied from the online network directly but updated slowly via a soft (Polyak) update after every training step:
where τ ≪ 1 (Table 3) is the soft-update coefficient. This combination—DDQN’s decoupled action selection/evaluation, PER’s priority-driven sampling, and the slowly-tracking target network—is what allows training to remain stable under the extreme class imbalance of enterprise network traffic while keeping the policy responsive to newly observed APT behavior. The resulting policy adapts continuously to changing communication patterns and is intended to support proactive identification of stealthy, multi-stage APT campaigns.
pi = |δi| + ε
θ′ ← τθ + (1 − τ)θ′
3.6. Performance Evaluation Metrics
Because enterprise network traffic is highly imbalanced, classification accuracy alone is not a reliable indicator of detection performance, so multiple complementary metrics are used to evaluate the proposed GADRL framework. In practice, APT-related traffic represents only a minute fraction of overall network activity; consequently, a classifier that fails to detect any attacks while correctly labeling the majority benign class can still achieve a misleadingly high accuracy score. A more stringent evaluation protocol is therefore used to assess both detection capability and classification robustness. The confusion matrix underlying this evaluation has four basic outcomes: true positive (TP), true negative (TN), false positive (FP), and false negative (FN); all metrics reported in this study are derived from these four quantities.
Detection precision is the proportion of malicious samples correctly identified as such, of the total number of samples labeled as attacks. The fewer the false alarms, the less time the analysts will spend at Security Operation Centers (SOCs) at high precision and the less time will be spent investigating. Detection rate (DR) or recall, which it is also referred to as, is a measure used for the recommended framework to detect malicious network behavior. Failure to detect an APT will result in serious security problems and that is why recall is one of the most important evaluation measures of this study.
For maximizing both precision and recall, F1 score is also provided—it is the harmonic mean of precision and recall. It works well for very imbalanced data sets, where a good performance on one criterion and a poor performance on the other is highly penalized.
Overall classification accuracy is reported for completeness only; given the severe class imbalance of enterprise network traffic (Table 2), it is not used as the primary indicator of detection performance.
In addition, the False Negative Rate (FNR) is evaluated, since undetected attacks represent the most serious security failure in an enterprise setting. FNR expresses the proportion of malicious events that the proposed framework fails to detect.
To additionally get a statistically reliable evaluation for severe class imbalance, the Matthews Correlation Coefficient (MCC) is used. The MCC does not require the distribution of classes to be equal, but it also accounts for all four of the elements of confusion matrix, unlike accuracy and F1 score. Hence, MCC has been becoming one of the most informative tests to assess the intrusion detection and anomaly classification problems.
These evaluation metrics can be achieved simultaneously, and from multiple perspectives, the proposed framework is evaluated from different angles: in terms of the detection capability, false-alarms reduction, robustness to severe mass imbalance, and overall classification reliability. They can then be deployed simultaneously to be compared against other intrusion detection and threat-hunting solutions in a realistic enterprise network environment.
4. Experiments and Results
4.1. Experimental Environment and Implementation Stack
In this section, the experimental setup and its implementation are discussed for the evaluation of the proposed framework of Graph Neural Network–Double Deep Q-Network with Prioritized Experience Replay (GADRL). The experiments aimed to evaluate how well the proposed adaptive threat-hunting architecture performs in realistic enterprise network scenarios where Advanced Persistent Threat (APT) campaigns are constantly changing and highly dynamic communication patterns are present with serious instances of class imbalance. As detailed in Section 3, all experiments were done against the DARPA Operationally Transparent Cyber (OpTC) dataset, which is a large-scale enterprise telemetry dataset recorded from realistic enterprise Windows-based infrastructures. The data set includes temporally ordered network events that represent various phases of a cyber-attack, such as reconnaissance, lateral movement, persistence, and communication with command-and-control (C2) nodes. The raw network events were segmented into a temporal series of snapshots (Conn00 to Conn04) and then each snapshot was transformed to a dynamic communication graph using the graph construction procedure described in Section 3.2. The resulting communication graphs were then fed into the proposed two-layer Graph Neural Network (GNN) encoder to learn topology-aware node embeddings. The embeddings were then used as the environment states for the threat-hunting agent that was based on a DDQN, allowing for adaptive security decision-making in an evolving network environment by continuously interacting with it. The Prioritized Experience Replay (PER) mechanism was used throughout the learning process in a way to continuously sample informative experiences based on their temporal-difference errors, which enabled the agent to learn efficiently even if all the APT experiences are rare in the presence of extreme imbalance between benign and malicious traffic. To make the simulations reproducible and to compare the results fairly, the same computational environment, the same preprocessing and the same hyperparameter settings were used for all simulations in every time snapshot. During evaluation, no specific tuning and manual parameter adjustments were done for the data set.
4.1.1. Hardware Configuration
The proposed framework was tested and implemented on a common research workstation having adequate computational resources for graph representation learning and deep reinforcement learning. The specification of the hardware is summarized in Table 5. All experiments were conducted on an Apple laptop (Apple Inc., Cupertino, CA, USA); the detailed hardware specifications are summarized in Table 5.
Table 5.
Hardware configuration of the experimental platform.
While the proposed framework combines Graph Neural Networks and reinforcement learning, the sparseness of the enterprise communication graph also greatly reduces the burden of graph convolution operations. As a result, all experiments were performed with commodity hardware and not needing to invest in clusters of high-performance GPUs. The computational resources were adequate to build dynamic communication graphs, aggregate the information of neighboring robots, keep the prioritized replay memory, and continuously optimize the DDQN agent during training.
4.1.2. Software Environment
All of the above was built in Python 3.9 using a suite of popular scientific computing and deep learning libraries. The flexibility of creating custom-made neural architectures and optimizations made TensorFlow/Keras the appropriate choice for the implementation of both the Graph Neural Network encoder and the online/target DDQN networks.
The raw OpTC telemetry logs were preprocessed using Pandas and temporal communication snapshots were organized, and numerical tensor operations and matrix computations were carried out using NumPy. To make the numerical data more stable for optimization, feature normalization and statistical preprocessing were performed using Scikit-learn. NetworkX was used to create dynamic communication graphs and adjacency matrices and Matplotlib to draw the experimental results shown in this section. The software environment employed in this study is summarized in Table 6.
Table 6.
Software environment employed in this study.
4.1.3. Training Strategy and Hyperparameter Configuration
The training of the proposed GADRL framework involves optimization of graph representation learning together with optimization of sequential decision-making. The same hyperparameter was used for all experiments for stable convergence. The online Q network was trained with the Adam optimizer and the weighted Huber loss function, and exploration was regulated by implementing an ε-greedy policy that gradually decreased in terms of its exploration probability during training. This was done to enhance learning efficiency when the class size distribution was severely imbalanced, by storing tuples containing transitions produced by the agent-environment interactions and giving a higher probability of sampling to those tuples that corresponding to a bigger temporal-difference error. To reduce overestimation of the values and stabilize policy learning, the target Q-network was softly synchronized with the online network after every optimization step. The above configuration has been experimentally determined to achieve the balance between stability of learning, speed of convergence, and computational efficiency. All results in this paper used the hyperparameters shown in Table 7, unless otherwise noted.
Table 7.
Hyperparameter configuration of the proposed GADRL framework.
4.2. Experimental Results and Performance Analysis
4.2.1. System Architectural Flow and Tensor Transformations
The experimental evaluation closely follows the end-to-end architecture proposed in Section 3 and investigates the complete processing pipeline from raw enterprise network telemetry to adaptive threat-hunting decisions. Unlike conventional intrusion detection systems that directly analyze tabular traffic records, the proposed framework first transforms sequential network communications into dynamic graph representations before applying graph representation learning and reinforcement learning. As illustrated in Figure 1, raw network traffic collected from the DARPA OpTC dataset is first divided into consecutive temporal windows using the sliding-window mechanism. Each temporal snapshot is subsequently converted into a communication graph, following the definition of Equation (1) given in Section 3.3.
This graph formulation preserves both structural connectivity and temporal evolution, enabling the framework to capture long-term attack propagation patterns that cannot be represented using isolated traffic records. The constructed graph is then processed by the proposed Graph Neural Network encoder, illustrated in Figure 3. Through successive message-passing and graph convolution operations, neighboring node information is iteratively aggregated to generate topology-aware node embeddings. The first graph convolution layer projects the original four-dimensional node attributes into a higher-dimensional latent representation, while the second graph convolution compresses these representations into compact 16-dimensional relational embeddings. These embeddings simultaneously encode local communication behavior and higher-order structural dependencies among enterprise hosts.
The learned graph embeddings are subsequently provided to the DDQN-based adaptive threat-hunting framework, shown in Figure 4, where they constitute the reinforcement learning state representation. At every interaction step, the DDQN agent estimates the long-term value of the available security actions and selects an appropriate response according to an ε-greedy exploration strategy. Following each action, the environment returns a new graph state together with an immediate reward, and the resulting transition is stored in the Prioritized Experience Replay memory. By preferentially sampling transitions associated with large temporal-difference errors, the learning algorithm efficiently focuses on rare but informative APT events, thereby improving policy convergence under highly imbalanced training data. To further illustrate the computational characteristics of the proposed framework, the tensor transformations and computational complexity of each processing stage are summarized in Table 8.
Table 8.
Tensor dimensional transformations and computational complexity of the proposed framework.
As shown in Table 8, the computational complexity of the proposed framework scales linearly with the number of observed communication edges rather than the total number of possible node pairs. Since enterprise communication graphs are naturally sparse, neighborhood aggregation remains computationally efficient even for large-scale networks. Moreover, compressing high-dimensional graph information into compact 16-dimensional embeddings substantially reduces the computational cost of the downstream reinforcement learning component, enabling low-latency adaptive threat hunting suitable for practical enterprise deployment scenarios.
4.2.2. Training Convergence Analysis
To test the stability of the threat-hunting policy learned by the reinforcement learning process and the reinforcement learning stability of the proposed GADRL framework, the convergence property of the proposed GADRL framework was considered. Convergence property of the proposed GADRL framework was considered for testing the stability of the threat-hunting policy learned by the reinforcement learning process and the stability of the reinforcement learning process itself. The decision policy was updated repeatedly by exploiting the value function generated online and exploring different actions for the graph in the OpTC dataset while the DDQN agent was training with it. The DDQN agent repeatedly trained on the OpTC dataset and explored/exploited the decision policy through repeated interactions with the dynamic communication graphs created on the fly from the dataset. This was summed over 150 training episodes, and the learning curves are shown in Figure 5.
Figure 5.
Training the proposed GADRL framework for 150 episodes, plotting the cumulative reward achieved as well as the Huber weighted loss during the process of reinforcement learning.
The learning process can consist of three successive phases, as indicated in Figure 5. In the early probe period (Episodes 1–20), the total reward is quite variable and stays at a low level. This is to be expected, as the initial portion of data from a new agent trained using the ɛ-greedy algorithm consists of random action selections, meaning that, with not enough experience, the agent may have to try out various threat-hunting actions before finding one that is effective. As a result, misguided security responses are often followed by negative consequences, especially if the intruder host goes undetected or superfluous isolation takes place. The cumulative reward grows gradually, and the cumulative reward increase is steady, between Episode 20 and Episode 60, while the online DDQN network slowly learns the relationship between the topology-aware graph embedding produced by the GNN encoder and the security actions. Finally, the replay memory phase starts to include more informative transition, allowing the agent to classify more accurately malicious communication behavior from normal network usage. However, the exploration probability gradually diminishes according to the predefined schedule for decay of ε, which enables the learning process to gradually begin focusing on policy exploitation phase. Following about Episode 80, the total reward becomes stable, and only fluctuates a little bit. This stable convergence shows an effective learning of a policy for threat hunting for the proposed framework, which is able to adapt to dynamic corporate network environments. This is another evidence of the stability of the reinforcement learning process when using graph representation learning with Double Deep Q-Learning, as the nature of APT is highly dynamic. The evolution of the Huber weighted loss shown in Figure 5 is complementary. In the initial stages of the training process, there are huge differences between the predicted and the desired Q-values and these large differences result in relatively large losses. The loss gradually reduces as learning progresses and gets stabilized, while indicating that the approximated action-value function approaches the actual transitions of the environment. Weighted Huber loss helps ensure the numerical stability by ensuring that the large time difference error does not affect the gradient’s value too drastically during optimization, which would lead to an unstable gradient update in the problem. In general, as can be seen in Figure 5, the proposed GADRL framework shows that it could successfully learn policies and optimize these strategically under a highly imbalanced and continually changing enterprise network environment.
4.2.3. Analysis of Prioritized Experience Replay Dynamics
In order to gain insight into the convergence behavior of the proposed graph-based reinforcement learning framework, the evolution of the cumulative reward, training loss and the minority-class precision–recall characteristics were analyzed during the learning process. These complementary metrics allow insights into achievement of policy convergence, optimization stability and capability of the proposed model to learn discriminative representations under severe class imbalance.
The cumulative reward in the exploration phase of the game shows quite large fluctuations, as shown in Figure 6, up to around −4500 in the first few episodes. This behavior is expected given the extremely sparse malicious events in the graph representations and the exploration of the large mapping of states to actions performed by the DDQN agent. As epsilon decays and the policy shifts from exploration toward exploitation, the reward trajectory becomes steadily less volatile and trends upward through the middle training episodes. Thus, the total payoff gradually grows after around Episode 90 until it reaches a steady positive value, marking the successful policy convergence. The middle section of Figure 6 shows the mean squared error (MSE) over time when training the model. So severe loss peaks can be found at all stages of the early learning process, including several peaks greater than 1.6 × 104. These oscillations are in direct response to the Prioritized Experience Replay (PER) memory mechanism, which samples transitions based on their temporal-difference (TD) error, following the sampling-probability definition already given in Equation (17). Rare transitions associated with APT activity tend to produce larger TD errors than routine benign transitions, and are therefore more likely to be selected for optimization under Equation (17). This preferential sampling introduces some additional variance into the optimization process in the short term, but allows the network to be trained on informative minority-class transitions that would otherwise be under-represented in a uniformly sampled minibatch.
Figure 6.
The training dynamics of the proposed DDQN–PER is presented with cumulative reward progression, average MSE loss, and the precision–recall curve for the minority class of APT.
These fluctuations on the loss decrease in frequency and decrease in size as training goes on and the optimization process settles down after around Episode 80. The behavior is why the estimation errors shrink over time with DDQN architecture and Huber loss function linearly penalizes the large residuals to smooth out impossible updates in the direction of the gradient. The precision–recall curve for the minority APT class is given on the right side of Figure 6. The Average Precision (AP) is calculated as 0.049, but it needs to be taken into account in light of the extreme imbalance of the DARPA OpTC dataset, where malicious events represent less than 0.01% of all observations. Even in these conditions, a reasonably high number of false positive predictions will significantly lower the precision. Most importantly is the proposed recall that is getting close to 1.0, indicating the learning strategy encompassed by PER improves recall of rare behavior while still optimizing the overall process.
4.2.4. Detection Performance Under Severe Class Imbalance
The proposed framework was further systemically assessed practically using the confusion-matrix analysis along with supporting statistical techniques to measure a system’s performance. Multiple evaluation metrics were considered since overall accuracy might be biased by highly imbalanced datasets for the proposed detector.
In Figure 7, it is illustrated how false positives (FPs) and false negatives (FNs) trade off. The Random Forest baseline yields zero false positive alarms, and falsely reports all of the malicious samples as false negative. With the proposed framework there are no false negatives, whereas there will be an increased number of false positives notified. As far as cyber security is concerned, it will be better because the damage incurred from undetected APT operations is normally much larger than any extra alert that would request manual investigation.
Figure 7.
Empirical false positive and false negative distributions for the models under comparison.
These observations are reinforced in the results of the quantitative confusion matrix, as presented in Table 9. The baseline algorithm using the Random Forest model correctly classifies the greatest number of benign samples but utterly fails to detect malicious activities with 100% false-negative rate. Adding the reinforcement-learning ablation model substantially improves minority-class detection, reducing the false-negative rate to 20%; the full GADRL framework, which additionally incorporates graph representation learning, achieves 0% false-negative rate with 91 false-positive samples generated. This behavior is consistent with the asymmetric reward formulation used when learning during reinforcement learning with much greater penalties given for missed attacks than false alarms. Conventional statistical performance measures are also summarized to give a brief summary of the detection capability of the models evaluated.
Table 9.
Confusion matrix comparison of the detection models evaluated time.
As an example in Figure 8, the Random Forest classifies correctly all samples, without recalling any of the malicious examples, so that the recall value is 0%. The reinforcement-learning ablation model substantially improves detection, reaching a recall of 80%, while the full GADRL framework detects all malicious samples in this evaluation snapshot, reaching a recall of 100%. The results show that prioritized reinforcement learning with graph-structured data clearly enhances sensitivity to rare APT behaviors.
Figure 8.
Recall comparison for minority class APT detection.
The limitations of just using the global accuracy are further illustrated in a statistical comparison reported in Table 9. However, the highest accuracy (99.99%) is achieved by the Random Forest baseline model, which is deceptive since the classifier is predicting almost all of the observations as benign. In the proposed framework, the overall accuracy is a little lower (99.90%) because of the additional number of false-positive predictions, but the number of false-negative predictions are completely eliminated. This recall gain has a direct precision cost: of the 96 alerts the proposed framework raises (5 true positives, 91 false positives), only 5.2% are genuine attacks, meaning roughly 95% of raised alerts would require a SOC analyst to manually rule out a false alarm. This trade-off is consistent with the low F1 score (0.0990) and should be weighed explicitly against the cost of a missed intrusion when considering operational deployment. The Matthews correlation coefficient (MCC), which is a more informative assessment as it takes into account true positives, true negatives, false positives, and false negatives, is, when computed directly from the raw counts in Table 9, marginally higher for the ablation baseline (MCC = 0.2308) than for the proposed framework (MCC = 0.2281); the proposed framework therefore does not dominate on every metric considered. The case for the proposed framework rests specifically on its recall advantage, which is disproportionately important in this domain because a missed APT (false negative) is typically far costlier than an additional SOC investigation (false positive), not on a claim of the single highest MCC. This comparison is also based on only five malicious observations in this evaluation snapshot: a single additional missed detection would reduce the reported recall from 100% to 80%, so this snapshot-level result should be interpreted together with the multi-snapshot recall trend in Table 10 (Section 4.2.5), which provides a more statistically stable picture of detection performance across temporal snapshots. From an overall perspective, the robustness of the proposed GADRL framework in handling extreme class imbalance problems makes it a reasonable choice for enterprise cyber security applications that prioritize minimizing missed intrusions over minimizing analyst workload. The results shown in Figure 7 and Figure 8 and Table 10 and Table 11 support this statement.
Table 10.
Comparing the statistical performance of models evaluated.
Table 11.
Detection recall given sequence of temporal snapshots from varied attack scenarios.
4.2.5. The Robustness Under Temporal Concept Drift
One of the key requirements for any real-world IDS is the ability to maintain detection performance as attacker behavior and network conditions evolve. Attack characteristics change across the stages of an intrusion lifecycle, and enterprise traffic distributions drift over time as a result. The framework’s temporal robustness is assessed across the five successive OpTC snapshots (Conn00–Conn04); consistent with the expanding-window protocol of Section Data Splitting, Preprocessing, and Leakage Prevention, the policy evaluated on each snapshot is trained only on the snapshots that chronologically precede it, so no snapshot-specific fine-tuning or leakage occurs. Under this protocol, Conn00 has no preceding training data and is therefore reported here as an in-sample training-performance reference point rather than a held-out generalization result; Conn01–Conn04 are the genuinely unseen, chronologically held-out evaluations. The number of malicious observations available in each snapshot (Table 2) ranges from 156 (Conn02) to 236 (Conn04); these small counts, discussed further below, bound how much confidence a single-run recall estimate can support.
Table 11 summarizes detection recall obtained from each model across the five temporal snapshots. Recall remains at 0% for the baseline model (Random Forest) throughout the evaluation period, across all attack stages. This behavior confirms that a traditional supervised classifier trained on static feature representations degrades once the underlying data distribution shifts away from its training distribution. The reinforcement-learning ablation model generalizes better than the static baseline, but its recall still decreases steadily as the campaign progresses, from 67.0% at the initial reconnaissance stage (Conn00) to 48.9% at the command-and-control exfiltration stage (Conn04). This monotonic decline, together with the qualitatively distinct attack-phase labels already listed in Table 11 (reconnaissance, scanning, lateral movement, staging, and exfiltration), constitutes behavioral evidence that the underlying communication patterns shift across snapshots; no formal statistical drift test (e.g., a distributional distance measure between consecutive snapshots’ feature or graph statistics) was computed, and this remains a direction for future work rather than a claim made here. The ablation’s degradation suggests that, absent graph-structural information, the agent increasingly loses access to the discriminative communication patterns that distinguish attack stages as those patterns change over time.
For a clearer view of recall over time, refer to Figure 9. The proposed GADRL framework maintains a constant recall of 100% across all evaluated snapshots without any parameter changes between them. This consistent behavior suggests good generalization across the different phases of the APT lifecycle, even as network communications evolve. This robustness can plausibly be attributed to the synergy of the framework’s components: the GNN encoder captures relational dependencies between communicating hosts in addition to their individual attributes, making the resulting representation less sensitive to local feature variation; the DDQN agent optimizes cumulative reward rather than isolated per-instance classification; and the Prioritized Experience Replay mechanism concentrates learning on the most informative attack transitions. However, this 100% recall is obtained from a single training run evaluated on snapshots containing between 156 and 236 malicious observations each (Table 2); no repeated runs with different random seeds were conducted, so no variance estimate is available, and a single additional missed detection in any snapshot would change its reported recall. Repeating training across multiple seeds and reporting the mean and standard deviation of recall is necessary before the stability suggested by Figure 9 can be treated as a robust property of the framework rather than an outcome of this particular run. Consequently, while these results are consistent with resilience to concept drift, the claim should be read as a preliminary indication rather than a demonstrated guarantee: the experiments do not include a formal drift test, a comparison against retraining, or multi-seed variance estimates, so any implication of reduced retraining requirements in deployment remains a hypothesis for future validation rather than an established finding.
Figure 9.
Recall stability of the assessed models across successive time snapshots of the network.
4.2.6. Computational Complexity and Scalability
In addition to detection accuracy, computational efficiency and scalability are essential for the practical deployment of graph-based intrusion detection systems on continually growing enterprise network traffic. The computational complexity of graph construction, graph convolution, and DDQN inference was analyzed for communication graphs of increasing size to assess the operational feasibility of the proposed framework.
Figure 10 plots the execution time of the command as a function of the size of the graph. The overall processing time as expected grows with number of connections in the network as more graph nodes and edges are added to the message-passing. The increase appears to be linear with the number of vertices of the graph though, therefore, the computations do not appear to be exponential in the graph size. The neighborhood aggregation operation that forms the bulk of the inference stage in the proposed structure is largely responsible for its computational characteristics, which depends highly on the type of Graph Neural Network (GNN) encoder. The complexity of a graph convolution layer is about linear on the number of graph edges ∣E∣ and the number of nodes ∣V∣ in a graph (O(∣E∣)).
Figure 10.
Scalability over large number of nodes in the communication.
The overall graph-embedding stage scales linearly with network connectivity, since the proposed architecture uses two graph convolution layers. After embedding, the DDQN policy network operates on a fixed-dimensional latent representation, so its own runtime does not depend on graph size. As Figure 10 shows, DDQN inference latency itself remains below the 4.2 ms threshold regardless of graph size; however, this bound applies only to the DDQN decision step, not to the whole inference pipeline. The GNN spatial-aggregation overhead scales with the number of communication edges and reaches approximately 21 ms at 100,000 edges, so total per-decision latency (graph embedding plus DDQN inference) grows correspondingly with graph size rather than remaining flat at 4.2 ms; this correction supersedes any statement elsewhere in the manuscript that the entire pipeline stays under 4.2 ms. This remains a workable execution profile for enterprise network security applications operating at the graph sizes evaluated here, though the growing GNN overhead component should be taken into account when the framework is deployed on substantially larger enterprise networks. Only compact latent embeddings are used at decision time, which reduces recomputation while retaining the structural information needed for detection. In summary, the scalability analysis shows that graph representation learning can be combined with DDQN-based decision-making at a computational cost that scales predictably with network size, though the graph-embedding stage, not the DDQN agent, is the dominant and size-dependent cost at scale.
4.2.7. Comparative Evaluation and Ablation Analysis
The proposed framework was compared against a Random Forest baseline and internal ablations of its own architecture to quantify the contribution of each component. An ablation study was carried out to isolate the effect of graph representation learning and Prioritized Experience Replay on overall detection performance. This comparison set has two limitations that should be stated explicitly. First, the Random Forest baseline achieves 0% recall, which suggests it was not configured with class weighting, resampling, or threshold calibration for this extremely imbalanced setting; a properly tuned cost-sensitive baseline would likely perform better than the unweighted Random Forest reported here, so the gap shown below should not be read as the maximum achievable by non-graph, non-RL methods. Second, no comparison is made against other graph-based supervised baselines (e.g., a supervised GCN/GAT/GraphSAGE classifier without the RL component), temporal graph models, or non-graph cost-sensitive classifiers such as class-weighted XGBoost or focal-loss models, all of which would more precisely isolate which parts of the reported gains come from graph representation learning versus from the reinforcement-learning formulation itself. A comparative evaluation of the proposed framework and the baseline and ablation models is presented in Table 12.
Table 12.
Performance comparison of the tested intrusion detection architectures.
The performance of the examined detection architectures is summarized under identical experimental conditions. Although the Random Forest baseline achieves a very high overall accuracy (99.99%), it fails to detect any malicious samples, with 0% detection recall and a 100% false-negative rate. This result illustrates the well-known tendency of conventional supervised classifiers to optimize for the majority benign class under extreme imbalance (subject to the caveat above that this baseline was not tuned for imbalance). Replacing the static supervised classifier with a reinforcement-learning agent substantially improves minority-class detection: the DQN-only ablation reaches 80% recall with a 20% false-negative rate, suggesting that a sequential decision policy is better suited to detecting evolving attack behavior than a static classifier. However, without graph-based structural representations, this ablation is restricted to connection-level features and cannot model the relational dependencies characteristic of multi-stage APT activity. The complete GADRL framework adds graph representation learning and priority-based policy optimization, detecting all malicious instances in the evaluation dataset (100% recall, 0% false-negative rate) at a global accuracy of 99.90%. The higher number of false positives, driven by the asymmetric reward formulation, accounts for this small accuracy reduction relative to the ablation; as discussed in Section 4.2.4, this trade-off should be weighed against the low precision (5.2%) it produces, rather than treated as a cost-free improvement. In enterprise cybersecurity applications where a missed intrusion is typically far costlier than an additional SOC investigation, this recall-favoring trade-off can still be the more defensible operating point, provided the resulting analyst workload is accounted for explicitly. A systematic ablation study was carried out next to isolate the contribution of each architectural component.
The findings in Table 13 indicate that each of the three components contributes to overall detection performance. Removing the Graph Neural Network encoder (Configuration II) reduces detection recall from 100% to 80%, indicating that the structural relationships between communicating entities carry information beyond what is available from individual connection-level features alone. Without graph-based embeddings, the reinforcement-learning agent cannot use topological context to distinguish a coordinated multi-stage attack from ordinary network activity. Similarly, removing the Prioritized Experience Replay mechanism while retaining the GNN encoder (Configuration III) reduces recall to 81.4%, consistent with the agent having fewer opportunities to learn from the small number of attack transitions in the training data. PER addresses this by preferentially sampling transitions with large temporal-difference (TD) errors, improving policy updates for minority-class events. The complete architecture achieves the highest recall of the three configurations, consistent with each component addressing a distinct limitation: the GNN encoder supplies structural context, the DDQN formulation stabilizes value estimation through decoupled action selection and evaluation, and PER concentrates learning on informative, rare transitions. This internal ablation isolates the contribution of each proposed component relative to one another, but, consistent with the baseline-comparison limitation noted above, it does not by itself establish how the complete framework compares to non-graph, non-RL cost-sensitive classifiers or to supervised graph baselines—that comparison requires the additional experiments noted at the start of this subsection.
Table 13.
Ablation study isolating the contribution of the GNN encoder and the PER buffer to overall detection performance.
4.2.8. Limitations and Future Research
While the proposed GADRL framework shows promising detection performance on the DARPA OpTC benchmark, several limitations should be noted, some of which bear directly on how the results reported above should be interpreted:
First, as communication graph size and density grow, the computational cost of graph construction and message passing increases correspondingly. The scalability analysis (Section 4.2.6) shows that DDQN inference latency remains bounded, but graph-processing overhead grows with the number of edges and becomes the dominant cost at scale; graph partitioning or distributed graph-processing techniques would likely be needed to control computational overhead and memory consumption on substantially larger enterprise networks.
Second, the framework was evaluated under an offline learning paradigm on fixed historical graph snapshots.
The temporal evaluation in Section 4.2.5 is consistent with resilience to concept drift, but was obtained from a single training run without repeated-seed variance estimates or a formal statistical drift test, so it should be read as a preliminary indication rather than a demonstrated guarantee; the framework has not been validated under genuine online or continual learning conditions where attack behaviors and reward signals arrive in real time. Combining the current architecture with online or continual learning algorithms is a natural direction for strengthening this evidence.
Third, the reward function is deliberately asymmetric, penalizing false negatives more heavily than false positives, because a missed Advanced Persistent Threat is typically far costlier than an additional SOC investigation. As shown in Section 4.2.4, this design increases false positives substantially (precision of 5.2% in the reported evaluation) in exchange for higher recall. Future work should explore reward-tuning strategies that let operators calibrate this trade-off to their own alert-handling capacity, rather than fixing a single asymmetric ratio.
Fourth, the present graph representation is built from static snapshots extracted over fixed, non-overlapping time windows (Section 3.3), and cross-snapshot temporal context is incorporated only through the exponential-moving-average aggregation of Section 3.4. Recent dynamic Graph Neural Network and temporal graph transformer architectures explicitly model continuously evolving graph structure and may capture longer-range temporal dependencies in multi-stage attacks more effectively than the present window-and-EMA approach.
Fifth, the evaluation reported here compares the proposed framework against a single Random Forest baseline and internal ablations of its own components; it does not include comparisons against tuned cost-sensitive classifiers, supervised graph baselines, or temporal GNN baselines, and all reported detection metrics come from a single training run on evaluation snapshots containing as few as 156 malicious observations, without repeated-seed variance estimates. These are the two most consequential open items for establishing the robustness of the comparative claims made in Section 4.2, and addressing them is a prerequisite for treating this evaluation as conclusive rather than preliminary.
Finally, this study evaluates detection performance under naturally occurring class imbalance but does not consider adversarial robustness—for example, graph poisoning, adversarial edge manipulation, or evasion attacks targeting the reinforcement-learning policy. Developing adversarial threat models for graph-based reinforcement learning is an important direction for future work, particularly for deployment in mission-critical cybersecurity systems.
Overall, the proposed framework provides a reasonable basis for graph-aware, reinforcement-learning-based enterprise intrusion detection, but the items above—particularly multi-seed validation, a broader baseline comparison, and formal drift quantification—should be addressed before its comparative claims and operational robustness can be considered established rather than preliminary.
5. Conclusions
5.1. Conclusions
Advanced Persistent Threats (APTs) are a difficult type of threat to defend against because of their low incidence rate in enterprise network traffic, stealthy nature, and multi-stage approach. Standard IDSs are usually optimized by supervised learning and global empirical risk minimization and can be prone to training just the major benign class, with little detection performance in the presence of very few but critical attack events. To resolve the limitation, it is necessary to develop learning frameworks that could capture the structural relationship in the network communication, and also put emphasis on the informative experiences in the minority class when optimizing. To overcome these issues, this paper introduced a novel graph-based deep reinforcement learning architecture combining three key components, Graph Neural Networks (GNNs), Double Deep Q Networks (DDQNs), and Prioritized Experience Replay (PER), to create an all-in-one framework for the threat detection problems in enterprises. Conventional intrusion detection methods rely on features, each of which is independent within the tabular structure of the system, whereas the proposed framework assumes that enterprise communication is organized in the form of graph structures, and the obtained topological relationships among interacting entities are leveraged to detect intrusion. These graph embeddings are then used as compact state representations of the network for the reinforcement learning agent, and therefore, policies for mitigation can be optimized by sequentially interacting with the network environment. Moreover, the PER mechanism pushes the learning process towards informativeness, as crucial data comes from rare attacks; whereas, the asymmetric reward function intentionally gives preference to minimizing the number of false-negatives during policy optimization. An experimental evaluation was performed on the DARPA OpTC benchmark, which showed the efficacy of the proposed framework in the extreme class-imbalanced setting. The distribution of network telemetry data was very uneven and the learning dynamics showed good convergence of the DDQN policy, and also the graph-based state representation allowed the reinforcement learning agent to retain structural information that is not available in the classical connection-based features. The proposed framework over the baseline and ablation models demonstrated the consistently best minority-class detection ability. Specifically, the proposed architecture achieved 100% recall on the evaluated snapshot, detecting all five malicious instances present; however, as discussed in Section 4.2.4, this result comes from a single training run on a snapshot with only five malicious observations, and the Matthews Correlation Coefficient computed directly from the reported confusion matrix (MCC = 0.2281) is marginally lower than that of the DDQN-only ablation (MCC = 0.2308), so the proposed framework’s advantage rests specifically on its recall gain rather than on outperforming every evaluated model on every metric. This performance also came with an accompanying increase in false positives, though in this scenario false negatives were completely eliminated, an operational shift that, for the most part, is a desirable compromise in enterprise cybersecurity for which additional alerts can be tolerated but a sophisticated, successful intrusion cannot. The recall observed across sequential temporal snapshots (Section 4.2.5) is consistent with resilience to temporal changes in network behavior, though this evidence likewise comes from a single run without repeated-seed variance estimates and should be treated as preliminary rather than conclusively demonstrated. The computational analysis (Section 4.2.6) showed that DDQN inference latency itself remains below 4.2 ms regardless of graph size, while graph-processing overhead grows with the number of communication edges and becomes the dominant, size-dependent cost at scale; total per-decision latency therefore scales with graph size rather than remaining fixed. The proposed framework’s DDQN component meets near real-time latency requirements at the graph sizes evaluated here, though the growing graph-processing cost should be accounted for in larger deployments. Overall, the results obtained in this study indicate that the fusion of graph representation learning and prioritized deep reinforcement learning is a great direction for intelligent intrusion detection in a highly imbalanced class. Instead of merely optimizing the traditional accuracy-based metrics, the proposed framework seeks to learn decision policies that are designed to achieve security goals in addition to being efficiently computable, specifically policies that aim to achieve reliable detection of low-frequency attack behaviors. Based on this, this work is a step forward in the field of graph-based artificial intelligence techniques for cyber security, proposing a combined approach to synchronously utilize structural network information, sequential decision optimization, and prioritized experience learning for analyzing the advanced enterprise threat.
5.2. Future Work
Research Directions: While the proposed framework exhibits good detection performance and operational resilience, there are still several lines of research that can be pursued to delve deeper into the proposed framework. The current implementation uses spectral graph convolution to get graph embeddings from an enterprise communication graph. While promising scalability is illustrated by the experimental results, spectral graph convolution involves computing a normalized graph Laplacian, which scales up with network size and density. More scalable architectures for the message passing will thus be explored in the future, such as GraphSAGE, Graph Attention Networks (GANs) and temporal graph transformers, with focus on decreasing the computational cost while maintaining the characteristics of the communication graph of a dynamic enterprise network. First, the reinforcement learning policy learned in this paper is based on an offline Markov Decision Process (MDP) formulation, taking the advantage of the predesigned graph snapshots that are provided within the DARPA OpTC dataset. In a real-world enterprise network, though, observations are often incomplete, the volume of received data is asynchronous, event arrival times are delayed, and network behaviors are constantly changing. The main limitation of the proposed framework is that it is restricted to situations where there are no hidden states, making it a direction for further development by extending it towards Partially Observable Markov Decision Processes (POMDPs), continual reinforcement learning or policy adaptation in an online scenario. Another new area of promising research would be on the adaptation of the rewards. Normally, in the current setting, the penalty for a false negative is greater than the penalty for a false positive, which is done deliberately to increase the number of attacks that can be picked up. Future research could explore more flexible and risk-based reward designs using dynamic or risk-triggered (flex) payments that adapt to the function requirements and risks of various enterprise environments, retaining the benefit of the effective approach for highly imbalanced cybersecurity data that was demonstrated in this design. In addition, a discrete temporal snapshot-based graph representation is used to build the current graph representation which encapsulates the network’s interactions within fixed observation intervals. However, as the attack behavior evolves over time in long-running campaigns, this might be adequately represented by new dynamic Graph Neural Networks or continuous-time learning approaches to graphs. Thus, using temporal graph representation learning is another direction that deserves further investigation to further improve the capabilities of attack detection systems in their early stages.
In conclusion, the proposed framework will be extended in the future in the following directions: scalable graph representation learning, continual learning in reinforcement learning, partially observable reinforcement learning, adaptive reward optimization, temporal graph modeling, and adversarially robust decision making. These advancements could significantly enhance the scalability, adaptability, and resilience of IDSs in rapidly changing corporate environments.
Author Contributions
Conceptualization, B.M., K.S. and S.S.G.; methodology, B.M., S.S.G. and K.S.; software, B.M. and K.M.; validation, S.S.G., S.P. and H.M.D.K.; formal analysis, B.M. and S.P.; investigation, B.M. and K.M.; data curation, K.M.; writing—original draft preparation, B.M.; writing—review and editing, K.S., S.S.G., S.P. and H.M.D.K.; visualization, B.M.; supervision, K.S. and H.M.D.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Alshamrani, A.; Myneni, S.; Chowdhary, A.; Huang, D. A Survey on Advanced Persistent Threats: Techniques, Solutions, Challenges, and Research Opportunities. IEEE Commun. Surv. Tutor. 2019, 21, 1851–1877. [Google Scholar] [CrossRef] [Scilit]
- Ring, M.; Wunderlich, S.; Scheuring, D.; Landes, D.; Hotho, A. A Survey of Network-Based Intrusion Detection Data Sets. Comput. Secur. 2019, 86, 147–167. [Google Scholar] [CrossRef] [Scilit]
- Redino, C.; Nandakumar, D.; Schiller, R.; Choi, K.; Rahman, A.; Bowen, E.; Shaha, A.; Nehila, J.; Weeks, M. Zero Day Threat Detection Using Graph and Flow Based Security Telemetry. In Proceedings of the 2022 International Conference on Computing, Communication, and Intelligent Systems (ICCCIS), Greater Noida, India, 4–5 November 2022; pp. 655–662. [Google Scholar] [CrossRef] [Scilit]
- Baharvand, D.; Jodati, F.; Shirini, K.; Gharehveran, S.S. Impact of simulated glasses noise on facial emotion recognition with deep learning models. Sci. Rep. 2026, 16, 26253. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chitraju, S. AI-Driven Deep Learning Framework for Identifying Malicious Activities in Encrypted Network Traffic. Sci. Prepr. 2025. [Google Scholar] [CrossRef] [Scilit]
- Sufi, F.; Alsulami, M. Quantifying Temporal Dynamics in Global Cyber Threats: A GPT-Driven Framework for Risk Forecasting and Strategic Intelligence. Mathematics 2025, 13, 1670. [Google Scholar] [CrossRef] [Scilit]
- Sommer, R.; Paxson, V. Outside the Closed World: On Using Machine Learning for Network Intrusion Detection. In Proceedings of the 2010 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 16–19 May 2010; pp. 305–316. [Google Scholar] [CrossRef] [Scilit]
- Samadi Gharehveran, S.; Shirini, K.; Sarhangzadeh, M.; Gholinavaz, S. A Review of Game Theory-based Approaches for Demand Side Management in Smart Energy Grids. Power Control. Data Process. Syst. 2026, 3, 28–37. [Google Scholar] [CrossRef]
- Salehi, M.; Taheri Hajivand, A.; Shirini, K. The NSGA-II Ministry of Industry and Information Technology (MOPSO) has also announced that it will launch a series of measures to curb the spread of the virus, including the NSGA-II Ministry of Industry and Information Technology (MOPSO). Agric. Inf. Sci. Technol. 2026, 9, 13–24. [Google Scholar] [CrossRef]
- Nguyen, T.T.; Reddi, V.J. Deep Reinforcement Learning for Cyber Security. IEEE Trans. Neural Netw. Learn. Syst. 2023, 34, 3779–3795. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nekahdari, A.; Kouzehkonani, E.D.; Saeedi, N.; Shirini, K.; Gharehveran, S.S. Multi-task procedural content generation with reinforcement learning. Sci. Rep. 2026, 16, 18389. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Fu, Z.; Liu, M.; Qin, Y.; Zhang, J.; Zou, Y.; Yin, Q.; Duan, H. Encrypted Malware Traffic Detection via Graph-Based Network Analysis. In Proceedings of the 25th International Symposium on Research in Attacks, Intrusions and Defenses (RAID 2022), Limassol, Cyprus, 26–28 October 2022; pp. 495–509. [Google Scholar] [CrossRef] [Scilit]
- Cheng, Z.; Lv, Q.; Liang, J.; Wang, Y.; Sun, D.; Pasquier, T.; Han, X. Kairos: Practical Intrusion Detection and Investigation Using Whole-System Provenance. In Proceedings of the 2024 IEEE Symposium on Security and Privacy (S&P), San Francisco, CA, USA, 19–23 May 2024. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Ye, A.; Lu, W.; Yang, L. Detecting Advanced Persistent Threats via Heterogeneous Graph Learning from Homophily and Heterogeneity Views. Cybersecurity 2026, 9, 39. [Google Scholar] [CrossRef] [Scilit]
- Maleknya, K.; Alizadehsani, R.; Pedrammehr, S.; Shirini, K. A solid waste classification using reinforcement learning boosted by data augmentation and hyperparameter optimization. Sci. Rep. 2026, 16, 18132. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, S.; Wang, Y.; Zhang, Z.; Hao, Q.; Hou, Y.; Yang, W.; Liu, L. Warning-Graph: An Early Warning Framework for APT Attacks Based on Threat Intelligence Modeling. IEEE Trans. Dependable Secur. Comput. 2025, 23, 3880–3897. [Google Scholar] [CrossRef] [Scilit]
- Kipf, T.N.; Welling, M. Semi-Supervised Classification with Graph Convolutional Networks. In Proceedings of the International Conference on Learning Representations (ICLR), Toulon, France, 24–26 April 2017. [Google Scholar] [CrossRef] [Scilit]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph Attention Networks. In Proceedings of the International Conference on Learning Representations (ICLR), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar] [CrossRef] [Scilit]
- Li, D.; Yang, Y.; Cui, Z.; Yin, H.; Sun, Q.; Zhang, M.; Chang, Y.; Hu, L. Graph Representation Learning in Complex Networks: Recent Advances and Open Challenges. J. Artif. Intell. Autom. 2026, 1, 4. [Google Scholar] [CrossRef] [Scilit]
- Rehman, M.U.; Ahmadi, H.; Hassan, W.U. FLASH: A Comprehensive Approach to Intrusion Detection via Provenance Graph Representation Learning. In Proceedings of the 2024 IEEE Symposium on Security and Privacy (S&P), San Francisco, CA, USA, 19–23 May 2024. [Google Scholar] [CrossRef] [Scilit]
- Jabbarzadeh, M.H.; Mehralizadeh, D.; Shirini, K.; Gharehveran, S.S. A hybrid approach to reinforcement learning: Combining soft updating and frame stacking for stable training in Flappy Bird and CartPole. J. Supercomput. 2026, 82, 503. [Google Scholar] [CrossRef] [Scilit]
- Al-Riyami, S.; Coenen, F.; Lisitsa, A. A Re-Evaluation of Intrusion Detection Accuracy: Alternative Evaluation Strategy. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS ′18), Toronto, ON, Canada, 15–19 October 2018; pp. 2195–2197. [Google Scholar] [CrossRef] [Scilit]
- Baharvand, D.; Saeedi, N.; Gharehveran, S.S.; Shirini, K. A deep generative approach to personalized super mario level design. Sci. Rep. 2026, 16, 18099. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Shirini, K.; Kordan, M.B.; Gharehveran, S.S. Impact of learning rate and epochs on lstm model performance: A study of chlorophyll-a concentrations in the Marmara Sea. J. Supercomput. 2025, 81, 265. [Google Scholar] [CrossRef] [Scilit]
- Aly, A.; Iqbal, M.S.; Youssef, A.M.; Mansour, E. MEGR-APT: A Memory-Efficient APT Hunting System Based on Attack Representation Learning. IEEE Trans. Inf. Forensics Secur. 2024, 19, 5257–5271. [Google Scholar] [CrossRef] [Scilit]
- Anjum, M.M.; Iqbal, S.; Hamelin, B. Analyzing the Usefulness of the DARPA OpTC Dataset in Cyber Threat Detection Research. In Proceedings of the 26th ACM Symposium on Access Control Models and Technologies (SACMAT 2021), Virtual Event, 16–18 June 2021; pp. 27–32. [Google Scholar] [CrossRef] [Scilit]
- Miuccio, L.; Riolo, S.; Samarakoon, S.; Bennis, M.; Panno, D. On Learning Generalized Wireless MAC Communication Protocols via a Feasible Multi-Agent Reinforcement Learning Framework. IEEE Trans. Mach. Learn. Commun. Netw. 2024, 2, 298–317. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.









