Real-time Network Intrusion Detection via Decision Transformers

Jingdi Chen,Hanhan Zhou,Yongsheng Mei,Gina Adam,Nathaniel D. Bastian,Tian Lan
DOI: https://doi.org/10.48550/arXiv.2312.07696
2023-12-17
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.
Cryptography and Security,Artificial Intelligence
What problem does this paper attempt to address?
This paper attempts to address the problem of making efficient decisions based on time series observations in real-time network intrusion detection. Existing methods such as reinforcement learning may not be suitable for such network security decision problems because the Markov property may not hold, and the underlying network state is usually unobservable. The paper proposes a new framework that abstracts the real-time network intrusion detection problem as causal sequence modeling and uses the Decision Transformers architecture for real-time decision-making. Specifically, by conditioning on past trajectories (including rewards, network packets, and detection decisions), future detection decisions are generated to achieve the desired return. This approach not only improves detection accuracy but also optimizes detection timeliness. ### Core Issues of the Paper 1. **Real-time Decision-making Problem**: How to make efficient decisions based on time series observations in real-time network intrusion detection. 2. **Limitations of Existing Methods**: Existing methods such as reinforcement learning have limitations in network security decision-making because the Markov property may not hold, and the network state is unobservable. 3. **Need for New Methods**: A simple and scalable method is needed to identify attacks/intrusions at the packet level, accelerate detection speed, and timely detect malicious packets. ### Solution 1. **Causal Sequence Modeling**: Abstract the network intrusion detection problem as a causal sequence modeling problem. 2. **Decision Transformers**: Use the Decision Transformers architecture to generate future detection decisions by conditioning on past trajectories. 3. **Feature Compression**: Use an autoencoder to compress packet sequences of arbitrary length into more compact packet embeddings as input features for the Decision Transformers. 4. **Balancing Accuracy and Timeliness**: Introduce a reward function that penalizes delayed detection decisions to explore a new trade-off between accuracy and timeliness. ### Main Contributions 1. **Novel Algorithm**: Propose a new algorithm that uses an autoencoder to integrate packet payload features into compressed embeddings. 2. **Sequence Modeling**: Formulate the network intrusion detection problem as a decision sequence modeling problem and use the Decision Transformers architecture to explore a new trade-off between accuracy and timeliness. 3. **Performance Evaluation**: Evaluate the proposed solution on real-world datasets, demonstrating superior performance in detection accuracy and timeliness compared to baseline algorithms based on reinforcement learning and sequence modeling. ### Related Work 1. **Learning-based NIDS**: Introduce various machine learning-based network intrusion detection systems (NIDS), including supervised learning, semi-supervised learning, and unsupervised learning methods. 2. **Offline Reinforcement Learning**: Discuss the application of offline reinforcement learning in NIDS, particularly its advantages in handling pre-recorded attack datasets. ### Methodology 1. **Data Preparation**: Extract and compress individual packet features to create more compact feature embeddings. 2. **Trajectory Representation**: Define a trajectory representation that includes returns, observations, decisions, and time intervals. 3. **Model Architecture**: Implement time position embeddings to enable the Decision Transformers to adapt to irregular time intervals. ### Summary This paper proposes a new method based on Decision Transformers for real-time network intrusion detection. Through causal sequence modeling and feature compression, this method achieves a good balance between detection accuracy and timeliness and performs well on real-world datasets.