For text-based AI systems to interact in the real world, causal reasoning is an essential skill. Since interventional data is costly to generate, we study to what extent an agent can learn causal reasoning from passive data. Specifically, we consider an axiomatic training setup where an agent learns from multiple demonstrations of a causal axiom (or rule), rather than incorporating the axiom as an inductive bias or inferring it from data values. A key question is whether the agent would learn to generalize from the axiom demonstrations to new scenarios. For example, if a transformer model is trained on demonstrations of the causal transitivity axiom over small graphs, would it generalize to applying the transitivity axiom over large graphs? Our results, based on a novel axiomatic training scheme, indicate that such generalization is possible. We consider the task of inferring whether a variable causes another variable, given a causal graph structure. We find that a 67 million parameter transformer model, when trained on linear causal chains (along with some noisy variations) can generalize well to new kinds of graphs, including longer causal chains, causal chains with reversed order, and graphs with branching; even when it is not explicitly trained for such settings. Our model performs at par (or even better) than many larger language models such as GPT-4, Gemini Pro, and Phi-3. Overall, our axiomatic training framework provides a new paradigm of learning causal reasoning from passive data that can be used to learn arbitrary axioms, as long as sufficient demonstrations can be generated.
翻译:为使基于文本的人工智能系统能在现实世界中交互,因果推理是一项关键能力。鉴于干预数据的生成成本高昂,本研究探讨智能体在多大程度上能从被动数据中习得因果推理。具体而言,我们采用公理化训练框架:智能体通过观察特定因果公理(或规则)的多次演示进行学习,而非将公理作为归纳偏置融入模型或从数据值中推断公理。核心问题在于:智能体能否从公理演示中学习并泛化至新场景?例如,若Transformer模型在小型图结构上接受因果传递性公理的演示训练,其能否将该传递性公理泛化应用于大型图结构?基于我们提出的新型公理化训练方案,实验结果表明此类泛化是可能实现的。本研究聚焦于在给定因果图结构的条件下,推断变量间是否存在因果关系的任务。我们发现:一个拥有6700万参数的Transformer模型,在线性因果链(及其噪声变体)数据上训练后,能够有效泛化至未见过的图结构类型,包括更长的因果链、顺序反转的因果链以及具有分支结构的因果图——即使模型从未针对这些场景进行过专门训练。该模型的表现与GPT-4、Gemini Pro、Phi-3等更大规模语言模型相当(甚至更优)。总体而言,我们的公理化训练框架为从被动数据中学习因果推理提供了一种新范式,该范式适用于学习任意公理,只要能够生成足够的演示数据。