Conceptio › Archive › arXiv CS
arXiv CS open access

Understanding Self-Supervised Representation Learning for Encrypted Traffic

Zongxi Liu et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
distributed-systemsinternetnetworkingprotocols
SSL has been adopted for encrypted traffic classification to learn representations from unlabeled traces and reduce reliance on manual feature engineering. However, recent studies show that data leakage can inflate reported performance and that pretrained models can underperform shallow classifiers
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

1

Understanding Self-Supervised Representation Learning for Encrypted Traffic

arXiv:2611.07452v1 [cs.NI] 5 Nov 2026

Zongxi Liu, Shuai Mao, Jie Chuai, and Hongyang Du

feature engineering nevertheless offer limited transferability across classification settings. More recently, advances in self-supervised pretraining in natural language processing (NLP) and computer vision (CV) have motivated learning traffic representations from unlabeled traces to reduce reliance on feature engineering. ET-BERT adapts BERT-style masked language modeling (MLM) to overlapping two-byte units [5]. Subsequent models, including YaTC and NetMamba, explore different input granularities and contextual pretraining objectives [6], [7]. However, recent analyses question whether encrypted traffic provides the contextual dependencies assumed by these methods. Zhao et al. [8] report weak pretrained representations and show that data leakage from packet-level splitting can inflate downstream classification accuracy. Once these shortcuts are controlled, the advantage of contextual pretraining over shallow classifiers becomes much less evident [9]. These findings motivate us to revisit the basis and effectiveness of pretraining for encrypted traffic. From a cryptographic perspective, ciphertext produced by secure encryption is expected to offer little exploitable bytelevel context [10]. Yet observed TLS traces also contain unencrypted protocol metadata, including record headers and parts of the handshake. These visible fields may retain dependencies that support pretraining even when ciphertext does not. Understanding the effectiveness of encrypted-traffic pretraining therefore requires considering both the remaining observable Index Terms—Encrypted traffic classification, self-supervised structure and effective signal sources of self-supervision. We learning, representation learning, contrastive learning. organize this investigation around four questions. Q1. What information remains learnable in encrypted traffic? Observed encrypted traffic contains both protocolI. I NTRODUCTION visible plaintext and ciphertext. Whether the visible fields Traffic classification is an important task in network mearetain contextual dependencies useful for pretraining is central surement and security analysis, as it aims to understand system to establishing what can be learned. behavior, application usage, and security events by identifying Q2. How can contextual pretraining better exploit the applications or services from their communications. Early available dependencies? If useful dependencies exist, their systems relied on transport ports and deep packet inspection range, strength, and distribution determine how they can support (DPI), which recognizes signatures in packet contents [1]. prediction. These characteristics should guide the choice of However, the widespread adoption of Transport Layer Security input units and learning objectives. (TLS) has made much of that content opaque, reducing the Q3. Can alternative pretraining paradigms be effective information available to payload inspection [2]. In response, for encrypted traffic? When contextual dependencies are classifiers instead use observable statistical properties of traffic absent or weak, other sources of supervision like contrastive through feature engineering without parsing the encrypted learning may still support representation learning. payload [3], [4]. These task-specific approaches relying on Q4. What are the limits of pretraining for encrypted Zongxi Liu and Hongyang Du are with the Department of Electrical and traffic? Traffic settings differ in the application information Computer Engineering, The University of Hong Kong, Hong Kong SAR, China they expose, and proxy encapsulation can further conceal (e-mail: duhy@hku.hk). that information. Whether current pretraining methods remain Shuai Mao and Jie Chuai are with Huawei Noah’s Ark Lab, Hong Kong SAR, China. effective across these settings determines their practical scope. Abstract—Self-supervised learning (SSL) has been adopted for encrypted traffic classification to learn representations from unlabeled traces and reduce reliance on manual feature engineering. However, recent studies show that data leakage can inflate reported performance and that pretrained models can underperform shallow classifiers once leakage is controlled. These findings raise fundamental questions about what information SSL can learn from encrypted traffic and how different pretraining mechanisms exploit this information. In this paper, we systematically investigate these questions by examining the sources of learnable information, the effectiveness of contextual pretraining, alternative self-supervision mechanisms, and the limits of representation learning. We first find that visible protocol fields retain contextual dependencies that are strongest between adjacent bytes, while payload interventions establish the classification value of retained plaintext structure. Guided by these insights, we investigate byte-level contextual learning through ByteBERT and TrafficDCNet, showing that aligning prediction granularity with local dependencies produces more discriminative representations than existing contextual pretraining approaches. We further examine cross-view contrastive learning through AlignTraffic and find that complementary supervision improves representation quality beyond contextual prediction alone. Across four public classification tasks, AlignTraffic outperforms shallow learning by 5.97 to 30.70 percentage points in Macro-F1, with additional evaluations on industrial traffic and geographic transfer demonstrating its effectiveness in broader settings. Finally, evaluations on Tor traffic and individual packets reveal limitations when application information is concealed or unevenly distributed. These findings provide a systematic understanding of how observable information and self-supervision mechanisms shape the effectiveness and scope of representation learning for encrypted traffic.

load-TLS 2

header payload App Encrypted: payload TLS Plaintext: length, cipher suites , etc. TCP Plaintext: port, sequence number, etc. IP Plaintext: IP address, checksum, etc.

TABLE I DATASET STATISTICS AND PAYLOAD ENTROPY BEFORE AND AFTER PREPROCESSING .

H0 (S)

Packets Dataset

Before

After Before After

ISCX-Direct 15 715 358 2 776 290 ISCX-VPN 2 816 966 321 414 CSTNET 12 049 643 –

Fig. 1. Protocol stack and observable fields in TLS-encrypted traffic. The payload includes visible TLS metadata and encrypted content.

5.70 7.97 7.08 7.95 7.97 –

ss

es

e

la

lc

al

eo

m

ut ub

yo

vi

e

ot ify

sp

q

ic

yp

sk

ts

ftp

ou

ng

ha

k

l

ai

oo

eb

fa c

em

ai

m

Exclusive-tuple ratio

Our findings are as follows. ISCX-Direct ISCX-VPN CSTNET • Protocol-visible fields retain useful local contextual dependencies. Their byte dependence is substantially stronger 1.0 than that measured in ciphertext, and the retained payload 0.8 structure carries classification-relevant information. 0.6 • Byte dependencies in protocol-visible regions are strongest 0.4 between adjacent bytes, yet existing contextual pretraining 0.2 schemes do not fully exploit this local structure. Ex0.0 periments with ByteBERT and TrafficDCNet show that matching prediction granularity to these dependencies yields more discriminative representations and improves performance over the existing schemes. • Cross-view contrastive learning complements contextual prediction. AlignTraffic improves frozen representations Fig. 2. Application-exclusive 5-tuple ratios. ISCX-Direct and ISCX-VPN show per-application ratios. CSTNET shows a weighted mean across its applications, over both constituent encoders and exceeds shallow with weights proportional to their numbers of distinct 5-tuples. learning in fine-tuned Macro-F1 on the main public tasks. Industrial classification and geographic transfer provide further evidence of its utility, although these gains come B. Tasks, Inputs, and Evaluation with additional computational overhead. We consider two classification tasks. Flow-level classification • The effectiveness of pretraining depends on the available assigns an application label to a bidirectional TCP flow using application information and the classification unit. Some its first five retained packets in temporal order. Packet-level encapsulated-traffic and individual-packet settings remain classification predicts the parent flow’s label from one packet. challenging for the evaluated representations. In both cases, we partition flows before extracting samples, keeping all packets from the same flow in one partition [8]. II. P RELIMINARY We follow the CSTNET split protocol of Zhao et al. and use A. Datasets and Preprocessing a category-wise 50%/50% flow split for the reorganized ISCX TLS is the most widely deployed protocol for securing data. Model selection uses three-fold validation within the Internet communications. As shown in Fig. 1, a classic TLS training partition. CSTNET and ISCX-Direct support flowpacket contains IP and TCP headers followed by a transport level evaluation, while ISCX-VPN, with only 966 independent payload carrying TLS records. The outer headers expose retained flows, is evaluated at packet level. We also consider addressing and transport metadata. Within the payload, TLS packet-level ISCX-Direct and CSTNET. record headers reveal framing information, including record Source and destination identifiers can provide collectionlength, and unencrypted handshake messages expose selected specific shortcuts. For each application, we measure the fraction protocol parameters. The retained payload therefore combines of its distinct 5-tuples that occur in no other application. visible protocol fields with ciphertext. Fig. 2 shows that many tuples are application-exclusive. In We use the ISCX suite and CSTNET to study encrypted unfrozen flow-level CSTNET classification, retaining these traffic from different collection environments. We reorganize identifiers raises ET-BERT’s Macro-F1 from 60.04% to 85.23% ISCX traces by access setting into ISCX-Direct, which uses a and YaTC’s from 74.42% to 92.92%. We therefore mask IP direct connection, and ISCX-VPN, which uses a VPN proxy [3]. addresses, transport ports, and the remaining 5-tuple fields in CSTNET contains TLS 1.3 traffic collected on the China all main public comparisons. Science and Technology Network [5]. We report accuracy (Acc) and Macro-F1. Acc measures the The original ISCX traces also include plaintext and non- overall fraction of correct predictions, while Macro-F1 averages target traffic. Following the protocol-based preprocessing of class-specific F1 scores with equal weight and therefore Zhao et al. [8], we remove plaintext flows using protocol captures recognition across imbalanced classes. We report types decoded by tshark. We then measure the zero-order both frozen and unfrozen results. In the frozen setting, the entropy of the retained payloads. Table I reports post-filtering pretrained encoder is fixed and only the classifier is trained, values of 7.97 and 7.95 bits for ISCX-Direct and ISCX-VPN, which directly reflects the quality of the learned representation. respectively, close to the 8-bit maximum for a byte.

3

