arXiv:2602.20332cs.CLcs.AI2026-02

用自适应查询重写缓解大模型幻觉,不需重训练也能提升准确率。

No One Size Fits All: QueryBandits for Hallucination Mitigation

  • 基于上下文带状模型在线选择最优查询重写策略。
  • 在16个问答场景中胜过基线87.5%,优于静态策略42.6%~60.3%。
  • 发现无通用最优策略,适合部署在闭源模型上的幻觉治理。

大型语言模型的先进推理能力导致幻觉频发;然而现有缓解方法多集中于开源模型的后处理检测与参数修改。对闭源模型中幻觉的研究尤为不足,而后者正是机构部署中的主流。本文提出QueryBandits——一种模型无关的上下文带状框架,通过经验验证且校准的奖励函数,自适应学习最优查询重写策略。在16个问答场景中,最优的QueryBandit(Thompson Sampling)相比无重写的基线获得87.5%的胜率,分别优于零样本静态策略(如改写或扩展)42.6%和60.3%。所有上下文带状模型均优于普通带状模型,特征方差越高,动作选择方差越大。这证实不存在对所有查询都最优的重写策略。还发现某些静态策略累积遗憾高于无重写,说明僵化的重写策略可能加剧幻觉。因此,通过QueryBandits在语义特征上学习在线策略,仅通过前向传播即可改变模型行为,适用于闭源模型,无需重新训练或梯度调整。

原文摘要 · Abstract (English)

Advanced reasoning capabilities in Large Language Models (LLMs) have led to more frequent hallucinations; yet most mitigation work focuses on open-source models for post-hoc detection and parameter editing. The dearth of studies focusing on hallucinations in closed-source models is especially concerning, as they constitute the vast majority of models in institutional deployments. We introduce QueryBandits, a model-agnostic contextual bandit framework that adaptively learns online to select the optimal query-rewrite strategy by leveraging an empirically validated and calibrated reward function. Across 16 QA scenarios, our top QueryBandit (Thompson Sampling) achieves an 87.5% win rate over a No-Rewrite baseline and outperforms zero-shot static policies (e.g., Paraphrase or Expand) by 42.6% and 60.3%, respectively. Moreover, all contextual bandits outperform vanilla bandits across all datasets, with higher feature variance coinciding with greater variance in arm selection. This substantiates our finding that there is no single rewrite policy optimal for all queries. We also discover that certain static policies incur higher cumulative regret than No-Rewrite, indicating that an inflexible query-rewriting policy can worsen hallucinations. Thus, learning an online policy over semantic features with QueryBandits can shift model behavior purely through forward-pass mechanisms, enabling its use with closed-source models and bypassing the need for retraining or gradient-based adaptation.

幻觉缓解大模型在线学习闭源模型

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