Abstract
Encrypted network traffic classification is an important research topic in the field of network security. Although deep learning-based methods have made progress, they still face three main challenges: first, the semantic information in encrypted traffic is inadequately represented, making it difficult for existing methods to effectively capture the hierarchical interaction relationships between packet-level and flow-level features; second, models rely on large amounts of labeled data for supervised training, resulting in high training costs and limited generalization ability in new scenarios; third, in existing self-supervised methods, the functions of the encoder and decoder are coupled, which restricts the full potential of the encoder’s representation learning. To address these issues, this paper proposes an Enhanced Traffic Classifier (ETC) based on self-supervised feature learning. The model first constructs a multi-level interactive traffic representation matrix, converting raw traffic into structured grayscale images that fuse packet-level and flow-level temporal features, thereby addressing the problem of missing semantic information. On this basis, an improved Masked Image Modeling Vision Transformer architecture is adopted. Through a three-stage decoupled design of encoder–regressor–decoder, the encoder focuses solely on feature extraction, the regressor performs masked representation prediction, and the decoder is only responsible for image reconstruction, thereby fully unleashing the encoder’s feature learning capability. Furthermore, during the fine-tuning stage, an Attentive Probing classification mechanism is introduced to replace the traditional linear classification head. By using learnable class query vectors to dynamically focus on semantic regions relevant to the classification target, the model’s recognition accuracy and robustness are further improved. Experiments are conducted on five public datasets, including USTC-TFC2016 and CICIoT2022, as well as a self-built Human-Internet dataset. The results show that ETC significantly outperforms mainstream methods such as YaTC and ET-BERT in core metrics including accuracy and F1-score, while also demonstrating strong generalization in few-shot scenarios.
1. Introduction
The rapid development and widespread application of the Internet have inevitably led to a continuous surge in network traffic [1]. Among the key challenges in current network management and optimization, effectively analyzing and utilizing massive traffic is crucial. With the increasing demand for privacy protection, various encryption protocols are now widely applied in network communications [2], resulting in a significant rise in the proportion of encrypted traffic in communication networks. Although encryption enhances communication confidentiality, it also poses serious challenges for network supervision, making it increasingly difficult to capture and identify malicious activities [3]. Therefore, how to efficiently and accurately classify encrypted network traffic has become a core problem in network security [4].
Traditional encrypted traffic identification methods mainly fall into three categories: port-based mapping [5], deep packet inspection (DPI) [6], and machine learning methods based on statistical features [7]. Port-based methods are simple to implement but are easily affected by dynamic ports, port hiding, or abuse, leading to poor identification performance. DPI methods achieve high accuracy by matching payload rule databases but require continuous rule updates, incur high system overhead, and carry risks of user privacy leakage. Machine learning methods based on statistical features, such as Random Forest [8], can circumvent issues like port inconsistency and dynamic port allocation, but their performance heavily relies on expert experience for feature selection and suffers from drawbacks such as high resource consumption and poor real-time performance [9], resulting in limited model generalization. With the increasing complexity and continuous evolution of encryption technologies such as VPN, SSL, and VoIP [2], the limitations of these traditional methods are becoming more pronounced.
In recent years, data-driven deep learning methods have shown great potential in the field of encrypted traffic identification. Convolutional Neural Networks (CNNs) can automatically extract spatial features from raw traffic bytes, treating them as images for processing; Recurrent Neural Networks (RNNs) and their combinations with CNNs, such as TSCRNN [10], attempt to capture temporal dependencies in traffic. While these methods have achieved certain results, significant shortcomings remain: (1) CNN methods are easily dominated by long packet bytes, causing important information from other packets to be drowned out; (2) existing models mostly ignore the hierarchical interaction relationships between packet-level and flow-level features; (3) most critically, they heavily rely on large amounts of labeled data for supervised training. In real network environments, collecting and labeling sufficient, real encrypted traffic samples is time-consuming and labor-intensive, and it is difficult to cover continuously emerging new applications and attack patterns. When facing new tasks, models often need to be redesigned or retrained [11], leading to weak generalization ability and high update costs.
To reduce dependence on labeled data, the self-supervised learning paradigm leverages large amounts of unlabeled data for pre-training and has achieved revolutionary breakthroughs in natural language processing [12,13] and computer vision [14]. In the field of encrypted traffic identification, researchers have drawn inspiration from BERT [13] to propose methods such as ET-BERT [15], treating packet bytes as words for pre-training. However, traffic bytes lack explicit high-level semantic units like natural language, raising questions about the rationality of this NLP transfer strategy [16]. Recently, YaTC [16] drew on the computer vision paradigm of Masked Autoencoders (MAE) [17], proposing a Multi-level Flow Representation (MFR) matrix to model raw traffic and constructing a Transformer model with packet-level and flow-level attention mechanisms, achieving significant progress in reducing the need for labeled data. Nevertheless, existing MAE-based methods like YaTC still face core bottlenecks: (1) After pre-training, directly using a linear classification head on the encoder output makes it difficult to accurately capture semantic information strongly related to the classification target, as the global representations extracted by the encoder may contain a large amount of irrelevant background information; (2) In their encoder-decoder architecture, the decoder also participates in feature learning during the reconstruction of masked images (i.e., traffic representation matrices), meaning that during downstream task fine-tuning, only the representations learned by the encoder are utilized, while the potentially high-quality representations in the decoder are discarded, failing to fully exploit the encoder’s feature extraction potential [18].
To address the above problems, this paper proposes an Enhanced Traffic Classifier (ETC) based on self-supervised feature learning, building upon MAE with the following improvements to the Vision Transformer architecture:
- Role Decoupling: Strictly separate the functions of the encoder and decoder. The encoder focuses solely on feature extraction, i.e., representation learning; the decoder is only responsible for the pre-training proxy task, i.e., image reconstruction. By introducing a Latent Contextual Regressor module for Masked Representation Modeling, the encoder is tasked with predicting the features of masked regions (Masked Patches), while the decoder performs pixel-level reconstruction based only on the representations provided by the encoder. This mechanism is complemented by a feature Alignment Constraint to ensure consistency between the regressor’s predictions and the encoder’s encodings, thoroughly unleashing the encoder’s feature learning potential and significantly improving the quality of pre-trained representations.
- Attentive Probing Classification Mechanism: For downstream classification tasks, the limited-effectiveness linear classification head (Linear Probing) is discarded. Instead, learnable Class Tokens and a Cross-Attention module are introduced between the encoder output and the final classification layer. This module uses the Class Token as the Query and the global representations from the encoder output as the Key/Value, dynamically focusing on semantic regions strongly related to the classification target, significantly enhancing the model’s recognition accuracy and robustness.
The core contribution of ETC lies in the improved Masked Image Modeling (MIM) Vision Transformer (ViT) architecture and the decoupled learning strategy. First, the ETC model is pre-trained on large-scale unlabeled encrypted traffic data to learn generic low-level traffic feature representations, greatly reducing dependence on manual labeling. Subsequently, only a small amount of labeled data is needed to fine-tune the pre-trained encoder combined with the Attentive Probing module, enabling efficient adaptation to specific scenarios such as malicious traffic detection and application identification, demonstrating powerful encrypted traffic identification capability and excellent cross-scenario generalization performance. During fine-tuning, since the pre-training stage is independent of any specific task or label, the representations obtained from the ETC model are considered unbiased, as they are learned solely from raw data without any task-specific bias.
We conducted comprehensive experiments on five public datasets, including USTC-TFC2016 [19] and CICIoT2022 [20], as well as a self-built Human-Internet dataset. The results show that the ETC model significantly outperforms existing mainstream methods (such as YaTC and ET-BERT) in core metrics like accuracy and F1-score. Particularly in different traffic classification scenarios, its generalization ability improvement is even more significant, validating the effectiveness and advancement of the proposed method.
2. Related Work
2.1. ML-Based Encrypted Traffic Classification
Machine learning-based encrypted traffic classification techniques utilize manually designed features for classification [21], typically leveraging statistical information of traffic flows to achieve high identification rates. Chandrasekhar et al. [22] combined Fuzzy C-Means clustering, Artificial Neural Networks (ANN), and SVM methods, achieving good results on multiple datasets, but their approach performed poorly when detecting anomalies in real-world networks. Taylor [23] proposed AppScanner, which uses Random Forest to analyze statistical features (such as packet sizes and inter-arrival times) of traffic generated by different applications. However, this feature selection heavily relies on expert experience and struggles to capture complex nonlinear relationships. Lashkari et al. [8] used manually designed time-related features and a Random Forest algorithm on the Tor-non-Tor dataset, achieving high real-time performance but with limited accuracy.
In recent years, although machine learning-based traffic classification methods have made significant research progress in traffic anomaly detection and encrypted traffic classification, overcoming some limitations of traditional methods, they largely depend on feature engineering and the choice of classification algorithm. Manual feature design is excessively reliant on expert knowledge, making it tedious and time-consuming [24]. Furthermore, with the increasing complexity of network traffic, new traffic types often require redesigning feature engineering, limiting the generalizability of machine learning methods [25].
2.2. DL-Based Encrypted Traffic Classification
Deep learning addresses the bottleneck of manual design through end-to-end feature learning. Some existing deep learning methods directly use packet bytes within a flow to represent raw traffic, employing spatial feature modeling approaches [19] to convert raw traffic bytes into grayscale images and utilizing Convolutional Neural Networks (CNNs) to extract spatial features. However, such methods ignore the inherent temporal dependencies within traffic and are susceptible to the “long-packet dominance” problem, where key information from other packets is overwhelmed by long-byte packets. Temporal feature modeling methods, such as TSCRNN [10], combine CNNs with Recurrent Neural Networks (RNNs) to learn temporal features from time-related packets. While partially mitigating the limitations of spatial modeling, they still fail to resolve the issue of long packets overwhelming critical information.
Currently, deep learning-based models demonstrate outstanding performance in encrypted traffic classification tasks. Sequence models such as Transformers directly applied to byte streams or packet sequences can capture the one-dimensional temporal dependencies of traffic, but they struggle to model the inherent hierarchical interaction relationships of encrypted traffic across byte-level, packet-level, and flow-level granularities, and remain prone to the “long-packet dominance” problem where key information from short control packets is overwhelmed by long payload sequences. Meanwhile, these sequence models treat traffic bytes as discrete semantic tokens analogous to natural language, while encrypted traffic lacks explicit high-level semantic units, leading to unreasonable semantic modeling and limited representation learning effects.
To capture hierarchical traffic structure, Qu et al. [26] proposed an input-agnostic framework that explicitly models the “packet-flow-trace” hierarchy through bottom-up abstraction. However, this approach relies on supervised learning with large amounts of labeled data and cannot leverage unlabeled traffic for representation learning. Similarly, Fauvel et al. [27] introduced LEXNet, a lightweight and explainable CNN that achieves fast inference with limited computational resources. Yet its input is limited to packet-size and direction sequences, which fails to capture the rich information embedded in raw packet bytes.
Despite these advances, most deep learning models still depend heavily on large-scale labeled datasets and struggle to generalize to new scenarios without retraining. To address the open-world challenge, Zhang et al. [28] proposed an autonomous framework that enables classifiers to filter and label packets from unknown applications. Nevertheless, their method does not incorporate pre-training to learn transferable representations, limiting its sample efficiency and generalization capability. Furthermore, obtaining high-quality, large-scale labeled traffic data is increasingly difficult as networks continue to evolve.
2.3. Self-Supervised Learning in Traffic Classification
In recent years, model pre-training methods based on large-scale unlabeled data have demonstrated outstanding performance in computer vision [17] and natural language processing (NLP) [13] tasks. Pre-training methods significantly reduce dependence on labeled data through self-supervised learning. Self-supervised learning first learns unbiased data feature representations autonomously from vast amounts of unlabeled traffic data and subsequently fine-tunes the model with a small amount of labeled data to accomplish corresponding downstream tasks. This paradigm has also proven effective in other spatiotemporal domains. For instance, in intelligent transportation systems, JointSTNet [29] leverages a joint pre-training framework to capture complex spatial-temporal dependencies for traffic forecasting, demonstrating the broad applicability of pre-training for learning robust representations from spatiotemporal data.
In the traffic classification domain, converting traffic into word vectors or visual images, thereby transforming the problem into NLP or CV tasks, has achieved better results. ET-BERT [15] pioneered treating packet bytes as words and adopted the BERT architecture for pre-training. Its drawback, however, lies in the fact that traffic bytes lack explicit semantic units present in natural language, casting doubt on the rationality of such semantic modeling [16]. EAPT [30] proposed adversarial pre-training of Transformers to reduce data requirements but relied on complex traffic tokenization strategies and failed to model hierarchical feature interactions.
MAE [17] learns robust representations in computer vision through masked image reconstruction, and its asymmetric architecture provides new ideas for traffic classification tasks. YaTC [16] successfully migrated this framework to the traffic classification domain, designing an MFR matrix and a dual-attention Transformer model for effective representation and feature extraction of encrypted traffic, surpassing traditional methods on multiple datasets. Similarly, Hang et al. [31] proposed Flow-MAE, which applies the MAE paradigm to malicious traffic classification using burst representation and patch embedding to handle extensive traffic lengths.
Although YaTC [16] innovatively proposed a Multi-level Flow Representation matrix fusing packet-level and flow-level information, its architecture still suffers from two major defects: its MAE-based self-supervised learning approach allows the Decoder to participate in traffic feature learning during masked image reconstruction, thereby inhibiting the learning potential of the Encoder. Since downstream tasks can only utilize representations learned by the Encoder, the feature potential of the Encoder is not fully unleashed [18]. Furthermore, existing methods commonly employ linear classification heads for direct classification of pre-trained representations, making it difficult to focus on target-relevant semantic regions from global information [18], which constrains the improvement of classification accuracy.
3. Methodology
The designed ETC model structure is shown in Figure 1. The model follows a “pre-training and fine-tuning” two-stage pipeline, with improvements made to both stages. The core lies in enhancing the representation and classification capabilities for encrypted traffic through structural decoupling and hierarchical attention mechanisms. The model core consists of two main modules: The upper part is the pre-training stage, which constructs a three-stage decoupled architecture of Encoder-Regressor-Decoder. It employs an improved Masked Image Modeling (MIM) strategy for self-supervised learning. Raw traffic is converted into multi-level flow feature grayscale images. After random masking, the visible parts are processed by the Encoder for feature extraction. The introduced Regressor predicts the content of the masked regions based on these features, and a parameter copy operation replicates the encoder parameters and forwards the original pixels of masked patches to generate alignment targets. Through a representation alignment mechanism, the Encoder is compelled to take on the full responsibility of feature learning. The Decoder then performs pixel reconstruction based solely on the predicted content. The core of this stage is to achieve task decoupling between “feature learning” and “image reconstruction,” ensuring that the responsibility for feature learning rests entirely with the Encoder, thereby fully unleashing its representational potential. The lower part is the fine-tuning stage, which employs a supervised learning strategy. The Decoder and Regressor are discarded, and the pre-trained Encoder is retained via parameter copying as the feature extraction backbone. First, packet-level features are extracted through a Packet-Level Attention module. Then, a Row Pooling operation compresses the two-dimensional features of each packet into a series of row vectors, aiming to reduce dimensionality while structurally preserving the sequential information of bytes within the packet. Subsequently, these row vectors are aggregated by a Flow-Level Attention module to capture temporal dependencies between packets. Finally, an Attentive Probing mechanism replaces the traditional linear classification head. Using learnable Class Tokens as queries, it dynamically focuses on the semantic information most relevant to classification from the Encoder’s output. Thus, only a small amount of labeled data is required to achieve high-accuracy, strongly generalized traffic classification. The following sections will elaborate on the core modules and working principles of each stage.
Figure 1.
ETC model structure.
3.1. Data Preprocessing
To convert raw encrypted traffic data into sequences comprehensible by the ETC model, traffic preprocessing from PCAP files is divided into two parts: traffic split and multi-level flow feature grayscale image conversion.
3.1.1. Traffic Segmentation
Considering that application-layer semantics in encrypted traffic are often implied within bidirectional interaction patterns (e.g., request/response), the ETC model adopts a session-based traffic segmentation strategy. This divides continuous raw network capture data (in PCAP format) into discrete, semantically meaningful units.
Specifically, given a raw traffic capture file, the set of packets it contains is denoted as . Each packet contains its core metadata: the quintuple (source IP address, destination IP address, transport layer protocol type, source port number, destination port number), packet size (in bytes), and transmission start timestamp . A session S is defined as the sequence of all bidirectional packets sharing the same quintuple x, sorted in ascending order of timestamp . This session-level segmentation defines the basic unit of our image representation: each session corresponds to one independent grayscale matrix, and the timestamp-based sorting strictly preserves the inter-packet temporal ordering of the communication. This means a session fully captures one complete bidirectional communication process between a client and a server, containing the interactive context. Compared to unidirectional flows, session-level segmentation better reflects the communication semantics of real applications (e.g., web request/response, login handshake processes), providing a foundation for the model to learn richer interaction patterns.
Training directly on raw traffic data would introduce irrelevant feature bias and pose user privacy leakage risks, impairing the model’s generalization capability. Therefore, after segmenting the session flows, a strict privacy protection and anonymization processing strategy is applied. (1) Stripping Data Link Layer Information: Information such as Ethernet frame headers is removed, retaining only IP layer and higher-layer packet content to eliminate features irrelevant to specific physical network interfaces. (2) Port Anonymization: The source and destination port numbers in packets are uniformly set to zero, i.e., . This effectively reduces the model’s reliance on specific port numbers (even dynamic ones), forcing it to focus more on the payload content and interaction patterns themselves. (3) IP Address Anonymization: The real source IP () and destination IP () in packets are replaced with randomly generated IP addresses. To ensure that within the same session S, the same original IP pair is mapped to the same random IP pair while strictly preserving the original communication direction. This removes device- or user-specific identifiers while completely retaining the internal communication direction and logical relationships within the session.
This session-level segmentation combined with meticulous anonymization offers significant advantages: On one hand, it captures the key temporal features of bidirectional interactions (request packets, response packets, and their sequence), aligning more closely with the actual behavior of application-layer protocols and solving the problem of lost semantic context inherent in traditional unidirectional flow segmentation. On the other hand, the anonymization operation greatly eliminates non-essential device and network environment features (specific MAC/IP/port), significantly enhancing the model’s generalization ability when facing different network deployments and unknown endpoints.
3.1.2. Multi-Level Flow Feature Grayscale Image Conversion
To process raw encrypted traffic data into a visual image form understandable by the ETC model, a Multi-level Flow Feature Grayscale Image conversion operation is performed on the PCAP file. By hierarchically organizing the traffic data, the preprocessed session flows (detailed in Section 3.1.1) are transformed into fixed-size two-dimensional grayscale matrices, serving as the input to the ETC model. The conversion process is illustrated in Figure 2: First, for each session flow among the anonymized session flows produced by Traffic Segmentation, the first 5 consecutive packets are extracted. If the number of packets is insufficient, zero-padding is applied. Each packet is further split into two parts: the IP layer and above header and the payload. The header information (including IP, TCP/UDP headers) is uniformly truncated or padded to 80 bytes (160 hexadecimal characters), while the payload part is processed into 240 bytes (480 hexadecimal characters), which are used to form the Packet-Level Matrix. This standardized truncation/padding strategy addresses packet size variation, ensuring balanced feature space for each packet, while the packet size information is implicitly encoded in the byte distribution and padding positions. This ensures strictly limited representation space for each packet within the matrix, preventing long packets from dominating the overall features.
Figure 2.
Traffic Conversion Flowchart.
Subsequently, the headers and payloads of each packet are concatenated according to the communication sequence for Flow-Level Stacking, forming the Multi-level Flow Representation matrix (MFR Matrix). This creates a continuous flow sequence of 1600 bytes (5 packets × 320 bytes). This sequence is parsed byte-by-byte into integer values from 0 to 255 (corresponding to grayscale image pixel intensity) and reshaped into a 40 × 40 two-dimensional matrix. The matrix’s row–column structure explicitly encodes three levels of features, with strict mapping of temporal information to spatial dimensions: At the byte-level dimension, each pixel point precisely corresponds to the single-byte value of the original traffic, and the column order strictly follows the intra-packet byte transmission sequence, preserving the underlying byte distribution characteristics. At the packet-level dimension, each data packet occupies 8 consecutive rows of the matrix (2 header rows + 6 payload rows) in the order of header followed by payload, completely retaining the structural information of the packet header and payload. At the flow-level dimension, the 5 data packets are vertically stacked in strict chronological order of transmission, forming a complete 40-row flow representation that explicitly encodes inter-packet temporal dependencies and effectively captures the interaction patterns and temporal features of the bidirectional session.
This design aims to address the triple limitations of traditional traffic representation: Firstly, by rigidly separating the header (80 B) and payload (240 B), it prevents the first long packet from overwhelming subsequent critical control packets (e.g., TCP SYN/ACK), ensuring balanced expression of features from all packets. Secondly, the hierarchical organization explicitly preserves the communication semantic hierarchy of “byte → packet → flow,” addressing the inherent challenge of ambiguous semantic units in encrypted traffic. Thirdly, the standardized 40 × 40 size and 0–255-pixel value range perfectly match the Vision Transformer architecture, providing structured input for the masked image reconstruction task. The final generated grayscale matrix can be formally expressed as Formula (1):
where denotes the truncation/padding operation of length L, R is the reshaping function, and ⊕ is the byte concatenation operation. Notably, this structured spatial mapping does not introduce artificial irrelevant spatial relationships; instead, it strictly maps the inherent sequential and hierarchical structure of traffic to the image’s spatial dimensions: the horizontal dimension corresponds to the intra-packet byte transmission sequence, the vertical dimension corresponds to the inter-packet transmission chronological order, and the block structure strictly aligns with the hierarchical boundaries of headers, payloads, and individual packets. Compared to sequence models directly applied to unstructured byte streams or packet sequences, this structured image representation provides a more efficient carrier for the model to capture multi-granularity hierarchical interaction features, and is more compatible with the masked image modeling self-supervised pre-training paradigm, which achieves superior representation learning effects on encrypted traffic without explicit semantic units. This structured representation provides a discriminative, semantically intact input foundation for subsequent self-supervised pre-training.
3.2. Model Pre-Training Architecture
Most existing self-supervised learning models for traffic classification are based on the Masked Autoencoder (MAE), which employs Masked Image Modeling (MIM) to reconstruct traffic grayscale images. During pre-training, the MAE’s encoder is solely responsible for representation learning on visible patches, while the decoder takes both visible and masked patches as input to perform the masked image reconstruction task, predicting the pixel values of the masked patches. After pre-training, only the Encoder is retained for downstream task fine-tuning. Therefore, fully unleashing the potential of the Encoder to learn high-quality representations during pre-training is crucial. However, the MAE-based masked image reconstruction pre-training method suffers from two drawbacks: First, MAE employs an encoder-decoder architecture. During pre-training, the Encoder only learns representations for a small subset of visible patches. Because the proportion of visible patches is small, the representations the Encoder can learn are limited. Simultaneously, the MAE Decoder also alters the representations of the visible patches, and it uses these altered representations of visible regions to predict the representations of the masked regions. This means that while completing the pre-training proxy task, the Decoder also optimizes the encoded representations output by the Encoder, taking on part of the representation learning responsibility. Since only the Encoder is retained for downstream fine-tuning, the semantic information learned by the Decoder is completely discarded, leaving the Encoder unable to fully learn complete and discriminative traffic features. Consequently, MAE-based pre-training methods do not fully exploit the potential of the encoder, limiting the quality of pre-trained representations and the model’s downstream performance.
To address the above issues, our model structure strictly decouples the functional roles of the Encoder, Regressor and Decoder through a three-stage encoder–regressor–decoder architecture, which improves representation quality by centralizing all semantic representation learning responsibilities on the Encoder, enforcing latent feature space consistency, and isolating the pixel reconstruction task from high-level semantic feature learning. We avoid letting components other than the Encoder undertake core traffic semantic feature learning, encouraging the Encoder to fully mine the underlying semantic patterns of encrypted traffic and extract more high-quality, generalizable semantic information for downstream tasks. Our method introduces an additional pre-training task of masked representation prediction in the latent feature space, and achieves strict role separation: the Encoder is solely responsible for generic traffic feature extraction and representation learning, the Regressor only performs masked latent feature prediction based on the Encoder’s output, and the Decoder is limited to pixel-level image reconstruction, with the aim of fully delegating the responsibility of feature extraction to the Encoder.
The model structure is shown in Figure 3, adopting a three-stage decoupled architecture of Encoder-Regressor-Decoder. This architecture strictly delineates the functions of each module: the Encoder focuses on feature extraction, the Regressor is responsible for masked representation prediction, and the Decoder performs only the image reconstruction task. Through the masked representation prediction task and the representation alignment mechanism, the Encoder is compelled to take on the full responsibility of feature learning, thereby fully unleashing its representation learning potential and enhancing the quality of feature extraction during the pre-training stage. The following sections will detail the structure and principles of each module in conjunction with Figure 3.
Figure 3.
Pretrained Model Architecture.
3.2.1. Embedding Module
Based on the characteristics of traffic, a traffic embedding module is designed to transform traffic grayscale images as input for the ETC traffic classification model. For downstream traffic classification tasks after pre-training, the multi-level flow feature grayscale image matrix is divided into two-dimensional patches of size P × P, with a total number of , resulting in . These patches are then linearly projected into d-dimensional vectors via a linear layer to serve as patch embedding vectors. Simultaneously, position embedding vectors are added to the patch embedding vectors to form the input for the Encoder module of the ETC traffic classification model. The calculation is shown in Formula (2):
where denotes the linear projection matrix, and denotes the position embedding matrix. We set D = 192, P = 2, yielding N = 20 × 20 = 400. This ensures that all pixels within one patch represent the same type of raw bytes. Since a traffic grayscale image matrix consists of 5 stacked data packets at the flow level, each packet-level matrix contains one row of header patches and three rows of payload patches. This provides structured input for the efficient packet-level and flow-level hierarchical attention mechanisms in the subsequent fine-tuning stage. The packet-level attention mechanism focuses on packet-level feature extraction. After processing by the packet-level attention module, the flow-level attention module learns relationships between packets to extract flow-level information features between row patches, thereby encouraging the model to better extract packet-level and flow-level features from the traffic data. The packet-level and flow-level attention modules will be detailed in the fine-tuning stage.
During the pre-training stage, the traffic grayscale image is randomly masked and divided into two groups of patches: visible patches and masked patches. The visible patches are used as model input. After embedding the visible patches, they are fed into the encoder for feature extraction.
3.2.2. Encoder
The ETC Encoder adopts the Vision Transformer structure. After embedding, the visible patches are fed into a stack of consecutive Transformer Blocks, responsible for learning the representations of the visible patches. The specific structure of the Encoder is shown in Figure 4. The sequence of visible patches processed by the embedding module first has positional encodings added and is then input into an encoder composed of multiple stacked Transformer blocks. Each Transformer block contains a Multi-head Self-Attention (MSA) layer and a Feed Forward Network (FFN), supplemented with Layer Normalization and Residual Connections to stabilize training and enhance feature representation capability. In the self-attention mechanism, each visible patch dynamically aggregates global contextual information by calculating relevance weights with all other visible patches, thereby capturing intra-packet and inter-packet dependencies. Like MAE, ETC’s Encoder encodes the visible patches and passes them to subsequent modules. However, the ETC Encoder also encodes the original image content of the masked patches before they were masked. The encoded result serves as the reference target for the subsequent regressor layer’s estimation of masked token representations, thereby aligning the features extracted by the regressor with those of the Encoder.
Figure 4.
ETC Encoder Structure.
3.2.3. Regressor
In the pre-training architecture of the ETC model, the Regressor module serves as the core component connecting the Encoder and Decoder. Its design is inspired by the masked representation prediction mechanism of CAE [18] (Context Autoencoder), aiming to thoroughly decouple the responsibility allocation between feature learning and reconstruction tasks. Its module structure is shown in Figure 5. The core function of this module is to predict the latent semantic features of the masked patches based on the representations of the visible patches, while ensuring the Encoder fully assumes the responsibility of feature extraction through strict representation alignment constraints. The module employs a multi-head cross-attention (Cross-Attention) structure, consisting of multiple stacked Transformer blocks. Each block contains a cross-attention layer and a Feed Forward Network (FFN), and does not include a self-attention layer. It achieves feature inference for masked regions by progressively aggregating contextual semantics.
Figure 5.
ETC Regressor Structure.
The input to the Regressor consists of two key parts: First, the set of visible patch representations output by the Encoder: , where z_(v_i)∈R^D is the feature vector of the i visible patch, and D is the feature dimension. It is concatenated with the output from the previous cross-attention layer as input (for the first cross-attention layer, it is concatenated with the mask query vectors to form Q_m). Second, the initialized mask query vectors , where is the initial feature representation of the j masked patch. This vector is a learnable parameter, shared with the same initial distribution across all masked regions. The cross-attention computation process for its l layer is shown in Formula (3).
where , , , [;] denotes the concatenation operation. When , , is the scaling factor to avoid gradient vanishing, and the softmax function ensures weight normalization. This process allows the mask query vectors to adaptively focus on the visible region features strongly correlated with the masked patches (such as byte distributions of adjacent packets, temporal patterns in session interactions), achieving accurate semantic information transfer. The computation process incorporates the positional encoding P_m of the masked patches. By embedding positional information into the feature vectors, the model’s ability to model the temporal structure of traffic data is enhanced, ensuring the prediction results conform to the transmission order characteristics of data packets.
After iterative updates through multiple layers of cross-attention, the Regressor outputs the optimized masked patch representations , Only this result is passed to the Decoder for the masked image reconstruction task. The visible patch representations generated by the Encoder are strictly confined within the Regressor and do not directly participate in the Decoder’s computation flow. This design structurally severs the Decoder’s access to the original visible features, forcing the Decoder to rely solely on the masked representations output by the Regressor to complete reconstruction. This thoroughly prevents the Decoder from participating in the feature learning process, ensuring the Encoder can focus on mining the underlying semantics of the traffic data (such as the association patterns between packet-level and flow-level features in encrypted traffic).
Compared to traditional architectures like MAE, where the Decoder simultaneously participates in feature adjustment, the advantages of this Regressor are reflected in three aspects: Firstly, it unleashes the Encoder’s potential for feature learning through functional isolation, enabling it to deeply mine the underlying structure of traffic data. Secondly, leveraging the contextual aggregation capability of cross-attention enhances the accuracy of semantic inference for masked regions, which is particularly suitable for scenarios where semantic information is fragmented in encrypted traffic. Furthermore, through positional encoding and representation alignment mechanisms, the Regressor ensures that the predicted features not only conform to the temporal characteristics of the flow but are also consistent with the original feature space, providing high-quality foundational representations for downstream classification tasks. These characteristics collectively enhance the model’s generalization ability in few-shot scenarios, allowing it to maintain excellent classification performance even with limited labeled data.
3.2.4. Decoder
As the final module of the pre-training architecture, the Decoder is solely responsible for the reconstruction task of the masked patches and does not participate in feature extraction or representation learning. The model structure is shown in Figure 6. Its core consists of stacked Transformer blocks, each containing a Self-Attention layer and a Feed Forward Network (FFN). Its input is the latent representation of the masked patches predicted by the Regressor and their corresponding positional embeddings, completely isolating information from the visible patches—meaning it does not receive the visible patch representations output by the Encoder. It models context within the masked patches through the self-attention mechanism and performs nonlinear transformations via the feedforward network. Finally, a linear projection layer maps the decoded high-level semantic representations back to the original pixel space, outputting the reconstructed grayscale values of the masked patches to complete the masked image reconstruction task for the multi-level traffic feature grayscale image.
Figure 6.
ETC Decoder Structure.
This design achieves strict functional decoupling. The Decoder performs pixel-level reconstruction based solely on the semantic representations provided by the Regressor, avoiding interference with the feature representations learned by the Encoder during reconstruction or taking on learning responsibilities that should belong to the Encoder. After pre-training is complete, the Decoder is discarded during the fine-tuning stage, and only the Encoder is retained as the feature extraction backbone for downstream classification tasks.
3.2.5. Latent Representation Alignment
Latent Representation Alignment is the core mechanism for enforcing our decoupling design, which ensures that the full responsibility of feature learning is entirely borne by the Encoder, while improving the consistency, completeness and discriminability of the learned representations. Its core idea is to enforce consistency in the feature space between the masked patch representations predicted by the regressor and the true representations directly generated by the encoder for the masked patches. This compels the encoder to learn more discriminative low-level traffic features. This mechanism addresses the issue in existing methods like YaTC, where the Decoder’s participation in feature learning prevents the encoder’s potential from being fully unleashed.
The alignment operation consists of two parts: true representation generation and predicted representation alignment. First, the original content of the masked regions (i.e., the unmasked content of the masked patches ) is fed into the encoder F to generate the true representations . This process requires stopping gradient backpropagation (Stop Gradient, sg[∙]) to prevent the encoder from being disturbed by the reconstruction task, which could interfere with its representation learning objective. Second, the Regressor predicts the masked patch representations based on the visible patch representations and minimizes the alignment loss to force to approximate .
Through explicit alignment constraints, the alignment mechanism ensures that the feature space output by the encoder has high consistency, placing and in the same semantic space. The regressor then acts solely as a predictor for masked representations and no longer undertakes the function of feature learning. Meanwhile, the encoder must generate high-quality representations to meet the alignment requirements, thereby fully unleashing its feature extraction potential.
3.2.6. Loss Function
The loss function consists of two parts: the pixel reconstruction loss for the masked image patches and the alignment loss for masked patch representation prediction , as shown in Formula (4):
Here, represents the true pixel values of the masked patches, represents the reconstructed pixel values of the masked patches, and is the weight parameter assigned to . Both and use the Mean Squared Error (MSE) loss function. In experiments, the value of is typically set to 1.
This dual-loss design enables the ETC model to optimize two objectives simultaneously during the pre-training stage: on one hand, the reconstruction loss ensures the model’s comprehensive understanding of the traffic data; on the other hand, the alignment loss forces the Encoder to assume full responsibility for feature learning, fully unleashing its representation learning potential.
3.3. Model Fine-Tuning Architecture
3.3.1. Encoder
During the fine-tuning stage, we discard the Decoder and Regressor modules used in pre-training, retaining only the Encoder as the feature extractor. This Encoder has already learned rich low-level traffic features through the masked representation prediction and reconstruction tasks on a large amount of unlabeled traffic data. The specific structure is shown in Figure 7. The pre-trained Encoder is retained as the feature extraction backbone, serving as both the packet-level attention module and the flow-level attention module. The patch representations output by the Encoder are first grouped by data packets. They undergo intra-packet local feature interaction via the packet-level attention module and are compressed into row-level features through row pooling. Subsequently, potential flow-level features are extracted through the flow-level attention module and column pooling. This design enables ETC to fully integrate the generic features learned during pre-training with the hierarchical semantics required for downstream tasks, achieving high-precision, strongly generalized traffic classification with only a small amount of labeled data.
Figure 7.
Model Architecture Diagram for the Fine-tuning Stage.
Specifically, in the model’s processing flow, the patch mapping vectors obtained from the Embedding Module are used as model input. To fully explore the hierarchical features within and between packets in the traffic data, we introduce a packet-level attention module and a flow-level attention module after the Encoder, forming a two-level feature extraction mechanism. Their processing flow and functions are as follows:
The packet-level attention module focuses on information interaction at the packet level, responsible for fine-grained feature interaction and extraction within each data packet. Its purpose is to primarily learn the dependencies between header patches and payload patches within a data packet. Therefore, the packet-level attention module only performs multi-head self-attention calculations on patches belonging to the same data packet. That is, all patch representations output by the Encoder are grouped according to the data packet they belong to, with each group corresponding to a complete data packet, including the header and payload parts. Within each packet, we apply a multi-head self-attention mechanism (Multi-Head Self-Attention, MSA) to perform local feature learning on the patches belonging to that packet. The experiment uses 16 parallel attention heads. The computation process is shown in Formula (5):
For the set of patch representations within the k-th packet, the query , key , the value vectors are generated through learnable weight matrices , , , respectively. Attention weights are then calculated. Compared to the global attention algorithm with time complexity , this algorithm has lower time complexity , where M is the number of packets.
The flow-level attention module aims to capture the temporal and interactive features between different data packets across the entire session flow. After packet-level attention extracts the internal features of each packet, we first perform a row pooling operation on the output patch representations of each packet, compressing each packet into several row-level feature vectors (each row corresponds to a type of byte information, such as header rows or payload rows). Specifically, mean pooling is performed on all patches of each packet row-wise to generate row-level representations . is the packet-level feature output by the packet-level attention module, and .
Subsequently, the row-level representations of all packets are concatenated in chronological order to form a flow-level representation sequence, which is then input to another set of multi-head self-attention layers. This module takes the entire flow as context, computing global dependencies between different packet rows, thereby capturing flow-level features such as request-response patterns and inter-packet temporal dynamics in bidirectional sessions. The time complexity at this stage is only .
In the fine-tuning stage, both the packet-level attention module and the flow-level attention module in ETC adopt a 4-layer Transformer block design. Inspired by YaTC, a parameter sharing mechanism is introduced. This design allows the two modules to share the same Transformer parameter weights, significantly improving model efficiency while maintaining feature extraction capability: on one hand, parameter sharing reduces the total number of model parameters by approximately 50%, effectively mitigating the risk of overfitting in few-shot scenarios. On the other hand, packet-level and flow-level feature extraction occur in a unified semantic space, ensuring consistency in hierarchical feature representation. Simultaneously, weight reuse reduces computational complexity and memory usage, providing better deployment feasibility for the model in resource-constrained edge environments.
3.3.2. Attentive Probing
The linear classification head merely applies a simple linear transformation or mean pooling to the global representations output by the Encoder. It is essentially a static, undifferentiated way of utilizing features, assuming that all feature regions contribute equally to the classification task. However, in encrypted traffic classification tasks, critical discriminative semantics (such as handshake packets of specific protocols, application-layer interaction patterns) are often concealed only in localized regions or individual data packets of the traffic. Global pooling operations can easily dilute these subtle yet crucial signals with a large amount of irrelevant byte background information.
To overcome this limitation, ETC introduces an Attentive Probing mechanism with a learnable multi-head cross-attention module between the Encoder output and the final classification layer, as indicated in Figure 7. We first provide the formal mathematical description of this mechanism, then elaborate on its implementation and technical advantages.
Formally, let the output of the pre-trained Encoder for an input multi-level flow representation matrix be a sequence of patch features , where N denotes the total number of image patches, D is the feature dimension consistent with the Encoder output, and each corresponds to the feature vector of the -th patch in the traffic representation matrix. The core of the Attentive Probing mechanism is to introduce a trainable class query vector , which acts as a learnable probe to dynamically aggregate classification-relevant semantic information from the global feature sequence .
The formal computation process of the mechanism is defined as follows. First, we map the class query vector and the global Encoder features into query, key, and value spaces through three independent learnable linear projection matrices:
where are learnable projection weight matrices, is the dimension of each attention head, and are the projected query, key, and value matrices, respectively.
We then adopt a multi-head cross-attention mechanism to achieve parallel semantic aggregation. For each attention head (where = 12 in our experiments), the scaled dot-product attention is computed as:
where are the query, key, and value matrices corresponding to the -th attention head, obtained by slicing the projected Q, K, V along the feature dimension. The outputs of all attention heads are concatenated and linearly projected to generate the enhanced class feature vector:
where is the output projection weight matrix, and is the final enhanced class vector that integrates traffic semantic features strongly relevant to the classification target.
Finally, the enhanced class vector is fed into a lightweight Multi-Layer Perceptron (MLP) classifier to output the class probability distribution over C traffic categories, formally defined as:
where is the predicted probability distribution of the traffic category, and C is the number of target categories for the downstream classification task.
The reason for introducing a new class vector instead of reusing the original class token from ViT is that the original class token is designed to aggregate information from these visible patches to assist in completing the MIM task, rather than being the optimal choice for classification tasks. A new class token, serving as a query, explicitly focuses on the representations of the regions in the image most relevant to classification, making it more suitable for different downstream traffic classification tasks. In contrast, the cross-attention mechanism implements a dynamic, selective feature filtering process. It uses a learnable class query vector as a “probe” to actively search for the semantic fragments most relevant to the current classification target among all features output by the Encoder. This mechanism enables the model to focus on salient regions in the traffic, such as specific request/response packet sequences within a TCP flow, rather than treating all information equally. Therefore, this design not only more fully utilizes the high-quality representations learned during the pre-training stage but also effectively enhances the model’s adaptability in few-shot scenarios and its discriminative accuracy for complex encrypted traffic, thereby addressing the core bottleneck of the linear classification head’s difficulty in focusing on target-relevant regions within global representations.
4. Experiments
4.1. Experiment Settings
4.1.1. Data Preparation
Experiments employ five network traffic datasets from real network scenarios for pre-training and evaluation, which are:
- USTC-TFC2016 [19]: This dataset includes encrypted traffic data from both malicious and benign applications, comprising 10 types of benign traffic and 10 types of malicious traffic. The malicious traffic data were collected by CTU researchers from real network environments between 2011 and 2015, while the benign traffic data consists of 10 types of normal traffic simulated by IXIA BPS;
- UPIoT: Provided by Shanghai UPIoT Technology Co., Ltd., Shanghai, China, this dataset contains encrypted network traffic captured from the Human-Internet and Internet of Things in a real industrial production environment during 2025. It is constructed for the practical landing requirement of abnormal traffic identification in real network supervision scenarios, and is set as a binary classification task with 2 categories (IoT traffic and non-IoT traffic);
- CICIoT2022 [20]: This is a multi-purpose IoT dataset provided by the Canadian Institute for Cybersecurity. It is used for behavioral analysis and vulnerability testing of differ-ent IoT devices with various protocols (e.g., IEEE 802.11 [32], Zigbee-based, and Z-Wave). We further divide it into 10 categories based on whether the behavior is malicious;
- ISCXTor2016 [8]: A dataset containing 8 categories of Tor traffic provided by the Ca-nadian Institute for Cybersecurity. The authors created accounts to use representative services like Skype and Facebook, defining a set of tasks to ensure the generation of a realistic and representative dataset with sufficient diversity and quantity. The dataset originates from 18 common applications, all using Tor for encrypted communication;
- ISCXVPN2016 [33]: Contains 12 categories of traffic, provided by the Canadian Institute for Cybersecurity. Traffic was captured via Wireshark and tcpdump, covering various VPN protocols (e.g., PPTP, L2TP, OpenVPN). This dataset is primarily used for Virtual Private Network (VPN) classification in network communications.
During the pre-training stage, the first five datasets (USTC-TFC2016, UPIoT, CICIoT2022, ISCXTor2016) are merged into a large-scale unlabeled dataset for self-supervised pre-training. For all datasets, we uniformly adopt the session-level flow segmentation strategy defined in Section 3.1.1, with each bidirectional session (grouped by communication quintuple and sorted by transmission timestamp) defined as one independent flow. The number of flows extracted from each dataset for pre-training is shown in Table 1. Regarding class distribution, the datasets employed exhibit a relatively balanced sample count across categories; for instance, the USTC-TFC2016 dataset contains approximately 2000 to 3000 flows per category, mitigating the risk of performance bias due to class imbalance. The training, validation, and test sets are split in an 8:1:1 ratio, as specified in Section 4.1.2.
Table 1.
Dataset Overview.
In the fine-tuning stage, supervised classification task training is conducted separately on each dataset. Additionally, the Cross-Platform [34] dataset is used for transfer learning experiments to validate the model’s generalization capability. This dataset contains encrypted traffic from Android applications, covering the most widely used applications globally, including 215 most prevalent apps from countries such as China and the US. It represents the current landscape of application encrypted traffic and is therefore broader in coverage and more challenging than other datasets.
4.1.2. Implementation Details
Model pre-training and fine-tuning are implemented based on PyTorch 2.3.0, and all experiments are completed on a single server equipped with an NVIDIA GeForce RTX 4060 Ti (NVIDIA Corporation, Santa Clara, CA, USA).
For self-supervised pre-training, we merge unlabeled data from the first five datasets in Table 1 to build the pre-training corpus, with no downstream label information involved to avoid data leakage. For downstream fine-tuning, we adopt a few-shot setting consistent with the mainstream paradigm in encrypted traffic classification [16], which matches the few-shot scenarios mentioned in the abstract and conclusion. Specifically, we set a maximum of 500 labeled flows per class for training and validation: for datasets with an average of less than 500 flows per class (calculated from total flows and category count in Table 1, including ISCXVPN2016, ISCXTor2016, USTC-TFC2016, Cross-Platform), we use the full set of valid samples; for datasets with sufficient per-class samples (CICIoT2022, UPIoT), we randomly sample 500 labeled flows per class. This setting uses no more than 25% of the full labeled samples of mainstream datasets, conforming to the standard definition of few-shot learning in this field.
To ensure the statistical reliability and reproducibility of results, we perform 10 independent random sampling runs for training set construction under the above setting. In each run, training samples are randomly sampled per the above rules, while the validation and test sets remain fixed across all runs to eliminate sampling bias and ensure fair comparison with baselines. All classification results reported in this paper (SOTA comparison, ablation study, transfer learning) are the arithmetic mean of the 10 independent runs, and the standard deviation of the results is used to quantify the statistical variance of model performance. After sampling, all datasets are uniformly split into training, validation and test sets in an 8:1:1 ratio. All fine-tuning experiments adopt early stopping based on validation loss to prevent overfitting. The reported metrics are averaged over 10 independent runs, with standard deviations consistently below 0.35% across all datasets, indicating robust performance.
Training hyperparameters are set as follows: in the pre-training stage, the batch size is 512, total training steps are 150,000, AdamW optimizer with linear learning rate scaling is adopted, base learning rate is 1 × 10−3, and the masking ratio of random patches is 0.6. This masking ratio is selected based on ablation experiments (Section 4.4), which achieves the optimal balance between pre-training task difficulty and downstream representation quality, consistent with the optimal setting range of MIM frameworks for visual representation learning. The encoder, regressor, and decoder all adopt a 4-layer Transformer block design, which is verified by ablation experiments to balance feature extraction capability and computational complexity. The weight of the alignment loss λ is set to 1, which balances the contributions of the reconstruction task and latent representation alignment task in pre-training. In the fine-tuning stage, we use AdamW optimizer for 200 epochs, with a base learning rate of 2 × 10−3 and a batch size of 64.
4.1.3. Evaluation Metrics
Since the fine-tuned model involves a multi-class traffic classification task, a series of evaluation metrics are selected, including accuracy (ACC), precision, recall, and F1-Score, to comprehensively assess model performance. The calculation formulas are shown below. Here, TP (True Positive) denotes the number of samples correctly predicted as positive; TN (True Negative) denotes the number of samples correctly predicted as negative; FP (False Positive) denotes the number of samples incorrectly predicted as positive; FN (False Negative) denotes the number of samples incorrectly predicted as negative.
Since the datasets used in fine-tuning are multi-class, precision, recall, and F1-Score cannot be directly calculated using the above formulas. The Macro Average method is used, calculating the arithmetic mean across all categories to obtain the overall average of these metrics. The specific calculation method is shown below, where represents the total number of categories, and , , , represent the corresponding metric values for the i-th category.
4.2. Comparison with State-of-the-Art Methods
Using the previously mentioned accuracy and precision metrics as benchmarks, ETC is compared and analyzed against a series of baselines and state-of-the-art methods in current traffic identification.
These methods include: plaintext feature-based traffic identification methods such as FlowPrint [34] and traditional statistical feature-based machine learning methods like AppScanner [23]; deep learning-based methods such as DF [35], Deeppacket [36], 2D-CNN [19], 3D-CNN [28] and FS-Net [37], which use raw traffic packet bytes as input for supervised learning to achieve traffic classification; and pre-training methods based on self-supervised learning, such as PERT [38], ET-BERT [15], Flow-MAE [31] and YaTC [16]. PERT and ET-BERT treat traffic packets as words for NLP-based pre-training tasks, while YaTC converts raw traffic into traffic grayscale images for pre-training on a large-scale unlabeled dataset and then fine-tunes the classifier with limited labeled data.
Table 2 shows the results. The results demonstrate the effectiveness of deep learning-based methods, while machine learning methods based on statistical features show deficiencies due to the difficulty in directly analyzing payloads in encrypted traffic. Furthermore, compared to top pre-training methods (YaTC, PERT, BERT), PERT and BERT mistakenly equate traffic bytes to natural language “words.” However, traffic lacks the inherent semantic hierarchy of language, making it difficult to capture packet-flow interaction features in encrypted traffic, resulting in poor adaptability. Although YaTC uses a multi-level flow feature grayscale image and an MAE architecture, its performance is limited due to the functional coupling of the Encoder–Decoder (the Decoder participates in feature learning, inhibiting the Encoder’s potential) and the difficulty of linear classification heads in focusing on key semantics. In contrast, ETC specifically optimizes these issues: it adapts to the characteristics of traffic data with multi-level interactive representations, employs a decoupled MIM ViT to unleash the Encoder’s potential, and uses attentive probing to focus on key semantics. Our method shows better results on all datasets. On the ISCXVPN2016 dataset, ETC’s accuracy (0.9370) and F1 score (0.9362) are significantly higher than the current best baseline YaTC by 1.93% and 1.92%, respectively. On ISCXTor2016, ETC (0.9313/0.9314) outperforms YaTC by 1.92% and 1.9%. On USTC-TFC2016 and CICIoT2022, ETC leads YaTC with excellent performance of 0.9786/0.9787 and 0.9604/0.9603, respectively. On the UPIoT dataset, which is a practical binary classification task for real industrial network supervision, ETC achieves an accuracy of 0.9983 and an F1 score of 0.9983, significantly outperforming YaTC by 1.71% and 1.72%, respectively. This result demonstrates that the proposed model maintains excellent classification performance and stability in practical landing scenarios, fully meeting the high-precision requirements of real-world network security supervision. Overall, ETC is better suited to the demands of complex encrypted traffic classification and demonstrates superior performance.
Table 2.
Comparison of Experiment Results. All results follow the rules in Section 4.1.2.
4.3. Transfer Learning Experiments
We conduct transfer learning experiments on the Cross-Platform dataset to validate the model’s generalization capability. To ensure fairness in comparison, three mainstream pre-training traffic classification methods—YaTC, BERT, and PERT—are introduced as baselines. The comparison results are shown in Table 3. The results show that ETC achieves an F1 score of 83.57% in complex cross-scenario tasks, outperforming YaTC (81.15%) and significantly surpassing BERT (75.61%) and PERT (76.85%), demonstrating that its pre-trained representations have stronger generalizability. Additionally, the F1 score of the ETC model increases from 71.92% without pre-training to 83.57% with pre-training, an improvement of 11.65%, which is superior to YaTC and significantly better than BERT and PERT. This indicates that ETC’s pre-training paradigm is more aligned with the intrinsic characteristics of encrypted traffic and can effectively meet traffic classification demands in new scenarios, making it more suitable for new downstream traffic classification tasks.
Table 3.
Comparison of Transfer Learning Experiment Results.
4.4. Ablation Study
To further validate the effectiveness of the performance contributions of ETC’s core components, an ablation study is conducted on four baseline datasets. The evaluation results are shown in Table 4. The ablation experiments aim to verify the contributions of ETC’s core components—Latent Contextual Regressor (LCR), Alignment Loss (AL), and Cross-Attention (CA)—to performance. Results based on four baseline datasets show: When the Alignment Loss (AL) is removed, Acc and F1 scores across all datasets significantly decrease (e.g., Acc on ISCXVPN2016 drops from 0.9370 to 0.9104). This is because AL plays a key role in calibrating the consistency between the true features output by the Encoder and the masked features predicted by the Regressor; its absence increases feature bias and directly weakens the discriminative power of traffic features. If the Latent Contextual Regressor (LCR) is removed, model performance shows significant fluctuations. For instance, Acc on CICIoT2022 plummets from 0.9604 to 0.7983. The reason is that LCR is the core module for decoupling the functions of the Encoder and Decoder. Its absence causes the semantic reasoning for masked regions to lose support, significantly degrading the quality of representations learned during pre-training. Removing the Cross-Attention module (CA) also affects performance, as CA only assists the Regressor in focusing on visible features strongly related to the masked regions, thereby improving model performance. When both CA and LCR are removed simultaneously, model performance drops to its lowest, close to that of YaTC (e.g., Acc on ISCXTor2016 is 0.9121). This is because together, they support the decoupled design of the Encoder and Decoder. Without them, the model reverts to a functionally coupled state where the Encoder cannot focus on feature extraction, ultimately causing ETC’s core advantages to disappear. In summary, LCR and AL are core to ensuring representation quality, while CA plays an auxiliary optimization role. Their synergy is key to ETC’s superior performance over existing methods.
Table 4.
Comparison of Experiment Results. All ablation results follow the rules in Section 4.1.2.
To further validate the rationality of our core hyperparameter settings, we conducted systematic single-variable ablation experiments, with all results averaged over 10 independent runs to ensure statistical reliability. The key results are summarized in Table 5.
Table 5.
Ablation results of core hyperparameters (averaged across 5 datasets).
The results show that our selected hyperparameters achieve the optimal overall performance. For the masking ratio, performance peaks at 60%, as a moderate masking ratio fully stimulates the encoder’s feature learning potential without making the pre-training task excessively difficult. For the layer number, the 4-layer structure achieves nearly the same performance as the 6-layer structure with only 61% of the parameters, striking the best balance between performance and efficiency. For the alignment loss weight, λ = 1 achieves the best performance by equally weighting the reconstruction and alignment tasks. These results fully justify all our hyperparameter settings.
4.5. Model Complexity Analysis
To comprehensively evaluate the trade-off between model classification performance and computational efficiency, we conduct an in-depth analysis of the ETC model from two dimensions: theoretical time complexity and actual model scale overhead, and compare it with mainstream pre-trained models for encrypted traffic classification including ET-BERT, EAPT and PERT. All the data presented in this section are obtained from actual experimental measurements under the same hardware environment (a single server equipped with an NVIDIA GeForce RTX 4060 Ti) as the classification performance experiments, ensuring the authenticity and fairness of the results.
4.5.1. Theoretical Time Complexity Analysis
For the core feature extraction module, ETC adopts a hierarchical attention mechanism combining packet-level and flow-level attention during the fine-tuning stage, which effectively reduces the computational complexity compared with the standard global self-attention mechanism adopted by most Transformer-based models such as ET-BERT. For an input multi-level flow representation matrix divided into N patches, the time complexity of standard global self-attention is , which increases quadratically with the number of patches, resulting in rapidly rising computational overhead when processing traffic sequences. In contrast, the packet-level attention module of ETC only performs multi-head self-attention calculation on patches belonging to the same data packet, with a time complexity of , where is the number of packets contained in a single session flow. This design significantly reduces the computational complexity compared with global attention. After packet-level feature extraction, we perform row pooling to compress the features, and the flow-level attention module only needs to model the dependencies between the compressed row-level features, with a time complexity of only , which further reduces the computational overhead of the model.
In addition, the encoder–regressor–decoder three-stage decoupled design adopted by ETC in the pre-training stage further optimizes the computational efficiency. The decoder is only responsible for pixel-level reconstruction of masked patches, and does not participate in the high-level semantic feature learning process, which avoids the additional computational overhead caused by the decoder participating in feature encoding and optimization, and also reduces the number of parameters that need to be updated during pre-training, accelerating the model convergence.
4.5.2. Quantitative Analysis of Computational Efficiency
To evaluate the practical deployment capability of the ETC model in real network security supervision scenarios, we quantitatively compare the model scale, theoretical computational complexity, and actual measured inference performance of ETC with mainstream encrypted traffic classification pre-trained models (ET-BERT, EAPT, PERT, YaTC) under the exact same hardware environment as all original experiments (single NVIDIA GeForce RTX 4060 Ti GPU, PyTorch 2.3.0, CUDA 12.1). All inference performance metrics are averaged over 10,000 consecutive repeated inference runs to eliminate random errors and ensure the authenticity and reliability of the measured results. The complete comparison results are shown in Table 6.
Table 6.
Comparison of Model Parameters.
ETC achieves a significant advantage in both lightweight design and practical inference efficiency. With only 2.16 million trainable parameters, ETC is 98% smaller than ET-BERT, 90.2% smaller than EAPT, and 93.0% smaller than PERT, realizing an ultra-lightweight architecture that can be deployed on resource-constrained edge network devices. The per-sample computational complexity of ETC is only 905 M FLOPs, which is merely 8.2% of ET-BERT, 34.8% of EAPT, and 23.2% of PERT, laying a foundation for its high real-time inference performance.
In terms of actual deployment performance, which is the core concern of network traffic classification tasks, ETC achieves a measured real-time throughput of 900 samples per second under the batch size = 1 setting (the most realistic scenario for online network traffic supervision, where traffic samples arrive sequentially and need to be processed in real time). This throughput is 11.1 times that of ET-BERT, 3.80 times that of EAPT, 4.92 times that of PERT, and 28.6% higher than the current state-of-the-art baseline YaTC. Correspondingly, the single-sample inference latency of ETC is only 1.11 ms, which is 91.0% lower than ET-BERT, 71.2% lower than EAPT, 78.3% lower than PERT, and 22.4% lower than YaTC. This excellent real-time inference performance fully meets the low-latency and high-throughput requirements of high-speed network traffic online monitoring and classification scenarios. The performance improvement mainly benefits from the lightweight hierarchical attention mechanism and the encoder–regressor–decoder decoupled design, which avoids redundant feature learning and reduces computational overhead while ensuring classification accuracy.
In addition, ETC also shows significant advantages in training efficiency. It only requires 150 K pre-training steps, which is only 30% of the steps required by ET-BERT and PERT, and the final model storage size is only 36.3 MB, which greatly reduces the training time and deployment storage cost. More importantly, ETC achieves an excellent balance between classification accuracy and computational efficiency: while the average classification accuracy across five datasets is 2.13% to 3.73% higher than ET-BERT, it maintains an ultra-lightweight model scale and extremely low real-time inference overhead, which has strong practical application value in real network security supervision scenarios.
4.6. Per-Class Performance Analysis and Failure Case Discussion
To fully demonstrate the fine-grained classification capability of the ETC model and systematically analyze its performance limitations, we select the most representative 20-class USTC-TFC2016 dataset as the core analysis object. This dataset, which is the most widely used benchmark in encrypted traffic classification, contains 10 categories of benign encrypted traffic and 10 categories of malicious botnet traffic. The per-class Precision, Recall and F1-Score of the ETC model on the USTC-TFC2016 test set are shown in Table 7, and the results show that ETC achieves stable and excellent classification performance on both benign and malicious traffic categories, with the F1-Score of all categories exceeding 96% and most benign application traffic categories reaching above 98%. This fully verifies the model’s strong discriminative ability for different types of encrypted traffic and balanced performance between benign traffic identification and malicious traffic detection.
Table 7.
Per-class classification metrics of ETC on USTC-TFC2016 dataset.
Based on the per-class metrics in Table 7, we systematically summarize the core error sources of the ETC model and conduct concise discussion on representative failure cases: the classification performance of malicious botnet categories is generally lower than that of benign categories, with the lowest F1-Score of 0.9646 for Virut botnet traffic, which is mainly due to the highly convergent feature distribution of different botnet samples—most botnets adopt similar SSL/TLS encryption mechanisms, persistent command and control (C&C) connection modes, and highly consistent packet-level statistical features, leading to reduced discriminability of multi-level flow representations; for benign categories, the lowest performance occurs in instant messaging and email traffic (e.g., Hangouts, AIMchat, Email), with an average F1-Score 1.2% lower than file transfer traffic such as FTPS/SFTP, mainly because such traffic often contains short sessions with sparse valid features and similar bidirectional interaction patterns, which increase classification difficulty. Notably, even in these error-prone scenarios, ETC still significantly outperforms all baseline models, with a 1.87% higher average accuracy on botnet traffic than the state-of-the-art YaTC, fully verifying the robustness of our method. Two representative failure cases are further analyzed based on the table: (1) Misclassification between Virut and Neris botnets, the two lowest-performing malicious categories, caused by nearly identical C&C communication protocols and session interaction features that lead to highly convergent flow representations; (2) Short-session AIMchat traffic misclassified as Email, which corresponds to the relatively low F1-Score of both categories, mainly due to extremely sparse valid semantic features in zero-padded flow matrices of sessions with only 1–2 packets, making it difficult for the model to extract sufficient discriminative features. For these limitations, we will optimize the model via fine-grained burst sequence modeling and lightweight sparse feature enhancement in future work.
5. Conclusions
This work addresses three core challenges in encrypted traffic classification: insufficient feature representation, poor model generalization, and heavy reliance on large-scale manually labeled data. It proposes an Enhanced Traffic Classifier (ETC) based on self-supervised feature learning. The model effectively tackles the issue of missing semantic information in encrypted traffic by constructing a multi-level interactive traffic representation matrix that fuses packet-level and flow-level temporal information. More crucially, we innovatively adopt an improved Masked Image Modeling Vision Transformer architecture and a decoupled learning strategy, strictly separating the functions of the encoder and decoder, thereby compelling the encoder to focus entirely on extracting underlying traffic features and fully unleashing its representation learning potential. For downstream tasks, we discard the limited linear classification head and introduce an Attentive Probing classification mechanism, which dynamically focuses on the semantic information most relevant to the classification target, significantly improving the model’s recognition accuracy and robustness.
To validate the effectiveness of the ETC model, comprehensive experiments were conducted on multiple public datasets, including USTC-TFC2016 and CICIoT2022. The results demonstrate that the ETC model significantly outperforms existing mainstream methods such as YaTC and ET-BERT on core metrics including accuracy and F1-score. Notably, it delivers outstanding few-shot generalization, proving that the self-supervised pre-trained features have high universality and discriminability, enabling rapid adaptation to new tasks with very few labeled samples.
In summary, the core contribution of this research lies in proposing and implementing an efficient and universal encrypted traffic classification framework. Through the decoupled design of feature learning and reconstruction tasks during pre-training, and the attention-focusing mechanism on target semantics during fine-tuning, this framework successfully achieves simultaneous improvement in model representation quality and classification performance. The ETC model not only reduces dependence on expensive labeled data but also provides a powerful solution for coping with increasingly complex and dynamically changing encrypted network traffic environments.
Author Contributions
Conceptualization, S.J., X.L., H.W., G.C. and H.Z.; methodology, S.J.; software, S.J.; validation, S.J., H.W., G.C. and H.Z.; formal analysis, S.J. and H.Z.; investigation, S.J., H.W. and G.C.; resources, X.L., H.W., G.C. and H.Z.; data curation, S.J., H.W., G.C. and H.Z.; writing—original draft preparation, S.J.; writing—review and editing, X.L., H.W., G.C. and H.Z.; visualization, S.J.; supervision, X.L.; project administration, X.L.; funding acquisition, X.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data presented in this study are partially available in publicly accessible repositories. The USTC-TFC2016, CICIoT2022, ISCXTor2016, and ISCXVPN2016 datasets can be accessed via their original sources as cited in the paper. The UPIoT dataset, which was constructed in collaboration with Shanghai UPIoT Technology Co., Ltd., is not publicly available due to privacy and commercial confidentiality restrictions. Requests to access the UPIoT dataset should be directed to the corresponding author. The core code has been released on GitHub: https://github.com/99complex/Enhanced-Traffic-Classifier (version v1.0, accessed on 28 March 2026).
Acknowledgments
The authors sincerely thank Shanghai UPIoT Technology Co., Ltd. for its assistance and support throughout this research.
Conflicts of Interest
Authors Hongyi Wang, Gang Chen and Hongwei Zhao were employed by the company Shanghai UPIoT Technology Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- Dong, W.; Yu, J.; Lin, X.; Gou, G.; Xiong, G. Deep learning and pre-training technology for encrypted traffic classification: A comprehensive review. Neurocomputing 2024, 617, 128444. [Google Scholar] [CrossRef] [Scilit]
- Sharma, R.; Dangi, S.; Mishra, P. A comprehensive review on encryption based open source cyber security tools. In Proceedings of the 2021 6th International Conference on Signal Processing, Computing and Control, Solan, India, 7–9 October 2021; IEEE: New York, NY, USA, 2021; pp. 614–619. [Google Scholar]
- Dong, C.; Zhang, C.; Lu, Z.; Liu, B.; Jiang, B. CETAnalytics: Comprehensive effective traffic information analytics for encrypted traffic classification. Comput. Netw. 2020, 176, 107258. [Google Scholar] [CrossRef] [Scilit]
- Ma, Y.; Li, Z.; Xue, H.; Chang, J. A balanced supervised contrastive learning-based method for encrypted network traffic classification. Comput. Secur. 2024, 145, 104023. [Google Scholar] [CrossRef] [Scilit]
- Izadi, S.; Ahmadi, M.; Nikbazm, R. Network traffic classification using convolutional neural network and ant-lion optimization. Comput. Electr. Eng. 2022, 101, 108024. [Google Scholar] [CrossRef] [Scilit]
- Yan, X.; He, L.; Xu, Y.; Cao, J.; Wang, L.; Xie, G. High-speed encrypted trafficclassification by using payload features. Digit. Commun. Netw. 2025, 11, 412–423. [Google Scholar] [CrossRef] [Scilit]
- Le, N.D.; Huynh, V.-N.; Thai, T.-A.; Niyato, D.; Wang, P. Machine learning for network anomaly detection: A survey. Comput. Netw. 2019, 151, 2–20. [Google Scholar]
- Lashkari, A.H.; Gil, G.D.; Mamun, M.; Ghorbani, A.A. Characterization of tor traffic using time based features. In Proceedings of the International Conference on Information Systems Security and Privacy, Porto, Portugal, 19–21 February 2017; SciTePress: Setúbal, Portugal, 2017; Volume 2, pp. 253–262. [Google Scholar]
- Shen, M.; Liu, Y.; Zhu, L.; Xu, K.; Du, X.; Guizani, N. Optimizing Feature Selection for Efficient Encrypted Traffic Classification: A Systematic Approach. IEEE Netw. 2020, 34, 20–27. [Google Scholar] [CrossRef] [Scilit]
- Lin, K.; Xu, X.; Gao, H. TSCRNN: A novel classification scheme of encrypted traffic based on flow spatiotemporal features for efficient management of IIoT. Comput. Netw. 2021, 190, 107974. [Google Scholar] [CrossRef] [Scilit]
- Sharma, M.; Singh, A.K.; Vashist, A.; Sharma, A.; Nigam, M. Machine learning-based detection of network anomalies: A survey. IEEE Commun. Surv. Tutor. 2019, 21, 663–706. [Google Scholar]
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16 × 16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Lin, X.; Xiong, G.; Gou, G.; Li, Z.; Shi, J.; Yu, J. Et-bert: A contextualized datagram representation with pre-training transformers for encrypted traffic classification. In Proceedings of the ACM Web Conference 2022 (WWW 22), Virtual, 25–29 April 2022; Association for Computing Machinery: New York, NY, USA, 2022; pp. 633–642. [Google Scholar]
- Zhao, R.; Zhan, M.; Deng, X.; Wang, Y.; Wang, Y.; Gui, G.; Xue, Z. Yet another traffic classifier: A masked autoencoder based traffic transformer with multi-level flow representation. Proc. AAAI Conf. Artif. Intell. 2023, 37, 5420–5427. [Google Scholar] [CrossRef] [Scilit]
- He, K.; Chen, X.; Xie, S.; Li, Y.; Dollár, P.; Girshick, R. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; IEEE: New York, NY, USA, 2022; pp. 16000–16009. [Google Scholar]
- Chen, X.; Ding, M.; Wang, X.; Xin, Y.; Mo, S.; Wang, Y.; Han, S.; Luo, P.; Zeng, G.; Wang, J. Context autoencoder for self-supervised representation learning. Int. J. Comput. Vis. 2024, 132, 208–223. [Google Scholar] [CrossRef] [Scilit]
- Wang, W.; Zhu, M.; Zeng, X.; Ye, X.; Sheng, Y. Malware Traffic Classification Using Convolutional Neural Network for Representation Learning. In Proceedings of the 2017 International Conference on Information Networking, Da Nang, Vietnam, 11–13 January 2017; IEEE: New York, NY, USA, 2017; pp. 712–717. [Google Scholar]
- Dadkhah, S.; Mahdikhani, H.; Danso, P.K.; Zohourian, A.; Truong, K.A.; Ghorbani, A.A. Towards the Development of a Realistic Multidimensional IoT Profiling Dataset. In Proceedings of the 2022 International Conference on Privacy, Security & Trust, Fredericton, NB, Canada, 22–24 August 2022. [Google Scholar]
- Elmaghraby, R.T.; Aziem, N.M.A.; Sobh, M.A.; Bahaa-Eldin, A.M. Encrypted network traffic classification based on machine learning. Ain Shams Eng. J. 2024, 15, 102361. [Google Scholar] [CrossRef] [Scilit]
- Chandrasekhar, A.; Raghuveer, K. Confederation of fcm clustering, ann and svm techniques to implement hybrid nids using corrected kdd cup 99 dataset. In Proceedings of the 2014 International Conference on Communication and Signal Processing, Tamilnadu, India, 3–5 April 2014; IEEE: New York, NY, USA, 2014; pp. 672–676. [Google Scholar]
- Taylor, V.F.; Spolaor, R.; Conti, M.; Martinovic, I. AppScanner: Automatic Fingerprinting of Smartphone Apps from Encrypted Network Traffic. In Proceedings of the 2016 IEEE European Symposium on Security and Privacy (EuroS&P), Saarbruecken, Germany, 21–24 March 2016; IEEE: New York, NY, USA, 2016; pp. 439–454. [Google Scholar]
- Garouani, M.; Ahmad, A.; Bouneffa, M.; Hamlich, M. AMLBID: An auto-explained automated machine learning tool for big industrial data. SoftwareX 2022, 17, 100919. [Google Scholar] [CrossRef] [Scilit]
- Xie, G.; Li, Q.; Jiang, Y. Self-attentive deep learning method for online traffic classification and its interpretability. Comput. Netw. 2021, 196, 108267. [Google Scholar] [CrossRef] [Scilit]
- Qu, J.; Ma, X.; Li, J.; Luo, X.; Xue, L.; Zhang, J.; Li, Z.; Feng, L.; Guan, X. An {Input-Agnostic} hierarchical deep learning framework for traffic fingerprinting. In Proceedings of the 32nd USENIX security symposium (USENIX Security 23), Anaheim, CA, USA, 9–11 August 2023; USENIX Association: Berkeley, CA, USA, 2023; pp. 589–606. [Google Scholar]
- Fauvel, K.; Chen, F.; Rossi, D. A lightweight, efficient and explainable-by-design convolutional neural network for internet traffic classification. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Long Beach, CA, USA, 6–10 August 2023; Association for Computing Machinery: New York, NY, USA, 2023; pp. 4013–4023. [Google Scholar]
- Zhang, J.; Li, F.; Ye, F.; Wu, H. Autonomous Unknown-Application Filtering and Labeling for DL-based Traffic Classifier Update. In Proceedings of the IEEE Conference on Computer Communications (INFOCOM), Toronto, ON, Canada, 6–9 July 2020; IEEE: New York, NY, USA, 2020; pp. 397–405. [Google Scholar]
- Cai, D.; Chen, K.; Lin, Z.; Li, D.; Zhou, T.; Leung, M.F. JointSTNet: Joint Pre-Training for Spatial-Temporal Traffic Forecasting. IEEE Trans. Consum. Electron. 2024, 71, 6239–6252. [Google Scholar] [CrossRef] [Scilit]
- Zhan, M.; Yang, J.; Jia, D.; Fu, G. EAPT: An encrypted traffic classification model via adversarial pre-trained transformers. Comput. Netw. 2025, 257, 110973. [Google Scholar] [CrossRef] [Scilit]
- Hang, Z.; Lu, Y.; Wang, Y.; Xie, Y. Flow-mae: Leveraging masked autoencoder for accurate, efficient and robust malicious traffic classification. In Proceedings of the 26th International Symposium on Research in Attacks, Intrusions and Defenses, Hong Kong, 16–18 October 2023; Association for Computing Machinery: New York, NY, USA, 2023; pp. 297–314. [Google Scholar]
- IEEE 802.11-2020; IEEE Standard for Information Technology—Telecommunications and Information Exchange Between Systems Local and Metropolitan Area Networks—Specific Requirements Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. IEEE: New York, NY, USA, 2020.
- Lashkari, A.H.; Gil, G.D.; Mamun, M.; Ghorbani, A.A. Characterization of encrypted and VPN traffic using time-related features. In Proceedings of the International Conference on Information Systems Security and Privacy, Rome, Italy, 19–21 February 2016; SciTePress: Setúbal, Portugal, 2016; pp. 407–414. [Google Scholar]
- Van Ede, T.; Bortolameotti, R.; Continella, A.; Ren, J.; Dubois, D.J.; Lindorfer, M.; Choffnes, D.; Van Steen, M.; Peter, A. Flowprint: Semi-supervised mobile-app fingerprinting on encrypted network traffic. In Proceedings of the Network and Distributed System Security Symposium (NDSS), San Diego, CA, USA, 23–26 February 2020; Internet Society: Reston, VA, USA, 2020; Volume 27. [Google Scholar]
- Sirinam, P.; Imani, M.; Juarez, M.; Wright, M. Deep Fingerprinting: Undermining Website Fingerprinting Defenses with Deep Learning. In Proceedings of the ACM SIGSAC Conference on Computer and Communications Security (CCS), Toronto, ON, Canada, 15–19 October 2018; Association for Computing Machinery: New York, NY, USA, 2018; pp. 1928–1943. [Google Scholar]
- Lotfollahi, M.; Siavoshani, M.J.; Zade, R.S.H.; Saberian, M. Deep packet: A novel approach for encrypted traffic classification using deep learning. Soft Comput. 2020, 24, 1999–2012. [Google Scholar] [CrossRef] [Scilit]
- Liu, C.; He, L.; Xiong, G.; Cao, Z.; Li, Z. FS-Net: A Flow Sequence Network For Encrypted Traffic Classification. In Proceedings of the IEEE Conference on Computer Communications (INFOCOM), Paris, France, 29 April–2 May 2019; IEEE: New York, NY, USA, 2019; pp. 1171–1179. [Google Scholar]
- He, H.; Yang, Z.; Chen, X. PERT: Payload Encoding Representation from Transformer for Encrypted Traffic Classification. In Proceedings of the 2020 ITU Kaleidoscope: Industry-Driven Digital Transformation, Ha Noi, Vietnam, 7–11 December 2020; IEEE: New York, NY, USA, 2020; pp. 1–8. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






