Self-Improving LLM Agents at Test-Time

Emre Can Acikgoz, Cheng Qian, Heng Ji, Dilek Hakkani-Tür, Gokhan Tur · Submission to ICLR 2026 · Withdrawn

TL;DR

Instead of expensive offline fine-tuning on massive datasets, Test-Time Self-Improvement (TT-SI) enables language model agents to identify their own uncertainties during inference, generate localized synthetic practice problems on-the-fly, and temporarily update their weights via parameter-efficient fine-tuning (LoRA). Across three agentic benchmarks, TT-SI outperforms standard supervised fine-tuning while training on roughly $68\times$ fewer samples and achieving a $3.7\times$ wall-clock speedup.

What Problem Does This Paper Address?

Standard post-training for agentic LLMs typically relies on large-scale supervised fine-tuning (SFT) over tens of thousands of instruction samples. This paradigm has serious flaws:

  • Redundancy: Models waste compute repeatedly training on examples they already understand.
  • Distribution Shifts: Offline training sets cannot anticipate every dynamic edge case or out-of-distribution query encountered during inference.
  • Catastrophic Forgetting & Model Churn: Updating base models offline often degrades existing capabilities and requires re-running expensive pipelines whenever a newer base model is released.

The authors ask: Can an LLM agent recognize when it is uncertain about a test query and dynamically self-improve on-the-fly?

Methods

TT-SI introduces an instance-specific test-time training loop that mimics human self-regulated learning in three distinct stages:

  1. Self-Awareness (Uncertainty Estimation, $H$): During inference, the agent calculates the negative log-likelihood (NLL) of available actions (e.g., candidate tool/API calls) and applies Relative Softmax Scoring (RSS). If the margin between the top two candidate actions is below a threshold $\tau$, the sample is flagged as uncertain. Certain queries skip adaptation and are executed directly.
  2. Self-Augmentation (Data Synthesis, $G$): For flagged queries, the model uses the unlabelled test query as a seed prompt to synthesize $K$ semantically similar, slightly varied input–output training examples (complete with generated arguments and tool calls).
  3. Self-Learning (Test-Time Fine-Tuning, $T$): The agent runs lightweight LoRA gradient updates on these synthetic instances, executes the original test query with the adapted parameters, and immediately resets back to the base weights to avoid parameter corruption.

The authors evaluate two primary variants:

  • TT-SI: The base model generates its own training examples.
  • TT-D (Test-Time Distillation): A stronger model (e.g., GPT-5-mini) synthesizes the temporary training examples for the base model.
  • TT-SI with ICL: A training-free baseline that inserts synthetic examples directly into the prompt context rather than applying gradient updates.

Datasets

Experiments focus on tool use and API calling:

  • SealTool: A benchmark comprising 4,076 APIs across diverse domains (evaluates tool selection and format precision). Evaluated on a 294-sample test split alongside its ~13k sample training set.
  • NexusRaven: A function-calling benchmark focusing on complex, nested, and parallel API execution (318 test instances over 65 APIs).
  • API-Bank: A multi-turn dialogue benchmark assessing conversational state tracking and tool invocation (316 test instances evaluated across Levels 1 and 2).
  • xLAM: Utilized in ablation studies to assess out-of-distribution (OOD) data scaling against standard SFT.

Key Insights and Ideas

  • One Sample Is Enough: TT-SI achieves measurable accuracy gains even when fine-tuning on just a single synthesized training instance ($K=1$) per uncertain query.
  • Uncertainty Filtering is Key: Fine-tuning on every single test instance yields only marginal accuracy gains (+1.04%) over selective filtering, but requires nearly 55% more training runs. Selecting uncertain samples via margin-based confidence ($\tau = 0.95$) isolates 88% of errors while misclassifying only 17% of correct cases.
  • Smaller Models Benefit More: While Qwen2.5-7B gained +3.02% accuracy with TT-SI, the smaller Qwen2.5-1.5B achieved a +5.76% boost, showing that test-time adaptation is especially effective for resource-constrained edge models.
  • Local Alignment in Representation Space: UMAP visualizations show that self-generated queries tightly cluster around the uncertain test query, effectively expanding the model's decision boundary right where it is most brittle.

Key Results

  • Benchmark Improvements: Using Qwen2.5-1.5B-Instruct, TT-SI yields consistent absolute accuracy gains over zero-shot base models: +6.05% on NexusRaven, +5.66% on SealTool, and +4.26% on API-Bank (an average direct prediction gain of +5.36%, from 60.26% to 65.62%).
  • Beating Inductive SFT with Far Less Data: On SealTool, TT-SI achieves 72.43% accuracy compared to 70.20% for full supervised fine-tuning. It does so using only 190 training pairs (uncertain queries paired with one synthetic sample) vs. 13,000 samples for standard SFT—a $68\times$ reduction in data and a $3.7\times$ end-to-end wall-clock speedup (36 minutes vs. 2 hours 12 minutes).
  • Distillation Gains: TT-D (using GPT-5-mini as the generator) reached 75.17% on SealTool and an average accuracy of 68.33% across all benchmarks.

Limitations and Future Work

  • Threshold Sensitivity: Identifying uncertain instances requires choosing a confidence cutoff ($\tau$), and optimal thresholds currently require manual tuning rather than autonomous calibration.
  • Prior Knowledge Bound: TT-SI cannot recover facts or tools entirely missing from the model's pretraining weights; missing knowledge still requires external retrieval or search.
  • No Lifelong Retention: Adapted weights are discarded after inference. Future work aims to explore cross-sample transfer, dynamic synthetic sample allocation (adaptive $K$), and co-evolutionary generator–agent learning.

Summary updated

BibTeX
@misc{acikgoz2025self,
  author = {Emre Can Acikgoz and Cheng Qian and Heng Ji and Dilek Hakkani-Tür and Gokhan Tur},
  title = {{Self-Improving LLM Agents at Test-Time}},
  year = {2025},
  eprint = {2510.07841},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.07841},
}
Figure