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

CAT:因果注意力调优,向大型语言模型注入细粒度因果知识

CAT: Causal Attention Tuning For Injecting Fine-grained Causal Knowledge into Large Language Models

Zhejiang University(浙江大学);Huawei Technologies(华为技术有限公司)

Kairong Han, Wenshuo Zhao, Ziyu Zhao, JunJian Ye, Lujia Pan, Kun Kuang

AI总结:

针对大模型难以利用因果知识的问题,提出因果注意力调优(CAT)方法,通过自动生成token级因果信号并引入Re-Attention机制,在STG基准和下游任务上显著提升性能,尤其在OOD场景中表现稳健。

摘要:

大型语言模型(LLMs)在各个领域取得了显著成功。然而,一个基本问题仍然存在:LLMs能否有效利用因果知识进行预测和生成?通过实证研究,我们发现直接在大型数据上训练的LLMs往往捕捉到虚假相关性而非真正的因果关系,导致性能次优,尤其是在分布外(OOD)场景中。为了解决这一挑战,我们提出了因果注意力调优(CAT),一种将细粒度因果知识注入注意力机制的新方法。我们提出了一种自动化流程,利用人类先验自动生成token级别的因果信号,并引入重新注意力(Re-Attention)机制来指导训练,帮助模型关注因果结构,同时减轻注意力分数中的噪声和偏差。在我们提出的虚假token游戏(STG)基准和多个下游任务上的实验结果表明,我们的方法有效利用因果知识进行预测,并在OOD场景中保持稳健。CAT在STG数据集上平均提升了5.76%,在下游任务上提升了1.56%。值得注意的是,Llama-3.1-8B模型在STG_M上的OOD性能从64.5%提高到90.5%,而Qwen在STG_H数据集上的OOD性能从25.4%提高到55.9%。实现细节可在https://github.com/Kairong-Han/CAT找到。

英文摘要:

Large Language Models (LLMs) have achieved remarkable success across various domains. However, a fundamental question remains: Can LLMs effectively utilize causal knowledge for prediction and generation? Through empirical studies, we find that LLMs trained directly on large-scale data often capture spurious correlations rather than true causal relationships, leading to suboptimal performance, especially in out-of-distribution (OOD) scenarios. To address this challenge, we propose Causal Attention Tuning (CAT), a novel approach that injects fine-grained causal knowledge into the attention mechanism. We propose an automated pipeline that leverages human priors to automatically generate token-level causal signals and introduce the Re-Attention mechanism to guide training, helping the model focus on causal structures while mitigating noise and biases in attention scores. Experimental results on our proposed Spurious Token Game (STG) benchmark and multiple downstream tasks demonstrate that our approach effectively leverages causal knowledge for prediction and remains robust in OOD scenarios. The CAT achieves an average improvement of 5.76% on the STG dataset and 1.56% on downstream tasks. Notably, the OOD performance of the Llama-3.1-8B model on STG_M increased from 64.5% to 90.5%, and Qwen's OOD performance on the STG_H dataset improved from 25.4% to 55.9%. Implementation details can be found at https://github.com/Kairong-Han/CAT.

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

↑