arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.14100cs.CLcs.IR
收藏

迈向上下文鲁棒的大语言模型:一种门控表示微调方法

Towards Context-Robust LLMs: A Gated Representation Fine-tuning Approach

Michigan State University(密歇根州立大学)

Shenglai Zeng, Pengfei He, Kai Guo, Tianqi Zheng, Hanqing Lu, Yue Xing, Hui Liu

AI总结:

针对结合外部上下文的大语言模型易过度依赖外部知识、受误导性上下文影响的问题,提出轻量即插即用的门控表示微调方法Grft,通过门控机制和低秩表示适配器,用极少参数和样本即可让模型具备上下文鲁棒性。

摘要:

通过检索增强生成(RAG)等方式结合外部上下文的大语言模型(LLMs),在处理不完美证据时往往面临挑战。它们倾向于过度依赖外部知识,易受误导性和无用上下文的影响。为解决这一问题,我们提出上下文鲁棒LLMs的概念,这类模型能像人类认知过程一样,有效平衡内部知识与外部上下文。具体而言,上下文鲁棒LLMs应仅在内部知识不足时依赖外部上下文,能识别内部与外部知识的矛盾,并忽略无用上下文。为实现该目标,我们提出Grft——一种轻量即插即用的门控表示微调方法。Grft包含两个核心组件:用于检测并过滤问题输入的门控机制,以及用于调整隐藏表示的低秩表示适配器。仅用不到200个样本训练占模型规模0.0004%的轻量干预函数,Grft就能有效让LLMs具备上下文鲁棒行为。

英文摘要:

Large Language Models (LLMs) enhanced with external contexts, such as through retrieval-augmented generation (RAG), often face challenges in handling imperfect evidence. They tend to over-rely on external knowledge, making them vulnerable to misleading and unhelpful contexts. To address this, we propose the concept of context-robust LLMs, which can effectively balance internal knowledge with external context, similar to human cognitive processes. Specifically, context-robust LLMs should rely on external context only when lacking internal knowledge, identify contradictions between internal and external knowledge, and disregard unhelpful contexts. To achieve this goal, we introduce Grft, a lightweight and plug-and-play gated representation fine-tuning approach. Grft consists of two key components: a gating mechanism to detect and filter problematic inputs, and low-rank representation adapters to adjust hidden representations. By training a lightweight intervention function with only 0.0004\% of model size on fewer than 200 examples, Grft can effectively adapt LLMs towards context-robust behaviors.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