MACHINE LEARNING-BASED DETECTION OF BGP ROUTING ANOMALIES FOR ENHANCED NETWORK SECURITY AND RESILIENCE: A HYBRID MULTI-SCALE TEMPORAL LEARNING APPROACH
Keywords:
Border Gateway Protocol, Anomaly detection, Routing security, Network resilience, Multi-scale temporal learning, Gradient boosting, Deep learningAbstract
The Border Gateway Protocol (BGP) lacks built-in validation, so worm outbreaks, power outages, and other disruptive events propagate as storms of routing updates that threaten the stability of the Internet. Machine learning (ML) detectors trained on historical incidents report high accuracy on the incidents they were trained on, whereas their ability to recognize previously unseen events, which is what matters in operation, has received little attention. This paper studies BGP anomaly detection under a leave-one-event-out protocol on real RIPE RIS traces of the Code Red I, Nimda, and Slammer worms and the Moscow blackout. We show that per-minute classifiers generalize poorly because anomalies are sustained multi-hour deviations hidden in bursty traffic, and we propose PyraGuard, a hybrid multi-scale temporal learning framework. PyraGuard fuses, at the decision level, a learned sequence branch with MS-GBDT, a gradient-boosted model on causal multi-scale descriptors spanning 1 to 240 minutes; for the learned branch, we also design MSTAN, an interpretable temporal-pyramid attention network. Multi-scale descriptors alone raise the mean F1 score of LightGBM from 60.2% to 79.1%, and decision-level fusion further improves every competent learner. PyraGuard with a GRU branch achieves a mean F1 score of 83.7% and an average precision of 87.1% on unseen events, outperforming seven baselines, and raises no false alarm on unseen-era 2017 traffic, at about 0.20 ms per decision on a single CPU core.References
[1] Rekhter Y, Li T, Hares S. A Border Gateway Protocol 4 (BGP-4). Internet Engineering Task Force (IETF), RFC 4271, 2006.
[2] Butler K, Farley T R, McDaniel P, et al. A survey of BGP security issues and solutions. Proceedings of the IEEE, 2010, 98(1): 100-122.
[3] Al-Musawi B, Branch P, Armitage G. BGP anomaly detection techniques: A survey. IEEE Communications Surveys & Tutorials, 2017, 19(1): 377-396.
[4] Sermpezis P, Kotronis V, Gigis P, et al. ARTEMIS: Neutralizing BGP hijacking within a minute. IEEE/ACM Transactions on Networking, 2018, 26(6): 2471-2486.
[5] Shapira T, Shavitt Y. AP2Vec: An unsupervised approach for BGP hijacking detection. IEEE Transactions on Network and Service Management, 2022, 19(3): 2255-2268.
[6] Al-Rousan N M, Trajković L. Machine learning models for classification of BGP anomalies. In: Proceedings of the IEEE 13th International Conference on High Performance Switching and Routing (HPSR), Belgrade, Serbia, 2012: 103-108.
[7] Ding Q, Li Z, Batta P, et al. Detecting BGP anomalies using machine learning techniques. In: Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 2016.
[8] Batta P, Singh M, Li Z, et al. Evaluation of support vector machine kernels for detecting network anomalies. In: Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS), Florence, Italy, 2018.
[9] Li Z, Gonzalez Rios A L, Trajković L. Detecting Internet worms, ransomware, and blackouts using recurrent neural networks. In: Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), Toronto, ON, Canada, 2020: 2165-2172.
[10] Li Z, Gonzalez Rios A L, Trajković L. Machine learning for detecting anomalies and intrusions in communication networks. IEEE Journal on Selected Areas in Communications, 2021, 39(7): 2254-2264.
[11] Cheng M, Xu Q, Lv J, et al. MS-LSTM: A multi-scale LSTM model for BGP anomaly detection. In: Proceedings of the IEEE 24th International Conference on Network Protocols (ICNP), Singapore, 2016: 1-6.
[12] Cheng M, Li Q, Lv J, et al. Multi-scale LSTM model for BGP anomaly classification. IEEE Transactions on Services Computing, 2021, 14(3): 765-778.
[13] Dong Y, Li Q, Sinnott R O, et al. ISP self-operated BGP anomaly detection based on weakly supervised learning. In: Proceedings of the IEEE 29th International Conference on Network Protocols (ICNP), Dallas, TX, USA, 2021: 1-11.
[14] Peng S, Nie J, Shu X, et al. A multi-view framework for BGP anomaly detection via graph attention network. Computer Networks, 2022, 214: 109129.
[15] Simon Fraser University Communication Networks Laboratory. Border Gateway Protocol (BGP) routing records from Reseaux IP Europeens (RIPE) and BCNET. IEEE DataPort, 2021. DOI: 10.21227/98aa-sh66.
[16] Li Z, Gonzalez Rios A L, Xu G, et al. Machine learning techniques for classifying network anomalies and intrusions. In: Proceedings of the IEEE International Symposium on Circuits and Systems (ISCAS), Sapporo, Japan, 2019.
[17] Bai S, Kolter J Z, Koltun V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv:1803.01271, 2018.
[18] Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need. In: Advances in Neural Information Processing Systems (NIPS), 2017, 30: 5998-6008.
[19] Liu S, Yu H, Liao C, et al. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling and forecasting. In: Proceedings of the International Conference on Learning Representations (ICLR), 2022.
[20] Xu J, Wu H, Wang J, et al. Anomaly Transformer: Time series anomaly detection with association discrepancy. In: Proceedings of the International Conference on Learning Representations (ICLR), 2022.
[21] Hu J, Shen L, Sun G. Squeeze-and-excitation networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018: 7132-7141.
[22] Lin T Y, Goyal P, Girshick R, et al. Focal loss for dense object detection. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017: 2980-2988.
[23] Ke G, Meng Q, Finley T, et al. LightGBM: A highly efficient gradient boosting decision tree. In: Advances in Neural Information Processing Systems (NIPS), 2017, 30: 3149-3157.
[24] Chang C C, Lin C J. LIBSVM: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2011, 2(3): 27:1-27:27.
[25] Breiman L. Random forests. Machine Learning, 2001, 45(1): 5-32.
[26] Cho K, van Merriënboer B, Gulcehre C, et al. Learning phrase representations using RNN encoder–decoder for statistical machine translation. In: Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 2014: 1724-1734.