Academic Citation & Technical Details

SuperCompress: Efficient LLM Context Compression

A query-aware learned keep/drop policy for context compression. Reads the question, keeps original lines that answer it, and drops the rest. Features include recency, position, and query overlap.

Citation

If you use SuperCompress in your research or project, please cite it as follows:

@software{shah_supercompress_2025, author = {Shah, Arjun}, title = {SuperCompress: Intelligent LLM Prompt Compression}, year = 2025, url = {https://supercompress.dev}, version = {0.6.1}, note = {query-aware extractive keep/drop for LLM context} }

BibTeX citation for LaTeX documents, copy the block above into your .bib file.

Model Architecture

SuperCompress uses a query-aware neural learned policy that operates on token-level features:

  • Input features: Token position, TF-IDF relevance score, named entity density, part-of-speech distribution, line length, and semantic similarity to query
  • Policy: Lightweight logistic regression with feature interactions, trained via reinforcement learning to maximize recall under a token budget
  • Output: Per-line keep/drop decision with a budget constraint that adapts to context length
Key insight: The policy is small enough to run in <10KB of memory, smaller than a single vector embedding. It compresses context on CPU before GPU inference, requiring zero extra GPU time.

Benchmark methodology

SuperCompress is query-aware and extractive: it scores context against the current question and keeps original wording. Public suites measure evidence containment, whether required lines survive, not a downstream chat-model grade.

Headline cut and answer-keep figures are on hold pending re-verification. Cite the live methodology on SuperCompress benchmarks rather than restating unpublished summary numbers here.

Qualitative comparators: truncation is position-blind; summarization rewrites source lines and needs an extra model call; attention-based methods such as H2O need model internals. SuperCompress is hosted Neural Keep plus MCP/hooks for coding agents.

Resources

Star on GitHub
Share on X Share on HN