Table of Contents
Fetching ...

Integrating Large Language Model for Improved Causal Discovery

Taiyu Ban, Lyuzhou Chen, Derui Lyu, Xiangyu Wang, Qinrui Zhu, Qiang Tu, Huanhuan Chen

TL;DR

This work tackles causal discovery from observational data in domain-specific settings where expert validation is scarce. It introduces an error-tolerant framework that leverages LLMs to generate variable metadata and priors, then maps these into ancestral constraints and softly integrates them into a score-based structure learning pipeline via an MCMC search. The approach combines an accuracy-oriented LLM reasoning stage, a knowledge-to-structure transition, and a soft constraint scoring mechanism, demonstrating improved recovery of eight real-world DAGs and robustness to inaccurate priors; a hard-prior variant is also analyzed. Results show that soft LLM priors generally enhance structure learning, while hard priors can degrade performance when priors are imperfect, with GPT-4 providing particularly strong priors and generalizable gains on private data, highlighting a path toward autonomous, low-cost causal discovery.

Abstract

Recovering the structure of causal graphical models from observational data is an essential yet challenging task for causal discovery in scientific scenarios. Domain-specific causal discovery usually relies on expert validation or prior analysis to improve the reliability of recovered causality, which is yet limited by the scarcity of expert resources. Recently, Large Language Models (LLM) have been used for causal analysis across various domain-specific scenarios, suggesting its potential as autonomous expert roles in guiding data-based structure learning. However, integrating LLMs into causal discovery faces challenges due to inaccuracies in LLM-based reasoning on revealing the actual causal structure. To address this challenge, we propose an error-tolerant LLM-driven causal discovery framework. The error-tolerant mechanism is designed three-fold with sufficient consideration on potential inaccuracies. In the LLM-based reasoning process, an accuracy-oriented prompting strategy restricts causal analysis to a reliable range. Next, a knowledge-to-structure transition aligns LLM-derived causal statements with structural causal interactions. In the structure learning process, the goodness-of-fit to data and adherence to LLM-derived priors are balanced to further address prior inaccuracies. Evaluation of eight real-world causal structures demonstrates the efficacy of our LLM-driven approach in improving data-based causal discovery, along with its robustness to inaccurate LLM-derived priors. Codes are available at https://github.com/tyMadara/LLM-CD.

Integrating Large Language Model for Improved Causal Discovery

TL;DR

This work tackles causal discovery from observational data in domain-specific settings where expert validation is scarce. It introduces an error-tolerant framework that leverages LLMs to generate variable metadata and priors, then maps these into ancestral constraints and softly integrates them into a score-based structure learning pipeline via an MCMC search. The approach combines an accuracy-oriented LLM reasoning stage, a knowledge-to-structure transition, and a soft constraint scoring mechanism, demonstrating improved recovery of eight real-world DAGs and robustness to inaccurate priors; a hard-prior variant is also analyzed. Results show that soft LLM priors generally enhance structure learning, while hard priors can degrade performance when priors are imperfect, with GPT-4 providing particularly strong priors and generalizable gains on private data, highlighting a path toward autonomous, low-cost causal discovery.

Abstract

Recovering the structure of causal graphical models from observational data is an essential yet challenging task for causal discovery in scientific scenarios. Domain-specific causal discovery usually relies on expert validation or prior analysis to improve the reliability of recovered causality, which is yet limited by the scarcity of expert resources. Recently, Large Language Models (LLM) have been used for causal analysis across various domain-specific scenarios, suggesting its potential as autonomous expert roles in guiding data-based structure learning. However, integrating LLMs into causal discovery faces challenges due to inaccuracies in LLM-based reasoning on revealing the actual causal structure. To address this challenge, we propose an error-tolerant LLM-driven causal discovery framework. The error-tolerant mechanism is designed three-fold with sufficient consideration on potential inaccuracies. In the LLM-based reasoning process, an accuracy-oriented prompting strategy restricts causal analysis to a reliable range. Next, a knowledge-to-structure transition aligns LLM-derived causal statements with structural causal interactions. In the structure learning process, the goodness-of-fit to data and adherence to LLM-derived priors are balanced to further address prior inaccuracies. Evaluation of eight real-world causal structures demonstrates the efficacy of our LLM-driven approach in improving data-based causal discovery, along with its robustness to inaccurate LLM-derived priors. Codes are available at https://github.com/tyMadara/LLM-CD.
Paper Structure (23 sections, 10 equations, 5 figures, 8 tables)

This paper contains 23 sections, 10 equations, 5 figures, 8 tables.

Figures (5)

  • Figure 1: An illustrative diagram of our LLM-driven causal discovery framework. Elliptical blocks represent the input or intermediate results. Rounded rectangular blocks represent two aspects of causality among the investigated variables, the actual causal mechanisms (structure) underlying data, and the knowledge recognition of causality among variables. Rectangular blocks with the solid border represent a specific process. Rectangular blocks with the dotted border represent modules or sub-processes. Circles with colored faces in the block 'LLM-based Causal Reasoning' represent the reasoning traces of the LLM.
  • Figure 2: An illustrative diagram of the metadata derivation stage of the prompting strategy. The example in the figure is selected from outputs of GPT-4 on the Child dataset, where integration of semantic symbols and value sets leads to more precise and contextually accurate metadata.
  • Figure 3: An illustrative diagram of the causal extraction and validation stages. The LLM is first prompted to extract causality among variables using their metadata, followed by a decomposition and validation process to ensure the correctness of each extracted causal statement.
  • Figure 4: Results of the soft approach with varying confidence levels in terms of the precision and recall of accepted priors, and the F1 score of the recovered causal structure. The dotted blue line represents the accuracy of LLM-derived priors, equivalent to the prior precision in the hard approach. The colored areas illustrate changes in prior precision when utilizing the soft approach compared to the original accuracy of LLM-derived priors.
  • Figure 5: Visualization of LLM-driven and data-based structure learning outcomes on private data. The recovered missing causality is highlighted by GREEN arrows, while the removed erroneous causality is highlighted by RED arrows.