PrismWF: A Multi-Granularity Patch-Based Transformer for Robust Website Fingerprinting Attack

Yuhao Pan, Wenchao Xu, Fushuo Huo, Haozhao Wang, Xiucheng Wang, Nan ChengarXiv 2026

TL;DR

PrismWF introduces a novel multi-granularity patch-based Transformer designed to execute website fingerprinting attacks in realistic, multi-tab browsing scenarios on Tor. By extracting traffic features across multiple temporal scales and using a hierarchical attention mechanism with dedicated router tokens, it successfully unmixes interleaved network traffic to identify concurrently visited websites without needing to know the tab count in advance.

What Problem Does This Paper Address?

Website Fingerprinting (WF) attacks allow a local adversary to infer which websites a Tor user is visiting by analyzing traffic metadata like packet size, direction, and timing. While deep learning has made single-tab WF attacks highly effective, real-world users rarely browse the web one page at a time. They open multiple tabs concurrently.

When multiple pages load at once, their traffic packets interleave, creating a complex, mixed traffic trace. Traditional single-tab models fail completely under these conditions. Existing multi-tab attack methods either lack robust traffic representations or rely on the unrealistic assumption that the attacker already knows exactly how many tabs are open (a priori knowledge of $K$). PrismWF addresses this gap by creating an attack model that can robustly "unmix" traffic and identify multiple co-existing websites simultaneously under an unknown tab count.

Fig. 1. Illustration of traffic mixing caused by concurrent multi-tab browsing. In the idealized sequential case, website-specific traffic segments remain separable, whereas concurrent page loads interleave traffic from multiple websites within the observed trace.

Methods

PrismWF uses a multi-step pipeline to process raw traffic traces and perform multi-label classification:

  1. Robust Trace Representation: Instead of feeding raw packet sequences directly into the model, PrismWF partitions the traffic time axis into fixed-length intervals (20 ms slots). For each slot, it extracts a 6-dimensional feature vector capturing packet counts (incoming/outgoing), direction transitions, and temporal gaps between transitions.
  2. Multi-Granularity Feature Extraction: The feature matrix is processed by parallel CNN branches with different convolutional kernel sizes. This creates multiple temporal scales: coarse-grained branches capture global contextual patterns, while fine-grained branches preserve local, detailed variations.
  3. Multi-Granularity Attention Block: To integrate these multi-scale features, the authors stack specialized attention blocks featuring three interaction layers:
  4. Inter-granularity interaction: Coarse-grained tokens act as queries to retrieve temporally aligned details from finer-grained sequences.
  5. Intra-granularity interaction: A hybrid self-attention mechanism that uses a learnable "router token" for each granularity to aggregate patch-level semantics locally, aided by a Gaussian distance bias.
  6. Inter-granularity router interaction: Global multi-head self-attention across all router tokens to fuse semantic summaries across all temporal scales.
  7. Website Identification: The final router tokens from all granularities are concatenated and passed to a linear classifier for multi-label prediction.
Fig. 3. Architecture of PrismWF. A raw mixed traffic trace is converted into a slot-based robust representation, encoded by multi-branch CNNs at multiple temporal granularities, refined through stacked Multi-Granularity Attention Blocks, and classified using the concatenated router tokens.

Datasets

The model was evaluated using two primary data sources:

  • ARES Benchmark Dataset: A public dataset containing directly collected multi-tab Tor sessions. It includes sub-datasets for 2-tab, 3-tab, 4-tab, and 5-tab settings across both closed-world (100 monitored sites, ~58,000 instances) and open-world (adding unmonitored background traffic, ~64,000 instances) scenarios. It also features simulated traffic defenses: WTF-PAD, Front, and RegulaTor.
  • Live Tor Testbed Dataset: A new dataset collected by the authors in August 2026 using Tor Browser and WFDefProxy. It covers 96 contemporary websites across 2-tab and 5-tab sessions under both undefended conditions and active online DeTorrent defenses.

Key Insights and Ideas

  • Cognitive Logic Alignment: The multi-granularity approach mirrors human cognitive logic: global coarse-grained reconnaissance identifies the overarching structure of the traffic, while local fine-grained querying fills in the specific details needed to separate interleaved tabs.
  • Router Tokens as Semantic Proxies: Instead of allowing all patches across all granularities to interact globally—which would be computationally prohibitive and noisy—PrismWF uses granularity-specific router tokens. These tokens cleanly summarize information within their own scale before exchanging global cues with other scales.
  • Unified Mixed-Tab Training: Training a single model on a pooled sample of 2-to-5-tab traces allows it to generalize effectively to real-world scenarios where the attacker has no prior knowledge of how many tabs the user opened (the unknown-K setting).

Key Results

PrismWF consistently established a new state-of-the-art across all evaluated settings:

  • Closed-World Performance: In the 2-tab setting, PrismWF achieved 89.13% Precision@2 and 92.96% MAP@2. In the challenging 5-tab setting, it hit 87.97% Precision@5, outperforming the previous best baseline (ARES) by nearly 5 percentage points.
  • Open-World Robustness: It maintained its lead in open-world scenarios, scoring 88.58% Precision@5 in the 5-tab setting.
  • Unknown-K Setting: When evaluated without knowing the true tab count, PrismWF improved micro-F1 over ARES by 3.11 points and exact-set accuracy by 4.76 points.
  • Defeating Defenses: Under the advanced RegulaTor defense in a 5-tab setting, PrismWF achieved 53.26% Precision@5, while some recent baselines like CountMamba degraded significantly (dropping to ~5.69%).
  • Real-World Live Deployment: On live Tor traffic defended by online DeTorrent, PrismWF outperformed ARES by 5.60 percentage points in Precision@5.

Limitations and Future Work

  • Scalability to Large-Scale Monitoring: The current evaluation focuses on a moderate scale of ~100 monitored websites. Scaling multi-tab attacks to thousands of websites introduces severe label ambiguity and remains an open challenge.
  • Sensitivity to Network Jitter: The fixed 20 ms slot interval provides a consistent structure but might suffer performance degradation under highly dynamic real-world network conditions with severe packet loss or massive timing variations.
  • Beyond Page-Loading: The current framework is optimized for finite observation windows during initial page loads. Long-lived interactive behaviors (like continuous scrolling or media streaming) may exhibit different temporal patterns that require adaptive temporal representations.

Summary updated

BibTeX
@misc{pan2026prismwf,
  author = {Yuhao Pan and Wenchao Xu and Fushuo Huo and Haozhao Wang and Xiucheng Wang and Nan Cheng},
  title = {{PrismWF: A Multi-Granularity Patch-Based Transformer for Robust Website Fingerprinting Attack}},
  year = {2026},
  eprint = {2603.21117},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.21117},
}
Figure