Skip to content
OpenTrain AIFor AI Companies

Latent Compaction with Test-Time Training

Yingfa Chen, Xingyu Shen, Chaojun Xiao, Xu HanPublished Oct 14, 2026
arXiv PDF
Researcher verdict
Context only
Use as context only
Benchmark evidence
Thin evidence
Verify before relying
Time to first repro
A few days
Plan setup time
Risk flags
2
Review before use

Abstract

Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.

Long contexts enlarge key--value (KV) caches, increasing memory use and attention costs during generation. Compressing these caches must preserve information for unseen questions. We introduce **Latent Compaction**, which learns a compact document-specific cache through test-time training. We initialize cache entries using reconstruction importance, teacher attention, and key-space diversity. Training first fits attention outputs and log-normalizers to those of the full cache, with reconstruction-selected entries held fixed. It then jointly optimizes the entire cache through end-to-end distillation from the full-cache model. Model weights remain frozen throughout, and training uses only generic prompts about the document, without access to downstream questions or answers. Experiments on RULER, LongBench, and Phonebook Lookup demonstrate substantial gains over budget-matched compression baselines. On a RULER, for example, our method achieves 96.7% accuracy at 32$\times$ compression, compared with 40.0% for KVZip+. The method also transfers across model scales and families, with retrieval gains on both Qwen3 and MiniCPM5. These results show that treating the KV cache as a neural network and optimizing it with test-time training can preserve retrieval accuracy under aggressive compression. The code is released at https://www.github.com/THUNLP/latent-compaction

Results and benchmarks

Freshness tier: hot
Long contexts enlarge key--value (KV) caches, increasing memory use and attention costs during generation.
Task Dataset Metric Value Source
Retrieval / indexing Latent Compaction 4K 87.75 paper-derived

Audit each benchmark finding before selecting an implementation path. Evidence refs map to the disclosure below.

Implementation

No direct implementation yet

Maintained implementation evidence is not confirmed for this paper yet.

Use the implementation status and reproduction sections for the current action plan.

Implementation evidence summary
Confidence: low

Recommendation evidence is currently too limited for a maintained-repo choice. Use Implementation Status and Reproduction Path for a practical baseline plan.

Reproduction risks
  • Estimate is based on paper-only reproduction flow

Compare implementation paths

Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.

Maintenance
Active
Confidence
Medium
Reproducibility
Strong
Stars
2
Last push
Oct 15, 2026 (15d)

Matched via arXiv identifier search · Strong overlap with paper title keywords

  • No tagged releases
  • No Docker setup
tatra-labs/cram
alternative
Maintenance
Active
Confidence
Medium
Reproducibility
Strong
Stars
0
Last push
Oct 22, 2026 (8d)

Matched via arXiv identifier search · Strong overlap with paper title keywords

  • No tagged releases
  • No Docker setup

Reproduction readiness

Time to first repro: days
Last checked: Oct 29, 2026

No repo

No verified implementation available

  • No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.

Hardware requirements

  • Expect multi-day setup/compute for meaningful reproduction based on current guidance.

Framework baselines

Repositories and ecosystem

Official

No additional official repositories detected.

Community

  • thunlp/latent-compaction
    Confidence: Medium

    Code for the paper "Latent Compaction with Test-Time Training"

    2 stars · 0 forks · Last push Oct 15, 2026 · MIT license

  • tatra-labs/cram
    Confidence: Medium

    Cram a long document into a tiny KV cache: test-time training of compact KV caches. At 8x compression, eviction keeps 5% of phonebook lookups; cram keeps 90%. Implements arXiv:2610.20582.

    0 stars · 0 forks · Last push Oct 22, 2026 · MIT license

Hugging Face artifacts

No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.

Tip: start with models, then check datasets and spaces if you need evaluation data or demos.

Research context

Tasks

Retrieval / indexing

Methods

Transformer

Domains

Information Retrieval

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.