III. L EARNING FROM P ROTOCOL -V ISIBLE S TRUCTURE We first examine byte-level dependence in the retained payloads. For a sequence S = (s1 , . . . , sNs ) over the byte alphabet X = {0, . . . , 255}, let P (x) denote the empirical byte distribution. At lag k ∈ {1, . . . , Ns − 1}, let Pk (x, y) be the empirical joint distribution of pairs (si , si+k ) with 1 ≤ i ≤ Ns − k. Its marginals are Pk (x) and Pk (y), with Pk (y | x) = Pk (x, y)/Pk (x). We compute marginal entropy, conditional entropy, and mutual information as X H0 (S) = − P (x) log2 P (x), x∈X

X

Pk (x, y) log2 Pk (y | x),

x,y∈X

Ik (S) =

X

Pk (x, y) log2

x,y∈X

CSTNET

Payload entropy

Payload MI

Plaintext MI

Ciphertext MI

8

2.0

6

1.5

4

1.0

2 0

0.5

0

1

2

3

4

5

6

7

8

9

10

Mutual information (bit)

ISCX-VPN

0.0

Lag k

A. Entropy and Mutual Information

Hk (S) = −

ISCX-Direct

Payload entropy (bit)

In the unfrozen setting, the entire model is fine-tuned to reflect end-to-end performance. Our contextual baselines are ET-BERT, YaTC, and NetMamba [5]–[7]. We also compare with Pcap-Encoder and shallow classifiers, both of which have been reported to outperform contextual pretraining baselines under flow-disjoint evaluation [8], [11]–[13]. Our models comprise two byte-level encoders, ByteBERT and TrafficDCNet, and their alignment framework, AlignTraffic. We introduce their designs in Sections IV and V. Public baselines use released implementations or checkpoints. Appendix Cand D provides reproducibility information.

(1)

Pk (x, y) . Pk (x)Pk (y)

H0 measures marginal byte uncertainty and is at most 8 bits. Hk measures the uncertainty in the later byte given the earlier byte, while Ik measures their shared information. We compute these statistics over the full retained payload and additionally estimate Ik within its protocol-visible and ciphertext regions. Fig. 3 shows a consistent pattern across ISCX-Direct, ISCXVPN, and CSTNET. Although full-payload conditional entropy remains close to 8 bits, nonzero mutual information reveals residual byte dependence that peaks between adjacent bytes and generally decreases with lag. Region-specific analysis indicates that this dependence comes primarily from protocol-visible plaintext, which exhibits substantially stronger dependence and follows the same pattern across lags. Ciphertext mutual information remains close to zero across the measured lags, consistent with its expected randomness. The local dependencies retained in visible protocol fields therefore provide a basis for contextual pretraining. B. Payload Interventions on CSTNET To further assess the classification value of the visible protocol fields, we conduct controlled payload interventions on CSTNET. CSTNET removes the TCP handshake and the initial client TLS ClientHello. Its first retained packet can still contain visible server-side handshake information, while later

Fig. 3. Payload entropy and mutual information across byte lags. Bars show marginal entropy H0 at k = 0 and conditional entropy Hk at positive lags. Solid, dashed, and dotted curves show mutual information for the full payload, protocol-visible plaintext, and ciphertext, respectively.

Fig. 4. An example of the retained five-packet prefix in CSTNET. The first retained packet contains server-side TLS handshake information, while the following packets primarily contain TLS-encrypted payload. TABLE II U NFROZEN FLOW- LEVEL CLASSIFICATION ON CSTNET UNDER PAYLOAD INTERVENTIONS USING A LIGN T RAFFIC . ACC IS IN PERCENTAGE .

Payload intervention

Acc

Original Shuffle payload Random payload Shuffle only 1st packet payload Shuffle except 1st packet payload

90.35 63.28 60.63 61.14 89.04

packets primarily carry encrypted payload. Fig. 4 illustrates a five-packet prefix with this structure. We therefore examine whether the model can exploit the plaintext protocol information retained in the payload for application classification. Using AlignTraffic as a classification probe, we compare the original input with versions that shuffle only the first packet’s payload or only the remaining four packets’ payloads. We also shuffle all payload bytes or replace them with random values as two additional controls. Table II shows that shuffling only the remaining four packets yields 89.04% accuracy, close to the original 90.35%. Shuffling the first retained packet instead reduces accuracy to 61.14%, comparable to shuffling the entire payload at 63.28% or randomizing it at 60.63%. The classification-relevant payload structure is thus concentrated in the first retained packet. Together with the region-specific dependence measurements, these results support the role of visible protocol fields in application classification.

4

IV. E XPLOITING L OCAL D EPENDENCIES WITH B YTE -L EVEL M ODELS

𝑧Ƹ 𝑙 = 𝐷𝑙 𝑧 𝑙

~ l+1

𝑧 l = Dechunk 𝑧Ƹ 𝑙+1 𝑝𝑙

𝑧 𝑧Ƹ 𝑙+1

𝑧

xL

l+1

A. Prediction Granularity and Local Context

+𝐴𝑙 𝑒Ƹ l

Decoder

Section III shows that protocol-visible plaintext in encrypted traffic retains contextual dependencies and provides useful Bottleneck 𝑧Ƹ 𝑙+1 = 𝐵 𝑒 𝑙+1 information for application classification. However, Zhao et Encoder al. [8] report that shallow classifiers can match or outperform 𝑒 l+1 𝑒 l+1 𝑝𝑙 = Chunk 𝑒Ƹ 𝑙 𝑝𝑙 existing pretrained models after controlling for data leakage. xL 𝑒Ƹ 𝑙 This motivates us to examine whether current input represen𝑒Ƹ 𝑙 = 𝐸 𝑙 𝑒 𝑙 tations and pretraining objectives allow models to exploit the available protocol structure effectively. Fig. 5. TrafficDCNet with one dynamic-chunking stage. We notice that Fig. 3 shows that byte dependence in protocolvisible regions is strongest between adjacent bytes and generally decreases with lag. To exploit this local structure, the input units This formulation exposes neighboring original byte positions and masking policy should preserve informative neighboring to the objective whenever they remain uncorrupted. We match the BERT [14] backbone configuration and training schedule bytes as context. However, ET-BERT’s tokenizer encodes overlapping two- to ET-BERT, while only the vocabulary and prediction units byte units [5]. For bytes a, b, c, d, the units are (a, b), (b, c), differ. TrafficDCNet. ByteBERT fixes the input unit at one byte. and (c, d). When the middle unit is masked but its neighbors remain visible, both target bytes are still present in the input. We further consider whether a model can learn how to group Token recovery can therefore exploit these overlapping copies, bytes as part of representation learning. Inspired by tokenizerweakening the need to learn dependencies between distinct free hierarchical sequence models [15]–[17], TrafficDCNet embeds raw bytes and learns content-dependent boundaries original bytes. YaTC masks whole patches and minimizes mean squared through dynamic chunking. This design can adapt its internal error (MSE) [6]. Adjacent bytes within a masked patch are resolution to the heterogeneous structure of visible fields and hidden together, removing their mutual context. MSE also ciphertext without a fixed multi-byte vocabulary. As shown in Fig. 5, its U-Net encoder [18] progressively treats bytes as numerical values and favors a conditional mean under uncertainty, although traffic bytes are discrete symbols. compresses the byte sequence. A causal Mamba-2 bottleNetMamba similarly masks groups of bytes within a stride [7]. neck [19] processes the compressed states, and a decoder These observations suggest that current contextual pretraining restores the original byte resolution through dechunking and methods do not fully exploit local byte dependencies, moti- skip connections. Appendix A provides the full architecture, vating byte-level input and prediction objectives that preserve dynamic chunking and dechunking operations, and ratio regularizer. informative neighboring context. TrafficDCNet is pretrained by next-byte prediction. With t = (t1 , . . . , ti ), its objective is ≤i B. Byte-Level Contextual Models Building on this analysis, we develop two byte-level models designed to exploit neighboring-byte dependencies and evaluate whether better use of this local structure improves pretrained representations and downstream classification. ByteBERT. We adapt the ET-BERT formulation so that each byte occupies one token position. Single-byte targets remove overlapping copies and allow neighboring unmasked bytes to serve as context. For raw traffic T = (t1 , . . . , tN0 ), every byte occupies one token position, giving u = (u1 , . . . , uN0 ) with ui = ti . The encoder fw produces token representations and a pooled global representation Rw = fw (u) ∈ RN0 ×dw ,

Rw = Pool(Rw ) ∈ Rdw .

1

B X X

Nmask i=1

k∈M(i)

(i)

log Pθw (uk | ũ(i) ).

NX 0 −1 1 log Pθb (ti+1 | t≤i ), N0 − 1 i=1

(4)

LDC = LNBP + αLratio . The ratio loss regularizes dynamic chunking toward the target retained fractions. The encoder fb returns Rb = fb (T ) ∈ RN0 ×db ,

Rb = Pool(Rb ) ∈ Rdb .

(5)

ByteBERT uses bidirectional masked prediction, while TrafficDCNet combines causal next-byte prediction with adaptive grouping. Both retain byte-resolution outputs, making them suitable for examining local context with different views.

(2)

For sample i, each valid position is independently selected with probability pmask = 0.15 to form M(i) . The corrupted sequence is ũ(i) . For a batch of B samples and Nmask = P (i) i |M |, the objective is Lw MLM = −

LNBP = −

(3)

C. Classification and Representation Quality Table III compares the five contextual models on flowlevel CSTNET and ISCX-Direct. ByteBERT and TrafficDCNet both improve frozen Macro-F1 over ET-BERT, YaTC, and NetMamba. On CSTNET, ByteBERT reaches 48.91% and TrafficDCNet reaches 58.80%, compared with 35.79% for the strongest of these baselines. On ISCX-Direct, their scores

5

TABLE III F LOW- LEVEL CLASSIFICATION WITH CONTEXTUAL PRETRAINING ON CSTNET AND ISCX-D IRECT. ACC AND M ACRO -F1 ARE PERCENTAGES , REPORTED AS MEAN ± STANDARD DEVIATION .

CSTNET Method

ISCX-Direct

Frozen

Unfrozen

Frozen

Unfrozen

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

ET-BERT YaTC NetMamba

17.89 ± 1.31 38.04 ± 1.04 14.40 ± 1.38

11.49 ± 1.81 35.79 ± 1.74 11.80 ± 0.87

