Papers › Can Large Language Models Infer Causation from Correlation?

Can Large Language Models Infer Causation from Correlation?

9 Jun 2023arXiv:2306.05836archive 2025-07-28

Zhijing Jin, Jiarui Liu, Zhiheng Lyu, Spencer Poff, Mrinmaya Sachan, Rada Mihalcea, Mona Diab, Bernhard Schölkopf

Causal inference is one of the hallmarks of human intelligence. While the field of CausalNLP has attracted much interest in the recent years, existing causal inference datasets in NLP primarily rely on discovering causality from empirical knowledge (e.g., commonsense knowledge). In this work, we propose the first benchmark dataset to test the pure causal inference skills of large language models (LLMs). Specifically, we formulate a novel task Corr2Cause, which takes a set of correlational statements and determines the causal relationship between the variables. We curate a large-scale dataset of more than 200K samples, on which we evaluate seventeen existing LLMs. Through our experiments, we identify a key shortcoming of LLMs in terms of their causal inference skills, and show that these models achieve almost close to random performance on the task. This shortcoming is somewhat mitigated when we try to re-purpose LLMs for this skill via finetuning, but we find that these models still fail to generalize -- they can only perform causal inference in in-distribution settings when variable names and textual expressions used in the queries are similar to those in the training set, but fail in out-of-distribution settings generated by perturbing these queries. Corr2Cause is a challenging task for LLMs, and would be helpful in guiding future research on improving LLMs' pure reasoning skills and generalizability. Our data is at https://huggingface.co/datasets/causalnlp/corr2cause. Our code is at https://github.com/causalNLP/corr2cause.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2306.05836")

Code

Syntology Ran 1 of 9 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

causalnlp/corr2cause officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 1 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
8unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from causalnlp/corr2cause. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

generate_prompt causalnlp/corr2cause/code/run_alpaca.py official repository ran fingerprinted MIT (permissive) · d9793b16bbddeedb · report
RMSELoss causalnlp/corr2cause/code/finetune/utils.py official repository unverified MIT (permissive) · 8a3decee5b54d71d · report
add_args causalnlp/corr2cause/code/finetune/utils.py official repository unverified MIT (permissive) · 0125471072372399 · report
get_model causalnlp/corr2cause/code/finetune/models.py official repository unverified MIT (permissive) · e44094bd647b0cdb · report
get_tokenizer causalnlp/corr2cause/code/finetune/models.py official repository unverified MIT (permissive) · e1018057f98e58a0 · report
modify_dict_from_dataparallel causalnlp/corr2cause/code/finetune/utils.py official repository unverified MIT (permissive) · ac2dc39bbcffe7e7 · report
num_samples2splits causalnlp/corr2cause/code/data_stats.py official repository unverified MIT (permissive) · 3e06f2ac8a9909be · report
read_optimizer causalnlp/corr2cause/code/finetune/models.py official repository unverified MIT (permissive) · a94fe6e02e03f5dc · report
subsample causalnlp/corr2cause/code/data_postsampling.py official repository unverified MIT (permissive) · fcc354ce3cc55f43 · report

Tasks

Causal Inference

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

fail

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections