Simple Context Compression: Mean-Pooling and Multi-Ratio Training

Yair Feldman, Yoav Artzi
10/23/2025
cs.CLcs.AIcs.LG

No official code found. Best implementation: lil-lab/simple-context-compression (11 stars, last commit 2025-10-24).

Abstract

A common strategy to reduce the computational costs of using long contexts in retrieval-augmented generation (RAG) with large language models (LLMs) is soft context compression, where the input sequence is transformed into a shorter continuous representation. We develop a lightweight and simple mean-pooling approach that consistently outperforms the widely used compression-tokens architecture, and study training the same compressor to output multiple compression ratios. We conduct extensive experiments across in-domain and out-of-domain QA datasets, as well as across model families, scales, and compression ratios. Overall, our simple mean-pooling approach achieves the strongest performance, with a relatively small drop when training for multiple compression ratios. More broadly though, across architectures and training regimes the trade-offs are more nuanced, illustrating the complex landscape of compression methods.

View on arXivView PDF

Code Implementations(1)

Code for the paper "Simple Context Compression: Mean-Pooling and Multi-Ratio Training"

111Shell, PythonOct 21, 202512 months ago

Cite this paper

@article{feldman2025simple,
  title  = {Simple Context Compression: Mean-Pooling and Multi-Ratio Training},
  author = {Yair Feldman and Yoav Artzi},
  year   = {2025},
  eprint = {2510.20797},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.20797v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.20797.svg)](https://codeofpaper.com/paper/2510.20797)

Discussion