62.56 ± 0.87 74.52 ± 0.55 79.44 ± 0.99

60.04 ± 0.68 74.42 ± 1.27 77.10 ± 0.85

23.20 ± 1.68 65.68 ± 0.74 32.07 ± 0.57

3.77 ± 1.58 55.08 ± 1.06 24.45 ± 1.78

71.00 ± 1.49 77.22 ± 1.69 67.48 ± 0.74

56.85 ± 1.55 61.31 ± 2.00 65.57 ± 0.80

ByteBERT TrafficDCNet

53.20 ± 0.90 62.10 ± 1.14

48.91 ± 0.55 58.80 ± 1.71

88.62 ± 1.27 88.24 ± 0.68

86.16 ± 1.65 85.98 ± 1.66

71.92 ± 1.81 71.33 ± 1.40

62.55 ± 1.24 63.70 ± 1.49

86.49 ± 1.52 78.44 ± 1.08

77.39 ± 0.65 67.74 ± 1.88

0.065

0.306

2/5

3/5

4/5

0.617

5/5

0.698 Dim 2

100

1/5

80 60 40

Dim 1 (a) ET-BERT

20

ET-BERT

YaTC

ByteBERT

TrafficDCNet

Fig. 6. 5NN-purity of frozen CSTNET flow representations under different modeling granularities. Each category gives the number of same-class neighbors among five nearest neighbors. Values above the bars denote mean purity.

are 62.55% and 63.70%, compared with 55.08%. After finetuning, ByteBERT achieves 86.16% Macro-F1 on CSTNET and 77.39% on ISCX-Direct. These results support byte-level modeling as a way to use the available contextual signal. We also measure the class consistency of frozen representations. A sample’s 5NN-purity is the fraction of its five nearest neighbors that share its class label. Fig. 6 shows mean purity increasing from 0.065 for ET-BERT and 0.306 for YaTC to 0.617 for ByteBERT and 0.698 for TrafficDCNet. This improvement indicates that the byte-level encoders organize samples into more class-consistent neighborhoods before taskspecific encoder adaptation. A similar pattern appears in the t-SNE projections [20] in Fig. 7. ByteBERT and TrafficDCNet exhibit compact local groups consistent with their higher purity and frozen classification scores. We further visualize the models’ predictions on their pretraining tasks in Fig. 8. YaTC minimizes MSE and achieves a low error of 0.0777, yet its reconstructions largely collapse toward mean byte values and fail to reproduce the original patterns at masked positions. ET-BERT recovers many masked tokens, but its sliding-window tokenization leaves copies of the target bytes in neighboring tokens. This shortcut allows accurate token recovery with little need to learn dependencies between distinct original bytes, consistent with its weak frozen

Dim 2

0

Dim 1 (b) YaTC

Dim 2

Ratio (%)

Dim 2

0/5

Dim 1 (c) ByteBERT

Dim 1 (d) TrafficDCNet

Fig. 7. t-SNE projections of frozen CSTNET flow representations. Each panel uses a model-specific subset of eight classes. Colors indicate class membership within each panel.

classification performance and low 5NN-purity. ByteBERT recovers part of the protocol-visible content through individualbyte prediction without overlapping target copies. Its higher frozen classification scores and 5NN-purity indicate that this contextual prediction produces more useful representations. V. B EYOND C ONTEXTUAL P REDICTION THROUGH C ROSS -V IEW A LIGNMENT A. Aligning Complementary Byte-Level Views Section III identifies a source of contextual supervision, and Section IV shows how byte-level models can use it more effectively. Yet full-payload mutual information remains small because much of the observed sequence is encrypted. This raises the broader question of whether other pretraining paradigms can provide useful supervision when contextual prediction offers limited signal. One alternative is contrastive learning, which derives supervision from correspondence

6

4574 7405 05dc dcd2 d21d 1d40 4000 002e 2e06 06a6 a687 8768 68ee ee9b 9b2b 2bac acee ee1e 1e6e 6e01 01bb bbe9 e9ee ee41 4129 29df df73 73ee eeee ee8c 8c9b 9b50 50ee ee01 01f5 f53e 3e61 6100 0000 0016 1603 0303 0300 007a 7a02 0200 0000 0076 7603 0303 0352 52b9 b9f8 f82b 2b2f 2fee eefb fbe1 e1f4 f49f 9fe8 e82c 2cc5 c535 35a5 a5c1 c119 19cf cfee eeef efee ee3b 3bee eee3 e3ee eead ad4d 4d79 796c 6c45 4570 701a 1a20 20e1 e1ee ee13 1376 761a 1a09 099c 9c11 11ee eee9 e90c 0cee eeee eedf df2a 2a58 5859 5918 189d 9dd9 d92c 2c7d 7db6 b683 830d 0d44 4400 00ee eeea eaad ad91 910c 0c13 1302 0200 0000 002e 2e00 002b 2b00 0002 0203 0304 0400 0033 3300 0024 2400 001d 1d00 0020 2018 18b0 b062 6227 2703 03ee eee6 e6ee ee9a 9a13 1309 09ba ba35 3500 0035 3593 933d 3da3 a30b 0b69 69a5 a5ee eeed ed8a 8aee eea2 a280 80ee eefd fdc2 c258 583a 3a14 1403 0303 0300 0001 0101 0117 1703 0303 0300 0034 348a 8a05 05f5 f5da da0f 0f1c 1cee ee22 22bf bfc0 c0e9 e994 94ba ba3f 3f97 9779 7985 85f7 f7c6 c68d 8d6a 6a99 99e8 e8ee eef1 f1ef ef81 81ee ee19 1953 5344 4402 02e4 e4f9 f938 382c 2c3a 3aea eaee eeca caee eeee ee02 02d3 d387 8747 471b 1b7b 7b1c 1c51 519f 9f4e 4e17 ⟨TLS⟩ 1703 0303 0312 12cb cbee eecf cf6e 6eee ee04 04c8 c88f 8fee eeee eef9 f9e2 e24b 4b41 41e4 e4ee ee93 9344 4444 44a7 a746 461e 1ece ce0a 0a90 9036 36ee ee0e 0e55 555e 5ebb bbb9 b9da da36 36ee ee7c 7cde de67 676f 6f2c 2cee ee1d 1d10 1020 2058 58da da93 938b 8baa aaa5 a5c7 c76a 6aad ad48 4895 959d 9d4e 4eab abd8 d83a 3a70 707f 7ff4 f4cf cfa1 a1fc fc37 379a 9a0e 0efd fdee ee1e 1e0e 0e79 79af afb0 b01a 1ac8 c84f 4f73 7327 2767 67e5 e52b 2b85 8572 [UNK] [UNK] [UNK] 4574 7405 05dc dcd2 d21e 1e40 4000 002e 2e06 06a6 a686 8668 6859 599b 9b2b 2b00 0010 101e 1e6e 6e01 01bb bbe9 e9ee ee41 4129 29e5 e527 275c 5c4e 4e8c 8c9b 9b50 5018 1801 01f5 f55d 5d71 7100 0000 0084 840f 0fee ee08 08cb cbe7 e77b 7bee eef1 f1bc bc60 60bd bd20 2042 4298 9853 53df df15 15a7 a758 58c9 c959 59ee ee81 81ee eee6 e6ee ee39 3956 56c6 c654 54d5 d5e3 e31b 1be7 e7ce ce4e 4ed1 d1fc fc8b 8b01 01ea ea82 8234 3486 866d 6dee ee9e 9eb7 b7ee eeee eebf bfb2 b2b3 b357 57ee eef6 f6e9 e905 05ee eeee ee19 19b4 b408 086e 6eaa aacf cf71 7167 6708 08dd ddee ee09 0929 29c3 c3ee eeee ee1c

header

(a) YaTC

payload-plaintext

(b) ET-BERT

payload-TLS

