Query-Conditioned Test-Time Self-Training for Large Language Models

Chaehee Song, Minseok Seo, Yeeun Seong, Doyi Kim, Changick KimarXiv 2026

TL;DR

This paper introduces QueST (Query-Conditioned Test-Time Self-Training), a framework that improves large language model (LLM) reasoning on-the-fly during inference. By using the input query as a seed to generate structurally similar problem-solution pairs, QueST fine-tunes the model's parameters via lightweight LoRA updates before answering the original question. This allows the model to dynamically adapt to complex queries without relying on any external training data or retrieval databases.

What Problem Does This Paper Address?

When deploying LLMs for difficult reasoning tasks, a common strategy to boost performance is test-time scaling—allocating more compute at inference time by generating multiple reasoning paths (e.g., Chain-of-Thought, self-consistency sampling). However, because the model's parameters remain completely frozen, it cannot correct deep-seated misconceptions or specialize its internal representations to the unique structure of a specific query.

Existing test-time optimization (TTO) methods attempt to update parameters during inference, but they suffer from major drawbacks: they either rely on massive external databases to retrieve similar problems, or they optimize generic objectives (like minimizing text perplexity) that lack direct alignment with the logic required by the user's prompt.

Methods

QueST solves this by turning the input query into its own localized training distribution. The pipeline operates entirely at test time through three main steps:

  1. Query-Conditioned Supervision Generation: Given a user query $q$, the base LLM acts as its own data generator to produce $N$ (typically 5) auxiliary problem-solution pairs $\mathcal{D}(q)$ that share core concepts and reasoning patterns with the original query.
  2. Low-Rank Test-Time Optimization: The model undergoes a few steps of Supervised Fine-Tuning (SFT) on these self-generated pairs using standard cross-entropy loss. To keep this process fast and stable, updates are restricted to Low-Rank Adaptation (LoRA) parameters while the base model weights remain frozen.
  3. Final Inference: The adapted model generates the final response $y^*$ for the original user query.
Figure 2: Overview of QueST. Given a user query q, QueST first generates query-conditioned auxiliary problem–solution pairs D(q) that reflect the underlying reasoning patterns of the query. These generated samples serve as supervision for low-rank test-time optimization via LoRA, enabling efficient parameter adaptation at inference time. The adapted model then produces the final response y∗, achieving query-specific adaptation without relying on external data.

Datasets

The authors evaluated QueST across multiple model architectures (including Qwen3 and OctoThinker variants) using a diverse set of challenging benchmarks:

  • Mathematical Reasoning: Seven distinct datasets covering various difficulty levels: AMC, Minerva, MATH500, GSM8K, OlympiadBench, AIME24, and AIME25.
  • Scientific Reasoning: GPQA-Diamond, a highly challenging, graduate-level scientific QA benchmark used to validate how well the method generalizes beyond pure mathematics.

Key Insights and Ideas

  • The Query is a Latent Signal: A key insight of the paper is that a complex query inherently encodes enough structural information to guide the generation of its own high-quality training data, eliminating the need for external data storage.
  • Framework-Spanning Diversity: For structurally rich problems, the model doesn't just swap out numbers; it can completely reframe the task using different mathematical vocabularies (e.g., translating a complex modulus problem into a Cartesian lattice-point counting problem), which helps the model break out of superficial pattern-matching traps.
  • Token Efficiency over Sampling: Modifying parameters on-the-fly can be significantly more token-efficient than massive sampling. QueST outperforms heavy test-time scaling baselines (like self-consistency with 64 samples) while consuming a fraction of the test-time tokens.

Key Results

  • State-of-the-Art Performance: QueST consistently outperformed base models and prior TTO methods (like TENT and TLM) across all eight benchmarks.
  • Substantial Accuracy Gains: It improved average accuracy by 6.44 percentage points across the board, with specific base model configurations seeing boosts between +5.77 and +7.21 percentage points.
  • Fewer Tokens, Better Answers: As shown in the performance curves, QueST achieves superior accuracy compared to standard sampling-based test-time scaling while using substantially fewer tokens.
Figure 1: Comparison of token usage and performance across three benchmarks: (a) MATH500 (high- school level mathematics), (b) AIME24 (advanced mathematical reasoning), and (c) GPQA-Diamond (general scientific reasoning). Each point on the baseline curves corresponds to sampling-based TTS using self-consistency decoding with N ∈{1, 2, 4, 8, 16, 32, 64} samples. Star markers denote QueST. Across all three benchmarks, QueST achieves superior accuracy while using substantially fewer test-time tokens.

Limitations and Future Work

  • Dependence on Query Quality: If a user query is ambiguous, poorly specified, or contains false premises, the generated self-supervision pairs will likely be flawed or misleading, causing the adaptation to fail.
  • No Knowledge Accumulation: Because parameters are reset after every single query, the model cannot accumulate knowledge over time. The authors highlight persistent test-time optimization (continual learning) across queries as an important future direction.
  • Procedural Retry Failure: Since the self-generated training data only contains successful solution traces, the model never learns how to diagnose or recover from its own mistakes. When it hits a computational wall during final inference, it tends to simply repeat the same erroneous calculation block under a new step rather than executing a true self-correction.

Summary updated

BibTeX
@misc{song2026query,
  author = {Chaehee Song and Minseok Seo and Yeeun Seong and Doyi Kim and Changick Kim},
  title = {{Query-Conditioned Test-Time Self-Training for Large Language Models}},
  year = {2026},
  eprint = {2605.13369},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.13369},
}

Loading related content...

Figure