Skip to main content
QUICK REVIEW

[Paper Review] Real-time Network Intrusion Detection via Decision Transformers

Jingdi Chen, Hanhan Zhou|arXiv (Cornell University)|Dec 12, 2023
Network Security and Intrusion DetectionComputer Science4 citations
TL;DR

This paper proposes a real-time network intrusion detection framework using Decision Transformers (DT) to model packet sequences for timely, accurate threat detection. By conditioning on past trajectories of packets, rewards, and decisions, the DT generates future detection actions in an autoregressive manner, outperforming RL and sequence modeling baselines in both accuracy and timeliness, especially under non-ideal training data.

ABSTRACT

Many cybersecurity problems that require real-time decision-making based on temporal observations can be abstracted as a sequence modeling problem, e.g., network intrusion detection from a sequence of arriving packets. Existing approaches like reinforcement learning may not be suitable for such cybersecurity decision problems, since the Markovian property may not necessarily hold and the underlying network states are often not observable. In this paper, we cast the problem of real-time network intrusion detection as casual sequence modeling and draw upon the power of the transformer architecture for real-time decision-making. By conditioning a causal decision transformer on past trajectories, consisting of the rewards, network packets, and detection decisions, our proposed framework will generate future detection decisions to achieve the desired return. It enables decision transformers to be applied to real-time network intrusion detection, as well as a novel tradeoff between the accuracy and timeliness of detection. The proposed solution is evaluated on public network intrusion detection datasets and outperforms several baseline algorithms using reinforcement learning and sequence modeling, in terms of detection accuracy and timeliness.

Motivation & Objective

  • To address the limitations of reinforcement learning in network intrusion detection, where the Markov property often fails and states are unobservable.
  • To improve detection timeliness by enabling early identification of malicious packets before full network flows complete.
  • To formulate network intrusion detection as a sequence modeling problem using offline decision transformers for scalable, real-time decision-making.
  • To introduce a novel tradeoff between detection accuracy and timeliness through a reward function that penalizes delayed decisions.
  • To enhance model robustness by using packet embeddings via autoencoders and evaluating performance under diverse data quality conditions.

Proposed method

  • The framework models network intrusion detection as a sequence modeling problem, using past trajectories of packets, detection decisions, and rewards as input.
  • A causally masked Decision Transformer (DT) generates future detection decisions autoregressively, conditioned on the desired return and historical observations.
  • Packet-level features are compressed into compact embeddings using a pretrained autoencoder to handle variable-length packet sequences efficiently.
  • A reward function is designed to penalize delayed detection, encouraging faster yet accurate decisions, thus enabling a tradeoff between speed and precision.
  • The model is trained offline on historical trajectories from the UNSW-NB15 dataset, with evaluation on a balanced dataset using oversampling for malicious traffic.
  • The approach is architecture-agnostic, allowing integration with alternative models like LSTMs or TCNs, though transformers are used for primary evaluation.

Experimental results

Research questions

  • RQ1Can decision transformers effectively model sequential network traffic for real-time intrusion detection without relying on the Markov property?
  • RQ2How does the proposed framework balance detection accuracy and timeliness compared to traditional RL and supervised baselines?
  • RQ3To what extent can the model generalize and maintain performance when trained on suboptimal or non-expert behavior policies?
  • RQ4How does the use of packet embeddings and a reward function that penalizes delay affect detection speed and accuracy?
  • RQ5Can the framework achieve high detection performance even with limited or imbalanced training data?

Key findings

  • The proposed DT-based method outperforms all baselines in detection accuracy, achieving an F1-score above 0.91 under random sampling, even with suboptimal training data.
  • Under expert sampling, DT achieved a precision of 0.99 and a lower Time To Resolution (TTR) than CQL, indicating faster detection without sacrificing accuracy.
  • In the medium sampling scenario, DT matched BC’s TTR of 0.80 but achieved significantly higher reward and detection accuracy, demonstrating superior robustness.
  • The model maintained the lowest TTR across all settings while achieving high precision and recall, proving its effectiveness in accelerating threat detection.
  • The reward function successfully encouraged earlier detection, resulting in higher normalized reward scores (closer to expert policy) compared to baselines.
  • The framework shows strong generalization under non-ideal data, making it suitable for real-world deployment where high-quality behavior data may be scarce.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.