TL;DR
This paper introduces SLOT, a novel test-time adaptation technique that fine-tunes a small, sample-specific parameter vector for each individual prompt. This allows Large Language Models (LLMs) to better understand and respond to complex or out-of-distribution instructions, significantly boosting performance on challenging reasoning tasks with minimal computational overhead.
What Problem Does This Paper Address?
Large Language Models (LLMs) are incredibly powerful, but they often struggle when faced with prompts that are not well-represented in their massive training datasets. This can lead to inaccurate or nonsensical responses, especially for complex instructions or specialized reasoning tasks. While techniques like Test-Time Adaptation (TTA) exist to address this, they often suffer from high computational costs or require complex supervision signals. The authors aim to bridge this gap by developing an efficient method to adapt LLMs to individual prompts during inference without incurring significant latency or requiring extensive retraining.
Methods
The core of SLOT is a lightweight, sample-specific parameter vector, denoted as $\delta$. This vector is added to the final hidden layer of the LLM before the output head. The process involves two stages:
- Prompt Stage: For each incoming prompt, SLOT initializes $\delta$ and then performs a few optimization steps. The goal is to minimize the cross-entropy loss of the model on the prompt itself. This effectively "teaches" the model to better understand the specific instruction of that prompt. Crucially, the LLM's main parameters ($\theta$) remain frozen.
- Generation Stage: Once $\delta$ is optimized for a given prompt, it's reused to modify the hidden states of subsequent token predictions during the generation of the response. This means the adaptation is specific to that prompt and is then discarded for the next one.
A key efficiency gain comes from caching the final hidden layer features. This allows the optimization to only involve a single linear layer update, significantly reducing computational overhead.
Datasets
The paper evaluates SLOT on a variety of existing benchmarks, including:
- C-Eval: A Chinese language evaluation suite covering STEM, Social Science, Humanities, Other, and a 'Hard' subset.
- GSM8K: A dataset of grade-school math word problems.
- HumanEval: A benchmark for evaluating Python code synthesis.
- AIME24: American Invitational Mathematics Examination for advanced math problem-solving.
- Math500: A subset of the MATH dataset covering K-12 math topics.
- GPQA Diamond: A graduate-level Q&A benchmark requiring deep domain knowledge, primarily in STEM.
Key Insights and Ideas
- Prompt as a Training Sample: The paper frames the input prompt itself as a mini training sample for test-time adaptation. This is a clever way to leverage the existing language modeling objective for prompt-specific fine-tuning.
- Logit Modulation Vector (LMV): By analyzing the effect of $\delta$ on the final logits, the authors introduce the concept of a Logit Modulation Vector. They observe that this LMV can selectively enhance reasoning-related tokens (like "think," "reasoning") while suppressing common words or numerical tokens, guiding the model towards deeper thought processes.
- Efficiency through Parameterization: The decision to optimize a small, sample-specific parameter vector ($\delta$) and add it to the final hidden layer is crucial for efficiency. This avoids costly full model fine-tuning and allows for rapid adaptation.
Key Results
SLOT demonstrates significant performance improvements across various LLMs and benchmarks:
- Qwen2.5-7B: Achieved an 8.6% accuracy gain on GSM8K (from 57.54% to 66.19%).
- DeepSeek-R1-Distill-Llama-70B: Reached a State-of-the-Art (SOTA) accuracy of 68.69% on GPQA Diamond among 70B-level models, a 3.03% improvement.
- C-Eval: Showed a +8.55 point gain on the 'Hard' subset and +4.19 points in the 'STEM' category for Qwen-7B.
- Inference Time: The overhead for SLOT is minimal, with a 7.9% increase in inference time for 5 optimization steps compared to the baseline.
Limitations and Future Work
- Limitations: The paper notes that while SLOT improves accuracy, it does introduce a slight increase in inference time. The authors also mention that the method is relatively insensitive to hyperparameters, but a thorough ablation study was conducted on specific models and benchmarks. The NeurIPS checklist indicates that the paper does not explicitly discuss limitations of the method itself, stating "The proposed method seems to exhibit no obvious limitations within the research domain discussed in this paper."
- Future Work: The authors suggest exploring adaptive optimization schemes and SLOT's efficacy across a broader range of tasks and modalities. They also mention that future work might explore adaptive inference-time computation.
Summary updated