Intrusion Detection Method based on Graph Edge Attention and Focal Loss
Shanyi Xie, Congcong Zhan, Jiajun Li, Yan Li · 2025
Aiming at the problem that existing network intrusion detection models have low recognition rates for a few attack classes in class-imbalanced datasets, we proposed an intrusion detection method based on graph edge attention with focus loss. First, the raw network traffic data is converted into a graph structure; second, edge features are weighted and aggregated using the edge multi-attention mechanism to generate edge embeddings; and finally, the focus loss function is used to enhance the recognition rate of the few classes. Experiments are conducted on the NF-BoT-IoT and NF-UNSW-NB15 datasets, and the results show that the proposed model enhances the capability of unbalanced intrusion detection data compared to other models, and the multi-classification detection accuracies reach 0.8308 and 0.9787, respectively.