MIETT: Multi-Instance Encrypted Traffic Transformer for Encrypted Traffic Classification
Xu-Yang Chen, Lu Han, De-Chuan Zhan, Han-Jia Ye · 2024
Read MIETT: Multi-Instance Encrypted Traffic Transformer for Encrypted Traffic Classification by Xu-Yang Chen, Lu Han, De-Chuan Zhan, Han-Jia Ye (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-15306.txt.
Introduction
Xu-Yang Chen and co-authors classify encrypted network traffic with a transformer built for flows in a 2024 paper. Encryption hides content, but security teams still need to know what kind of traffic is moving. Earlier models read tiny tokens inside packets, which carry little meaning when everything is scrambled.
Their MIETT model treats a flow as a bag of packets, learning from how packets interact rather than from token trivia. Pre-training on unlabeled traffic gives it broad footing. The design aims at threat detection and network management alike. Reading the shape of a conversation without opening it is the core skill modern monitoring needs.
Catalog record
| CREATOR | Xu-Yang Chen, Lu Han, De-Chuan Zhan, Han-Jia Ye |
|---|---|
| YEAR | 2024 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 40 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2412-15306
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
MIETT: Multi-Instance Encrypted Traffic Transformer for Encrypted Traffic Classification Xu-Yang Chen, Lu Han, De-Chuan Zhan, Han-Jia Ye Abstract Network traffic includes data transmitted across a network, such as web browsing and file transfers, and is organized into packets (small units of data) and flows (sequences of packets exchanged between two endpoints). Classifying encrypted traffic is essential for detecting security threats and optimizing network management. Recent advancements have highlighted the superiority of foundation models in this task, particularly for their ability to leverage large amounts of unlabeled data and demonstrate strong generalization to unseen data. However, existing methods that focus on token-level relationships fail to capture broader flow patterns, as tokens, defined as sequences of hexadecimal digits, typically carry limited semantic information in encrypted traffic. These flow patterns, which are crucial for traffic classification, arise from the interactions between packets within a flow, not just their internal structure. To address this limitation, we propose a Multi-Instance Encrypted Traffic Transformer (MIETT), which adopts a multi-instance approach where each packet is treated as a distinct instance within a larger bag representing the entire flow. This enables the model to capture both token-level and packet-level relationships more effectively through Two-Level Attention (TLA) layers, improving the model’s ability to learn complex packet dynamics and flow patterns. We further enhance the model’s understanding of temporal and flow-specific dynamics by introducing two novel pre-training tasks: Packet Relative Position Prediction (PRPP) and Flow Contrastive Learning (FCL). After fine-tuning, MIETT achieves state-of-the-art (SOTA) results across five datasets, demonstrating its effectiveness in classifying encrypted traffic and understanding complex network behaviors. Code is available at https://github.com/Secilia-Cxy/MIETT . School of Artificial Intelligence, Nanjing University, China National Key Laboratory for Novel Software Technology, Nanjing University, China {chenxy, hanlu, zhandc, yehj}@lamda.nju.edu.cn Introduction Network traffic refers to the flow of data transmitted between devices over a network, typically structured into packets, which are small units sent across the network, and flows, which are sequences of packets exchanged between two points. Each packet is composed of two parts: the header and the payload. The header contains essential information, such as routing details, source and destination addresses, and packet length, while the payload carries the actual data being transmitted, which may be encrypted for security purposes. Traffic classification, the process of identifying and categorizing network traffic, is crucial for both network management and cybersecurity. It allows network administrators to ensure Quality of Service (QoS), optimize bandwidth and detect malicious activities, thus maintaining network security and efficiency. The overview of encrypted traffic classification task is provided in Figure 1 . However, the increasing prevalence of encryption has made traditional classification methods, such as port-based and statistics-based approaches, less effective. The advent of deep learning (DL) brought significant improvements, with payload-based methods using models like CNNs to automatically extract features from raw data. Despite their success, these methods rely heavily on large amounts of labeled data, which can be difficult to obtain. Figure 1: Encrypted traffic classification task description. Raw traffic is first divided into session flows, with each flow further segmented into a sequence of packets. A packet typically consists of a header and a payload. The task is to classify the type of a given flow. Recently, foundation models have emerged as a powerful alternative, pre-trained on large volumes of unlabeled data and fine-tuned for specific tasks. PERT ( He, Yang, and Chen 2020 ) employs a BERT-based model with a Masked Language Modeling (MLM) task to pre-train a packet-level encoder, but this approach primarily focuses on token-level relationships within individual packets, overlooking the broader context of inter-packet relationships. ET-BERT ( Lin et al. 2022 ) addresses this limitation by introducing the Same-origin BURST Prediction (SBP) task, which determines whether one packet follows another within the same flow. While this method accounts for adjacent packet relationships, it still falls short of capturing the full complexity of flow-level interactions and the broader context across multiple packet segments. YaTC ( Zhao et al. 2023 ) takes a different approach by tokenizing traffic data into patches and using a Masked Auto-Encoder (MAE) for pre-training a token-level encoder within a flow. However, focusing solely on token dependencies is less effective due to the low semantic information in encrypted traffic tokens. This approach tends to overlook the broader patterns and relationships that exist between entire packets within a traffic flow. Instead, learning packet representations that capture these packet patterns proves to be more robust. Given that each packet can be viewed as a distinct instance carrying unique information within a flow, it is crucial to effectively model the relationships between packets to achieve a comprehensive flow representation. To address this, we propose a Multi-Instance Encrypted Traffic Transformer (MIETT) with Two-Level Attention (TLA) layers that capture both token-level and packet-level relationships. To further enhance the model’s ability to capture temporal and flow-specific dynamics, we introduce two novel pre-training tasks: Packet Relative Position Prediction (PRPP) and Flow Contrastive Learning (FCL). The PRPP task is designed to help the model understand the sequential relationships between packets within a flow by predicting their relative positions, thereby enabling a more accurate representation of the flow’s structure. Meanwhile, the FCL task focuses on distinguishing packets from the same flow and those from different flows by learning robust representations that emphasize intra-flow similarities and inter-flow differences. Building on the robust representations learned during pre-training, the model is then fully fine-tuned on the specific classification task. During this stage, both the packet encoder and the flow encoder are jointly optimized to adapt the model to the task at hand. Across experiments conducted on five datasets, MIETT consistently demonstrates competitive or superior performance compared to existing methods. In conclusion, this paper presents several key contributions to the field of encrypted traffic classification: • We propose a novel Multi-Instance Encrypted Traffic Transformer (MIETT) architecture, which introduces Two-Level Attention (TLA) layers to effectively capture both token-level and packet-level relationships within traffic flows. • We introduce two innovative pre-training tasks, Packet Relative Position Prediction (PRPP) and Flow Contrastive Learning (FCL). The PRPP task enhances the model’s understanding of the sequential order of packets within a flow, while the FCL task improves the model’s ability to differentiate between packets from the same flow and those from different flows. • We provide extensive empirical validation of the proposed MIETT model on multiple datasets, showing that our approach outperforms existing methods in terms of accuracy and F1-score. Related work Encrypted traffic classification is an essential research area in network security. As encryption becomes more prevalent, traditional traffic analysis methods that inspect packet payloads have become less effective. Researchers now focus on methods to classify encrypted traffic without accessing its content directly. These methods can be divided into three types: port-based methods, statistics-based methods, and payload-based methods. Port-based Methods. Port-based traffic classification, one of the oldest methods, relies on associating port numbers in TCP/UDP headers with well-known IANA port numbers. Although it is fast and simple, the method’s accuracy has declined due to port obfuscation, dynamic port assignments, network address translation (NAT), and other techniques ( Moore and Papagiannaki 2005 ) . Statistics-based Methods. Statistics-based methods for encrypted traffic classification leverage features independent of payloads, such as packet sizes, timing, and flow duration, to analyze and categorize traffic.