Papers
Topics
Authors
Recent
Search
2000 character limit reached

Compactor: Data & Memory Reduction Techniques

Updated 2 July 2026
  • Compactor is a mechanism that selectively reduces data, memory, or physical material size while preserving critical information for downstream tasks.
  • It utilizes algorithmic strategies such as hybrid ranking, updated attention scores, and amortized synthesis to optimize performance in diverse applications like LLM KV cache compression.
  • Applications include streaming quantile estimation, database compaction, and human-like memory simulation in agent architectures, proving its versatility across domains.

A compactor is a general term referring to an algorithmic or mechanical process that reduces (compacts) the size or dimensionality of data, memory, or physical material while controlling loss or transformation of essential structure or information. In contemporary research, “compactor” and “compaction” span a diversity of domains, including LLM serving, combinatorial circuit design, streaming quantile estimation, earthwork engineering, database management, and more. The unifying principle across domains is selective or structured reduction for efficiency, memory management, or reliability, while maintaining adequacy with respect to critical observables or downstream use.

1. Compactors in LLM KV Cache Compression

The compactor in the context of transformer-based LLMs denotes a lightweight, parameter-free strategy for compressing the key-value (KV) cache used during generation. Traditional approaches for KV cache management are either query-aware (requiring the next query to select which tokens to retain) or query-agnostic (requiring an evaluation of token importance based on the available context alone).

Compactor, as formalized in (Chari et al., 10 Jul 2025), operates in the query-agnostic regime using a hybrid ranking strategy:

  • Statistical Leverage Scores: Given the pre-position-embedded key matrix KRN×dK\in\mathbb{R}^{N\times d}, approximate leverage scores are computed via a low-dimensional SVD of KKK^\top K (cost O(d3)O(d^3)), followed by a randomized right-sketch to further reduce computational overhead (O(Ndk)O(Ndk)).
  • Task-Driven Attention Scores: Non-causal attention is computed over QKQK^\top; tokens highly attended across the context are marked as important.
  • Score Blending: Standardized outlier scores and attention scores are combined (weighting factor λ0.3\lambda\approx0.3), and the top-rNrN tokens in each layer/head are retained.
  • Calibration Procedure: For a given context cc and user-specified quality budget τ\tau, the method fits a smooth calibration curve f(r,c)f(r,c) to model NLL degradation as a function of compaction, thus inferring the maximum safe compression ratio KKK^\top K0 per context.

Empirical results show that, on benchmarks like RULER and LongBench, Compactor matches or exceeds full-KV performance with as little as half the original tokens retained, and often reduces memory burden by over 60% (Chari et al., 10 Jul 2025).

2. Amortized and Expressive Compactors for Long-Horizon LLMs

