Abstract
Large Language Models (LLMs) exhibit exceptional abilities for causal analysis between concepts in numerous societally impactful domains, including medicine, science, and law. Recent research on LLM performance in various causal discovery and inference tasks has given rise to a new ladder in the classical three-stage framework of causality. In this paper, we advance the current research of LLM-driven causal discovery by proposing a novel framework that combines knowledge-based LLM causal analysis with data-driven causal structure learning. To make LLM more than a query tool and to leverage its power in discovering natural and new laws of causality, we integrate the valuable LLM expertise on existing causal mechanisms into statistical analysis of objective data to build a novel and practical baseline for causal structure learning. We introduce a universal set of prompts designed to extract causal graphs from given variables and assess the influence of LLM prior causality on recovering causal structures from data. We demonstrate the significant enhancement of LLM expertise on the quality of recovered causal structures from data, while also identifying critical challenges and issues, along with potential approaches to address them. As a pioneering study, this paper aims to emphasize the new frontier that LLMs are opening for classical causal discovery and inference, and to encourage the widespread adoption of LLM capabilities in data-driven causal analysis.
Introduction
Causal Structure Learning (CSL) is the fundamental process of identifying the underlying web of cause-and-effect relationships from observational data. Despite its importance, CSL remains a notoriously difficult NP-hard problem. The search space for possible Directed Acyclic Graphs (DAGs) grows exponentially with the number of variables, making purely data-driven discovery computationally intensive and often prone to errors in the presence of noise or limited samples.
Traditionally, researchers have relied on human domain experts to provide "priors"—pre-existing knowledge that constrains the search space. However, expert time is expensive, and their availability is limited. Large Language Models (LLMs) like GPT-4 present a promising alternative, possessing vast cross-domain knowledge. Yet, LLMs are not perfect causal architects; they are prone to "hallucinations," can confuse correlation with causation, and often provide qualitative insights that do not map directly to the rigid parent-child relationships required by mathematical DAGs. This research introduces a framework to bridge the gap between flexible LLM reasoning and rigorous statistical discovery.
Methodology
The proposed framework addresses the limitations of LLMs through an error-tolerant, three-stage pipeline designed to integrate LLM expertise into data-driven structure learning.
1. Accuracy-Oriented Prompting
To minimize hallucinations and ensure context-awareness, the framework employs a structured prompting strategy:
- Metadata Derivation: Instead of providing only variable names, the model is given "value sets" (e.g., "Normal, Low, High"). This helps the LLM understand the semantic context of the variables more precisely.
- Causal Extraction: The LLM is restricted to single-step reasoning to identify only the most confident relationships.
- Causal Validation: Chain-of-Thought (CoT) reasoning is used to validate identified relationships, requiring the model to explain its logic before finalizing a causal link.
2. Knowledge-to-Structure Transition
A critical innovation in this framework is the treatment of LLM outputs as ancestral constraints rather than direct edges. While an LLM might correctly state that "Smoking causes Cancer," it may not know the intermediate biological variables. By interpreting this as a directed path (A eventually leads to B) rather than a direct arrow (A is a parent of B), the framework allows for intermediate variables and becomes significantly more robust to the qualitative nature of LLM knowledge.
3. Soft Scoring Criteria
The framework integrates these LLM-derived priors into statistical scoring functions (such as MML or BDeu) using a "soft" approach. Rather than strictly forbidding structures that contradict the LLM, the framework applies a penalty. This allows strong observational data to "overrule" an incorrect LLM prior, acting as a vital sanity check against model hallucinations.
Experimental Evaluation
The framework was evaluated using eight benchmark datasets spanning medicine, environmental science, and economics (e.g., Asia, Child, Alarm, Insurance). To further test generalizability, the researchers also utilized two private real-world clinical datasets (RECTUM and HEAD&NECK) containing data likely unseen by the LLM during its training phase.
Results and Discussion
The integration of LLM expertise led to substantial improvements in the quality of recovered causal structures. On the Asia dataset, the LLM-driven approach improved the F1 score by up to 46%, while the Structural Hamming Distance (SHD) was reduced by 95-100% compared to purely data-based methods.
Key findings include:
- Robustness: The "soft" scoring mechanism successfully prevented graph degradation even when the LLM provided incorrect priors.
- Value Set Impact: Providing variable value sets significantly improved the LLM's semantic understanding compared to using names alone.
- Model Performance: GPT-4 emerged as the most reliable "expert," showing stable, high-accuracy performance across all tested domains, outperforming other models like Claude and Llama.
Conclusion
This research demonstrates that LLMs can serve as effective "autonomous experts" in causal discovery when paired with an error-tolerant framework. By treating LLM insights as flexible ancestral constraints and using soft scoring to balance knowledge with data, the accuracy and reliability of causal structure learning can be significantly enhanced.
Future work will focus on addressing "temporal blind spots" in LLM reasoning—particularly in complex environmental datasets like Water and Mildew—and exploring the integration of ancestral constraints into continuous structure learning frameworks.
Summary updated