arXiv:2602.09719cs.CL2026-02

让大模型在推理时自适应调整,提升生成质量。

Unsupervised Layer-Wise Dynamic Test Time Adaptation for LLMs

  • 按层动态调节学习率,基于提示内容精细控制更新强度。
  • 在多个数据集和模型上显著提升生成稳定性与质量。
  • 适合需要高鲁棒性的实际部署场景,如医疗、法律问答。

大语言模型的测试时适应(TTA)在推理阶段利用部署时可用信号更新模型参数。本文聚焦一种常见但研究不足的设定:无监督、样本特定的TTA,即模型仅依赖提示本身独立地为每个输入进行自适应,无需真实答案或外部监督。尽管吸引人,但使用固定手工学习率的朴素无监督TTA易不稳定:更新可能过拟合于提示特定统计特征,偏离期望答案分布,最终降低生成质量。这一失败现象并不意外,因为在此设定下,TTA需在仅有几次梯度步内适应单个提示,而标准训练则通过大规模数据集和长时间优化来平均更新。为此,我们提出分层动态测试时适应框架,显式根据提示表示、模型结构和适应步骤调节TTA强度。在该设定中,仅更新LoRA参数,由轻量级超网络预测每层、每步的学习率倍数,实现细粒度控制。跨多种数据集和模型的实验一致表明,本方法通过学习有效的缩放模式,在适应步骤与变换器层投影间显著增强TTA,提升稳定性并取得更优性能。

原文摘要 · Abstract (English)

Test-time adaptation (TTA) for large language models (LLMs) updates model parameters at inference time using signals available at deployment. This paper focuses on a common yet under-explored regime: unsupervised, sample-specific TTA, where the model adapts independently for each prompt using only the prompt itself, without gold answers or external supervision. Although appealing, naive unsupervised TTA with a fixed, handcrafted learning rate can be unstable: updates may overfit to prompt-specific statistics, drift from the desired answer distribution, and ultimately degrade generation quality. This failure mode is not surprising, as in this case TTA must adapt to a single prompt within only a few gradient steps, unlike standard training that averages updates over large datasets and long optimization horizons. Therefore, we propose layer-wise dynamic test-time adaptation, a framework which explicitly modulates TTA strength as a function of prompt representation, LLM structure and adaptation step. In our setting, TTA updates only LoRA parameters, and a lightweight hypernetwork predicts per-layer, per-step learning-rate multipliers, enabling fine-grained control. Experiments across various datasets and LLMs consistently show that our method substantially strengthens TTA by learning effective scaling patterns over adaptation steps and transformer layer projections, improving stability while delivering better performance.

大模型测试时适应动态学习率无监督

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。