While Compactor excels in selection-based, parameter-free compaction, the synthesis regime is embodied by methods such as Still (O'Neill et al., 5 Jun 2026). Still trains a small per-layer Perceiver module to produce compressed keys and values via a single forward pass, amortized across all contexts. Unlike per-instance optimization or heuristic selection—which are either expressive but slow, or lightweight but limited—Still is both computationally efficient and able to operate at extreme compression ratios (up to KKK^\top K1) while preserving critical context for LLM inference:

  • Architecture: At each transformer layer, Still applies Perceiver-style cross-attention and self-attention blocks over learned latent banks, projecting the original KKK^\top K2 cached keys and values into KKK^\top K3 compact representations.
  • Training Objective: KL divergence is minimized between frozen base model predictions on full-KV versus compacted-KV contexts, using a fixed corpus and teacher-forced outputs.
  • Iterative and Trajectory-Aware Compaction: Because compaction is a forward pass, Still supports recurring application as a new chunk of text arrives, with the retained cache growing sublinearly in total processed context.
  • Empirical Superiority: Across Qwen and Gemma models and on tasks such as RULER and HELMET, Still consistently exceeds the strongest baseline by 8–22 points (accuracy) and supports zero-shot architecture and scale transfer (O'Neill et al., 5 Jun 2026).

3. Compactors in Data Streams and Quantile Sketches

In the data stream algorithms literature, “compactor” most notably appears in the context of space-efficient streaming quantile estimation. The recent innovation of “elastic compactor” (Gribelyuk et al., 2024) enables near-optimal KKK^\top K4-relative error quantile sketches over streams:

  • Elastic Compactor: A resizable block-compactor maintains its items in sorted order and exposes a Resize operation that dynamically alters its capacity. At each compaction, a suffix is reduced via random selection; items are output at double the current weight.
  • Hierarchical Design: Multiple elastic compactors are arranged in a hierarchy corresponding to dyadic scales of the rank-space, each handling queries of a certain order of magnitude.
  • Space and Accuracy: The scheme achieves a total space of KKK^\top K5, matching the lower bound for relative error sketches. Error per query KKK^\top K6 is tightly controlled, with variance scaling as KKK^\top K7 (Gribelyuk et al., 2024).
  • Top Quantiles Subproblem: A critical subroutine is the Top-KKK^\top K8 Quantiles estimator, supporting precise tails of the distribution using sublinear space.

These algorithmic compactors are central in modern data monitoring, quantile tracking, and other high-throughput streaming tasks.

4. Compactor Agents for Human-Like Memory and Agentic Control

Compactor also refers to structural constraints imposed on memory in agent architectures seeking to simulate or enforce human-like memory constraints:

  • Human Memory Emulation: Compactor agents, as described in (Wang et al., 25 May 2026), regulate transformers’ working memory by explicitly limiting recall to KKK^\top K9 key–value slots (motivated by cognitive science). An LLM ingests a stimulus, encodes up to four compressed “chunks” using tool calls in a key-value store, and then answers queries based only on these chunks. This bottleneck results in error and forgetting patterns that closely mimic human short-term memory, as measured by normalized Wasserstein distance across benchmark memory tasks.
  • Agentic Flows and Compaction: In long-horizon LLM deployments (e.g., HotpotQA, LoCoMo), compactor functionality underlies block-based and parallel context summarization, providing operator control over output volume, throughput, and fidelity (Cim et al., 22 May 2026), with further developments in asynchronous, trajectory-grounded validation and summary adoption (Chen et al., 9 May 2026).

5. Compactors in Database Systems and Hardware Verification

  • Tuple Compactor Frameworks: In semi-structured document database systems such as Apache AsterixDB, a tuple compactor refactors per-record metadata (e.g., field names, type tags) into shared schema structures, reducing storage by up to O(d3)O(d^3)0. Compaction is piggybacked on Log-Structured Merge (LSM) tree flush events, inferring vectorized record formats and merging component schemas without requiring pre-defined user schemas. On diverse real-world datasets, compactor-enabled ingestion consistently improves throughput and resource efficiency (Alkowaileet et al., 2019).
  • Compaction in Hardware Test Circuits: In scan-based integrated circuit testing, “X-compact” refers to X-tolerant compaction circuits leveraging combinatorial X-codes. These designs maximize information throughput (compaction ratio O(d3)O(d^3)1) while being robust to “unknowns” (“Xs”), using mathematically constructed codewords with controlled fan-out and tolerance parameters. Direct links to combinatorial design theory (e.g., Steiner triple systems, even-configuration avoidance) yield explicit constructions and tight existence results for X-compactors under various fault and erasure regimes (Fujiwara et al., 2015).

6. Compactors in Physical and Civil Engineering

  • Granular Material Compaction: In engineering applications involving particulate media, compaction refers to the densification of granular material under confined geometries. Detailed models using the discrete element method elucidate stress accumulation, threshold effects, and the limits of one-dimensional models under varying geometry, rate, and initial packing. These analyses provide quantitative guidelines for the design and operational limits of mechanical compactors (Marks et al., 2015).
  • Intelligent Compaction and QA of Earthwork: Modern roller-based compaction equipment generates high-frequency measurements (roller measurement values, RMVs) used for real-time control and QA. Statistical spatial models (sequential mixed-effects, kriging) paired with multiresolution scale-space analysis enable targeted intervention and assurance of compaction homogeneity, effectively integrating compactor measurements into engineering and construction workflows (Heersink et al., 2013).

7. Theoretical and Algorithmic Compactors in Parameterized Complexity

  • Compact Kernelization for Counting Problems: In parameterized counting complexity, a compactor (formally, a pair of condenser and extractor functions) compresses problem instances such that the answer is recoverable from a condensed object of polynomial size in the parameter. For MSOL-expressible, treewidth-modulable counting problems on O(d3)O(d^3)2-top-minor-free graphs, polynomial-size compactors enable fixed-parameter tractable algorithms with condensing time O(d3)O(d^3)3 and decoding time O(d3)O(d^3)4 (Kim et al., 2018).

References

A compactor, in contemporary research usage, is thus a foundational construct spanning memory management, data reduction, decision support, and physical engineering, realized via both algorithmic innovation and principled system design across computational and applied domains.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Compactor.