acceptodds
Under review as a conference paper at ICLR 2027

TraceCodec: A Compiler-Backed Neural Codec for Network Traffic Traces

Abstract

Critical networking workflows need high-fidelity packet captures (PCAPs) for testing, security analysis, and protocol validation; flow-level summaries are not enough. Existing packet generators often learn raw or near-raw packet fields. Such representations mix behavioral choices with fields determined by protocol state, so decoding may require ambiguous post-hoc repair. We present TraceCodec, a packet-aligned neural codec for stateful multi-flow traces. TraceCodec represents each packet as a timed PacketAction with explicit flow slots and transport cues, learns a continuous per-packet latent sequence, and uses a deterministic stateful compiler to reconstruct PCAPs. The compiler assigns endpoints, advances transport state, enforces packet legality, and renders packet bytes, while the neural codec reconstructs the actions and timing. On CICIDS2017 Monday, TraceCodec has 0.00% packet-count and protocol error and 0.03% flow-count error. Raw-field baselines produce substantially larger flow-count and TCP-event errors under the same non-repair policy. With the same flow-matching continuation model, TraceCodec produces complete decoded suffixes in 100% of CICIDS2017 cases and 98.44% of MAWI cases, compared with at most 10.94% for raw-field latent controls. Additional diagnostics show that it preserves TCP transitions and multi-flow interleaving. These results support TraceCodec as a generator-facing latent interface with a deterministic path back to usable packet traces.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.