mlsanityData to 14 Oct 2026

Reproducibility Report: Test-Time Training on Nearest Neighbors for Large Language Models

arXiv 2511.16691 ↗First posted 16 Nov 2025cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

We reproduce the central claims of Test-Time Training on Nearest Neighbors for Large Language Models (Hardt and Sun, 2024), which proposes adapting a language model at inference time by fine-tuning on retrieved nearest-neighbor sequences. Using pretrained RoBERTa embeddings indexed with Faiss, we retrieve 20 neighbors per test input and apply one gradient update per neighbor across GPT-2 (117M, 774M), GPT-Neo (1.3B), and R1-Distilled-Qwen2.5-1.5B. Our experiments confirm that test-time training significantly reduces perplexity and bits-per-byte metrics across diverse domains from The Pile, with the largest improvements in structured or specialized datasets such as GitHub and EuroParl. We further validate that models not pretrained on The Pile benefit more from this adaptation than models already trained on similar data, allowing smaller models to approach the performance of larger ones. Due to infrastructure limitations, we introduce a memory-efficient retrieval implementation that loads only required line offsets rather than entire files, reducing RAM requirements from over 128 GB per server to 32 GB. We also extend the original study by evaluating R1-Distilled-Qwen2.5-1.5B, showing that test-time training yields consistent gains even for modern reasoning-optimized architectures. Overall, our results support the robustness and generality of nearest-neighbor test-time training while highlighting practical considerations for reproducing large-scale retrieval-augmented adaptation.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 9 references that are in the map. First posted on arXiv 16 Nov 2025.

Builds on

6 of 9 references.

References · 6

  1. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  4. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
  5. 2023Test-Time Training on Nearest Neighbors for Large Language Modelscited by 88
  6. 2017Dynamic Evaluation of Neural Sequence Modelscited by 55

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Pruning Laws for Large Language Models
  2. 2026Rethinking Expressivity and Efficiency in Test-Time Training
  3. 2026Probe the Harness: Setup Checks for Stale-Data RL Comparisons in Language Models
  4. 2024Efficiently Learning at Test-Time: Active Fine-Tuning of LLMs
  5. 2025Reusing Pre-Training Data at Test Time is a Compute Multiplier
  6. 2023EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism
  7. 2025First Finish Search: Efficient Test-Time Scaling in Large Language Models
  8. 2025LATTS: Locally Adaptive Test-Time Scaling