45 74 05 dc d2 1d 40 00 2e 06 a6 87 68 ee 9b 2b ac ee 1e 6e 01 bb e9 ee 41 29 df 73 ee ee 8c 9b 50 ee 01 f5 3e 61 00 00 16 03 03 00 7a 02 00 00 76 03 03 52 b9 f8 2b 2f ee fb e1 f4 9f e8 2c c5 35 a5 c1 19 cf ee ef ee 3b ee e3 ee ad 4d 79 6c 45 70 1a 20 e1 ee 13 76 1a 09 9c 11 ee e9 0c ee ee df 2a 58 59 18 9d d9 2c 7d b6 83 0d 44 00 ee ea ad 91 0c 13 02 00 00 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 18 b0 62 27 03 ee e6 ee 9a 13 09 ba 35 00 35 93 3d a3 0b 69 a5 ee ed 8a ee a2 80 ee fd c2 58 3a 14⟨TLS⟩ 03 03 00 01 01 17⟨TLS⟩ 03 03 00 34 8a 05 f5 da 0f 1c ee 22 bf c0 e9 94 ba 3f 97 79 85 f7 c6 8d 6a 99 e8 ee f1 ef 81 ee 19 53 44 02 e4 f9 38 2c 3a ea ee ca ee ee 02 d3 87 47 1b 7b 1c 51 9f 4e 17⟨TLS⟩ 03 03 12 cb ee cf 6e ee 04 c8 8f ee ee f9 e2 4b 41 e4 ee 93 44 44 a7 46 1e ce 0a 90 36 ee 0e 55 5e bb b9 da 36 ee 7c de 67 6f 2c ee 1d 10 20 58 da 93 8b aa a5 c7 6a ad 48 95 9d 4e ab d8 3a 70 7f f4 cf a1 fc 37 9a 0e fd ee 1e 0e 79 af b0 1a c8 4f 73 27 67 e5 2b 85 72 [UNK] [UNK] [UNK] 45⟨IP⟩ 74 05 dc d2 1e 40 00 2e 06 a6 86 68 59 9b 2b 00 10 1e 6e 01 bb e9 ee 41 29 e5 27 5c 4e 8c 9b 50 18 01 f5 5d 71 00 00 84 0f ee 08 cb e7 7b ee f1 bc 60 bd 20 42 98 53 df 15 a7 58 c9 59 ee 81 ee e6 ee 39 56 c6 54 d5 e3 1b e7 ce 4e d1 fc 8b 01 ea 82 34 86 6d ee 9e b7 ee ee bf b2 b3 57 ee f6 e9 05 ee ee 19 b4 08 6e aa cf 71 67 08 dd ee 09 29 c3 ee ee 1c 1d a8 c3 bf 50 ee 02 bd 59 b6 40 22 e8 ee 90 1b 83 31 89 73 0c 20 74 10 e0 56 b0 7d 3e 72 d8 b1 38 ee b1 81 b9 d3 8c 1e 3c 6f 16 1c ee a6 83 d2 f4 72 cd d4 ef e0 c4 4c 34 ee af 28 ee ee 4b 51 ee 59 02 e1 59 89 e8 5d 7f 79 1a 88 84 2c ee a4 b2 ae c2 be ee d9 4e a4 bf 95 54 be ed 60 e5 6f 7d 63 00 b1 ae b4 ee 17 0b 72 08 ee 05 40 06 ee f9 da c5 aa 69 06 8f 06 ee 8a 56 6b a0 ca 3c ee ee ee f1 ee 32 52 42 c7 ae ee ee 6d 33 ee 59 f5 ee d8 68 a9 0f 19 a5 87 2b c9 ee 6e 5a d3 f0 93 ee 8b ee c4 d7 23 91 90 11 ff ee fb 28 5b 0b fe 42 7f ee 25 a9 ee 95 ee ef 85 07 ee 3f 53 47 3b 2e a2 32 db c7 b1 23 ca fe 13 [UNK] [UNK] [UNK] 45⟨IP⟩ 74 04 c0 d2 1f 40 00 2e 06 a7 86 68 59 9b 2b 00 10 1e 6e 01 bb e9 ee 41 29 ea db 5c 4e 8c ee 50 18 01 f5 bf a6 00 00 46 41 a2 f0 ea 2f ee eb d0 16 52 f5 b6 3d 52 9e da 5c 88 02 77 ee 47 97 26 ee 10 b8 3a 38 8d c0 04 6d 2b 3d 88 f6 50 50 c3 08 7f 91 ee b8 ee ee ee dc a1 ce a2 29 c8 ee 16 ab e3 e0 85 da f1 45 ee 04 90 46 56 f7 4a 7b d5 15 3b 94 01 ee f7 73 26 fb 80 ee 8e 7b 37 9e ce 38 43 de e3 e9 b2 50 4a 08 fc 7b d0 6a ee 56 a8 8c 90 ee 55 20 c6 25 34

header

payload-plaintext

payload-TLS

(c) ByteBERT

Fig. 8. Qualitative pretraining examples. YaTC shows original, masked, reconstructed, and error images from top left to bottom right. In the byte examples, yellow marks headers, blue marks protocol-visible payload, and magenta marks TLS ciphertext. Green and red mark correct and incorrect predictions.

MLM loss 52 54 [MASK] 35 02 08 00 27 75 [MASK] 08 00 45 00 00 fd 2e b1 40 00 [MASK] 00 00 0a 00 02 0f ad fc

Cross attention-based fusion branch

Bytes View

Matching loss

𝐡𝒃

Single-byte word View

𝐡𝑤

Contrastive loss TrafficDCNet

𝒬𝑏

ByteBERT

𝒬𝑤 52 54 00 12 35 02 08 0027 75 8c 62 08 00 45 00 00 fd 2e b1 40 00 80 06 00 00 0a 00 02 0f ad fc 6b 11 c0 53 14 66 7e 37 85 ce 01 d7 d9 e7 50 18

bytes

traffic

52 54 00 12 35 02 08 0027 75 8c 62 08 00 45 00 00 fd 2e b1 40 00 80 06 00 00 0a 00 02 0f ad fc 6b 11 c0 53 14 66 7e 37 85 ce 01 d7 d9 e7 50 18

Single-byte word

Fig. 9. Architecture of AlignTraffic.

jective LC brings together the two representations of the same sample relative to those of different samples, using momentum encoders and feature queues [21], [22]. A fusion encoder applies cross-attention to the token-level representations, which share the original byte resolution. A matching objective LM trains the fused features to distinguish same-sample pairs from hard negative pairs. Joint training also retains contextual supervision. The auxiliary fused-view MLM objective predicts bytes at synchronized corrupted positions in the two branches. With MLM weight η and ratio-loss weight α, the complete objective is LAlign = LC + LM + ηLwb MLM + αLratio .

(6)

We first pretrain ByteBERT and TrafficDCNet independently, then initialize AlignTraffic from those encoders and optimize the joint objective. The correspondence objectives organize the complementary features around sample identity, while fusedview MLM preserves their connection to the observed bytes. B. Classification with Cross-View Alignment

between different views of the same instance rather than from contextual byte prediction [21], [22]. Such views are often constructed through transformations that preserve the instance’s semantic content. For encrypted traffic, however, these transformations are difficult to design because modifying bytes may disrupt protocol structure or remove applicationrelevant information, while encryption obscures the content needed to assess whether semantics are preserved. We therefore build on the two byte-level encoders developed in Section IV, using their distinct modeling biases to construct complementary views of the same unmodified traffic sample. ByteBERT learns bidirectional dependencies through masked prediction over individual bytes, whereas TrafficDCNet combines causal nextbyte prediction with adaptive byte grouping. These distinct modeling choices provide complementary views for alignment. AlignTraffic aligns the global representations of these views and fuses their byte-level features. Appendix B provides the projection and fusion formulations and full definitions of the contrastive, matching, and MLM objectives. Projection heads map the pooled features to normalized embeddings hw and hb in a shared space. A contrastive ob-

We next examine whether the additional supervision from cross-view alignment improves classification beyond contextual pretraining alone and whether AlignTraffic can outperform shallow learning, whose effectiveness was emphasized by Zhao et al. [8]. Tables IV and V compare AlignTraffic with shallow learning, Pcap-Encoder, and its two constituent encoders. The shallow baseline selects among Random Forest, XGBoost, and LightGBM using explicit TCP/IP and TLS features, including record statistics and visible ServerHello fields. Appendix D details the feature groups. For Pcap-Encoder, we report only unfrozen flow-level results. Following the original evaluation procedure, we obtain flow labels by majority voting over packet predictions [8]. After fine-tuning, AlignTraffic achieves the highest Macro-F1 among the compared methods on all four public tasks. On flowlevel CSTNET and ISCX-Direct, it reaches 89.20% and 83.92%, exceeding shallow learning by 30.70 and 14.84 percentage points, respectively. It also outperforms Pcap-Encoder on both flow-level tasks. On packet-level ISCX-Direct and ISCX-VPN, its gains over shallow learning are 5.97 and 24.01 percentage points.

Align

7

TABLE IV F LOW- LEVEL CLASSIFICATION ON CSTNET AND ISCX-D IRECT. ACC AND M ACRO -F1 ARE PERCENTAGES , REPORTED AS MEAN ± STANDARD DEVIATION .

CSTNET Method

ISCX-Direct

Frozen

Unfrozen

Frozen

Unfrozen

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Shallow learning Pcap-Encoder

– –

– –

78.11 ± 1.66 71.35 ± 1.48

58.50 ± 1.50 61.88 ± 1.21

– –

– –

86.09 ± 0.85 84.75 ± 0.86

69.08 ± 1.38 68.52 ± 1.01

ByteBERT TrafficDCNet AlignTraffic

53.20 ± 0.90 62.10 ± 1.14 67.08 ± 1.23

48.91 ± 0.55 58.80 ± 1.71 64.22 ± 0.95

88.62 ± 1.27 88.24 ± 0.68 90.35 ± 0.70

86.16 ± 1.65 85.98 ± 1.66 89.20 ± 1.88

71.92 ± 1.81 71.33 ± 1.40 76.34 ± 0.68

62.55 ± 1.24 63.70 ± 1.49 65.04 ± 0.97

86.49 ± 1.52 78.44 ± 1.08 90.36 ± 0.93

77.39 ± 0.65 67.74 ± 1.88 83.92 ± 1.01

TABLE V PACKET- LEVEL CLASSIFICATION ON ISCX-D IRECT AND ISCX-VPN. ACC AND M ACRO -F1 ARE PERCENTAGES , REPORTED AS MEAN ± STANDARD DEVIATION .

ISCX-Direct Method

Frozen

ISCX-VPN Unfrozen

Frozen

Unfrozen

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Shallow learning Pcap-Encoder

– 96.97 ± 0.68

– 39.94 ± 1.39

93.07 ± 1.12 98.66 ± 0.57

68.37 ± 1.44 62.67 ± 1.17

– 97.01 ± 0.63

– 65.01 ± 1.08

94.43 ± 0.78 97.45 ± 0.55

59.35 ± 1.31 66.56 ± 1.14

ByteBERT TrafficDCNet AlignTraffic

96.99 ± 0.61 97.40 ± 0.56 97.40 ± 0.54

56.66 ± 1.57 64.83 ± 1.19 64.87 ± 1.02

97.80 ± 0.66 99.33 ± 0.51 99.44 ± 0.50

66.43 ± 1.20 71.18 ± 1.08 74.34 ± 0.89

89.76 ± 0.92 93.95 ± 0.81 95.91 ± 0.73

60.17 ± 1.34 72.70 ± 1.27 74.31 ± 1.10

95.71 ± 0.70 96.88 ± 0.60 97.73 ± 0.58

75.92 ± 1.03 76.21 ± 0.98 83.36 ± 0.84

0/5 1/5

0.617

0.698

4/5 5/5

0.727

80 Dim 2

Ratio (%)

100

2/5 3/5

60 40 20 0

Dim 1

ByteBERT TrafficDCNet AlignTraffic

(a) 5NN-purity

(b) AlignTraffic t-SNE

Fig. 10. Frozen CSTNET flow representations after cross-view alignment. Panel (a) compares ByteBERT, TrafficDCNet, and AlignTraffic using the purity categories in Fig. 6. Panel (b) projects eight classes using t-SNE.

