Papers
Topics
Authors
Recent
2000 character limit reached

Selective Compression & Approximate Retrieval

Updated 23 November 2025
  • Selective Compression and Approximate Retrieval is a set of techniques that minimize data volume by preserving only task-relevant information for efficient, fidelity-controlled querying.
  • These methods leverage formal rate-distortion frameworks and task-adaptive codes to balance storage efficiency with accurate, query-specific data recovery.
  • Practical implementations in scientific data analysis, semantic LLM compression, and high-dimensional vector search demonstrate significant improvements in throughput, latency, and memory utilization.

Selective Compression and Approximate Retrieval denotes a class of information storage and query processing techniques that maximize efficiency by reducing data volume while enabling query-driven, fidelity-controllable access to relevant content. These methods are prevalent across numerous domains, including scientific data analysis, information retrieval, vector search, event data frameworks, and LLMs, where the scale or structure of information renders full decompression or exhaustive retrieval impractical.

1. Conceptual Foundations and Mathematical Formalism

Selective compression targets the retention of task-relevant or query-selective information, as opposed to generic or lossless compression. The optimal selective compression strategy depends on the downstream approximate retrieval protocol, which might allow errors in reconstruction, tolerate controlled degradation of fidelity, or focus on similarity identification rather than perfect recovery.

A formal rate-distortion framework contextualizes these trade-offs. For a given source sequence XnX^n and a family of queries YnY^n, Ingber & Weissman characterize the minimal rate RID(D)R_{ID}(D) that supports similarity-deciding queries with vanishing false positives, given a permissible distortion DD:

RID(D)=minPUX:uPU(u)ρˉ(PXU=u,PY)DI(X;U)R_{ID}(D) = \min_{P_{U|X}: \sum_u P_U(u)\,\bar{\rho}(P_{X|U=u},P_Y) \ge D} I(X;U)

where ρˉ\bar{\rho} is the minimal transport distortion between distributions, and I(;)I(\cdot;\cdot) denotes mutual information (Ingber et al., 2013). For approximate pattern matching under edit distance, space- and time-efficient retrieval can be achieved by maintaining grammar-compressed structures supporting random access and sparse matching (Gagie et al., 2011).

Information-theoretic approaches highlight that naive quantization or vector coding often fails to realize the lowest feasible compression rates for selective retrieval, motivating problem-adaptive codes and coupling strategies.

2. Compression and Retrieval in Practice: Scientific, Event, and Text Data

Selective compression and retrieval architectures are implemented at scale in numerous scientific and industrial systems. In ATLAS's persistent event data layout, selective access was achieved by designing ROOT file structures with member-wise streaming and optimized basket sizes, tuned to the granularity of event selection in the Athena analysis framework (Gemmeren et al., 2011). Key features of this system include:

  • Container-level baskets (mostly disabling per-member splitting).
  • Frequent basket flushing (every 5–10 events), minimizing extraneous I/O per selected event.
  • Integration with a separate TAG database, which supports SQL-like preselection over compressed event metadata, allowing StoreGate to efficiently map TAG-based queries to minimal data reads.

Consequent improvements included a 4–5× increase in sparse access throughput, up to 30% higher full-scan speed, and substantial reductions in per-reader memory footprint without increasing data size.

Lossy, progressive selective compression schemes are exemplified by IPComp for scientific data (Yang et al., 6 Feb 2025). IPComp applies multi-level interpolation predictors—such as linear or cubic splines—anti-correlated quantization, and bitplane decomposition, enabling users to retrieve coarse approximations (by loading a subset of bitplanes) and progressively refine as needed to reach a target error bound. The optimal bits-to-load per retrieval are decided analytically through knapsack dynamic programming to achieve minimum required I/O for a given error or under a bitrate constraint. This structure allows retrieval workflows such as visualization (e.g., partial field rendering at 0.3% of original data, followed by refinement for high-fidelity features), yielding up to an 83% reduction in data volume compared to prior progressive compressors.

