CGF-Net: A Multi-View Contrastive Learning Model for Encrypted Traffic Classification

For the task of encrypted traffic classification, existing approaches commonly rely on a single feature view, such as side-channel characteristics or raw packet bytes, often incorporating techniques inspired by natural language processing and computer vision for modeling and classification. In recent years, multi-view learning has gained increasing attention due to its ability to enhance discriminative power and generalization performance by capturing complementary information from different perspectives. However, heterogeneous feature views often exhibit distributional discrepancies, which makes direct multi-view integration difficult. To address this issue, we propose CGF-Net, a multi-view contrastive learning framework for encrypted traffic classification. The proposed model is inspired by cross-modal contrastive learning and employs lightweight adaptation to learn representations from both behavioral and content views. During pre-training, CGF-Net performs instance-level cross-view contrastive learning by treating the behavioral and content views of the same network flow as a positive pair, thereby aligning heterogeneous representations at the flow-instance level. In addition, a lightweight fine-tuning module together with a gating-based fusion mechanism is introduced to improve the collaborative modeling capability of multi-view representations. Extensive experiments on four public datasets show that CGF-Net achieves ACC scores of 95.81%, 93.38%, 96.38%, and 95.72% on CSTNET-TLS1.3, CipherSpectrum, ISCXVPN2016, and ISCXTor2016, respectively. Compared with the best-performing baseline on each dataset, CGF-Net improves the average ACC and F1-score by 0.78 and 0.69 percentage points, respectively, demonstrating the effectiveness of the proposed model.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2026-07-23
DOI
https://doi.org/10.3390/electronics15153249
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
article

CGF-Net: A Multi-View Contrastive Learning Model for Encrypted Traffic Classification

Ning Hu, Y. C. He
Electronics
Internet Traffic Analysis and Secure E-voting
article

CGF-Net: A Multi-View Contrastive Learning Model for Encrypted Traffic Classification

Ning Hu, Y. C. He
article en

Abstract

For the task of encrypted traffic classification, existing approaches commonly rely on a single feature view, such as side-channel characteristics or raw packet bytes, often incorporating techniques inspired by natural language processing and computer vision for modeling and classification. In recent years, multi-view learning has gained increasing attention due to its ability to enhance discriminative power and generalization performance by capturing complementary information from different perspectives. However, heterogeneous feature views often exhibit distributional discrepancies, which makes direct multi-view integration difficult. To address this issue, we propose CGF-Net, a multi-view contrastive learning framework for encrypted traffic classification. The proposed model is inspired by cross-modal contrastive learning and employs lightweight adaptation to learn representations from both behavioral and content views. During pre-training, CGF-Net performs instance-level cross-view contrastive learning by treating the behavioral and content views of the same network flow as a positive pair, thereby aligning heterogeneous representations at the flow-instance level. In addition, a lightweight fine-tuning module together with a gating-based fusion mechanism is introduced to improve the collaborative modeling capability of multi-view representations. Extensive experiments on four public datasets show that CGF-Net achieves ACC scores of 95.81%, 93.38%, 96.38%, and 95.72% on CSTNET-TLS1.3, CipherSpectrum, ISCXVPN2016, and ISCXTor2016, respectively. Compared with the best-performing baseline on each dataset, CGF-Net improves the average ACC and F1-score by 0.78 and 0.69 percentage points, respectively, demonstrating the effectiveness of the proposed model.

ElectronicsVol. 15(15)
Guangzhou University (CN), Peng Cheng Laboratory (CN)
Reduced inequalities
Openalex Percentile: Top 7%
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.