Among the reported frozen results, AlignTraffic achieves the highest Macro-F1 on all four public tasks, outperforming both constituent encoders. On CSTNET, alignment raises the score from 48.91% for ByteBERT and 58.80% for TrafficDCNet to 64.22%. Packet-level ISCX-VPN shows the same progression, from 60.17% and 72.70% to 74.31%. The improvement with a fixed downstream encoder demonstrates that alignment strengthens the pretrained representation.

the resulting class structure, with separated groups in the projected features. Fig. 11(a) shows AlignTraffic recovering protocol-visible byte structure. The two loss curves in Fig. 11(b) and (c) connect independent ByteBERT pretraining to alignment training. ByteBERT’s MLM loss decreases early and then stabilizes, whereas fused-view MLM continues to improve during AlignTraffic training. The continuous reference line makes this progression visible across the two stages. Summarising the frozen classification and purity results, these observations show that cross-view training improves how the encoders use the available information. D. Objective Ablation We retain the two-branch framework and remove individual objectives to assess their contributions. Table VI shows that removing both alignment objectives reduces frozen Macro-F1 by 17.33 percentage points on CSTNET and 16.60 percentage points on ISCX-Direct. Removing either contrastive or matching supervision also lowers performance. MLM makes a complementary contribution, with its removal producing the largest reduction in frozen Macro-F1. The full objective therefore benefits from both byte-level contextual learning and cross-view correspondence.

C. Representation Structure and Optimization Fig. 10a compares the two byte-level encoders with AlignTraffic. Mean 5NN-purity increases from 0.617 for ByteBERT and 0.698 for TrafficDCNet to 0.727 after alignment. The aligned representation has the highest mean purity among the five encoders in the neighborhood analysis. Fig. 10b illustrates

E. Industrial Classification and Geographic Transfer We further evaluate AlignTraffic on a private industrial flowclassification dataset collected from March 2025 to March 2026. It covers 165 applications across multiple devices and network conditions. Inputs retain payloads from flows with at

8

45 74 05 dc d2 1d 40 00 2e 06 a6 87 68 59 9b 2b ac 10 1e 6e 01 bb e9 ee 41 29 df 73 5c 4e 8c 9b 50 10 01 f5 3e 61 00 00 16 03 03 00 7a 02 00 00 76 03 03 52 b9 2f 2b 2f 97 fb e1 f4 9f e8 2c c5 35 a5 c1 19 cf b6 ef ee 3b cb e3 f0 ad 4d 79 6c 45 70 1a 20 e1 8b 13 71 1a 09 9c 11 7d e9 0c 12 5d df 2a 58 59 18 9d d9 2c 7d b6 83 0d 44 00 ee ea ad 91 0c 13 02 00 00 2e 00 2b 00 02 03 04 00 33 00 24 00 1d 00 20 18 b0 62 27 03 44 e6 c8 9a 13 09 ba 35 00 35 93 3d a3 0b 69 a5 70 ed 8a e8 a2 80 e8 fd c2 58 3a 14 03 03 00 01 01 17 03 03 00 34 8a 05 f5 da 0f 1c 88 22 bf c0 e9 94 ba 3f 97 79 85 f7 c6 8d 6a 99 e8 f1 f1 ef 81 85 19 53 44 02 e4 f9 38 2c 3a ea 11 ca 2e 39 02 d3 87 47 1b 7b 1c 51 9f 4e 17⟨TLS⟩ 03 03 12 cb 51 cf 6e 32 04 c8 8f 1b 54 f9 e2 4b 41 e4 0f 93 44 44 a7 46 1e ce 0a 90 36 4c 0e 55 5e bb b9 da 36 c7 7c de 67 6f 2c 51 1d 10 20 b2 da 93 8b aa a5 c7 6a ad 48 95 9d 4e ab d8 3a 71 7f f4 cf a1 fc 37 9a 0e fd 61 1e 0e 79 af b0 1a c8 4f 73 61 67 e5 2b 85 72 [UNK] [UNK] [UNK] 45 74 05 dc d2 1e 40 00 2e 06 a6 86 68 59 9b 2b ac 10 1e 6e 01 bb e9 ee 41 29 e5 27 5c 4e 8c 9b 50 18 01 f5 5d 71 00 00 84 0f c4 08 cb e7 7b 4b f1 61 60 bd 20 42 98 53 df 15 a7 ba c9 59 bd ba 99 e6 12 39 56 c6 54 d5 e3 1b e7 ce 4e d1 fc 8b ba ea 82 34 86 6d 71 9e b7 f2 1d bf b2 61 57 08 f6 e9 05 05 42 19 b4 08 6e aa cf 71 61 08 dd 2f 09 29 c3 59 71 61 1d a8 ba bf a0 d2 02 bd 59 b6 40 22 e8 0c 90 1b 83 31 89 73 a0 20 74 10 e0 56 b0 7d 3e 72 d8 b1 38 ba b1 81 b9 d3 ba ba 61 61 61 61 6b a6 83 d2 f4 72 61 d4 ef b2 c4 4c 34 80 af 28 61 83 4b 51 85 59 02 e1 59 89 ba 5d 7f 79 1a a0 84 2c 2d a4 b2 a0 c2 be 53 d9 4e a4 a0 95 54 be ed 60 e5 6f 7d 63 00 b1 ae b4 cd b2 0b 72 a0 c7 05 40 06 c1 f9 da c5 61 69 ba 8f 06 51 8a 56 6b a0 ca 3c 82 56 78 71 71 32 52 42 c7 ae 2d b2 6d 33 1e 59 f5 6f d8 68 a9 0f 19 a5 87 2b c9 5a ba 5a d3 b2 93 b2 b2 b2 c4 d7 23 91 90 11 b2 a7 a0 28 5b 0b fe 42 7f cf b2 a9 66 95 b2 ef 85 07 61 61 53 47 3b 2e a2 32 a0 c7 b2 23 ca fe 13 [UNK] [UNK] [UNK] 45 74 04 c0 d2 1f 40 00 2e 06 a7 91 68 59 9b 2b ac 10 1e 6e 01 bb e9 ee 41 29 ea db 5c 4e 8c 9b 50 18 01 f5 bf 41 00 00 46 41 a2 f0 ea 2f db eb d0 16 b2 f5 b6 3d 71 9e da 5c ba 02 77 61 47 97 26 21 10 b8 3a 61 ba c0 b2 6d 2b 3d 88 f6 50 50 c3 08 7f a0 a0 b8 37 f3 ac b2 a1 ce a2 29 c8 2f 16 ab e3 e0 85 da f1 45 9e 04 90 46 56 f7 4a 7b d5 15 3b 94 01 75 f7 73 26 fb 80 87 8e 7b ba 9e ce 38 43 de e3 e9 b2 50 4a 08 fc a0 d0 6a a7 56 b2 8c 90 95 ba 20 c6 25 b2

Align 5.5 Train MLM loss

5.0 4.5 4.0 3.5 3.0 2.5 2.0

0

10

20

30

40

50

0

10

Epoch

payload-TLS

payload-plaintext

header

6.0

(a) AlignTraffic MLM predictions

20

30

40

50

Epoch

(b) ByteBERT MLM loss

(c) AlignTraffic MLM loss

Fig. 11. Masked-byte prediction and MLM training. In (a), yellow, blue, and magenta indicate headers, protocol-visible payload, and TLS ciphertext. Green and red indicate correct and incorrect predictions. Panels (b) and (c) count epochs within their respective pretraining stages. The continuous green dashed line connects the reference loss across the two panels. TABLE VI F LOW- LEVEL OBJECTIVE ABLATION ON CSTNET AND ISCX-D IRECT. ACC AND M ACRO -F1 ARE PERCENTAGES .

CSTNET Method

ISCX-Direct

Frozen

AlignTraffic w/o MLM w/o contrastive w/o matching w/o alignment

Unfrozen

Frozen

Unfrozen

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

Acc

Macro-F1

67.08 35.84 58.75 55.84 51.11

64.22 29.97 53.87 49.97 46.89

90.35 83.03 82.55 83.03 84.23

89.20 80.76 79.07 80.76 81.94

76.34 41.59 72.16 70.62 57.70

65.04 26.44 62.58 58.42 48.44

90.36 68.60 79.86 77.37 80.09

83.92 55.50 71.03 65.77 65.58

TABLE VII U NFROZEN FLOW- LEVEL CLASSIFICATION ON THE INDUSTRIAL DATASET. ACC AND M ACRO -F1 ARE PERCENTAGES .

Method

Acc

Macro-F1

ET-BERT YaTC Industrial baseline AlignTraffic

67.87 82.90 92.15 94.54

48.21 42.87 42.38 51.26

TABLE VIII F LOW- LEVEL CLASSIFICATION ON TRAFFIC FROM B EIJING AND X I ’ AN WITHOUT TARGET- REGION RETRAINING . ACC AND M ACRO -F1 ARE PERCENTAGES .

Method

Region

Acc

Macro-F1

Industrial baseline AlignTraffic Improvement

Beijing Beijing Beijing

94.79 95.83 +1.04

95.42 96.08 +0.66

Industrial baseline AlignTraffic Improvement

Xi’an Xi’an Xi’an

81.41 87.51 +6.10

83.95 88.69 +4.74

least eight packets and remove packet headers. The training set contains approximately 1.38 million samples, and the test set contains approximately 2.83 million samples with an imbalanced deployment distribution. Appendix E describes the the industrial baseline by 0.66 percentage points in Beijing and 4.74 percentage points in Xi’an. collection. Table VII shows that AlignTraffic reaches 94.54% Acc and 51.26% Macro-F1. It improves Macro-F1 over the industrial F. Computational Cost baseline by 8.88 percentage points and exceeds the compared Although the additional contrastive supervision improves public models. This extends the classification evidence to a AlignTraffic’s representations and classification performance, larger application set and an industrial collection environment. its competitiveness in practice also depends on computational In a separate geographic transfer experiment, we train efficiency. Encoding each sample through two branches and on 887,781 samples from a source region and evaluate on fusing their features introduces additional computation and held-out traffic from Beijing and Xi’an without target-region memory costs. Table IX reports the parameter counts, latency, retraining. The two test sets contain 165,144 and 24,626 and memory usage measured in the offline evaluation. Alignsamples, respectively. Traffic uses 396.35 million parameters and takes 62.82 ms Table VIII shows that AlignTraffic improves Macro-F1 over for inference, compared with 160.67 million parameters and

