Teaching Transformers Causal Reasoning through Axiomatic Training

Aniket Vashishtha, Abhinav Kumar, Atharva Pandey, Abbavaram Gowtham Reddy, Kabir Ahuja +2 more
7/10/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: inquisitour/axiomatization-learning (8 stars, last commit 2024-07-13).

Abstract

For text-based AI systems to interact in the real world, causal reasoning is an essential skill. Since active interventions are costly, we study to what extent a system can learn causal reasoning from symbolic demonstrations of causal axioms. Specifically, we present an axiomatic training method where the system 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 system would learn to generalize from the axiom demonstrations to more complex scenarios. Our results, based on applying axiomatic training to learn the transitivity axiom and d-separation rule, indicate that such generalization is possible. To avoid data contamination issues, we start with a 67 million parameter transformer model and train it from scratch. On both tasks, we find that a model trained on linear causal chains (along with some noisy variations) can generalize well to complex graphs, including longer causal chains, causal chains with reversed order, and graphs with branching.To handle diverse text inputs, the same method is extended to finetune language models. Finetuning Llama-3-8B-Instruct model on our axiomatic data leads to significant gains on causal benchmarks such as Corr2Cause and CLEAR, in some cases providing state-of-the-art performance surpassing GPT-4.

View on arXivView PDF

Code Implementations(1)

Interactive dashboard for 'Teaching Transformers Causal Reasoning through Axiomatic Training' by Vashishtha et al. (2024). Explore key findings on how transformers learn causal axioms, generalize to complex structures, and compare with large language models.

81PythonJul 12, 20242 years ago

Similar Papers

Cite this paper

@article{vashishtha2024teaching,
  title  = {Teaching Transformers Causal Reasoning through Axiomatic Training},
  author = {Aniket Vashishtha and Abhinav Kumar and Atharva Pandey and Abbavaram Gowtham Reddy and Kabir Ahuja and Vineeth N Balasubramanian and Amit Sharma},
  year   = {2024},
  eprint = {2407.07612},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.07612v3},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.07612.svg)](https://codeofpaper.com/paper/2407.07612)

Discussion