NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Demultiplexing Encrypted Tunnels with Slot-Based Recurrent Graphs

When several applications on one device send traffic through a single encrypted tunnel, such as a full-device OpenVPN or WireGuard connection or a V2Ray session with multiplexing turned on, a network observer sees one interleaved stream of packets. It can observe only each packet's size, direction and arrival time. Current encrypted-traffic classifiers assume each observed flow belongs to one application. They therefore answer the wrong question on such a stream, or they average several applications into a blurred label. We propose to recover the hidden structure directly. The model is a recurrent network that keeps a small set of memory slots, one per concurrent application session. It assigns each arriving packet to a slot and, as it goes, builds a graph of dependencies between the slots: which session's burst answers or triggers which. Applications are then identified per slot, not per tunnel.

The problem matters because tunnel multiplexing is where the visibility gap left by encryption is widest. DecETT, the strongest method for identifying apps inside encrypted tunnels, explicitly leaves the multiplexed case unaddressed (DecETT). The one published model that combines graphs, recurrence and encrypted traffic, MH-Net, uses its graph only among the bytes inside a single packet and never evaluates interleaved sessions (MH-Net). Our claim is that multiplexed-tunnel analysis is a problem of inferring a latent dependency graph. The objects whose dependencies matter, the concurrent sessions, are not observed and must be inferred. A streaming recurrent model is the natural tool for that inference at line rate.

Core Claim

A recurrent model with $K$ slot memories can separate an interleaved encrypted tunnel into per-session streams from size, direction and timing alone. It should reach per-session application identification well above both flow-level classifiers and whole-window multi-label classifiers. The gain should come specifically from the explicit assignment of packets to slots, which a separate ablation isolates, and possibly also from the learned slot-to-slot dependency edges, which a second ablation isolates. If multi-label window classifiers match it, the demultiplexing idea is wrong and we will say so.

Where This Sits

Three bodies of work shape the design, each in a different role.

Work that couples graphs with recurrent networks supplies the basic architectural pattern but assumes the graph's nodes are known. DGANN combines graph attention with recurrent units to follow the default risk of known firms in a loan-guarantee network over time (Cheng et al.). A GNN-LSTM system does the same for known suppliers and manufacturers in the semiconductor supply chain (Ju). In both, the topology is given and only the node states evolve. Behme and Klüppelberg stress that in many operational settings the true network is unobserved, and that risk calculations must account for this uncertainty (Behme and Klüppelberg). We take that concern to its extreme case: the nodes themselves are latent, and the model must infer both nodes and edges from a single stream.

Graph methods for encrypted traffic supply the vocabulary for the edges but work at the wrong scale or assume flows are already separated. FG-SAT builds a graph inside one flow from TCP window and acknowledgment relations (FG-SAT). DigTraffic connects the packets of one flow through message-boundary and direction-change edges and processes them with a graph Transformer whose cost grows quadratically in flow length (DigTraffic). Enmob comes closest in spirit. It links flows produced by a single app action through "adjoint", "partial order" and "independent" relations and matches them against behavioral profiles (Enmob). Enmob, however, starts from flows that are already separated by their five-tuple. Inside a VPN tunnel those five-tuples are encrypted away. We reuse Enmob's edge types as the relation vocabulary for our slot graph, but the slot graph must be inferred, not read off the packet headers.

Sequence models for encrypted traffic supply the per-packet encoder and also constrain the design. FS-Net, a bidirectional gated recurrent model over packet length and direction sequences, collapses inside tunnels. DecETT reports its accuracy dropping to roughly 61% or lower on VMess (DecETT). This negative result tells us that a plain recurrent network over the tunnel sequence is not enough. It also motivates keeping DecETT's idea of separating tunnel-induced noise from application behavior. Irregular packet timing is handled with time-aware gates in the style of Phased LSTM (Phased LSTM) and with state propagation under asynchronous observations (Recurrent Neural Networks for Missing or Asynchronous Data). DigTraffic's observation that timing is much less stable than size under jitter also shapes the design: timing feeds the assignment step only through a coarse, jitter-robust encoding.

Research Program

The model reads one packet at a time from the tunnel. Each packet's observable features, $x_t$, are its encrypted size, direction and inter-arrival gap. The model maintains $K$ slot states $s^1_t,\dots,s^K_t$, each a gated recurrent state standing for one candidate concurrent session, plus an "open new slot" option. A small scoring network, the component that decides which session a packet belongs to, compares $x_t$ with each slot's prediction of its own next packet:

$$p(z_t = k \mid x_t, s_{t-1}) \propto \exp\big(-\lVert x_t - f(s^k_{t-1}) \rVert^2 / \tau + g(s^k_{t-1}, x_t)\big).$$

Here $z_t$ is the slot the packet is assigned to, $f$ is the slot's predictor of its next packet, $g$ is a learned compatibility term, and $\tau$ is a temperature. Only the assigned slot updates its gated state. This keeps memory constant per tunnel and makes processing streaming.

Alongside the slots, the model keeps a slot-to-slot edge matrix $A_t$ over Enmob's three relation types. Two slots gain "partial order" weight when one slot's upstream burst is repeatedly followed by the other's activity within a short lag, as happens when one app action triggers a second connection. A light message-passing step over $A_t$ refines the slot states before per-slot app classification. This lets a slot borrow evidence from sessions it is coupled to.

