Abstract
At the core of causal inference lies the challenge of determining reliable causal graphs solely based on observational data. Since the well-known backdoor criterion depends on the graph, any errors in the graph can propagate downstream to effect inference. In this work, we initially show that complete graph information is not necessary for causal effect inference; the topological order over graph variables (causal order) alone suffices. Further, given a node pair, causal order is easier to elicit from domain experts compared to graph edges since determining the existence of an edge can depend extensively on other variables. Interestingly, we find that the same principle holds for Large Language Models (LLMs) such as GPT-3.5-turbo and GPT-4, motivating an automated method to obtain causal order (and hence causal effect) with LLMs acting as virtual domain experts. To this end, we employ different prompting strategies and contextual cues to propose a robust technique of obtaining causal order from LLMs. Acknowledging LLMs' limitations, we also study possible techniques to integrate LLMs with established causal discovery algorithms, including constraint-based and score-based methods, to enhance their performance. Extensive experiments demonstrate that our approach significantly improves causal ordering accuracy as compared to discovery algorithms, highlighting the potential of LLMs to enhance causal inference across diverse fields.
The Problem: Ambiguity in Causal Discovery
Causal discovery—the process of determining "what causes what"—is a fundamental yet notoriously difficult task in data science. Recently, researchers have explored using Large Language Models (LLMs) as virtual domain experts to aid this process, often by asking pairwise questions such as "Does smoking cause lung cancer?"
However, a significant flaw exists in this approach: even a "perfect" expert can struggle to distinguish between a direct effect (A → B) and an indirect effect (A → C → B) when variables are viewed in isolation. This ambiguity leads to "noisy" expert knowledge, resulting in causal graphs plagued by logical contradictions and cycles (e.g., A causes B, B causes C, and C causes A). For instance, in complex medical scenarios, the relationship between pollution, smoking, and cancer involves multiple overlapping pathways that are difficult to disentangle through simple pairwise queries.
Shifting Focus: From Graphs to Causal Order
This research proposes a paradigm shift: instead of asking LLMs for a full causal graph, we should ask them for the causal order (the topological sequence of events). Causal order is a more stable interface for expert knowledge; while an expert might be unsure if an edge is direct or indirect, they are usually certain about which event precedes another. Mathematically, a correct causal order is sufficient to identify valid adjustment sets for effect inference.
To robustly extract this order, the authors introduce three key components:
- The Triplet Method: Rather than pairwise prompts, the LLM is presented with three variables (A, B, C) and asked to provide causal relationships while ensuring no cycles exist within that triplet. This provides the model with necessary context and structural constraints.
- Voting-Based Ensemble: Because each pair of variables appears in multiple triplets with different "auxiliary" variables, the system uses a majority vote to decide the final direction of an edge, effectively filtering out LLM hallucinations.
- Downstream Integration: The derived causal order can be plugged into standard discovery tools like the PC algorithm or CaMML to refine graph discovery and calculate Average Causal Effects (ACE).
Experimental Results and Key Insights
The method was evaluated across benchmark graphs (e.g., Earthquake, Cancer, Child) and nuanced medical datasets (Neuropathic pain, Alzheimer’s, Covid-19). The findings highlight several advantages of the triplet-based causal ordering approach:
- Superior Accuracy: On the complex "Child" dataset, the triplet method achieved a Topological Divergence ($D_{top}$) of 1, whereas standard pairwise methods failed to produce a valid order due to excessive logical cycles (sometimes over 10,000).
- Model Efficiency: The triplet method is robust enough that smaller, more efficient models like Phi-3 or Llama-3 8B can outperform GPT-4 when the latter is restricted to pairwise prompting.
- Cost Efficiency: By utilizing smaller models for the bulk of triplet queries and reserving high-cost models like GPT-4 only for tie-breaking, the cost of causal discovery for a 100-node graph was reduced from approximately $574 to just $55.
- Improved Inference: Using LLM-guided ordering to select adjustment variables resulted in significantly lower errors in ACE estimation compared to traditional discovery algorithms like ICA-LiNGAM or NOTEARS.
Limitations and Future Work
While promising, the method relies on the LLM's existing domain knowledge and cannot discover relationships for entirely novel or semantically neutral variables. Additionally, while the authors proposed variants to maintain $O(N^2)$ complexity, querying all possible triplets is computationally $O(N^3)$. Future research may focus on applying these techniques to complex counterfactual estimation, which requires the exact functional form of the full causal graph beyond just the topological order.
Summary updated