CAGN-GAT Fusion: A Hybrid Contrastive Attentive Graph Neural Network for Network Intrusion Detection

Md Abrar Jahin, Shahriar Soudeep, Fahmid Al Farid, M. F. Mridha, Raihan Kabir +2 more
3/2/2025
cs.LG

No official code found. Best implementation: Abrar2652/Network-Intrusion-Detection (28 stars, MIT, last commit 2025-02-13).

Abstract

Cybersecurity threats are growing, making network intrusion detection essential. Traditional machine learning models remain effective in resource-limited environments due to their efficiency, requiring fewer parameters and less computational time. However, handling short and highly imbalanced datasets remains challenging. In this study, we propose the fusion of a Contrastive Attentive Graph Network and Graph Attention Network (CAGN-GAT Fusion) and benchmark it against 15 other models, including both Graph Neural Networks (GNNs) and traditional ML models. Our evaluation is conducted on four benchmark datasets (KDD-CUP-1999, NSL-KDD, UNSW-NB15, and CICIDS2017) using a short and proportionally imbalanced dataset with a constant size of 5000 samples to ensure fairness in comparison. Results show that CAGN-GAT Fusion demonstrates stable and competitive accuracy, recall, and F1-score, even though it does not achieve the highest performance in every dataset. Our analysis also highlights the impact of adaptive graph construction techniques, including small changes in connections (edge perturbation) and selective hiding of features (feature masking), improving detection performance. The findings confirm that GNNs, particularly CAGN-GAT Fusion, are robust and computationally efficient, making them well-suited for resource-constrained environments. Future work will explore GraphSAGE layers and multiview graph construction techniques to further enhance adaptability and detection accuracy.

View on arXivView PDF

Code Implementations(1)

MIT

Network Intrusion Detection using GNN

283Jupyter NotebookJan 24, 20251 years agoMIT

Similar Papers

Cite this paper

@article{jahin2025cagngat,
  title  = {CAGN-GAT Fusion: A Hybrid Contrastive Attentive Graph Neural Network for Network Intrusion Detection},
  author = {Md Abrar Jahin and Shahriar Soudeep and Fahmid Al Farid and M. F. Mridha and Raihan Kabir and Md Rashedul Islam and Hezerul Abdul Karim},
  year   = {2025},
  eprint = {2503.00961},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.00961v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.00961.svg)](https://codeofpaper.com/paper/2503.00961)

Discussion