ISAR Publisher

International Scientific and Academic Research Publisher

Submit Manuscript

Lightweight Convolutional Neural Network for Anomaly Detection in Encrypted Network Traffic Using Flow Features


Author: Jonathan Amos Oguzebeh, Siman Emmanuel*, Ishaya Joseph
Department of Computer Science Kwararafa University, Wukari, Nigeria
Published Date: 2026-08-26
DOI: 10.5281/zenodo.22829720
Keywords: Encrypted Network Traffic; Anomaly Detection; Convolutional Neural Network; Intrusion Detection System; Deep Learning; Cybersecurity; Flow-Level Features.
Abstract:

The increasing use of encryption protocols such as Transport Layer Security (TLS) and QUIC has reduced the effectiveness of conventional intrusion detection systems that rely on packet payload inspection. This study proposes XCNN-AD, a lightweight Convolutional Neural Network framework for anomaly detection in encrypted network traffic using flow-level statistical features without decrypting packet contents. The framework was evaluated using the CICIDS2017 and UNSW-NB15 benchmark datasets through a preprocessing pipeline involving data cleaning, feature selection, normalization, class balancing, and transformation of flow features into a structured spatial grid. The proposed model integrates CNN-based feature extraction with Focal Loss, Mixup augmentation, dropout, batch normalization, probability calibration, and Integrated Gradients for explainable detection. Results on the CICIDS2017 test dataset showed that XCNN-AD achieved 97.93% precision, recall, and F1-score, with an AUC-ROC of 0.9975 and a false positive rate of 0.42% across 2,522,362 test flows. The model outperformed MLP, LSTM, and Autoencoder baselines, while ablation analysis confirmed the importance of the 2D spatial feature representation, whose removal reduced the F1-score to 94.11%. The framework also demonstrated high computational efficiency, with approximately 186,000 parameters, a 0.7 MB model size, and a throughput of 91,006 flows per second on commodity CPU hardware. Temperature scaling improved model calibration by reducing Expected Calibration Error from 0.065 to 0.012. Overall, XCNN-AD provides an accurate, lightweight, privacy-preserving, and explainable solution for encrypted traffic anomaly detection, although improving cross-dataset generalisation remains an important direction for future research.