For pattern-rich data (e.g., genomes, logs), grammar-compressed indices (e.g., SLP or block-graph) combined with phrase-boundary extraction enable O(zmin(mk,k4+m)+occ)O(z \min(mk, k^4+m) + \mathsf{occ})-time approximate pattern matching, where zz is the number of LZ77 phrases and occ\mathsf{occ} the occurrences, avoiding the full decompression of the underlying string (Gagie et al., 2011).

3. Semantic and Contextual Compression in Language and Retrieval Models

Semantic compression in LLMs operates by transforming textual or code data into compact representations (often not human-interpretable) that support “semantic retrieval”—the capacity to reconstruct or reason over content at a level sufficient for downstream utility, even if exact reproduction is impossible (Gilbert et al., 2023). In prompt-based LLM workflows, the compression is guided by meta-prompts—either targeting lossless or semantic (intent-preserving) objectives. The reconstructed semantic similarity (CS) and token saving (CR) are quantitated by metrics such as SRE (Semantic Reconstruction Effectiveness):

SRE=CR×CS\mathrm{SRE} = \mathrm{CR} \times \mathrm{CS}

Empirical results show that semantic compression with GPT-4 achieves \sim77% compression ratios with CS \approx 0.94, substantially expanding the effective context window (~5×), compared to standard lossless baselines.

In Retrieval-Augmented Generation (RAG), selective compression is used to balance fine-grained precision and global coverage, as demonstrated in SARA (Jin et al., 8 Jul 2025). Here, context documents are split into chunks, and a combination of fine-grained, entity-rich spans (retained in natural language) and dense semantic compression vectors (aligned to LLM embedding space) are selected for augmentation. Embedding-based and conditional self-information criteria drive an iterative evidence selection module that prioritizes both novelty and factual accuracy. Experimental results show SARA yields consistent improvements (+17.7 F1, +15.5 ROUGE-L) compared to both pure-compression and summarization-based baselines in knowledge-intensive QA.

For long-context LLMs, selective KV cache compression at the head level (HeadKV, HeadKV-R2) enables retention of only the most contextually critical keys and values per attention head, based on synthetic retrieval and reasoning benchmarks. Even at 1.5% of full KV cache size, HeadKV-R2 can retain 97% of QA performance with 10× reduced peak memory and no latency overhead (Fu et al., 25 Oct 2024).

In high-dimensional vector search, selective compression aims to reduce the storage and computation required while retaining retrieval fidelity for near-neighbor queries. “Connecting Compression Spaces with Transformer” (CCST) trains a transformer-based projection to compress vectors such that inhomogeneous neighborhood relationships are prioritized, enforced by the INRP (Inhomogeneous Neighborhood Relationship Preserving) loss:

LINRP=1m2i=1mj=1mwijf(xi)f(xj)2xixj2L_{INRP} = \frac{1}{m^2} \sum_{i=1}^m \sum_{j=1}^m w_{ij} \left| \|f(x_i) - f(x_j)\|_2 - \|x_i - x_j\|_2 \right|

Here wijw_{ij} upweights close neighbors, ensuring recall preservation in approximate nearest neighbor search, while distant pairs are aggressively compressed. Accelerated graph-based and product-quantization back-ends using CCST-compressed descriptors achieve up to 4×4\times speedup in large-scale search with no recall loss or even slight gains (Zhang et al., 2021).

“Semantic compression” in vector retrieval generalizes top-kk to the selection of diverse and representative sets using submodular set functions F(S)F(S)—a sum of coverage and diversity (or redundancy penalty) terms, often operationalized by greedy selection with a theoretical (11/e)(1-1/e)-approximation guarantee. Recovery of traditional nearest-neighbors is a limiting case with diversity weight set to zero. Augmentation with semantic graphs (kNN plus symbolic edges) and multi-hop retrieval protocols (e.g., Personalized PageRank fusion) further enhances semantic coverage beyond metric proximity alone, addressing high-dimensional concentration pathologies, and yielding broader and more meaning-centric search results (Raja et al., 25 Jul 2025).

