动态调整模型输出,解决上下文与参数知识冲突问题
AdaCAD: Adaptively Decoding to Balance Conflicts between Contextual and Parametric Knowledge
- 根据上下文与参数知识差异,自适应调整解码权重
- 在6个问答数据集上平均准确率提升14.21个百分点
- 适合真实场景中混杂有冲突与无冲突样本的使用
大语言模型在解码时,其上下文信息与参数存储知识之间常存在矛盾,影响性能。现有测试时对比方法通过比较有无上下文时的输出分布来调整模型,但常误判冲突程度,且对不同冲突强度的样本处理不当。本文提出细粒度、实例级的AdaCAD方法,基于上下文与参数知识分布间的Jensen-Shannon散度动态计算调整权重。在四个大模型、六个问答(QA)和三个摘要数据集上,相比静态对比基线,平均问答准确率提升14.21%(绝对值),摘要事实性提升6.19(AlignScore)。此外,当无冲突时,对比基线会损害性能,而AdaCAD有效缓解此类损失,更适用于现实数据中混合存在冲突与非冲突样本的场景。
原文摘要 · Abstract (English)
Knowledge conflict arises from discrepancies between information in the context of a large language model (LLM) and the knowledge stored in its parameters. This can hurt performance when using standard decoding techniques, which tend to ignore the context. Existing test-time contrastive methods seek to address this by comparing the LLM's output distribution with and without the context and adjust the model according to the contrast between them. However, we find that these methods frequently misjudge the degree of conflict and struggle to handle instances that vary in their amount of conflict, with static methods over-adjusting when conflict is absent. We propose a fine-grained, instance-level approach called AdaCAD, which dynamically infers the weight of adjustment based on the degree of conflict, as measured by the Jensen-Shannon divergence between distributions representing contextual and parametric knowledge. Across four LLMs, six question-answering (QA) and three summarization datasets, we demonstrate that ADACAD consistently outperforms other decoding baselines with average QA accuracy gains of 14.21% (absolute) over a static contrastive baseline, and improves the factuality of summaries by 6.19 (AlignScore). Lastly, we show that while contrastive baselines hurt performance when conflict is absent, ADACAD mitigates these losses, making it more applicable to real-world datasets in which some examples have conflict and others do not.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。