English

Learning What to Remember: Adaptive Probabilistic Memory Retention for Memory-Efficient Language Models

Computation and Language 2025-10-13 v1

Abstract

Transformer attention scales quadratically with sequence length O(n^2), limiting long-context use. We propose Adaptive Retention, a probabilistic, layer-wise token selection mechanism that learns which representations to keep under a strict global budget M. Retention is modeled with Bernoulli gates trained via a Hard-Concrete/variational relaxation and enforced with a simple top-M rule at inference, making the method differentiable and drop-in for standard encoders. Across classification, extractive QA, and long-document summarization, keeping only 30-50% of tokens preserves >= 95% of full-model performance while cutting peak memory by ~35-45% and improving throughput by up to ~1.8x. This architecture-agnostic approach delivers practical long-context efficiency without modifying base attention or task heads.

Keywords

Cite

@article{arxiv.2510.08798,
  title  = {Learning What to Remember: Adaptive Probabilistic Memory Retention for Memory-Efficient Language Models},
  author = {S M Rafiuddin and Muntaha Nujat Khan},
  journal= {arXiv preprint arXiv:2510.08798},
  year   = {2025}
}

Comments

14 Pages, 2 Figures, 6 Table, Accepted at EMNLP 2025 Findings as a Short Paper

R2 v1 2026-07-01T06:28:10.806Z