[论文解读] CLadder: Assessing Causal Reasoning in Language Models
简要:本文提出 CLadder,一个包含1万道问题的数据集,用于评估语言模型在 Pearl 的正式因果推理三阶梯上的推理能力,并提出 CausalCoT,一种通过使 LLM 输出与因果推理步骤对齐来提升推理的提示策略。
The ability to perform causal reasoning is widely considered a core feature of intelligence. In this work, we investigate whether large language models (LLMs) can coherently reason about causality. Much of the existing work in natural language processing (NLP) focuses on evaluating commonsense causal reasoning in LLMs, thus failing to assess whether a model can perform causal inference in accordance with a set of well-defined formal rules. To address this, we propose a new NLP task, causal inference in natural language, inspired by the "causal inference engine" postulated by Judea Pearl et al. We compose a large dataset, CLadder, with 10K samples: based on a collection of causal graphs and queries (associational, interventional, and counterfactual), we obtain symbolic questions and ground-truth answers, through an oracle causal inference engine. These are then translated into natural language. We evaluate multiple LLMs on our dataset, and we introduce and evaluate a bespoke chain-of-thought prompting strategy, CausalCoT. We show that our task is highly challenging for LLMs, and we conduct an in-depth analysis to gain deeper insights into the causal reasoning abilities of LLMs. Our data is open-sourced at https://huggingface.co/datasets/causalNLP/cladder, and our code can be found at https://github.com/causalNLP/cladder.
研究动机与目标
- 评估大型语言模型在基于 Pearl 的因果推理框架下能否进行正式的因果推理。
- 提供一个大规模、多样化的数据集(CLadder),包含跨关联、干预和反事实查询的真实因果答案与解释。
- 提供一个提示策略(CausalCoT),以引导 LLM 进行健全的因果推理。
- 通过研究模型表现和错误模式,识别当前 LLM 在因果推理方面的局限性。
提出的方法
- 基于符号因果图创建具有可识别性保证的真实因果查询,借助因果推理引擎(CI 引擎)。
- 通过将符号查询转述为故事和模板,生成 1 万个自然语言问题及配套解释。
- 开发 CausalCoT,一种多步连锁推理提示协议,引导 LLM 完成图提取、查询形式化、估计量推导和评估等步骤。
- 在所有三阶梯上对各种 LLMs(GPT-4、GPT-3 变体、LLaMa/Alpaca 等)进行有无 CausalCoT 的对比评估。
- 按阶梯、常识对齐(常识性、非合理、反常识性)以及逐步推理质量等维度分析模型表现。
- 提供数据质量检查和消融实验以分离数据污染效应与上下文学习收益。
实验结果
研究问题
- RQ1当答案通过因果推理引擎得到时,LLMs 是否能够进行正式的因果推理(阶梯 1–3)?
- RQ2LLM 的表现如何随阶梯复杂度和图结构而变化?
- RQ3以因果性为导向的提示策略(CausalCoT)是否相比原生提示提高了 LLM 的准确性?
- RQ4常识对齐或数据污染在多大程度上影响 LLM 在因果任务上的推理?
- RQ5当前 LLMs 的哪些子技能在推理过程中最脆弱?
主要发现
| Model | Overall Acc. | Acc. by Rung 1 | Acc. by Rung 2 | Acc. by Rung 3 | Comm. | Nonsens. | Anti-C. |
|---|---|---|---|---|---|---|---|
| Random | 49.27 | 50.28 | 48.40 | 49.12 | 49.01 | 49.69 | 49.12 |
| LLaMa | 44.03 | 48.23 | 29.46 | 52.66 | 45.14 | 44.22 | 42.67 |
| Alpaca | 44.66 | 52.03 | 29.53 | 51.13 | 44.86 | 44.40 | 44.77 |
| GPT-3 Non-Instr. (davinci) | 49.92 | 50.00 | 49.75 | 50.00 | 49.06 | 49.97 | 50.72 |
| GPT-3 Instr. (text-davinci-001) | 51.40 | 51.30 | 52.63 | 50.47 | 54.31 | 50.13 | 50.05 |
| GPT-3 Instr. (text-davinci-002) | 53.15 | 50.85 | 56.96 | 51.90 | 55.33 | 52.47 | 51.81 |
| GPT-3 Instr. (text-davinci-003) | 56.26 | 51.11 | 62.97 | 54.96 | 56.83 | 54.79 | 57.49 |
| GPT-3.5 | 52.18 | 51.80 | 54.78 | 50.32 | 54.09 | 50.68 | 52.09 |
| GPT-4 | 62.03 | 63.01 | 62.82 | 60.55 | 62.27 | 63.09 | 60.47 |
| + CausalCoT | 70.40 | 83.35 | 67.47 | 62.05 | 69.25 | 71.58 | 70.12 |
- CausalCoT 在整体准确率上达到 70.40%,比在 CLadder 上的 Vanilla GPT-4 高出 8.37 点。
- 模型在阶梯 1 上的准确性最高,随着问题难度增加到阶梯 3,准确性下降。
- CausalCoT 对反常识(anti-commonsensical)数据的提升为 9.65 点,表明对未见过或未记忆模式具有鲁棒性。
- 图提取(步骤 ①)相对较强(节点/边的 F1 值高),而需要正式因果推理的步骤(步骤 ②、③、⑤)更具挑战性。
- 经指令微调的模型表现优于未进行指令微调的对照,但在正式因果推理方面仍存在困难。
- 上下文学习显示某些查询类型(如条件概率和 NIE)从示例中受益最大。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。