ET-BERT: A Contextualized Datagram Representation with Pre-training Transformers for Encrypted Traffic Classification

Xinjie Lin, Gang Xiong, Gaopeng Gou, Zhen Li, Junzheng Shi +1 more
2/13/2022
cs.CRcs.AIcs.NI
transformer-attention

Official code: linwhitehat/ET-BERT (687 stars, Python, MIT, PyTorch, last commit 2026-07-23).

Abstract

Encrypted traffic classification requires discriminative and robust traffic representation captured from content-invisible and imbalanced traffic data for accurate classification, which is challenging but indispensable to achieve network security and network management. The major limitation of existing solutions is that they highly rely on the deep features, which are overly dependent on data size and hard to generalize on unseen data.

Show full abstract

How to leverage the open-domain unlabeled traffic data to learn representation with strong generalization ability remains a key challenge. In this paper,we propose a new traffic representation model called Encrypted Traffic Bidirectional Encoder Representations from Transformer (ET-BERT), which pre-trains deep contextualized datagram-level representation from large-scale unlabeled data. The pre-trained model can be fine-tuned on a small number of task-specific labeled data and achieves state-of-the-art performance across five encrypted traffic classification tasks, remarkably pushing the F1 of ISCX-Tor to 99.2% (4.4% absolute improvement), ISCX-VPN-Service to 98.9% (5.2% absolute improvement), Cross-Platform (Android) to 92.5% (5.4% absolute improvement), CSTNET-TLS 1.3 to 97.4% (10.0% absolute improvement). Notably, we provide explanation of the empirically powerful pre-training model by analyzing the randomness of ciphers. It gives us insights in understanding the boundary of classification ability over encrypted traffic. The code is available at: https://github.com/linwhitehat/ET-BERT.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

The repository of ET-BERT, a network traffic classification model on encrypted traffic. The work has been accepted as The Web Conference (WWW) 2022 accepted paper.

687133PythonFeb 9, 20224 months agoMIT
burst-analysisencrypted-traffic-analysismask-burst-modelingpre-trainingpytorch+2 more

Similar Papers

Cite this paper

@article{lin2022etbert,
  title  = {ET-BERT: A Contextualized Datagram Representation with Pre-training Transformers for Encrypted Traffic Classification},
  author = {Xinjie Lin and Gang Xiong and Gaopeng Gou and Zhen Li and Junzheng Shi and Jing Yu},
  year   = {2022},
  eprint = {2202.06335},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.06335}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.06335.svg)](https://codeofpaper.com/paper/2202.06335)

Discussion