9

TABLE IX C OMPUTATIONAL COST IN THE OFFLINE EVALUATION . PARAMETERS ARE IN MILLIONS , LATENCY IN MILLISECONDS , AND MEMORY IN MB.

Method ET-BERT Pcap-Encoder TrafficDCNet AlignTraffic

Params (M)

Stage Inference Pretraining Inference Pretraining Inference Pretraining Inference Pretraining

160.67 222.90 249.32 396.35

Latency (ms)

Memory (MB)

17.54 62.69 36.04 94.69 48.38 199.67 62.82 380.07

1013.15 3122.84 669.00 4311.69 980.42 2431.41 3789.12 9648.35

TABLE X PACKET- LEVEL CLASSIFICATION ON ISCX-T OR . ACC AND M ACRO -F1 ARE PERCENTAGES , REPORTED AS MEAN ± STANDARD DEVIATION .

ISCX-Tor Method

Frozen

Unfrozen

Acc

Macro-F1

Acc

Macro-F1

Pcap-Encoder

53.42 ± 1.29 3.99 ± 1.52 2.79 ± 1.88 60.06 ± 1.35

9.40 ± 1.84 4.34 ± 1.79 2.95 ± 1.56 15.00 ± 1.62

Shallow learning

–

–

55.14 ± 1.58 11.00 ± 1.64 4.50 ± 1.73 63.50 ± 1.06 8.86 ± 1.69

19.34 ± 1.11 6.35 ± 1.36 1.58 ± 1.42 22.47 ± 1.49 3.22 ± 1.91

59.65 ± 1.24 21.44 ± 1.41 37.61 ± 1.33

9.34 ± 1.71 15.62 ± 1.55 23.75 ± 1.22

62.60 ± 1.09 44.66 ± 1.28 61.25 ± 1.04

25.65 ± 1.37 20.64 ± 1.63 25.78 ± 1.16

ET-BERT YaTC NetMamba

ByteBERT TrafficDCNet AlignTraffic

17.54 ms for ET-BERT. Its pretraining memory usage reaches 9648.35 MB. For deployments with tight latency or memory budgets, these costs must be weighed against the classification gains [23], [24].

TABLE XI U NFROZEN PACKET- LEVEL CLASSIFICATION ON CSTNET. ACC AND M ACRO -F1 ARE PERCENTAGES .

CSTNET

Method Acc

Macro-F1

ET-BERT YaTC NetMamba Shallow learning

25.41 59.38 57.21 71.06

16.15 33.28 29.33 63.73

ByteBERT TrafficDCNet AlignTraffic

60.71 31.24 35.47

37.21 23.31 24.97

Table X shows low Macro-F1 across the evaluated methods. AlignTraffic obtains the highest frozen and unfrozen scores, 23.75% and 25.78%, respectively, but reliable recognition across classes remains unresolved in this setting. The result identifies a boundary for the current byte-level representations when application structure is concealed by additional encrypted encapsulation. B. Information Available to Individual Packets Packet-level CSTNET restricts the observation in a different way. The flow-level interventions in Q1 show that classificationrelevant structure is concentrated in the first retained packet. Individual later packets receive the same flow label while containing primarily encrypted payload. Table XI reports 37.21% Macro-F1 for ByteBERT, 23.31% for TrafficDCNet, and 24.97% for AlignTraffic. Shallow learning reaches 63.73%, showing the utility of explicit protocol features for this packet-level task. The comparison highlights the role of the observation unit. A representation that benefits from a multi-packet prefix may have substantially less class information available in an isolated packet. VII. R ELATED W ORK A. Traffic Classification and Pretraining

Traffic classification evolved from port matching and DPI to statistical features and raw-byte neural models as encryption reduced access to application content [1], [27]–[30]. SelfA. Application Information Concealed by Tor The preceding sections identify learnable structure in supervised pretraining extends this progression by learning protocol-visible fields and demonstrate how byte-level modeling representations from unlabeled traces. PERT, ET-BERT, YaTC, and cross-view alignment improve traffic representations. We NetMamba, and PacRep explore different input units and now extend the evaluation to more restricted settings, like ISCX- prediction objectives [5]–[7], [31], [32]. Graph-based models Tor [25]. Tor carries application streams through encrypted relay and contrastive learning extend these approaches [33]–[35]. cells over TLS channels, concealing the inner application’s We relate model granularity and supervision to the byte protocol structure from an observer of the outer connection [26]. dependencies that remain observable in encrypted traces. This provides a setting with more restricted application-specific observations than direct TLS traffic. B. Evaluation Bias and Generalization We apply the same protocol-based filtering used for the Zhao et al. [8] examine dataset preparation, flow-disjoint ISCX datasets. The retained subset contains 1,846,917 packets, splitting, frozen evaluation, and protocol-aware pretraining. compared with 1,854,409 before filtering, and its payload Their analysis motivates separating downstream classification entropy increases from 4.43 to 7.99 bits. With 68 independent accuracy from the quality of a pretrained representation. Related retained flows, we evaluate classification at packet level using studies investigate outdated datasets and collection-dependent flow-disjoint partitions and the same identifier masking. shortcuts [9], [36]. Rosetta shows that TCP dynamics can VI. L IMITS OF E NCRYPTED -T RAFFIC P RETRAINING

10

change the observed shape of TLS flows across environments, while data-drift studies document corresponding classifier sensitivity [37], [38]. We use flow-disjoint partitions, identifier masking, and both frozen and unfrozen evaluations, and extend the comparison to industrial geographic transfer.

The projection Al aligns the skip feature width. The encoder, bottleneck, and decoder use causal Mamba-2 blocks [19]. Width changes append a shared learnable vector during expansion and retain leading channels during reduction [16]. The final state ẑ0 has one feature vector per original byte position and gives the representation in Eq. (5).

C. Protocol-Visible Information Header-based classification and Pcap-Encoder demonstrate B. Dynamic chunking the value of observable protocol information [8], [39], [40]. At level l, two learned projections produce qlj = Wq êlj and Akbari et al. [41] show that encrypted-traffic classifiers can ul = W êl . Following dynamic chunking [15], the boundary u j j rely heavily on visible TLS handshake fields, motivating probability is protocol-aware input design. ET-BERT also discusses ciphertext ! qlj · ulj−1 1 randomness as a challenge for traffic modeling [5]. Our analysis l , pl1 = 1. (9) pj = 1− l distinguishes visible fields from ciphertext within retained 2 ∥qj ∥∥ulj−1 ∥ payloads and connects their byte dependencies to classification l l through packet-specific interventions. ByteBERT and TrafficD- The selection is bj = I{pj ≥ 0.5}, and the next level retains CNet examine ways to exploit local structure, drawing on the states at selected positions. These are learned boundaries byte-level and tokenizer-free sequence modeling [15]–[17]. in the representation sequence. The model is not supplied with AlignTraffic further uses their complementary views to provide plaintext-region annotations or supervised protocol boundaries. l During dechunking, let vm be the boundary probability of supervision through sample correspondence. retained state m. Exponential smoothing gives VIII. C ONCLUSION l+1 l l+1 l zl+1 (10) m = vm ẑm + (1 − vm )zm−1 , Encrypted traffic retains learnable structure in protocoll+1 l+1 j, define m(j) = visible regions. Our entropy and mutual-information analysis with Pj z1 l = ẑ1 . For originall position l l b and the confidence c = b p + (1 − blj )(1 − plj ). identifies local byte dependencies, and CSTNET payload j j j n=1 n interventions connect the retained structure to classification. Causal expansion with a straight-through estimator [42] is   ByteBERT and TrafficDCNet exploit this signal through e (11) zlj = clj + stopgradient(1 − clj ) zl+1 m(j) . individual-byte prediction and adaptive grouping. AlignTraffic strengthens their representations with cross-view contrastive The bracket equals one in the forward pass, while its difand matching supervision, improving public and industrial ferentiable component carries the confidence gradient. The classification and supporting transfer across geographic collec- expanded states are combined with the skip features before tion settings. Evaluations with concealed application structure decoder refinement. and individual-packet observations characterize the remaining boundaries. These findings establish a basis for encrypted- C. Prediction and ratio regularization traffic pretraining that matches model design and supervision A linear head projects ẑ0i onto the byte vocabulary to to the information available in observed traces. compute Pθb (ti+1 | t≤i ) in Eq. (4). For each transition, the discrete selected fraction and mean boundary probability are A PPENDIX A T RAFFIC DCN ET A RCHITECTURE Nl Nl 1 X 1 X l l l J = b , G = pl . (12) A. Hierarchical encoder and decoder Nl j=1 j Nl j=1 j 0 TrafficDCNet embeds the raw byte sequence T into e ∈ RN0 ×d0 . At level l, Nl is the sequence length and dl is the For target compression ratio C l > 1, the structural regularizer feature width. For l = 0, . . . , L − 1, contextual transformation is L−1 X Cl h precedes dynamic chunking Lratio = (C l − 1)J l Gl Cl − 1 e0 = Emb(T ), (13) l=0 i l l êl = E l (el ), + (1 − J )(1 − G ) . (7) (el+1 , pl , bl ) = Chunkl (êl ), It encourages retained fractions near 1/C l [15]. Independent ẑL = B(eL ). pretraining uses next-byte prediction plus this regularizer. l Nl l Here, p ∈ [0, 1] contains boundary probabilities and b ∈ Downstream TrafficDCNet training uses classification loss plus {0, 1}Nl contains binary selections. The retained states form αLratio , with α = 0.03 for unfrozen training and α = 0 for el+1 ∈ RNl+1 ×dl+1 . The bottleneck B processes the coarsest frozen evaluation. sequence. For l = L − 1, . . . , 0, the decoder restores positions and injects skip features zl = Dechunkl (ẑl+1 , pl , bl ) + Al (êl ), ẑl = Dl (zl ).

(8)

11

A PPENDIX B A LIGN T RAFFIC O BJECTIVES AlignTraffic aligns each sample’s ByteBERT and TrafficDCNet representations from Eqs. (2) and (5). MLP heads gw and gb project their global features of widths dw and db into normalized embeddings of width demb . hw =

