[Paper Review] CGNN: Traffic Classification with Graph Neural Network
This paper proposes CGNN, a graph neural network-based traffic classification method that models packet streams as chained graphs to preserve sequential and causal relationships. By leveraging a simplified graph convolutional network (SGC) on this structure, CGNN achieves 23–29% higher accuracy for application classification and 2–37% improvement for malicious traffic detection, outperforming state-of-the-art deep learning methods on real-world encrypted, normal, and malicious traffic datasets.
Traffic classification associates packet streams with known application labels, which is vital for network security and network management. With the rise of NAT, port dynamics, and encrypted traffic, it is increasingly challenging to obtain unified traffic features for accurate classification. Many state-of-the-art traffic classifiers automatically extract features from the packet stream based on deep learning models such as convolution networks. Unfortunately, the compositional and causal relationships between packets are not well extracted in these deep learning models, which affects both prediction accuracy and generalization on different traffic types. In this paper, we present a chained graph model on the packet stream to keep the chained compositional sequence. Next, we propose CGNN, a graph neural network based traffic classification method, which builds a graph classifier over automatically extracted features over the chained graph. Extensive evaluation over real-world traffic data sets, including normal, encrypted and malicious labels, show that, CGNN improves the prediction accuracy by 23\% to 29\% for application classification, by 2\% to 37\% for malicious traffic classification, and reaches the same accuracy level for encrypted traffic classification. CGNN is quite robust in terms of the recall and precision metrics. We have extensively evaluated the parameter sensitivity of CGNN, which yields optimized parameters that are quite effective for traffic classification.
Motivation & Objective
- Address the challenge of accurately classifying modern network traffic, especially encrypted, NAT-translated, and dynamically ported traffic, where traditional feature engineering fails.
- Overcome the limitations of existing deep learning models that treat traffic as fixed 1D/2D structures, ignoring compositional and causal packet relationships.
- Develop a novel graph-based framework that preserves the linear sequence of packets while enabling end-to-end learning of structural and semantic features for classification.
- Achieve robust performance across diverse traffic types—normal, encrypted, and malicious—without relying on manual statistical features or payload inspection.
- Demonstrate superior generalization and stability in precision and recall metrics compared to existing neural network-based classifiers.
Proposed method
- Construct a chained graph model where each packet is a node and adjacent packets are connected by directed edges, preserving the linear sequence and causal dependencies in traffic flows.
- Apply a simplified graph convolutional network (SGC) to the chained graph, using linear aggregation over neighbors to maintain the sequential structure and avoid non-linear transformations that disrupt chain integrity.
- Use raw packet-level features (e.g., size, direction, timestamp) as input node features, eliminating the need for handcrafted statistical features.
- Train a two-layer SGC model with output dimensions optimized via ablation: 516 and 256 for first and second layers, respectively, achieving peak performance.
- Employ a classification head on the final node representations to predict application or traffic type labels using cross-entropy loss.
- Optimize hyperparameters through extensive sensitivity analysis, identifying robust configurations effective across diverse network environments.
Experimental results
Research questions
- RQ1Can a chained graph representation effectively model the compositional and causal relationships between packets in network traffic flows?
- RQ2Does a graph neural network built on such a chained graph structure improve classification accuracy compared to 1D-CNN or 2D-CNN-based models on real-world traffic?
- RQ3How does CGNN perform on encrypted, malicious, and normal traffic, especially when traditional port- or payload-based methods fail?
- RQ4What is the optimal architecture and hyperparameter configuration for the SGC-based model on chained graphs for traffic classification?
- RQ5To what extent does CGNN generalize across different network environments (e.g., 5G, Wi-Fi, industrial networks) without retraining?
Key findings
- CGNN improves application classification accuracy by 23% to 29% compared to state-of-the-art deep learning models on real-world traffic datasets.
- For malicious traffic detection, CGNN achieves a 2% to 37% improvement in accuracy, demonstrating strong robustness against adversarial and obfuscated traffic.
- CGNN reaches the same level of accuracy as prior models for encrypted traffic, while avoiding reliance on payload inspection or port-based heuristics.
- The model maintains high precision and recall across all traffic types, indicating strong generalization and stability in real-world deployment scenarios.
- The optimal SGC architecture uses 516-dimensional features in the first layer and 256 in the second, which was identified through ablation and sensitivity analysis.
- CGNN outperforms both traditional statistical feature-based methods and end-to-end deep learning models that do not model sequential dependencies, proving the value of structured graph representation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.