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.
翻译:摘要:因果推理能力被广泛视为智能的核心特征。本研究探讨大型语言模型(LLMs)是否能对因果关系进行连贯推理。现有自然语言处理(NLP)研究主要关注评估LLMs的常识性因果推理,但未能检验模型是否遵循一套定义明确的形式化规则进行因果推断。为此,我们受Judea Pearl等人提出的“因果推理引擎”启发,提出一项新的NLP任务——自然语言中的因果推断。我们构建了一个包含10K样本的大规模数据集CLadder:基于因果图与查询(关联性、干预性及反事实性)集合,通过因果推理引擎生成符号化问题及其真值答案,并进而将其转化为自然语言表述。我们在数据集上评估了多个LLMs,同时引入并评估了一种定制化思维链(CoT)提示策略——CausalCoT。实验表明,我们的任务对LLMs极具挑战性,我们通过深度分析揭示了LLMs因果推理能力的深层特征。数据已开源至https://huggingface.co/datasets/causalNLP/cladder,代码见https://github.com/causalNLP/cladder。