Eliciting and Improving the Causal Reasoning Abilities of Large Language Models with Conditional Statements
Computational Linguistics · 24.06.2025 · 51 (2) · 467-504
DOI: 10.1162/coli_a_00548 ↗Kurz gefasst
Fachartikel in der Zeitschrift Computational Linguistics, online erschienen am 24.06.2025. Verfasst von Xiao Liu und 4 weiteren Autor:innen. Die Arbeit wurde bisher 2-mal zitiert (Crossref) und nennt 89 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY-NC-ND 4.0).
Abstract (Originalsprache)
Causal reasoning, the ability to identify cause-and-effect relationships, is crucial in human thinking. Although large language models (LLMs) succeed in many NLP tasks, it is still challenging for them to conduct complex causal reasoning like abductive reasoning and counterfactual reasoning. Complex causal structures are rarely expressed explicitly in the text, which could make learning them challenging for LLMs. Given the fact that programming code may express causal relations more often and explicitly with conditional statements like if, we want to explore whether large language models of code (Code-LLMs) acquire better causal reasoning abilities, and whether code prompts better describe the causal structure than text prompts. Our experiments show that compared with general-purpose LLMs like Llama-2 and GPT-3, Code-LLMs like CodeLlama and Codex are significantly better in causal reasoning. Code prompts not only work well for Code-LLMs, but also help improve the performance of most general-purpose LLMs. To understand why code prompts are effective, we intervene on the prompts from different aspects, and discover that the programming structure is crucial in code prompt design, while models are more robust towards format perturbations. We further explore whether exposing models with more code with conditional statements aids in enhancing causal reasoning abilities. We finetune LLMs on such code corpus, and find their performance improves when prompted with either code prompts or text prompts.1
Zitieren
APA
Liu, X., Yin, D., Zhang, C., Zhao, D., & Feng, Y. (2025). Eliciting and Improving the Causal Reasoning Abilities of Large Language Models with Conditional Statements. Computational Linguistics, 51(2), 467-504. https://doi.org/10.1162/coli_a_00548
Vancouver
Liu X, Yin D, Zhang C, Zhao D, Feng Y. Eliciting and Improving the Causal Reasoning Abilities of Large Language Models with Conditional Statements. Computational Linguistics. 2025;51(2):467-504. doi:10.1162/coli_a_00548
BibTeX
@article{Liu2025,
author = {Liu, Xiao and Yin, Da and Zhang, Chen and Zhao, Dongyan and Feng, Yansong},
title = {Eliciting and Improving the Causal Reasoning Abilities of Large Language Models with Conditional Statements},
journal = {Computational Linguistics},
year = {2025},
volume = {51},
number = {2},
pages = {467--504},
doi = {10.1162/coli_a_00548}
}
EUVIMED