NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Test-Time Learning with an Evolving Library

Weijia Xu, Alessandro Sordoni, Chandan Singh, Zelalem Gero, Michel Galley, Xingdi Yuan, Jianfeng Gao

TL;DR

EVOLIB is a self-supervised framework that allows Large Language Models (LLMs) to "learn" during inference by building a persistent library of reusable skills and reflective insights. By evolving these abstractions over time without needing parameter updates or ground-truth feedback, EVOLIB enables models to consistently improve their performance on complex reasoning and coding tasks while remaining highly token-efficient.

What Problem Does This Paper Address?

Standard LLMs are essentially "stateless" during inference; they treat every new prompt as an isolated event, discarding any logic or strategies they might have uncovered while solving a previous, similar problem. While techniques like Retrieval-Augmented Generation (RAG) can provide a form of memory, they typically store raw, unstructured trajectories which are difficult for models to generalize.

Existing Test-Time Learning (TTL) methods often face two major hurdles:

  1. Gradient Dependency: Many require updating model weights, which is impossible for popular "black-box" API-based models like GPT-4o or Claude.
  2. Supervision Dependency: They often rely on external rewards or ground-truth labels, which are rarely available in real-world deployment scenarios.

EVOLIB seeks to bridge this gap by enabling a model to induce generalized knowledge from its own reasoning processes in a completely self-supervised, weight-agnostic manner.

Methods

The core of EVOLIB is a shared, evolving library of knowledge abstractions. These come in two flavors:

  • Modular Skills: Reusable procedures, such as specific Python functions for coding tasks or sub-task workflows for agentic environments.
  • Reflective Insights: Natural language "lessons learned" that capture common errors and corrective strategies (e.g., "If the task involves logistic regression, don't forget to scale the features").

The system operates in a continuous loop, as illustrated in Figure 1:

  1. Solution Generation: The model samples relevant abstractions from the library to help solve a new task.
  2. Extraction: The model reflects on its generated solution to extract new potential skills and insights.
  3. Consolidation: To prevent memory bloat and encourage generalization, the system uses embedding-based similarity and LLM judgment to merge new abstractions with similar existing ones.
  4. Weighting & Evolution: A novel credit assignment mechanism updates the "importance" of library entries.
Figure 1: Overview of the EVOLIB algorithm. EVOLIB performs test-time learning by repeatedly: (i) solving tasks using sampled abstractions, (ii) extracting new abstractions, consolidating them into the library, and propagating credit to both new and previously used abstractions via Information Gain (IG) and Future IG.

A key innovation here is the use of Information Gain (IG) and Future Information Gain (Future IG). While IG measures how much an abstraction helps solve the current task, Future IG rewards an abstraction for its potential to generate valuable future abstractions. This allows simple, specific insights to evolve into broad, powerful strategies over time.

Datasets

The authors evaluated EVOLIB across three demanding domains:

  • Mathematical Reasoning: The Harvard–MIT Mathematics Tournament (HMMT) 2025–2026, featuring elite-level high school competition problems.
  • Code Generation: BigCodeBench Hard (148 tasks requiring complex library usage) and LiveCodeBench v6 Hard (80 competitive programming problems).
  • Agentic Tasks: ScienceWorld (scientific experiments in a simulated environment) and PDDL (symbolic planning tasks).

Key Insights and Ideas

  • Abstraction over Memorization: Distilling experience into modular skills is far more effective for transfer learning than simply retrieving raw past trajectories.
  • The Power of Evolution: The "Future IG" mechanism creates an evolutionary pressure. Abstractions that act as "stepping stones" for more advanced logic are preserved, even if their direct utility is modest.
  • Self-Correction as a Signal: The system is entirely self-supervised. The model uses its own internal judgment (or synthetic test cases it generates itself) to score its solutions, proving that LLMs can effectively "bootstrap" their own learning.
  • Robustness to Chaos: Unlike many learning methods that require a carefully curated "curriculum" (easy tasks first), EVOLIB showed significant gains even when tasks were presented in a completely random order.

Key Results

EVOLIB consistently outperformed both standard test-time scaling (like Best-of-N sampling) and existing learning baselines.

  • Performance Gains: On BigCodeBench, GPT-4o augmented with EVOLIB achieved a 40.8% pass rate, surpassing the strongest reported models on the leaderboard (e.g., Gemini-Exp-1206 at 40.5%).
  • Token Efficiency: As shown in Figure 2, EVOLIB is significantly more token-efficient than baselines. It achieves higher accuracy with a smaller "compute budget" because it reuses refined knowledge rather than just sampling more candidates.
  • Ablation Success: Figure 3 demonstrates that both skills and insights are necessary; removing either type of abstraction leads to a noticeable drop in performance, especially as the compute budget increases.
Figure 2: Cost–performance curves comparing EVOLIB with competitive baselines on (a) Big- CodeBench and (b) LiveCodeBench. Each curve plots performance (y-axis) as the test-time compute cost (x-axis) increases for each method.

Limitations and Future Work

The authors identify a few key areas for improvement:

  • Verifier Quality: The system relies on the model's ability to judge its own work. If a model is a poor verifier, it might populate the library with "noisy" or incorrect abstractions.
  • Domain Breadth: While successful in math and code, it remains to be seen how well this generalizes to more subjective, open-ended domains like creative writing or general conversation.
  • Meta-Learning: A promising future direction is allowing the LLM to "meta-learn" the library design itself—optimizing how it chooses to represent and weight knowledge based on the specific task stream it encounters.

Summary updated

BibTeX
@inproceedings{xu2026test,
  author = {Weijia Xu and Alessandro Sordoni and Chandan Singh and Zelalem Gero and Michel Galley and Xingdi Yuan and Jianfeng Gao},
  title = {{Test-Time Learning with an Evolving Library}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=BzzLBbILBI},
}
Figure