PCAP-LM: An LLM-Native Text Representation for TLS Bulk Traffic Analysis
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 5 of its 10 references that are in the map. First posted on arXiv 30 Jul 2026.
Builds on
5 of 10 references.
References · 5
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
- 2022ET-BERT: A Contextualized Datagram Representation with Pre-training Transformers for Encrypted Traffic Classificationcited by 66
- 2023NetGPT: Generative Pretrained Transformer for Network Trafficcited by 31
- 2025TrafficLLM: Enhancing Large Language Models for Network Traffic Analysis with Generic Traffic Representationcited by 15
- 2024LLMcap: Large Language Model for Unsupervised PCAP Failure Detectioncited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Multimodal Reasoning with LLM for Encrypted Traffic Interpretation: A Benchmark
- 2025ReGAIN: Retrieval-Grounded AI Framework for Network Traffic Analysis
- 2024Large Language Model (LLM) for Telecommunications: A Comprehensive Survey on Principles, Key Techniques, and Opportunities
- 2025Distilling Large Language Models for Network Active Queue Management
- 2024Sentinels of the Stream: Unleashing Large Language Models for Dynamic Packet Classification in Software Defined Networks -- Position Paper
- 2026AutoSec-RAN: Specification-Grounded LLM Fine-Tuning for Automated Security Analysis of O-RAN
- 2026Lightweight GenAI for Network Traffic Generation: Fidelity, Augmentation, and Classification
- 2026Intent2Tc: Automated Intent-to-Traffic Control Translation with Language Models