Abstract
Determining causal relationships is fundamental to scientific inquiry. While Large Language Models (LLMs) show promise in inferring causality from variable metadata, they are prone to hallucinations and lack grounding in structured facts. Knowledge Graphs (KGs) offer a reliable source of truth but present a "needle-in-a-haystack" problem due to their massive scale and inherent noise. This paper proposes a framework that combines LLMs with KGs by training a specialized "Subgraph Ranker" to identify the most informative paths between variables. Our approach significantly reduces hallucinations and outperforms traditional statistical causal discovery methods by up to 44.4 F1 points on biomedical benchmarks.
Introduction
Causal discovery—the process of determining if one variable causes another—traditionally relies on statistical analysis of large observational datasets. However, human experts often leverage mechanistic knowledge (e.g., biological pathways) to infer causality. Recent advancements in LLMs allow for "knowledge-based" discovery by reasoning over variable names and descriptions. Despite their potential, LLMs often produce inconsistent results in sensitive domains like medicine.
Knowledge Graphs (KGs) provide a structured repository of facts that can ground LLM reasoning. However, for any two variables, a KG may contain thousands of connecting paths, most of which are irrelevant "noise." The core challenge addressed in this research is identifying the specific subgraph that provides the necessary evidence for an LLM to confirm or refute a causal link.
Methodology
The authors developed a three-stage pipeline to bridge the gap between structured KGs and the reasoning capabilities of LLMs.
1. Subgraph Relevancy Estimation
The process begins by using a cost-effective LLM (e.g., Mistral-7B) to evaluate candidate subgraphs. A subgraph is deemed "informative" if it enables the LLM to correctly predict a known causal relationship. This step generates the training data for the ranking model.
2. Subgraph Ranker
Using the scores from the estimation phase, a specialized ranking model is trained to identify "metapaths"—sequences of node types (such as Drug -> Gene -> Disease)—that likely contain causal evidence. The researchers experimented with both Transformer-based Cross-Encoders and XGBoost models.
3. Zero-Shot Causal Discovery
For unseen variable pairs, the Ranker selects the top-performing subgraph. This subgraph is "verbalized" into natural language and included in the prompt for a target LLM (such as Llama-3 or Gemma). The LLM then performs zero-shot reasoning to determine if the relationship is causal or non-causal.
Experimental Evaluation
The framework was tested across multiple domains and datasets:
- Biomedical Domain: Evaluated on
GENEC(gene-gene),ADE(drug-side effects), andCOMAGC(gene-disease) using theHetionetKG. - Open-Domain: Tested on
SEMEVAL-2010 Task 8usingWikidata. - Statistical Comparison: Compared against traditional algorithms (e.g., PC Algorithm, DirectLiNGAM) using the
SACHSprotein signaling dataset.
Key Insights
- Informativeness over Similarity: Standard Retrieval-Augmented Generation (RAG) often relies on vector similarity. This study demonstrates that similarity is insufficient for causality; a path must be mechanistically informative. The specialized ranker successfully filters out topical noise in favor of causal evidence.
- Structural Evidence: The specific structure of a path (the metapath) is a strong indicator of causal relevance. For instance, paths indicating upregulation are more informative than simple co-occurrence.
- Knowledge-Driven Superiority: On the SACHS benchmark, the LLM+KG approach outperformed classic statistical search methods, achieving a 17-point reduction in Hamming Distance. This suggests that prior knowledge in KGs can be more effective than inferring structure from raw data alone.
Results
The proposed method yielded substantial performance improvements:
- Performance Boost: On the
COMAGCdataset, Llama-3’s F1 score increased from 33.33 to 77.78 when augmented with the ranked KG context—a 44.4 point improvement. - Generalizability: The framework proved effective across different underlying LLMs, including Mistral, Llama, and Gemma.
- Ranking Efficacy: The "Subgraph Ranker" consistently outperformed baseline retrieval methods like random selection or similarity-based search, highlighting the importance of context selection.
Conclusion and Future Work
This research provides a robust blueprint for grounding LLMs in the structured logic of Knowledge Graphs to improve causal reasoning. While the current focus is on pairwise variable discovery, future work will explore "full causal graph discovery" involving complex networks of multiple variables. Additionally, the system's performance remains dependent on the completeness of the underlying KG. Despite these challenges, the integration of structured facts with LLM reasoning marks a significant step toward more reliable and interpretable causal discovery.
Summary updated