gw (Rw ) gb (Rb ) ∈ Rdemb , hb = ∈ Rdemb . ∥gw (Rw )∥2 ∥gb (Rb )∥2

(14) As shown in Fig. 9, fusion encoder fm applies cross-attention to both token sequences and produces token and global outputs of width df .

multiset union, and a tuple (a, b, y) represents (u(a) , T (b) ) with label y ∈ {0, 1}. For each (a, b, y) ∈ SM , the fusion encoder produces (a,b) (a) (b) Rwb = Pool(fm (Rw , Rb )).  The scalar  matching head (a,b) gM assigns probability mab = σ gM (Rwb ) , where σ is the sigmoid function. The matching loss is X   1 LM = − y log mab + (1 − y) log(1 − mab ) . 3B (a,b,y)∈SM

(18) c) MLM loss: To maintain contextualized representations during alignment pretraining, we also adopt an auxiliary fusedview MLM objective. In each alignment mini-batch, M(i) and ũ(i) are resampled using the same masking and tokenRwb = fm (Rw , Rb ) ∈ RN0 ×df , (15) corruption policy as in independent ByteBERT pretraining. Rwb = Pool(Rwb ) ∈ Rdf . Within each sample, the same masked positions are shared a) Cross-view contrastive loss: The contrastive objective across the two views, where the corresponding raw bytes are aligns the two views by maximizing the similarity of matched replaced with samples from Unif(X ) to form T̃ (i) . The head pairs and minimizing the similarity to mismatched samples. gMLM maps fused features to logits over X . The target-token Inspired by ALBEF [22] and MoCo [21], we adopt momentum probability and fused-view MLM loss are   encoders and feature queues to stabilize training and to enlarge (i) R̃wb = fm fw (ũ(i) ), fb (T̃ (i) ) , the negative set. Concretely, the set I = {1, . . . , B} indexes i h  a mini-batch. For v ∈ {w, b}, θv and θ̃v are the online (i) ρ = softmax g ( R̃ ) , ik MLM wb,k (i) and momentum encoder-head parameters, and µ ∈ [0, 1) is uk (19) the momentum coefficient. The momentum branch produces B (i) 1 X X h̃v under θ̃v ← µθ̃v + (1 − µ)θv . Each queue Qv ∈ Lwb log ρik . MLM = − Nmask i=1 RK×demb stores K previous momentum embeddings. The k∈M(i) matrix H̃v ∈ R(B+K)×demb stacks the current momentum The complete objective is Eq. (6). Independent ByteBERT keys in sample order followed by Qv . The one-hot vector pretraining selects valid positions with probability 0.15 and preei ∈ {0, 1}B+K identifies the ith current key. For temperature dicts their original values using Eq. (3). Alignment pretraining τ > 0 and distillation PB+K weight γ ∈ [0, ′1], cross-entropy is resamples the masked positions and synchronizes them between CE(q, p) = − j=1 qj log pj . For (v, v ) ∈ {(w, b), (b, w)}, the branches. The raw-byte branch uses uniformly sampled the distributions, soft targets, and symmetric loss are replacement bytes at those positions, as specified above. This   v→v ′ (i) avoids leaving an uncorrupted raw-byte target available to the ′ pi = softmax H̃v hv /τ , fusion module at a selected position.   ′ qv→v = γ softmax H̃v′ h̃(i) + (1 − γ)ei , i v /τ A PPENDIX C B i 1 Xh w→b w→b b→w b→w T RAINING S ETTINGS LC = CE(qi , pi ) + CE(qi , pi ) . 2B i=1 Experiments use Ubuntu 24.04, CUDA 12.8, and PyTorch (16) 2.8.0. Multi-GPU training uses distributed data parallelism b) Cross-view matching loss: Cross-view matching trains on one node. The following settings describe the reported the fusion branch to discriminate whether a two-view pair experiments. originates from the same encrypted traffic. Specifically, for B ≥ 2, each i ∈ I contributes one positive pair and two hard A. Contextual baselines and ByteBERT negative pairs, constructed as Our ET-BERT implementation uses HuggingFace BERT exp(sij ) Pr(ji− = j) = P , while retaining the original vocabulary and model design. r∈I\{i} exp(sir ) Pretraining uses 100 epochs, batch size 128, learning rate exp(ski ) − 2 × 10−5 , and warmup ratio 0.1. Downstream training uses P Pr(ki = k) = , (17) exp(s ) AdamW for 50 epochs, batch size 128, and dropout 0.5. The ri r∈I\{i} unfrozen learning rates are 6×10−5 for flow-level and 2×10−5 B ]  − − for packet-level classification. Frozen classifier training uses SM = (i, i, 1), (i, ji , 0), (ki , i, 0) , |SM | = 3B, 2 × 10−4 . ByteBERT uses the same backbone configuration i=1 and training settings, with single-byte tokens and masking (i)⊤ (j) where sij = hw hb /τ is the cross-view similarity and probability 0.15. ji− , ki− ∈ I \ {i} are the byte-view and word-viewUnegatives YaTC uses AdamW with linear learning-rate scaling, base selected based on Pr, respectively. The operator denotes pretraining rate 10−3 , batch size 128, and 150,000 pretraining

12

steps. The patch masking ratio is 0.75. Fine-tuning uses 200 epochs, base learning rate 2 × 10−3 , and batch size 128. NetMamba follows its official implementation with the same base pretraining rate, batch size, and number of steps. Its stride masking ratio is 0.9, and its downstream learning rate is 2 × 10−3 [7]. B. TrafficDCNet and AlignTraffic TrafficDCNet uses three hierarchical levels with widths {512, 768, 1024}. Two transitions each target a compression ratio of 3, giving cumulative ratios {1, 3, 9}. Independent pretraining uses AdamW for 1000 epochs with learning rate 8 × 10−4 , β = (0.9, 0.95), weight decay 0.01, batch size 128, and a warmup, hold, and decay schedule. The ratio-loss weight is 0.03. Downstream training uses 50 epochs, learning rate 3 × 10−4 , and batch size 128. AlignTraffic uses a 12-layer BERT-base pathway. Its first six layers form the word-view encoder fw , and the remaining six layers become the cross-attention fusion module fm . The byte pathway reuses TrafficDCNet. Alignment training uses AdamW for 50 epochs, including 10 warmup epochs, with batch size 128. The initial, minimum, and warmup learning rates are 5 × 10−5 , 10−5 , and 5 × 10−6 , respectively. Weight decay is 0.02, followed by a cosine learning-rate schedule. We set τ = 0.07, queue size K = 65,536, momentum µ = 0.995, distillation weight γ = 0.4, MLM weight η = 1, and ratio-loss weight α = 0.03. Downstream fine-tuning uses AdamW for 50 epochs, batch size 128, and learning rate 10−4 . C. Protocol-aware and shallow baselines Pcap-Encoder starts from the authors’ released T5-AE+Q&A checkpoint and uses their two-layer MLP classifier. Downstream AdamW learning rates are 3 × 10−4 for frozen and 10−4 for unfrozen training. Flow-level classification trains a packet classifier on the first five packets and uses majority voting for the flow label [8]. The flow-level frozen results are not reported. The shallow baseline uses AutoGluon TabularPredictor to select among LightGBM, XGBoost, and Random Forest [43]. LightGBM and XGBoost use its default tabular configurations. Random Forest candidates use Gini and entropy splitting criteria. The feature groups are described below. A PPENDIX D S HALLOW F EATURE G ROUPS The packet-level features describe IP and TCP behavior, generic TLS records, and visible ServerHello information. IP features include length, flags, fragmentation, checksum, protocol, header length, type of service, TTL, version, and identification. TCP features include sequence and acknowledgment numbers, flags, checksum, window, header length, urgent pointer, reserved fields, timestamps, and selective acknowledgment options. Original 5-tuple fields are suppressed in the masked comparison. TLS features include payload length, TLS presence, the first record’s type, version, and length, record count and length

summaries, and application-data, handshake, alert, and changecipher-spec statistics. When a complete visible ServerHello is available, the features include its selected version, cipher suite, extension count, supported version, and key-share group. ALPN is included when visible in the captured protocol version. Flow features expand the packet groups across the first five packet positions, add four inter-packet intervals, and aggregate TLS information across those packets. The aggregates include ServerHello recovery and attributes, session-ID length, directional counts, and directional byte statistics. This baseline therefore has explicit access to parsed protocol information, including fields within the retained payload. A PPENDIX E I NDUSTRIAL E VALUATION D ETAILS Script-driven applications generate the industrial traffic across multiple terminal devices and network-quality conditions. Traffic is captured at an intermediate network device. The 165 application classes include voice, video, gaming, social media, and AIGC services, with ground-truth labels derived from plaintext-visible information. Preprocessing retains payloads from flows with at least eight packets and removes packet headers. The training set is relatively balanced, while the test set follows an imbalanced deployment distribution. We evaluate ET-BERT, YaTC, AlignTraffic, and the deployed industrial baseline in the unfrozen setting. The payload-only inputs omit the header fields used by Pcap-Encoder and our shallow baseline. The collaborator restricts release of the dataset because it contains private traffic information. R EFERENCES [1] P. Haffner, S. Sen, O. Spatscheck, and D. Wang, “ACAS: automated construction of application signatures,” in Proceedings of the 2005 ACM SIGCOMM workshop on Mining network data, 2005, pp. 197–202. [2] E. Rescorla, “The transport layer security (TLS) protocol version 1.3,” Internet Engineering Task Force, RFC 8446, Aug. 2018. [Online]. Available: https://www.rfc-editor.org/rfc/rfc8446 [3] G. Draper-Gil, A. H. Lashkari, M. S. I. Mamun, and A. A. Ghorbani, “Characterization of encrypted and VPN traffic using time-related features,” in Proceedings of the 2nd International Conference on Information Systems Security and Privacy - Volume 1: ICISSP, INSTICC. SciTePress, 2016, pp. 407–414. [4] V. F. Taylor, R. Spolaor, M. Conti, and I. Martinovic, “AppScanner: Automatic fingerprinting of smartphone apps from encrypted network traffic,” in 2016 IEEE European Symposium on Security and Privacy (EuroS&P). IEEE, 2016, pp. 439–454. [5] X. Lin, G. Xiong, G. Gou, Z. Li, J. Shi, and J. Yu, “ET-BERT: A contextualized datagram representation with pre-training transformers for encrypted traffic classification,” in Proceedings of the ACM Web Conference 2022, ser. WWW ’22. New York, NY, USA: Association for Computing Machinery, 2022, p. 633–642. [6] R. Zhao, M. Zhan, X. Deng, Y. Wang, Y. Wang, G. Gui, and Z. Xue, “Yet another traffic classifier: A masked autoencoder based traffic transformer with multi-level flow representation,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 37, no. 4, pp. 5420–5427, Jun. 2023. [7] T. Wang, X. Xie, W. Wang, C. Wang, Y. Zhao, and Y. Cui, “NetMamba: Efficient network traffic classification via pre-training unidirectional Mamba,” in 2024 IEEE 32nd International Conference on Network Protocols (ICNP). IEEE, 2024, pp. 1–11. [8] Y. Zhao, G. Dettori, M. Boffa, L. Vassio, and M. Mellia, “The sweet danger of sugar: Debunking representation learning for encrypted traffic classification,” in Proceedings of the ACM SIGCOMM 2025 Conference, ser. SIGCOMM ’25. New York, NY, USA: Association for Computing Machinery, 2025, p. 296–310.