Training uses packet-level assignment labels where they exist, with a loss over slot permutations. It also adds the same per-slot app classification loss and a next-packet prediction loss that gives an unsupervised signal on unlabeled captures. A DecETT-style tunnel-adversarial branch removes tunnel-protocol identity from the slot states.

Data is the main engineering contribution, because no public multiplexed benchmark exists. We will build two datasets. The first is a controlled synthetic set made by interleaving single-application captures from ISCX VPN-nonVPN and CrossPlatform according to their timestamps. It is cheap to make and has exact labels, but it lacks realistic shared-congestion effects. The second is a real capture set. Instrumented Android and desktop clients run two to five concurrent applications through OpenVPN, WireGuard and V2Ray mux. Ground-truth per-packet labels come from captures taken before the tunnel on the client and matched to tunnel packets by timing and size. Shadowsocks, which opens a separate proxy connection for each client connection, serves as a naturally non-multiplexed control.

Baselines

The naive reference point is a flow-level classifier applied to the whole tunnel as though it were one flow, predicting a single label. We score it against the set of true concurrent apps, crediting only its top label. This measures how much a multiplexed tunnel breaks current practice.

The recurrent reference is FS-Net as reimplemented in DecETT's setting. It is run on the same tunnel sequences with a multi-label sigmoid output head. DecETT reports FS-Net accuracy of roughly 61% or lower on single-app VMess traffic (DecETT), so we expect it to degrade further under multiplexing.

The strongest existing competitor is DecETT itself, adapted with a multi-label head over sliding windows. It is the best reported tunnel fingerprinting method and directly targets encapsulation noise. We found no reported result on Lacuna for DecETT's own accuracy numbers in the compiled file. We will therefore report its numbers from our own rerun on DecETT's released setting before extending it to multiplexed data.

We also include DigTraffic's message-aware graph Transformer and MH-Net as graph-based competitors, each with a multi-label window head. No reported result was found on Lacuna for either on ISCX-VPN in the compiled file, so we will reproduce them on single-app ISCX-VPN first to check our implementations.

All systems receive the same features, windows, training data, a matched budget of hyperparameter trials (around forty each), and comparable parameter counts. The proposal counts as beating them if it improves per-session macro F1 over the best adapted window baseline by a margin larger than seed-to-seed variance on the real multiplexed set with three or more concurrent apps. It must also stay within a few points of the best single-app baseline on the Shadowsocks control.

Two ablations isolate the proposal's ingredients. Setting $K=1$ turns the model into an FS-Net-like recurrent classifier, which isolates the value of slot assignment. Removing the edge matrix $A_t$ isolates the value of the dependency graph. An oracle that is given the true packet assignment and then classifies per slot gives the ceiling on what demultiplexing could deliver.

Why not just…?

Why not just train a multi-label classifier on windows of the tunnel? This is the real threat. If concurrent apps leave distinguishable size and timing signatures, a strong window model such as DecETT or DigTraffic with a sigmoid head could list which apps are present without ever separating packets. Our bet is that it fails as concurrency grows and when two apps share a traffic type, for example two video apps. It also cannot say which bytes belong to whom, which policy enforcement needs. The comparison against these adapted baselines, broken down by number of concurrent apps, settles the question. If the window models match per-session F1 at three or more apps, we drop the slot mechanism.

Why not just demultiplex with heuristics first, by clustering on packet size and timing gaps, and then classify each cluster? This two-stage pipeline is cheap and may work when apps have separated size modes. We include it as a baseline, using k-means or DBSCAN on size, direction and gap followed by DecETT on each cluster. We expect it to break when apps overlap in size. Its failure should also show up in the assignment metric, adjusted Rand index against the true packet ownership, which the learned model should raise.

Why not just use a Transformer over the whole tunnel instead of a recurrent model? A Transformer may match accuracy offline. The recurrent design is chosen for streaming: each packet costs a constant amount of work and memory, whereas DigTraffic-style attention grows quadratically (DigTraffic). We will report accuracy together with packets per second and memory per tunnel. If a windowed Transformer wins on both, the recurrence argument fails.

Decisive Checks

We measure three things: per-packet assignment quality (adjusted Rand index against true ownership), per-session app identification (macro F1 over sessions), and the time from a session's first packet to its correct identification. All three are reported on the synthetic and real multiplexed sets, split by tunnel protocol and by the number of concurrent apps.

Three checks decide the proposal's fate. First, the $K=1$ ablation must lose clearly to the full model on real multiplexed traffic; otherwise slot assignment adds nothing. Second, the gap between the learned model and the oracle-assignment ceiling shows how much of the remaining error is due to demultiplexing and how much to per-session classification. Third, removing $A_t$ should hurt mainly on apps that open coupled connections. If it does not, we report that the dependency graph is unnecessary and keep only the slots.

Finally, because padding and dummy-packet generators such as AdvTG can reshape size and timing profiles (AdvTG), we stress-test the system with constant-rate padding in the tunnel. We report the point at which assignment breaks down, since that marks the honest limit of seeing through encryption by observing behavior alone.