A Heterogeneous Graph Learning Model for Cyber-Attack Detection

Mingqi Lv, Chengyu Dong, Tieming Chen, Tiantian Zhu, Qijie Song, Yuan FanarXiv 2021

Introduction

Modern cyber-attacks are increasingly characterized by complex, long-term Tactics, Techniques, and Procedures (TTPs) that evade traditional Intrusion Detection Systems (IDS). While conventional IDS often focus on isolated snapshots of system behavior, stealthy attacks unfold over extended periods, involving intricate interactions between processes, files, and network sockets. To capture this context, researchers have turned to system provenance data—a detailed record of system events. However, existing provenance-based detection systems frequently rely on brittle, manually-defined rules or struggle with the computational scale and "out-of-sample" challenges inherent in dynamic system environments.

Methodology

This paper introduces a novel framework designed to transform raw system logs into a structured heterogeneous graph for intelligent attack detection. The pipeline consists of three primary stages: graph construction, semantic embedding, and local graph sampling.

The proposed three-stage pipeline for cyber-attack detection, moving from raw system events to a classified local graph.

1. Heterogeneous Graph Construction

The framework constructs a heterogeneous graph where nodes represent diverse system entities (e.g., Process, File, Socket) and edges denote specific events (e.g., read, write, fork). A key innovation is the inclusion of "attribute" nodes, such as "sensitive data" or "common file." These attributes act as anchors, preventing the graph from becoming a collection of disconnected components and allowing the model to learn cross-system patterns.

The heterogeneous graph schema (a) and meta-path based relationship modeling (b) used to capture semantic context.

2. Semantic Embedding via HGAT

To capture the semantic meaning of system interactions, the model employs a Heterogeneous Graph Attention Network (HGAT). This process is guided by meta-paths—predefined sequences like Process → File → Process—which enable the model to identify high-level relationships, such as inter-process communication via shared files.

3. Local Graph Sampling and Detection

To enable real-time detection of new system processes (the "out-of-sample" problem), the framework utilizes a k-order sub-graph sampling strategy. When a new entity appears, it is linked to the existing graph, and a compact neighborhood is extracted. This local graph is then processed by a Relational Graph Convolutional Network (R-GCN) to classify the process as malicious or benign, significantly reducing computational overhead and memory usage.

Experimental Evaluation

The model was rigorously evaluated using two benchmark datasets:

  • Lab Dataset: A Linux-based environment featuring 2.7 million events and 34 distinct attack campaigns, including Webshells and Remote Access Trojans (RATs).
  • DARPA Dataset: A Windows 10 dataset from the DARPA Transparent Computing program, containing 26.7 million events representing highly stealthy red-team activities.

Key Results

The proposed model demonstrated state-of-the-art performance across both datasets. On the DARPA benchmark, it achieved a Recall of 1.0000 and an Accuracy (ACC) of 0.9820, outperforming standard GNN architectures like GAT and HGAT. Notably, the model remained robust when encountering entirely new processes, maintaining a Macro-F1 score of 0.9530 on the Lab dataset's "Out-Sample" test.

Furthermore, the local sampling strategy proved highly efficient. By focusing on local neighborhoods, the authors reduced memory consumption by over 90% and achieved sub-second classification times, making the system viable for live deployment.

Conclusion

By modeling system provenance as a heterogeneous graph and leveraging local graph sampling, this framework addresses the critical challenges of scale and adaptability in cyber-attack detection. While currently focused on node-level classification, future work aims to enhance forensic capabilities by automatically reconstructing full attack narratives from detected malicious nodes.

Summary updated

BibTeX
@misc{lv2021heterogeneous,
  author = {Mingqi Lv and Chengyu Dong and Tieming Chen and Tiantian Zhu and Qijie Song and Yuan Fan},
  title = {{A Heterogeneous Graph Learning Model for Cyber-Attack Detection}},
  year = {2021},
  eprint = {2112.08986},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.08986},
}
Figure