Artificial Intelligence1 min read

PCAP-LM: Helping AI assistants read network traffic

By · Published by Everything Blog

In short

The new system, named PCAP-LM, transforms raw traffic into an abbreviated notation that preserves core details like packet direction, type, size, and timing while applying run-length encoding. In evaluations on real 4G and 5G network traffic, it reduced document sizes about 800-fold compared to detailed Wireshark text outputs, generating files that average roughly 100 KB. This compact structure allowed an AI model to achieve 99.3% accuracy on basic forensic questions across 30 unseen captures, outperforming truncated standard outputs. To balance the intentional loss of raw payloads and exact timings, the format can maintain reference pointers back to the original source capture.

Key points

  • Discarding sequence numbers and raw payloads allows language models to analyze complete n…: Discarding sequence numbers and raw payloads allows language models to analyze complete network traces without hitting context limits.
  • Evaluated against size-truncated standard outputs that yielded 51% accuracy, the condense…: Evaluated against size-truncated standard outputs that yielded 51% accuracy, the condensed format significantly improves forensic performance.
  • Compression checks missed retransmissions in approximately one-quarter of affected captur…: Compression checks missed retransmissions in approximately one-quarter of affected captures that were recorded behind a proxy.

Sources checked by our analysis pipeline: 1

Packet captures are the ground truth of network operations. When a customer complains about slow downloads or a security team investigates an incident, someone eventually opens a capture file and reads what actually crossed the wire. That work is slow, needs rare expertise and does not scale.

Large language models (LLMs) seem like an obvious helper. They already summarize logs and draft troubleshooting steps. But hand one a packet capture, and it chokes. When converted to text using standard tools, a few megabytes of traffic can expand to nearly 20 million tokens, far more than any model can read at once. We set out to fix that mismatch. The result is PCAP-LM, a way of rewriting a capture so that an AI assistant can read the whole thing in one go. The full details are in our research paper.

Symbol | Layer | Meaning |

> / < | Direction | Client → server / reverse |

S A F R P U | TCP | SYN, ACK, FIN, RST, PSH, URG |

~ / h | TLS | Application…

Artificial Intelligence