Comparative Evaluation of Machine Learning and Deep Learning Models for Flow-Level Multi-Class Darknet Traffic Classification

Encrypted traffic classification is a key problem in network security because encryption and anonymity technologies limit access to packet contents used for monitoring and intrusion detection. This study compares six machine-learning and deep-learning models for classifying Layer 2 darknet traffic, distinguishing among Freenet, I2P, Tor, VPN, and ZeroNet traffic using the SafeSurf dataset. After removing duplicate records and observations with missing or infinite values, the final dataset comprised 75,201 flows described by 79 flow-level features, including port and protocol fields. Random Forest, XGBoost, Multilayer Perceptron (MLP), Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM), and CNN-LSTM models were evaluated using identical stratified training, validation, and test partitions. Source and destination IP addresses and timestamps were excluded to avoid potential collection-specific information leakage. XGBoost achieved the highest test accuracy (94.78%), macro-F1 (0.9440), and Matthews correlation coefficient (MCC; 0.9308), followed by Random Forest (93.50% accuracy, 0.9299 macro-F1, and 0.9136 MCC). MLP achieved 87.74% accuracy, followed by CNN-LSTM (84.84%), CNN (79.16%), and LSTM (77.13%). I2P and Tor were frequently confused, whereas tree-based models classified minority-class VPN traffic effectively. Removing the port fields lowered tree-model accuracy by 1.3 to 1.61 points without changing their ranking. McNemar’s tests on paired test-set predictions showed significant differences (all p < 0.001) for XGBoost versus Random Forest, XGBoost versus MLP, XGBoost versus CNN-LSTM, and MLP versus CNN-LSTM. These findings demonstrate the potential of flow-level features for five-class darknet technology classification, identify persistent classification challenges, and provide a baseline for evaluating generalisation to independent network environments.

Authors

Institutions

Publication Details

Journal
Asian Journal of Research in Computer Science
Published
2026-11-13
DOI
https://doi.org/10.9734/ajrcos/2026/v19i11932
Primary Topic
Internet Traffic Analysis and Secure E-voting
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Comparative Evaluation of Machine Learning and Deep Learning Models for Flow-Level Multi-Class Darknet Traffic Classification

Amar Kumar Mohapatra, Ranga Rao Velamala, Karri Venugopal
Asian Journal of Research in Computer Science
Internet Traffic Analysis and Secure E-voting
article

Comparative Evaluation of Machine Learning and Deep Learning Models for Flow-Level Multi-Class Darknet Traffic Classification

Amar Kumar Mohapatra, Ranga Rao Velamala, Karri Venugopal
article en

Abstract

Encrypted traffic classification is a key problem in network security because encryption and anonymity technologies limit access to packet contents used for monitoring and intrusion detection. This study compares six machine-learning and deep-learning models for classifying Layer 2 darknet traffic, distinguishing among Freenet, I2P, Tor, VPN, and ZeroNet traffic using the SafeSurf dataset. After removing duplicate records and observations with missing or infinite values, the final dataset comprised 75,201 flows described by 79 flow-level features, including port and protocol fields. Random Forest, XGBoost, Multilayer Perceptron (MLP), Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM), and CNN-LSTM models were evaluated using identical stratified training, validation, and test partitions. Source and destination IP addresses and timestamps were excluded to avoid potential collection-specific information leakage. XGBoost achieved the highest test accuracy (94.78%), macro-F1 (0.9440), and Matthews correlation coefficient (MCC; 0.9308), followed by Random Forest (93.50% accuracy, 0.9299 macro-F1, and 0.9136 MCC). MLP achieved 87.74% accuracy, followed by CNN-LSTM (84.84%), CNN (79.16%), and LSTM (77.13%). I2P and Tor were frequently confused, whereas tree-based models classified minority-class VPN traffic effectively. Removing the port fields lowered tree-model accuracy by 1.3 to 1.61 points without changing their ranking. McNemar’s tests on paired test-set predictions showed significant differences (all p < 0.001) for XGBoost versus Random Forest, XGBoost versus MLP, XGBoost versus CNN-LSTM, and MLP versus CNN-LSTM. These findings demonstrate the potential of flow-level features for five-class darknet technology classification, identify persistent classification challenges, and provide a baseline for evaluating generalisation to independent network environments.

Asian Journal of Research in Computer ScienceVol. 19(11)
Naval Science & Technological Laboratory (IN), Indira Gandhi Delhi Technical University for Women (IN), Jawaharlal Nehru Technological University-Gurajada, Vizianagaram (IN), GMR Institute of Technology (IN), GITAM University (IN)
Internet Traffic Analysis and Secure E-voting
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon