More Than Meets the Eye: A Semantics-Aware Traffic Augmentation Framework for Generalizable Website Fingerprinting Youquan Xian∗§∥ , Xueying Zeng†∥ , Lingjia Meng§ , Lei Cui§ B , Runhan Song§¶ , Wei Wang§ , Zhengquan Ding§ , Peng Liu‡ , Zhiyu Hao§ B ∗ School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing, China † School of Computer Science and Engineering, Beihang University, Beijing, China
arXiv:2605.11402v1 [cs.LG] 12 May 2026
¶ Faculty of Computing, Harbin Institute of Technology, Harbin, China ‡ School of Computer Science and Engineering, Guangxi Normal University, Guilin, China § Zhongguancun Laboratory, Beijing, China
Abstract—Deep learning-based website fingerprinting has emerged as an effective technique for inferring the websites users visit. Although existing methods achieve strong performance on closed-world datasets, they often fail to generalize to real-world environments, especially under geographic and temporal shifts. This limitation fundamentally stems from the coupled effects of two key challenges: application-layer resource composition variability and observable feature instability induced by cross-layer encapsulation. Intertwined, these factors induce systematic shifts between underlying application semantics and observable traffic features. To address the above challenges, we propose SATA, a semantics-aware traffic augmentation framework. Specifically, SATA first performs application-layer semantic augmentation based on protocol rules, expanding the resource composition patterns within each flow and frame sequence patterns under protocol constraints. Based on these augmented frame sequences, we further introduce a cross-layer feature alignment mechanism via knowledge distillation. It aligns frame sequence with packetlength sequence features, enabling cross-layer feature alignment between enhanced semantics and observable sequences. Extensive experiments show that SATA successfully generates traffic patterns that are absent from the training set but genuinely exist in the test set, and significantly improves the performance of mainstream models across diverse and complex scenarios. In particular, in open-world settings, SATA improves ACC by 90.81% and AUROC by 48.37%. The source code of the prototype system is available at https://anonymous.4open.science/r/SATA-B6C2/.
I. I NTRODUCTION In recent years, end-to-end encrypted protocols, exemplified by TLS 1.3 [1], along with privacy-enhancing technologies such as encrypted DNS [2]–[4] and Encrypted Client Hello [5], have fundamentally reshaped the privacy landscape of ∥ Equal contribution. B Corresponding author.
Network and Distributed System Security (NDSS) Symposium 2026 23 - 27 February 2026 , San Diego, CA, USA ISBN 979-8-9919276-8-0 https://dx.doi.org/10.14722/ndss.2026.[23|24]xxxx www.ndss-symposium.org
Web Resources x.com/aa.css
y.com/bb.js
C1: Application-Layer Resource Composition Variability y.com/cc.js
k.com/page/1
CDN
Servers
x.com/aa.css y.com/bb.js y.com/cc.js
Case 1: One Flow
Router k.com/page/1
Attacker User
[207, -804, -619]
x.com/aa.css
[207, -1423]
y.com/bb.js
[284, -1423]
y.com/cc.js
Case 2: Two Flows C2: Observation-Level Feature Instability
[207, -804, -619]
Packet Length Sequence WF Model
Application
Fig. 1. Overview of a WF attack scenario and its two major generalization challenges. Blue dashed lines denote the attacker’s workflow, and red dashed regions indicate the challenges faced by the attacker.
cyberspace. The widespread deployment of these mechanisms has rendered traditional traffic analysis methods that rely on deep packet inspection and plaintext metadata increasingly ineffective [6]–[10]. However, protocol-level encryption does not eliminate the risk of privacy leakage. During communication, side channels such as packet length and packet direction can still expose observable features [11], [12]. With their strong capability for non-linear representation learning, advanced website fingerprinting (WF) models can bypass payload encryption and infer high-level application behaviors solely from these observable signals, thereby posing a new threat to network privacy [13]–[17]. Although existing WF models have achieved promising performance on closed-world datasets, variations in resource scheduling and multilayer protocol encapsulation mechanisms in real networks pose severe generalization challenges in the real world. To improve generalization, existing studies have primarily relied on the data augmentation paradigm, addressing the problem from two perspectives: data distribution fitting and network simulation. On the one hand, methods based on deep generative models such as generative adversarial net-
works (GANs) and large language models (LLMs) are mostly limited to generating intermediate representations or nonfunctional fields [18]–[22]. Such purely data-driven paradigms are highly dependent on the training set’s original distribution and struggle to extend beyond the existing probability space to generate plausible out-of-domain (OOD) data [23], [24]. On the other hand, existing simulation-based augmentation strategies, such as those simulating perturbations in roundtrip time (RTT) and maximum transmission unit (MTU), remain confined to TCP/IP stack–level effects [13], [25]–[28]. More importantly, both paradigms overlook how applicationlayer resource scheduling and cross-layer encapsulation jointly shape traffic features. As a result, the mapping from application semantics, namely the actual conveyed resources, to observed traffic features exhibits a systematic shift that is difficult to correct. We observe that the systematic shift of observed traffic features fundamentally arises from the coupled effects of two challenges during traffic generation, as illustrated in Fig. 1. First, at the application layer, the interplay of dynamic DNS [29], [30] and HTTP/2 multiplexing [31] continuously alters the composition of resources within a flow, resulting in resource composition variability (C1). Second, during crosslayer encapsulation, application resources undergo structural perturbations induced by state-dependent header compression [32], fragmentation, and dynamic scheduling mechanisms [31], [33], [34], resulting in unstable observed features, such as packet-length sequences (C2). The systematic feature shift induced by these challenges significantly degrades the generalization capability of WF models in real-world environments. To address the aforementioned challenges, this paper provides an analysis of the multilayer factors underlying the systematic shift of observed traffic features. On this basis, we propose a semantics-aware traffic augmentation framework, SATA. Specifically, SATA first expands the resource composition patterns within each flow and the application-layer frame sequence patterns under protocol constraints through a resource recomposition module and a frame sequence augmentation module. It then introduces a cross-layer feature alignment mechanism that uses frame sequence representations to guide the learning of packet-length sequences. This design mitigates the systematic shift of observed features, improving the generalization and robustness of existing WF models in the real world. To the best of our knowledge, this is the first work to leverage application-layer semantics for traffic augmentation. The main contributions are summarized as follows: • We analyze the multilayer factors underlying the systematic shift of observed traffic features, revealing how application-layer behaviors and cross-layer protocol mechanisms jointly reshape traffic features. It provides a theoretical foundation for understanding the mechanisms driving such feature shifts. • We propose a semantic-aware traffic augmentation framework, SATA, which simulates realistic network protocol processes to enrich application-layer frame sequences,
while also constructing a cross-layer feature alignment mechanism to align observed features with semantic features. • Extensive experimental results validate the effectiveness of SATA. It improves ACC and AUROC by 90.81% and 48.37% in open-world settings, respectively, and increases pattern coverage by 9.93%, generating frame sequence patterns unobserved in the training set but present in the test set. II. R ELATED W ORK A. Advances in Website Fingerprinting With the widespread adoption of end-to-end encryption, the focus of WF research has transitioned from labor-intensive, pioneering manual feature engineering [14], [16], [35], [36] to deep learning-based automatic representation learning. The selection of model input features has been extensively investigated in previous works. Although some recent studies directly learn from raw payload bytes in an end-to-end manner [37]–[48], the latest research demonstrates that the pseudorandomness of encrypted payloads can easily induce such models to rely on dataset-specific biases through shortcut learning [10]. In contrast, packet length sequences and associated side-channel features, such as timing and direction, circumvent payload-level obfuscation and have been shown to provide more fundamental and reliable representations. They have therefore become the central focus of current WF research [9]. For sequence features such as packet length, researchers have developed a wide range of deep learning models and architectures at different granularities. From the perspective of granularity, flow-level methods leverage models such as CNN and LSTM to perform lightweight modeling of single-flow features [49]–[55]. Trace-level methods, by contrast, incorporate more complex architectures to integrate global session context [15], [17], [56]–[59]. Benefiting from these powerful deep neural architectures and refined feature engineering, existing WF models generally achieve remarkable classification accuracy on public closed-world datasets, with performance nearing saturation. However, such performance advantages obtained in controlled environments frequently collapse in the wild [13], [27], [60]. B. Data Augmentation Recent studies have widely adopted data augmentation strategies to expand the training space, thereby addressing the generalization bottlenecks in existing models. The mainstream strategies can be broadly categorized into two categories: data distribution fitting and network simulation. The first category relies on data-driven distribution fitting and extensively employs deep generative models, such as generative adversarial networks (GANs), diffusion models, and large language models (LLMs), to synthesize and augment traffic representations. Specifically, to mitigate class imbalance, ILETC [20], CS-BiGAN [18], and NetDiffusion [19] generate samples with high statistical similarity by directly
2
learning traffic sequences or implicitly fine-tuning image-like representations to accurately capture the latent distribution of traffic. Hajaj et al. [22] employed LSTMs to perform temporal extrapolation on traffic feature images. AdvTG [21], in contrast, leverages a fine-tuned LLM to selectively mutate non-functional fields in payloads, achieving semantic-level adversarial augmentation. However, distribution fitting methods often overlook the generation logic of traffic features, making it difficult for existing generative models to synthesize an interpretable, valid OOD packet length sequences [23], [24]. The second category augments traffic representations by manually manipulating network states, such as MTU and RTT, or by simulating packet loss and packet reordering, to force models to learn invariant features under diverse transmission conditions. Specifically, Rosetta [27] and Zion et al. [26] dynamically adjust network transmission parameters to generate synthetic samples characterized by sequence shifts and size variations. Horowicz et al. [28] further extend such delay and packet-loss perturbations to customized augmentation of twodimensional traffic images. At the granularity of structural operations on packet sequences, NetAugment [13] and Zion et al. [26] simulate feature shifts caused by bandwidth fluctuations through fine-grained modification of burst sequences and averaging of cross-flow features, respectively. Meanwhile, Nuwa [25] further introduces masking strategies for packet loss and reordering, leveraging self-supervised learning to reconstruct corrupted complete features dynamically. However, these methods mainly operate on TCP/IP-stack-level observations, without touching the application-layer semantics that generate traffic. Therefore, it is imperative to develop a traffic augmentation mechanism that bridges application semantics and observable features to enhance model generalization in the real world.
(a) Trace 1 https://static.files.bbci.co.uk/.../958cd2585.js https://static.files.bbci.co.uk/.../958cd2585.js https://static.files.bbci.co.uk/.../07f766f6b.js https://static.files.bbci.co.uk/.../07f766f6b.js
172.18.0.2:59336->88.221.168.120:443 172.18.0.2:59336->88.221.168.120:443
https://emp.bbci.co.uk/.../-4/bump-4.js https://emp.bbci.co.uk/.../-4/bump-4.js https://static.files.bbci.co.uk/.../aeba27237.js https://static.files.bbci.co.uk/.../aeba27237.js https://static.files.bbci.co.uk/.../1d22ac4fa.js https://static.files.bbci.co.uk/.../1d22ac4fa.js
(b) Trace 2
https://emp.bbci.co.uk/.../-4/bump-4.js https://emp.bbci.co.uk/.../-4/bump-4.js
172.18.0.2:39004->88.221.168.120:443 172.18.0.2:39004->88.221.168.120:443
https://static.bbci.co.uk/.../s/require.js https://static.bbci.co.uk/.../s/require.js
Resources (URI)
Flow
IP Destination
Fig. 2. Illustrative example of cross-domain resource aggregation caused by dynamic DNS and HTTP/2 connection coalescing. (a) Trace 1 https://assets.nflxext.com/.../6cccad376.js https://assets.nflxext.com/.../6cccad376.js
172.18.0.2:47280->45.57.90.1:443 172.18.0.2:47280->45.57.90.1:443
https://assets.nflxext.com/.../96_large.jpg https://assets.nflxext.com/.../96_large.jpg
172.18.0.2:47304->45.57.90.1:443 172.18.0.2:47304->45.57.90.1:443
https://assets.nflxext.com/.../_W_Blk.woff2 https://assets.nflxext.com/.../_W_Blk.woff2 https://assets.nflxext.com/.../s_W_Bd.woff2 https://assets.nflxext.com/.../s_W_Bd.woff2 https://assets.nflxext.com/.../s_W_Md.woff2 https://assets.nflxext.com/.../s_W_Md.woff2
172.18.0.2:47344->45.57.90.1:443 172.18.0.2:47344->45.57.90.1:443 172.18.0.2:47342->45.57.90.1:443 172.18.0.2:47342->45.57.90.1:443
(b) Trace 2 https://assets.nflxext.com/.../6cccad376.js https://assets.nflxext.com/.../6cccad376.js
https://assets.nflxext.com/.../96_large.jpg https://assets.nflxext.com/.../96_large.jpg https://assets.nflxext.com/.../s_W_Md.woff2 https://assets.nflxext.com/.../s_W_Md.woff2 https://assets.nflxext.com/.../_W_Blk.woff2 https://assets.nflxext.com/.../_W_Blk.woff2 https://assets.nflxext.com/.../s_W_Bd.woff2 https://assets.nflxext.com/.../s_W_Bd.woff2
Resources (URI)
172.18.0.2:38802->45.57.91.1:443 172.18.0.2:38802->45.57.91.1:443
172.18.0.2:38820->45.57.91.1:443 172.18.0.2:38820->45.57.91.1:443 172.18.0.2:38834->45.57.91.1:443 172.18.0.2:38834->45.57.91.1:443
Flow
IP Destination
Fig. 3. Illustrative example of flow-level resource distribution variation induced by HTTP/2 connection reuse.
III. C HALLENGES from multiple domains are consolidated into one flow, altering the original domain composition and traffic distribution patterns. As illustrated in Fig. 2, across different visits, resources of domain emp.bbci.co.uk may co-occur within the same flow as static.files.bbci.co.uk or static.bbci.co.uk due to HTTP/2 connection coalescing, leading to variations in resource composition within the flow. The second scenario primarily arises from the inherent nondeterminism of HTTP/2 connection reuse strategies in practical implementations. Although HTTP/2 recommends reusing existing connections to enhance transmission efficiency, RFC 9113 explicitly states that clients are not mandated to enforce reuse [62]. The client may dynamically establish new TCP connections or shift scheduling across multiple connections under various triggers, such as existing connection loads approaching their thresholds, active termination by either party, or intervention by browser security isolation policies. Consequently, resource requests under the same domain may be distributed across multiple parallel flows, manifesting a multi-flow transmission pattern. As illustrated in Fig. 3, the
Expanding on the challenges previously outlined, we examine the multilayer factors driving the systematic shift of traffic features from two perspectives: (C1) Application-Layer Resource Composition Variability, and (C2) ObservationLevel Feature Instability induced by similar application semantics. A. Application-Layer Resource Composition Variability Regarding resource composition variation, two representative scenarios are observed, as illustrated in Fig. 2 and Fig. 3, namely changes in domain combination within a flow and the absence of multiplexing for same-domain resources within a single flow. The first scenario arises from the interplay of dynamic DNS, shared infrastructure, and HTTP/2 connection coalescing. In practice, diverse domains may be resolved to the same service endpoint via CDNs [6] or reverse proxies [61]. When these domains satisfy connection reuse criteria, such as TLS certificate compatibility, the client may leverage a single TCP connection to transmit logically independent cross-domain requests. Consequently, resources
3
red-marked resource from assets.nflxext.com occupies an exclusive flow in one visit, while in another it shares a flow with other resources, leading to significantly different transmission structures (Appendix B). This volatility decouples flows from semantics, rendering models overfitted to static training distributions fragile against the real world. (a) Cumulative Packet Length Sequence
operational networks to perform classification based solely on observable packet-length sequences extracted from TCP flows. However, modern web infrastructure and the HTTP/2 protocol jointly lead to significant variability in traffic features. These factors collectively induce significant distribution shifts between training and deployment environments, impeding the generalization of existing models in realistic settings. SATA aims to improve the classification robustness of existing deep learning models when handling real-world HTTP/2 traffic. It does not require prior knowledge of the network environment. In practice, mechanisms such as dynamic scheduling and protocol stack encapsulation on both the client and server sides are highly time-varying and largely unobservable, making them extremely difficult to capture accurately in real time. Moreover, SATA maintains compatibility with existing models without requiring architectural modifications. It only necessitates a knowledge distillation framework, where the original WF model is instantiated as both teacher and student, and trained in a two-stage scheme across distinct tasks.
(b) Zoom 2 × 104
104 1.8 × 104 1.6 × 104 1.4 × 104
103
Detailed View
Packet Length (Log)
2.2 × 104
1.2 × 104 0
5
10
15
20
25
30
Packet Index
24
25
26
27
Index
Fig. 4. Illustrative example of packet length sequence instability caused by HTTP/2 scheduling and cross-layer encapsulation.
B. Overview B. Observation-Level Feature Instability
This paper presents SATA, a semantics-aware traffic augmentation framework, as illustrated in Fig. 5. SATA is designed to mitigate the systematic shift stemming from both application-layer resource composition variability (C1) and observation-level feature instability (C2), thereby enhancing the robustness of mainstream deep learning models on realworld HTTP/2 traffic. SATA establishes a systematic pipeline spanning dataset construction, traffic augmentation, and feature alignment. Specifically, it first formalizes a semantic correspondence between plaintext resources and encrypted traffic. Subsequently, by incorporating resource recomposition and frame-sequence augmentation tailored to mechanisms like dynamic DNS and HTTP/2 multiplexing, the framework diversifies flow-level application semantics to encompass the varied traffic patterns encountered in operational networks. Finally, a knowledge distillation-based feature alignment mechanism transfers semantic knowledge from frame sequences to the observations packet-length representation, enabling the model to inherit the enriched semantics while mitigating systematic shift. SATA maintains full compatibility with existing architectures; it involves instantiating the original WF model as both a teacher and a student within a two-stage knowledge distillation paradigm. In the following subsections, we introduce the four core modules of SATA in detail.
Beyond variations in resource composition, packet length sequences of the same resource can exhibit significant variations, as illustrated in Fig. 4. In the mapping from applicationlayer resources to HTTP/2 frames, such uncertainty primarily originates from state dependencies and scheduling coupling within the protocol. On the one hand, HPACK, the header compression mechanism used in HTTP/2, leverages a stateful dynamic table to reduce redundant header transmission. Its stateful nature leads HEADER frames to alternate between indexed header field representation and literal encoding, resulting in variable frame sizes [32]. On the other hand, the concurrent requests of partial resources under multiplexing drives the protocol stack to transmit HEADERS frames in compacted bursts, disrupting the expected sequential structure of HEADERS and DATA frames in observed traces (Appendix D). Furthermore, during cross-layer encapsulation, buffering and asynchronous scheduling across the HTTP, TLS, and TCP layers undermine the stability of data unit boundaries as they propagate through the protocol stack. Dynamic buffer write patterns, evolving window states, and transmission scheduling jointly drive continuous fragmentation of data units, resulting in non-linear segmentation in the top-down mapping of application-layer semantics (Appendix C). Finally, at the transport layer, the mapping from TLS records to TCP segments is further modulated by factors such as maximum segment size (MSS) [63] negotiation, exacerbating this cross-layer structural perturbation. It disrupts learned temporal dependencies, constraining the generalization capability of conventional WF models in the real world.
C. Dataset Construction To address the lack of fine-grained alignment between plaintext resources and encrypted observations in existing encrypted traffic datasets, this paper leverages Tshark 1 and TLS session keys to perform cross-layer parsing of raw traffic, thereby establishing correspondences among resources, HTTP/2 frame sequences, and packet length sequences. Specifically, two
IV. S YSTEM D ESIGN A. Threat Model We consider a website fingerprinting scenario in real-world HTTP/2 traffic, where deep learning models are deployed in
1 https://tshark.dev/
4
Dataset Construction google.com apple.com
Flow2
A B
…
…
C D E
[207, -1623] [263, -1623] [206, -1623] [207, -1623]
SAN1
SAN2
A B
Cy.comD z.com E
x.com
github.com Flow1
Resource Recomposition
Resources
A B
C D E
IP1
IP2
HTTP Frame Sequence [238, -1460, -194, 95,…] [294, 95, -1460, -194,…]
…
TCP Packet Length Sequence
Structure-preserving Stable Changeable
[207, -1623, 64, -15645] [263, -1623, 64, -15652] [206, -1623, 57, -16067]
SAN-constrained Resource Remapping
[64, -15645] [64, -15652] [57, -16067] [56, -15645]
…
Frame Sequence Augmentation
Distribution-constrained Sequence Augmentation [205, -1623, 64, -15645] [263, -1623, 64, -15648]
IP3
Empirical Flow Reuse Pattern Resampling
H
Header
Flow4
Aug Resource Compositions
H
Forward Temporal Shift Mechanism
A B C D E Flow1 Flow2
H
Feature Alignment Aug Set
Train Set PLS
Generated PLS Teacher Model
Student Model
Embedding Soft-label Latent Feature Distillation Alignment (KL Divergence) (Cosine Loss)
HHH Aug HTTP Frame Sequence
Teacher stage
Student stage
Fig. 5. The workflow of SATA is as follows: (1) Dataset Construction module establishes precise alignment between plaintext resources and encrypted traffic, providing the data foundation. (2) Resource Recomposition module operates on this dataset to simulate dynamic DNS and HTTP/2 multiplexing, generating flows with diverse resource composition patterns. (3) Frame Sequence Augmentation module perturbs the transmission volume and positional distribution of frame sequences within the recombined flows, and models header coalescing behavior, expanding frame sequence patterns. (4) The Feature Alignment module employs knowledge distillation to transfer semantically aligned representations from augmented sequences into the WF model.
protocol stack may reuse a TCP connection. This mechanism changes the allocation of resources to different flows, affecting resource composition patterns within a flow. To simulate this phenomenon, we propose a SAN-constrained resource remapping method. The overall procedure is illustrated in Fig. 5. Specifically, we first extract SAN information from raw traffic and establish a mapping from resources to their registered domains and corresponding SAN sets. Next, we analyze the distribution of the number of IP nodes associated with each SAN in traffic traces and model it using a Gaussian distribution parameterized by the mean µsan and standard deviation σsan . During the data augmentation phase, given an input trace, we sample a target number of IP nodes N from the distribution N (µsan , σsan ), and reassign the M domains within the same SAN set in the trace to these N IP nodes. This process modifies the domain-to-IP mapping under protocol constraints, thereby adjusting how resources are distributed across concurrent flows and effectively augmenting the resource composition patterns within the original trace.
types of mappings are constructed. First, TLS traffic is decrypted to extract the HTTP/2 frame sequence corresponding to each resource, consisting of the sizes of HEADER and DATA frames, establishing a mapping between resources and frame sequences. Second, at the flow level, resource compositions and their corresponding TCP packet length sequences are extracted to establish a mapping between resource compositions and observable traffic representations. Through this process, a cross-layer aligned dataset linking resources, frame sequences, and packet length sequences is constructed, providing the data foundation for subsequent resource recomposition, frame sequence augmentation, and cross-layer feature alignment. D. Resource Recomposition 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
bool VerifyDomainAuthentication(domain) { if (session_is_draining) return false; if (!GetSSLInfo()) return true; // non-TLS session return CanPool(domain); } bool CanPool(new_hostname) { if (IsCertStatusError()) return false; if (!cert->VerifyNameMatch(new_hostname)) return false; // SAN validation (core constraint) if (IsPKPViolated()) return false; return true; }
Furthermore, to address variations in flow reuse patterns for resources within the same domain, we design an empirically driven resampling method to augment flow reuse patterns. In the offline phase, we analyze historical traffic to collect allocation patterns of resources within the same domain across different flows, remove duplicate patterns, and construct a domain-specific pool of flow reuse patterns along with their empirical probability distributions. As illustrated in Fig. 5, for a domain containing resources C, D, two reuse patterns may exist in historical observations: either C, D are transmitted within the same flow, or C and D are distributed across two different flows. In the online augmentation phase, given an
Listing 1. HTTP/2 reuse logic via certificate SAN validation (Chromium).
As shown in Listing 1, an analysis of the HTTP/2 protocol stack implementation in Chromium reveals that when two domains share the same Subject Alternative Name (SAN) [64] and are resolved to the same IP address via DNS, the
5
input trace, we first extract the set of resources associated with the test set and search for matching historical reuse patterns with the same resource set in the related pattern pool. If matching patterns exist, one is randomly sampled according to its empirical probability and used to reorganize the current resource composition. If no matching pattern exists, a flow reuse pattern is randomly constructed for the current resource set under the constraint of a maximum number of concurrent flows. In summary, these two resource recomposition strategies effectively simulate the variations in resource composition induced by the interplay between dynamic DNS and protocol stack reuse. By enriching the boundaries of the data distribution, they encourage the model to learn more generalizable representations of resource semantic grouping.
and per-position value bounds, the objective is to minimize the deviation from the historical distribution weighted by variance. The optimization problem can be formally expressed as follows: min x
s.t.
k X (xi − xbase )2 i
i=1 k X
σi2 + ϵ (1)
xi = U tgt ,
i=1 bmin ≤ xi ≤ bmax , i i
∀i
where ϵ is a small constant introduced to prevent division by zero. After solving the above optimization problem using the Sequential Least Squares Programming algorithm [65], we further incorporate a greedy heuristic to discretize the continuous solution x and correct residual errors. This procedure produces augmented sequences for individual resources that conform to historical statistical patterns in both local frame size variations and overall traffic volume. After performing application-layer frame sequence augmentation, we further introduce a forward temporal shifting mechanism to simulate the combined transmission behavior of request HEADER frames under HTTP/2 multiplexing. Given a flow-level frame sequence S f low , formed by aggregating the frame sequences of all resources within a flow, we define S f low = [S1 , S2 , . . . , SN ], where St = [st,1 , st,2 , . . . , st,Lt ] denotes the frame sequence of the t-th resource. The algorithm then processes these sequences in a backward manner. For any request HEADER frames st,j > 0 in St (for t > 1), the algorithm removes it from the current sequence with probability pmove = 0.2 and inserts it after the request HEADER frames in the preceding resource sequence St−1 . Frames that have been shifted forward may continue to move further upstream in subsequent iterations with probability pmove , forming a cascading forward-shifting process. Through this mechanism, requests HEADER from multiple resources can form localized aggregation patterns within the flow-level frame sequence, effectively simulating the coalesced transmission behavior induced by HTTP/2 multiplexing and mitigating the strict temporal patterns introduced by naive resource concatenation.
E. Frame Sequence Augmentation We observe that the total upstream and downstream traffic volumes exhibit pronounced multimodal distributions, driven by factors such as HPACK index hit states, accompanied by a clear static–dynamic separation in frame sequences, where some frame lengths remain stable while others vary within bounded ranges (Appendix C). Based on the above observations, we propose a frame sequence augmentation method with structure preservation and distributional constraints. It aims to generate HTTP frame sequences that conform to historical statistical distributions while retaining the stable structural patterns of applicationlayer frame sequences. Given the historical set of HTTP frame sequences for a certain resource, denoted as S, each sequence can be represented as S = [s1 , s2 , . . . , sL ], where positive values indicate upstream requests and negative values indicate downstream responses. First, the method aligns the sample sequences in S and identifies positions where frame sizes remain nearly constant as anchor positions, which preserve the stable structural patterns of the resource’s frame sequence. Meanwhile, it detects the set of positions M where frame sizes exhibit variability, which are treated as adjustable positions for subsequent augmentation. For each adjustable position i ∈ M, the historical variance σi2 and value range [bmin , bmax ] are estimated to constrain the i i magnitude of local perturbations. In addition, for each historical sequence, the total upstream volume U and downstream volume D are computed, and their probability distributions fˆU (u) and fˆD (d) are estimated via kernel density estimation (KDE), capturing the global traffic volume variation patterns of the resource. During the generation phase, the algorithm randomly selects a historical sequence S base ∈ S as the base sequence, and samples a target upstream volume U tgt from the KDE distribution (the downstream sequence is generated analogously). The target volume is then allocated across the adjustable positions. Specifically, let the adjustable upstream frame vector to be generated be x = [x1 , . . . , xk ]T , with base values xbase . This process is formulated as a constrained quadratic programming problem: under the constraints of total volume conservation
F. Cross-Layer Feature Alignment Furthermore, to bridge the gap between application-layer frame sequences (FS) and transport-layer packet length sequences (PLS), we construct an intermediate proxy by generating an ideal packet length sequence from the frame sequence, and introduce a cross-layer feature alignment mechanism. In this mechanism, a teacher model equipped with framelevel semantic knowledge guides a student model to align its latent representations when processing observed packet length sequences. As a result, the model learns to suppress transmission perturbations and environmental noise. First, we introduce an intermediate representation, termed the Generated Packet Length Sequence (GPLS), to mitigate the substantial discrepancies between FS and PLS in both
6
Phase 1: Teacher Pre-training AUG Set
GPLS
Train Set
GPLS
Teacher Model (Trainable)
introduced by lower-layer transmission protocols. Given the GPLS Xclean and corresponding labels y from both the original training set and its augmented counterpart, the model parameters are optimized by minimizing a standard classification loss LTcls (e.g., cross-entropy loss). After sufficient training, the teacher model can learn highly abstract and noise-robust semantic representations in its projection layer. Once training is complete, the parameters of the teacher model are frozen, and its output soft predictions and high-dimensional feature representations serve as reference targets for subsequent knowledge distillation [66]. During the cross-layer distillation stage, the student model (S) inherits the architecture and initialization of the teacher model and is trained on paired samples: the ideal sequence Xclean (GPLS) is fed into the teacher model, while the corresponding noisy observed sequence Xnoisy (PLS) is fed into the student model. To guide the student model to approximate the semantic space under noisy inputs, we introduce a softlabel distillation mechanism in the decision space based on the Kullback–Leibler (KL) divergence. Let zt and zs denote the logits produced by the teacher and student models, respectively. A temperature parameter T is applied to soften the output distributions, and the objective is to minimize the discrepancy between the two predictive distributions:
Cross-Entropy Loss
Phase 2: Cross-layer Distillation
GPLS
Train Set
PLS
Teacher Model (Frozen) Pretrained Weights
Student Model (Trainable)
KL-Divergence Loss Cosine Similarity Loss
Distillation Loss
Cross-Entropy Loss
Phase 3: Deployment Test Set
PLS
Student Model (Deployed)
Final Prediction
Fig. 6. Cross-layer feature alignment architecture.
feature dimensionality and value distribution. It represents a stable, idealized generation form of real traffic, free from transmission-induced perturbations such as buffering, fragmentation, and scheduling. In this form, each frame is independently encapsulated across protocol layers, yielding a packetlength structure that closely approximates an MSS-constrained segmentation pattern. Let a single application-layer data frame be denoted as fi , where sgn(fi ) indicates the transmission direction and |fi | denotes its size. The reconstruction process consists of two sequential transformations. First, during crosslayer encapsulation, a fixed encapsulation and encryption overhead ∆T LS is added to each application-layer frame to account for protocol stack overhead 2 , yielding the ideal encapsulated frame fi′ : fi′ = sgn(fi )(|fi | + ∆T LS )
z z s t ∥σ Lkl = T 2 · DKL σ T T
where σ(·) denotes the Softmax function. This process enables the student model to capture the implicit inter-class structural relationships learned by the teacher model. To further mitigate the impact of fragmentation and cross-layer perturbations on sequence representations, we introduce a cosine alignment constraint in the latent feature space. Specifically, let vt and vs denote the feature vectors output by the projection layers of the teacher and student models, respectively. Feature alignment is achieved by minimizing their cosine distance, thereby enforcing directional consistency between the PLSbased representation and the GPLS-based representation in the feature space.
(2)
Subsequently, based on the MSS threshold τM SS of the target network environment, the encapsulated frame is subjected to idealized segmentation modeling. Specifically, when |f ′ i| > τM SS , it is sequentially divided into a packet length subsequence Pi . In this process, Pi consists of k = ⌊|f ′ i|/τM SS ⌋ full-sized segments, along with an additional residual segment when the division is not exact, thereby characterizing the ideal segmentation structure. Pi = sgn(fi ) τM SS , . . . , τM SS , |fi′ | mod τM SS | {z }
(4)
N
Lcos = 1 −
(3)
(j)
(j)
1 X vs · v t N j=1 ∥vs(j) ∥2 ∥vt(j) ∥2
(5)
Finally, by including the supervision from ground-truth labels, the overall optimization objective of the student model is defined as Lstudent , where α, β, and γ are weighting coefficients. In this multi-objective joint optimization framework, the student model is able to progressively approximate the stable semantic representations characterized by GPLS, starting from perturbed PLS inputs. It enables more robust traffic fingerprinting performance in real-world network environments.
k
As shown in Fig. 6, based on the augmented data described above, we first perform supervised pretraining of a teacher model T . It uses frame sequences to construct an ideal semantic representation space that is free from interference 2∆ T LS primarily consists of the fixed overhead introduced by the HTTP/2 frame header and the TLS Record layer. Under the widely used AES-GCM encryption mode, TLS 1.3 incurs approximately 31 bytes (including a 9B HTTP/2 frame header, 5B TLS Record header, 1B content type field, and 16B authentication tag), while TLS 1.2 introduces an additional ∼8B explicit initialization vector on top of this.
Lstudent = αLScls + βLkl + γLcos
7
(6)
RQ3: Robustness and Generalization. Can SATA maintain stable performance and resilience under highly volatile network conditions and complex deployment environments? • RQ4: Efficacy under Controlled Settings. Does SATA sustain its efficacy in controlled environments where dynamic noise is minimized?
V. E VALUATION A. Experimental Setup a) Dataset Construction: To validate the effectiveness of SATA, we construct an encrypted traffic dataset, as shown in Table I, to evaluate model robustness in complex conditions such as cross-region and cross-time scenarios. Data collection is executed within Docker containers, where each URL visit is driven by an independent subprocess. Browser interactions are automated using Playwright 3 , while network traffic is captured by Tshark. In addition, TLS session keys are preserved to enable joint analysis of plaintext and encrypted traffic features. The augmented dataset (AUG) is built by the Singapore-A dataset. The training set consists of 70% of the SingaporeA data, with the remaining 15% used for validation during training and 15% reserved for testing. The training set contains both GPLS and their corresponding PLS, while the test set only includes observable PLS. Importantly, to strictly evaluate the adaptability of SATA under complex protocols such as HTTP/2, we use only HTTP/2 traffic in both training and evaluation stages.
•
B. RQ1: Performance a) Overall Performance: Table II presents the performance comparison across different datasets and models. Overall, the proposed method consistently yields stable performance improvements across all evaluation scenarios and model configurations, validating its effectiveness in various settings. In both cross-region scenarios (France-A and SouthKoreaA) and the cross-time scenario (Singapore-B), all models achieve varying degrees of performance improvement after incorporating the proposed method. In particular, under crossregion scenarios with more pronounced distribution shifts, the method achieves average improvements of 5.57% and 5.47% in ACC and F1, respectively, which are substantially higher than those observed in the closed-world setting (Singapore-A). It indicates that, by expanding resource composition patterns and mitigating structural perturbations, the proposed method effectively bridges the structural gap between source and target domains, thereby yielding more substantial gains under pronounced distribution shifts. From a model perspective, the method exhibits strong adaptability and architectural compatibility. Notably, larger improvements are observed in more expressive models such as BERT-PS and FSNet, with gains of up to 12.23%. It suggests that more expressive models can better leverage the enriched semantic information in the augmented data when modeling packet-length sequences. b) Open-World Performance: To evaluate the performance of SATA in open-world scenarios, we use SingaporeA as the training set and conduct testing on France-A and China-C, where China-C is treated as unknown-class data to construct an open-world environment. During the inference stage, we further integrate several mainstream open-world recognition methods, including Softmax [35], OpenMax [67], and a series of KLND-based methods [68] (KLND-1, KLND2, and KLND-3). These methods are integrated with FSNet to systematically evaluate performance under different openworld decision mechanisms. Fig. 7 shows the performance improvements of FSNet in different open-world decision mechanisms after introducing the proposed method (FSNet+). The results show that, across all evaluation settings, the model achieves consistent improvements in ACC, F1, and AUROC, with particularly significant gains in ACC and AUROC, averaging 90.81% and 48.37%, respectively. It indicates that the proposed method not only enhances the model’s discriminative capability for known classes but also substantially improves its ability to identify unknown samples. In addition, the proposed method yields consistent performance gains across different open-world recognition
TABLE I DATASET OVERVIEW. Dataset Name
Collection Date
Collection Location
Description
Number of Flows
Number of Traces
Singapore-A SouthKorea-A France-A Singapore-B China-C
2025/12 2025/12 2025/12 2026/01 2025/03
Singapore South Korea France Singapore China
Top-110 Alexa sites Top-110 Alexa sites Top-110 Alexa sites Top-110 Alexa sites Top-9853 China sites
160,604 175,472 70,703 156,753 334,414
5,500 5,500 5,500 5,500 9,853
b) Model and Hyperparameter Settings: The experimental evaluation employs commonly used deep learning models for WF, including FSNet [49], BERT-PS [55], Transformer, LSTM, and GRU. The main hyperparameters are configured as follows: the learning rate is set to 1 × 10−4 , and the maximum input sequence length is 500. Models are trained using the Adam optimizer. The maximum number of training epochs is set to 300, with early stopping terminating training if the validation F1 score does not improve for 15 consecutive epochs. c) Experimental Environment: To ensure reproducibility, all experiments are conducted on a consistent computing platform. The software environment comprises Ubuntu 22.04, Python 3.12, and PyTorch 2.7.0. The hardware configuration is anchored by an NVIDIA RTX 5090 GPU (32 GB) and a 32-core Intel(R) Xeon(R) Gold 6459C CPU. Our evaluation is structured to address the following research questions: • RQ1: Performance. Does SATA significantly improve the classification accuracy and unknown-sample detection capabilities of representative baseline models across diverse scenarios? • RQ2: Effectiveness of Key Components. How do the individual components of SATA contribute to the overall performance enhancement? 3 https://playwright.dev/
8
TABLE II P ERFORMANCE IMPROVEMENTS OF SATA ACROSS DIFFERENT DATASETS AND MODELS . Singapore-A
Methods
France-A
SouthKorea-A
Singapore-B
ACC
F1
ACC
F1
ACC
F1
ACC
F1
Transformer LSTM GRU BERT-PS FSNet
73.24 (2.02%↑) 65.49 (1.07%↑) 62.96 (0.83%↑) 83.92 (2.13%↑) 71.07 (5.81%↑)
84.45 (0.84%↑) 79.93 (0.90%↑) 76.71 (0.87%↑) 93.38 (0.88%↑) 82.77 (3.75%↑)
64.78 (2.81%↑) 56.34 (3.39%↑) 53.91 (2.71%↑) 44.88 (10.98%↑) 60.40 (5.76%↑)
68.77 (2.44%↑) 61.10 (2.49%↑) 59.43 (3.20%↑) 49.45 (7.14%↑) 62.90 (9.01%↑)
52.53 (4.13%↑) 44.69 (2.26%↑) 41.78 (3.78%↑) 39.91 (12.23%↑) 47.81 (7.66%↑)
68.73 (2.15%↑) 58.54 (4.27%↑) 55.14 (6.86%↑) 50.43 (8.96%↑) 61.79 (8.16%↑)
62.55 (1.74%↑) 55.03 (1.07%↑) 52.71 (1.40%↑) 70.92 (2.55%↑) 59.80 (5.43%↑)
72.70 (1.28%↑) 67.22 (2.01%↑) 65.42 (1.54%↑) 79.62 (1.82%↑) 70.81 (4.28%↑)
On Average
71.34 (2.37%↑)
83.45 (1.45%↑)
56.06 (5.13%↑)
60.33 (4.86%↑)
45.34 (6.01%↑)
58.93 (6.08%↑)
60.2 (2.44%↑)
71.15 (2.19%↑)