Compressed Semantic Retrieval as External Memory for Scalable AI Systems

Jiawei Guan, Yancong Wang, Feng Zhang, Qiang Yin, Wei Wang, Xiaoyong DuSCALE @ ICML 2026

TL;DR

This paper introduces compressed-domain retrieval, a paradigm shift where AI systems store, index, and retrieve data directly in its compressed form. By pairing a novel random-access packaging format (ZPKG) with a byte-level embedding model (CEM), the researchers achieved up to a 66x speedup in index construction and a 70% reduction in storage footprint while maintaining retrieval quality competitive with state-of-the-art text encoders.

What Problem Does This Paper Address?

As we move toward "Agentic AI"—systems that use retrieval-augmented generation (RAG) as a form of long-term external memory—we hit a scaling wall. Standard retrieval pipelines are "decompression-first": they take compressed archives, expand them into plain text, chunk them, and then build a vector index.

This workflow is incredibly inefficient for dynamic systems. If your agent’s memory needs to be refreshed or transferred frequently, the cost of decompressing, re-indexing, and storing massive vector blobs becomes a primary bottleneck. The authors ask a provocative question: Must semantic indexing always be built on decompressed text? They argue that by treating compression as part of the retrieval representation itself, rather than just a storage optimization, we can build much leaner and faster AI "memory" substrates.

Methods

The authors propose a two-pronged architecture to enable retrieval over compressed bytes:

  1. ZPKG (Zstandard Packaging): This is a new data format based on the Zstandard (zstd) algorithm. Unlike standard zip files, ZPKG is designed for "granularity alignment." It uses output-driven chunking, where chunks are defined by their compressed size rather than word counts. It includes shard-local dictionaries and a tail index table that allows the system to jump directly to a specific compressed chunk and decompress only that piece after it has been selected.
  2. CEM (Compressed Embedding Model): Since compressed bytes don't look like natural language (they are a mess of dictionary references and entropy-coded symbols), standard tokenizers fail. CEM uses a byte-level architecture inspired by the Byte Latent Transformer. It employs "entropy-based patching," which groups bytes into variable-length patches based on how "predictable" the stream is.
  3. Cross-Domain Distillation: To make CEM understand semantics, it is trained using a teacher-student setup. A powerful text-based model (Qwen3-Embedding-0.6B) acts as the teacher, and CEM learns to map compressed byte sequences into the same semantic space that the teacher uses for plain text.

Datasets

The researchers evaluated their system on a six-task suite derived from the MTEB (Massive Text Embedding Benchmark):

  • AILAStatutes (Legal)
  • LEMBPasskeyRetrieval (Long-context)
  • SpartQA (Spatial reasoning)
  • TempReasonL1 (Temporal reasoning)
  • TwitterHjerneRetrieval (Social media)
  • WinoGrande (Common sense reasoning)

They compared CEM against heavyweights like BGE-M3, E5, and GTE variants.

Key Insights and Ideas

  • The "Unit" Unification: The core philosophy is that the unit of storage, the unit of indexing, and the unit of retrieval should be the exact same compressed chunk. This eliminates the "representation mismatch" that plagues traditional RAG.
  • Late Decompression: By deferring decompression until after the top-k candidates are selected, the system avoids ever materializing the full text of the corpus in memory.
  • Compressibility as a Signal: The authors found that corpus compressibility is a predictor of efficiency. On highly redundant data (like the Passkey task), storage gains were nearly two orders of magnitude.
  • Byte-Level Resilience: Because CEM operates on raw bytes, it is inherently more robust to the structural "noise" introduced by compression algorithms than a subword-token-based model would be.

Key Results

The efficiency gains are staggering, particularly for system maintainers:

  • Storage: Reduced corpus footprint to 30–33% of its original size.
  • Index Construction: Building the HNSW (Hierarchical Navigable Small World) index was 15.1x to 66.9x faster than text-side baselines. This is because compressed chunks are "denser," meaning the model indexes far fewer vectors for the same amount of information.
  • Retrieval Quality: Despite operating on "scrambled" compressed bytes, CEM was not just an approximation. It actually outperformed all baselines on the WinoGrande and TempReasonL1 tasks and remained competitive across the board.

Limitations and Future Work

  • Training Budget: The current CEM was trained on a modest budget (short schedule, single-node hardware). The authors believe even better results are possible with larger-scale pretraining.
  • Dictionary Overhead: For very short or low-redundancy corpora (like short tweets), the fixed cost of the ZPKG dictionary can eat into storage gains.
  • End-to-End Integration: While the retrieval substrate is proven, the next step is testing this in a fully autonomous agentic loop where the agent performs iterative retrieval and planning over years of compressed memory.

Summary updated

BibTeX
@inproceedings{guan2026compressed,
  author = {Jiawei Guan and Yancong Wang and Feng Zhang and Qiang Yin and Wei Wang and Xiaoyong Du},
  title = {{Compressed Semantic Retrieval as External Memory for Scalable AI Systems}},
  booktitle = {SCALE @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=p3bV4zdXre},
}
Figure