13

[9] C. Wang, X. Xie, T. Wang, and Y. Cui, “Bias in the shadows: Explore shortcuts in encrypted network traffic classification,” arXiv preprint arXiv:2601.10180, 2026. [10] P. Rogaway, “Nonce-based symmetric encryption,” in International workshop on fast software encryption. Springer, 2004, pp. 348–358. [11] L. Breiman, “Random forests,” Machine learning, vol. 45, no. 1, pp. 5–32, 2001. [12] T. Chen and C. Guestrin, “XGboost: A scalable tree boosting system,” in Proceedings of the 22nd ACM SIGKDD International Conference on knowledge discovery and data mining, 2016, pp. 785–794. [13] G. Ke, Q. Meng, T. Finley, T. Wang, W. Chen, W. Ma, Q. Ye, and T.-Y. Liu, “LightGBM: A highly efficient gradient boosting decision tree,” in Advances in Neural Information Processing Systems, vol. 30. Curran Associates, Inc., 2017, pp. 3146–3154. [14] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), J. Burstein, C. Doran, and T. Solorio, Eds. Minneapolis, Minnesota: Association for Computational Linguistics, Jun. 2019, pp. 4171–4186. [Online]. Available: https://aclanthology.org/N19-1423/ [15] S. Hwang, B. Wang, and A. Gu, “Dynamic chunking for end-to-end hierarchical sequence modeling,” arXiv preprint arXiv:2507.07955, 2025. [16] K. Slagle, “SpaceByte: Towards deleting tokenization from large language modeling,” Advances in Neural Information Processing Systems, vol. 37, pp. 124 925–124 950, 2024. [17] M. Videau, B. Y. Idrissi, A. Leite, M. Schoenauer, O. Teytaud, and D. Lopez-Paz, “From bytes to ideas: Language modeling with autoregressive U-Nets,” arXiv preprint arXiv:2506.14761, 2025. [18] O. Ronneberger, P. Fischer, and T. Brox, “U-Net: Convolutional networks for biomedical image segmentation,” in International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2015, pp. 234–241. [19] T. Dao and A. Gu, “Transformers are SSMs: generalized models and efficient algorithms through structured state space duality,” in Proceedings of the 41st International Conference on Machine Learning, 2024, pp. 10 041–10 071. [20] L. van der Maaten and G. Hinton, “Visualizing data using t-SNE,” Journal of Machine Learning Research, vol. 9, no. 86, pp. 2579–2605, 2008. [Online]. Available: http://jmlr.org/papers/v9/vandermaaten08a.html [21] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick, “Momentum contrast for unsupervised visual representation learning,” in Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2020, pp. 9729–9738. [22] J. Li, R. Selvaraju, A. Gotmare, S. Joty, C. Xiong, and S. C. H. Hoi, “Align before fuse: Vision and language representation learning with momentum distillation,” Advances in Neural Information Processing Systems, vol. 34, pp. 9694–9705, 2021. [23] S. U. Jafri, S. Rao, V. Shrivastav, and M. Tawarmalani, “Leo: Online ML-based traffic classification at Multi-Terabit line rate,” in 21st USENIX Symposium on Networked Systems Design and Implementation (NSDI 24), 2024, pp. 1573–1591. [24] M. Parvez, A. Zulfiqar, R. Beltiukov, S. L. Feibish, W. Willinger, A. Gupta, and M. Shahbaz, “SpliDT: Partitioned decision trees for scalable stateful inference at line rate,” in Proceedings of the ACM SIGCOMM 2025 Conference, 2025, pp. 1238–1240. [25] A. H. Lashkari, G. D. Gil, M. S. I. Mamun, and A. A. Ghorbani, “Characterization of Tor traffic using time based features,” in Proceedings of the 3rd International Conference on Information Systems Security and Privacy - Volume 1: ICISSP, INSTICC. SciTePress, 2017, pp. 253–262. [26] The Tor Project, “A short introduction to Tor,” Tor Specifications, accessed October 16, 2026. [Online]. Available: https://spec.torproject. org/intro/index.html [27] T. Karagiannis, K. Papagiannaki, and M. Faloutsos, “BLINC: multilevel traffic classification in the dark,” in Proceedings of the 2005 conference on Applications, technologies, architectures, and protocols for computer communications, 2005, pp. 229–240. [28] L. Bernaille and R. Teixeira, “Early recognition of encrypted applications,” in International Conference on Passive and Active Network Measurement. Springer, 2007, pp. 165–175.

[29] W. Wang, M. Zhu, J. Wang, X. Zeng, and Z. Yang, “End-to-end encrypted traffic classification with one-dimensional convolution neural networks,” in 2017 IEEE international conference on intelligence and security informatics (ISI). IEEE, 2017, pp. 43–48. [30] M. Lotfollahi, M. Jafari Siavoshani, R. Shirali Hossein Zade, and M. Saberian, “Deep Packet: A novel approach for encrypted traffic classification using deep learning,” Soft Computing, vol. 24, no. 3, pp. 1999–2012, 2020. [31] H. Y. He, Z. G. Yang, and X. N. Chen, “PERT: Payload encoding representation from transformer for encrypted traffic classification,” in 2020 ITU Kaleidoscope: Industry-Driven Digital Transformation (ITU K). IEEE, 2020, pp. 1–8. [32] X. Meng, Y. Wang, R. Ma, H. Luo, X. Li, and Y. Zhang, “Packet representation learning for traffic classification,” in Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2022, pp. 3546–3554. [33] H. Zhang, L. Yu, X. Xiao, Q. Li, F. Mercaldo, X. Luo, and Q. Liu, “TFE-GNN: A temporal fusion encoder using graph neural networks for fine-grained encrypted traffic classification,” in Proceedings of the ACM Web Conference 2023, 2023, pp. 2066–2075. [34] H. Zhang, X. Xiao, L. Yu, Q. Li, Z. Ling, and Y. Zhang, “One train for two tasks: An encrypted traffic classification framework using supervised contrastive learning,” arXiv preprint arXiv:2402.07501, 2024. [35] X. Lin, L. He, G. Gou, J. Yu, Z. Guan, X. Li, J. Guo, and G. Xiong, “CETP: A novel semi-supervised framework based on contrastive pretraining for imbalanced encrypted traffic classification,” Computers & Security, vol. 143, p. 103892, 2024. [36] N. Wickramasinghe, A. Shaghaghi, G. Tsudik, and S. Jha, “SoK: Decoding the enigma of encrypted network traffic classifiers,” in 2025 IEEE Symposium on Security and Privacy (SP). IEEE, 2025, pp. 1825– 1843. [37] R. Xie, J. Cao, E. Dong, M. Xu, K. Sun, Q. Li, L. Shen, and M. Zhang, “Rosetta: Enabling robust TLS encrypted traffic classification in diverse network environments with TCP-Aware traffic augmentation,” in 32nd USENIX Security Symposium (USENIX Security 23). Anaheim, CA: USENIX Association, Aug. 2023, pp. 625–642. [Online]. Available: https://www.usenix.org/conference/usenixsecurity23/presentation/xie [38] N. Malekghaini, E. Akbari, M. A. Salahuddin, N. Limam, R. Boutaba, B. Mathieu, S. Moteau, and S. Tuffin, “Data drift in DL: Lessons learned from encrypted traffic classification,” in 2022 IFIP Networking Conference (IFIP Networking). IEEE, 2022, pp. 1–9. [39] S. Cui, J. Liu, C. Dong, Z. Lu, and D. Du, “Only header: a reliable encrypted traffic classification framework without privacy risk,” Soft Computing, vol. 26, no. 24, p. 13391–13403, Oct. 2022. [Online]. Available: http://dx.doi.org/10.1007/s00500-022-07450-9 [40] J. Yu, Y. Choi, K. Koo, and D. Moon, “A novel approach for application classification with encrypted traffic using BERT and packet headers,” Computer Networks, vol. 254, p. 110747, 2024. [41] I. Akbari, M. A. Salahuddin, L. Aniva, N. Limam, R. Boutaba, B. Mathieu, S. Moteau, and S. Tuffin, “Traffic classification in an increasingly encrypted web,” Communications of the ACM, vol. 65, no. 10, pp. 75–83, 2022. [42] Y. Bengio, N. Léonard, and A. Courville, “Estimating or propagating gradients through stochastic neurons for conditional computation,” arXiv preprint arXiv:1308.3432, 2013. [43] N. Erickson, J. Mueller, A. Shirkov, H. Zhang, P. Larroy, M. Li, and A. Smola, “Autogluon-tabular: Robust and accurate automl for structured data,” arXiv preprint arXiv:2003.06505, 2020.

Related documents

Record · ID 1571702 · SHA-256 0171c5cabdebc775
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive