PCAP-LM: An LLM-Native Text Representation for TLS Bulk Traffic Analysis
Abstract
Large language models (LLMs) offer powerful reasoning capabilities for network traffic analysis, but standard capture formats and their textual equivalents are prohibitively verbose, overflowing LLM context windows by two orders of magnitude. We present PCAP-LM, a flow-centric, LLM-native text representation that acts as a lossy knowledge extraction step rather than a standard compression tool: raw captures are transcoded into semantic summaries using PacketGlyphs - a novel ASCII alphabet coined in this paper that encodes packet direction, TCP/TLS state, log-scale size, and inter-packet delay. Combined with a constrained PMI-BPE tokenizer and motif run-length encoding, repetitive behavioural patterns are aggressively collapsed. A @REFS side-index preserves lossless drill-down into the original packets. Evaluated on a homogeneous corpus of 5G/4G TLS 1.3 bulk-download traffic, the BPE vocabulary fully saturates at 159 tokens, achieving an 812x size reduction over tshark -V and fitting entire captures within a single LLM context window. In a forensic question-answering evaluation over 30 held-out files, a frontier LLM achieves 99.3% accuracy from PCAP-LM documents versus 51.0% from a token-budget-matched tshark -V prefix. The lossy design introduces known blind spots - most notably a 24% false-negative rate for TCP retransmissions - and extending to heterogeneous mixed-protocol environments will require vocabulary retraining.
Create a lesson
Metadata
- Categories
- cs.NI, cs.CL
- Comments
- 6 pages
Related papers
Spectrum Adaptation of AI-Native Autoencoder Communications with Transfer Learning
Shared title terminologycs.NIYalin E. Sagduyu, Tugba Erpek
Relieving Hotspot Congestion in Large-Scale Low Earth Orbit Satellite Networks via Distributed Dual-Timescale Traffic Splitting
Shared title terminologycs.NIShuyang Li, Guanchen Wu, Qiang Wu et al.
Leveraging Persistent Field-of-View and Multipath Segment Routing for Traffic Engineering in LEO Satellite Constellations
Shared title terminologycs.NIKai Wang, Chee Wei Tan
Beyond Raw IQ: Compact Semantic Representations for Task Oriented Automatic Modulation Classification
Shared title terminologycs.NIOmm Swarup, Shrishail M. Hiremath
An LLM-Driven Traffic-Control xApp for Dynamic 5G RAN Intents
Shared title terminologycs.NIValerio Triolo, Luca Valcarenghi, Emilio Paolini
Intent-Defined Radio: A Goal-Native Architecture for Next-Generation Wireless Networks
Shared title terminologycs.NIWencheng Yan, Binrui Xu, Yihao Shen et al.