arXiv AI

Beyond Compressing Everything: Contrastive Memory Learning for Selective Context Compression

The paper introduces CoMem, a query‑guided selective context compression framework that learns memory representations conditioned on both the document and the query. CoMem employs Contrastive Compressor Learning and a same‑context hard negative mining strategy to retain only query‑relevant evidence, while enabling bidirectional attention among memory slots to overcome causal masking. Experiments show that CoMem outperforms existing context compression methods on question answering and RULER‑NIAH benchmarks across various compression ratios.

Hugging Face Trending Papers
Nov 12

Beyond Compressing Everything: Contrastive Memory Learning for Selective Context Compression

The paper introduces CoMem, a query‑guided selective context compression framework that learns memory representations conditioned on both the document and the query. CoMem employs Contrastive Compressor Learning and a same‑context hard negative mining strategy to retain query‑specific evidence while preserving overall context, and it enables bidirectional attention among memory slots to overcome causal masking limitations. Experiments show that CoMem consistently outperforms existing context compression methods on question answering and RULER‑NIAH benchmarks across various compression ratios.

arXiv Machine Learning
Sep 11

REVA: Reusable Evidence View Aggregation for Context-Efficient RAG Serving

The paper introduces REVA, a method for compressing retrieval-augmented generation (RAG) prompts by aggregating historical query–document–model interactions into reusable evidence views. REVA mines attention traces from the target generator, maps token-level attention to readable words, aggregates importance across repeated document accesses, and produces budget‑specific plain‑text views that maintain document order and the standard RAG interface. Experiments on four benchmarks with modern LLMs show that REVA improves generation quality by 1.0–5.8 points over existing compressors while reducing compression overhead by 5.3 to 15.6 times and adding less than 40 ms of latency.

By Tuan Nguyen, Qiran Hu, Banruo Liu, Khoa D. Doan, Kok-Seng Wong, Fan Lai
arXiv AI
Sep 30

CoEM: Empowering Long-Context Reasoning with Commit-on-Evidence Memory

CoEM introduces a Commit-on-Evidence Memory system that learns when to compress source evidence into compact memory facts while preserving potentially useful excerpts verbatim in a pending set. The system uses a learned policy to decide whether to promote, retain, or discard each pending excerpt as new context arrives, and a frozen verifier ensures only supported facts are committed. Reinforcement learning trains this policy with step-level evidence rewards and final answer rewards, leading to consistent improvements in long-context reasoning, achieving 10.4–11.4 F1 points over the strongest baseline on 6,400-document inputs.

By Jingguang Li, Yebo Wu, Zuyi Guo, Kailang Ma, Xianjie Dai, Han Zheng, Benwang Chen, Li Li, Can Rong, Heye Huang
arXiv AI
5d ago

StitchRAG: Constructing Compact and Evidence-Preserving Contexts for RAG with Diffusion-Based Stitching

StitchRAG is a framework that builds compact, evidence-preserving contexts for retrieval-augmented generation by dynamically compressing retrieved passages based on a utility maximization trade-off between retained information and computational cost. It extracts answer candidates and query-related keywords as anchors, collects sentences containing these anchors under a size constraint, and stitches them together using text diffusion to create a coherent context. Experiments on five open‑domain QA benchmarks show that StitchRAG consistently outperforms various multi‑step and compression baselines, with ablations confirming the benefits of dynamic size allocation, anchor preservation, and diffusion-based stitching.

By Minsang Kim, Junpyo Lim, Heeje Cho, Seungjun Baek
arXiv Computation and Language
Nov 9

Adamas: Hadamard Sparse Attention for Efficient Long-Context Inference

Adamas is a token‑level sparse attention mechanism that uses the Hadamard transform, bucketization, and 2‑bit compression to create compact representations, followed by lightweight distance‑based top‑k selection for efficient long‑context inference. It achieves near‑lossless performance on Llama‑3.1‑8B‑Instruct and delivers up to 6.5× speedup in self‑attention and 1.7× in end‑to‑end decoding at a 32K context length. Adamas also matches full attention performance on challenging long‑form reasoning benchmarks such as AIME 2024 and 2025.

By Siyuan Yan, Guo-Qing Jiang, Yuchen Zhang, Xiaoxing Ma, Ran Zhu, Chun Cao, Jingwei Xu