5. Selective Compression in Approximate Query Processing and Streaming

Approximate query processing over massive tabular data requires both storage-efficient compression and query-time synopses that allow rapid (millisecond-scale) retrieval of approximate answers. PairwiseHist (Hurst et al., 22 Jan 2024) achieves this by storing the raw dataset with Generalized Deduplication (GD)—a blockwise lossless satellite dictionary structure—and building recursive, hypothesis-test-refined histograms (on sampled compressed “bases”) to form a tiny synopsis capable of answering aggregates, quantiles, and coverage for complex predicates. At query time, only the synopsis is accessed, bypassing raw decompression; selective “drill-down” is performed only when full-fidelity is required for a small subset. Quantitatively, PairwiseHist realizes $2$–3×3\times better accuracy, $10$–50×50\times smaller synopses, and $3$–4×4\times lower latency than previous AQP systems at comparable support (Hurst et al., 22 Jan 2024).

6. Selective Memory Compression and Retrieval in State Space Models

State space models (SSMs) with selective gating serve as a dynamical-theoretic model for compressing temporal dependencies. The gating mechanism G(xt,ht1)G(x_t, h_{t-1}) outputs a soft mask over hidden state dimensions, updating only coordinates deemed relevant at time tt and thus compressing memory by dimension sparsity. The trade-off between memory efficiency and recoverable information is analyzed via rate-distortion theory. For a target distortion DD, the minimal mutual information I(ht;x1:t)I(h_t; x_{1:t}) (selective compression rate) is bounded accordingly. Stability and convergence are formally established under contraction mappings, ensuring that the compressed memory representation remains reliable over long horizons. Empirical results show selective SSMs match or exceed LSTM/GRU baselines in accuracy and perplexity while reducing memory usage by 40–60% and per-step update time by up to 2× (Bhat, 4 Oct 2024).

7. Methodological Guidelines, Impact, and Limitations

Across domains, several methodological patterns emerge for effective selective compression and approximate retrieval:

  • Align physical storage or code structure to expected access granularity (e.g., object- or event-wise containers, chunked text spans).
  • Separate coarse preselection (e.g., fast metadata filtering, semantic tagging) from precise data retrieval, minimizing decompression or memory load for irrelevant content.
  • Support fidelity modulation (e.g., progressive bitplane decoding in IPComp, semantic vs. lossless mode in LLM prompt compression), allowing users to trade retrieval time/volume for approximation quality.
  • Employ task-driven training targets: neighborhood-preserving losses for vector indices, information-theoretic objectives for sequence codes, or context/question-aware allocation for LLM caches.
  • Explicitly quantify trade-offs among compression ratio, retrieval latency, and approximation error by metrics such as SRE/ERE, error propagation bounds, and empirical coverage/diversity in search selection.

Limitations include the computational cost of offline model fitting (e.g., projection matrix training for CCST, autoencoder alignment for SARA, rate-distortion optimization for SSMs), potential temporal drift in LLM-based semantic compressors, and the need for auxiliary index or metadata structures to enable selective access. Storage overhead, domain- or application-specific tuning, and limitations of current compressed representations (e.g., in preserving global structure or reasoning over very long contexts) remain areas for further research.


The diversity of strategies and mathematical frameworks outlined above reflects the centrality of selective compression and approximate retrieval in contemporary data-intensive computation, with each instantiation realizing a distinct, formally-grounded solution to the core problem of information reduction without loss of actionable or query-relevant content (Gemmeren et al., 2011, Yang et al., 6 Feb 2025, Ingber et al., 2013, Gilbert et al., 2023, Jin et al., 8 Jul 2025, Raja et al., 25 Jul 2025, Zhang et al., 2021, Bhat, 4 Oct 2024, Fu et al., 25 Oct 2024, Hurst et al., 22 Jan 2024, Gagie et al., 2011).

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Selective Compression and Approximate Retrieval.