Causal Order: The Key to Leveraging Imperfect Experts in Causal Inference

Aniket Vashishtha, Abbavaram Gowtham Reddy, Abhinav Kumar, Saketh Bachu, Vineeth N Balasubramanian, Amit Sharma · DOI

Abstract

Large Language Models (LLMs) have been used as experts to infer causal graphs, often by repeatedly applying a pairwise prompt that asks about the causal relationship of each variable pair. However, such experts, including human domain experts, cannot distinguish between direct and indirect effects given a pairwise prompt. Therefore, instead of the graph, we propose that causal order be used as a more stable output interface for utilizing expert knowledge. Even when querying a perfect expert with a pairwise prompt, we show that the inferred graph can have significant errors whereas the causal order is always correct. In practice, however, LLMs are imperfect experts and we find that pairwise prompts lead to multiple cycles. Hence, we propose the triplet method, a novel querying strategy that introduces an auxiliary variable for every variable pair and instructs the LLM to avoid cycles within this triplet. It then uses a voting-based ensemble method that results in higher accuracy and fewer cycles while ensuring cost efficiency. Across multiple real-world graphs, such a triplet-based method yields a more accurate order than the pairwise prompt, using both LLMs and human annotators. The triplet method enhances robustness by repeatedly querying an expert with different auxiliary variables, enabling smaller models like Phi-3 and Llama-3 8B Instruct to surpass GPT-4 with pairwise prompting. For practical usage, we show how the expert-provided causal order from the triplet method can be used to reduce error in downstream graph discovery and effect inference tasks.

Introduction

Causal discovery, the process of determining "what causes what," is a cornerstone of scientific inquiry but remains notoriously difficult. Recently, Large Language Models (LLMs) have been employed as "domain experts" to assist in this process. The conventional approach relies on pairwise prompting, where a model is asked to determine the relationship between two variables, A and B.

However, this approach faces two significant hurdles. First, there is the Direct/Indirect Ambiguity: even a perfect expert might correctly identify that "Smoking causes Respiratory Disease," but in a graph containing "Lung Damage," the direct edge should be Smoking $\rightarrow$ Lung Damage $\rightarrow$ Respiratory Disease. Without the intermediate context, the expert provides a "correct" intuition that leads to an "incorrect" graph structure. Second, LLMs are imperfect experts; when queried pair-by-pair, they frequently produce logical inconsistencies such as cycles (e.g., A $\rightarrow$ B, B $\rightarrow$ C, C $\rightarrow$ A), which violate the Directed Acyclic Graph (DAG) assumption necessary for causal inference.

The Triplet Method for Causal Order

To address these issues, this work proposes shifting the output interface from full causal graphs to causal order (topological ordering). Causal order is inherently more stable than edge-level discovery because it is independent of which other variables are present in a specific query.

Comparison of pairwise and triplet prompting strategies for perfect and imperfect experts.

The authors introduce the triplet method to robustly extract this order:

  1. Querying: For every pair of variables (A, B), the system selects an auxiliary variable C and asks the LLM to orient the relationships between all three simultaneously, with explicit instructions to avoid cycles.
  2. Ensembling: Since each pair (A, B) is evaluated within multiple different triplets, the system collects several "votes" for their relationship.
  3. Majority Voting: A final orientation is determined by majority rule. In cases of ties or persistent conflicts, a "high-cost expert" (e.g., GPT-4) serves as a tie-breaker.

This method provides "dynamic context," forcing the LLM to reason about causal paths and helping it avoid spurious direct edges. Furthermore, the triplet-derived order can be integrated into existing frameworks, such as the PC algorithm (constraint-based) or CaMML (score-based), to guide graph discovery.

Experimental Evaluation

The method was evaluated on standard benchmarks (e.g., Earthquake, Cancer, Child) and nuanced medical graphs (Neuropathic Pain, Alzheimers, Covid-19) to ensure the results were not merely due to LLM memorization of common datasets.

Key Results

  • Cycle Elimination: In the Child dataset (20 nodes), pairwise prompting with GPT-3.5 generated over 3,000 cycles. The triplet method reduced this count to zero.
  • Performance of Small Models: Remarkably, smaller models like Phi-3 (3.8B) and Llama-3 (8B) using the triplet method outperformed GPT-4 using standard pairwise prompts. This underscores that the prompting strategy is as critical as model scale.
  • Metric Improvements: The authors highlight Topological Divergence ($D_{top}$) as a superior metric for expert knowledge, as it specifically measures deviations from the true causal order. The triplet method consistently yielded lower $D_{top}$ and Structural Hamming Distance (SHD) across all datasets.
SHD score distribution as a function of the number of variables $|C|$ when the topological divergence is zero.
  • Downstream Impact: Utilizing the triplet-derived order to identify "backdoor sets" significantly reduced errors in estimating the Average Causal Effect (ACE).
  • Cost Efficiency: By delegating the majority of queries to smaller models and reserving GPT-4 for tie-breaking, the cost of processing a 100-node graph was reduced by approximately 90% (from ~$574 to ~$55).

Conclusion

By focusing on causal order rather than individual edges, "imperfect" LLMs can be transformed into highly effective tools for causal discovery. While challenges remain regarding scaling to thousands of variables and handling completely novel variables without metadata, the triplet method represents a significant step toward robust, expert-guided causal inference.

Summary updated

Abstract

Large Language Models (LLMs) have been used as experts to infer causal graphs, often by repeatedly applying a pairwise prompt that asks about the causal relationship of each variable pair. However, such experts, including human domain experts, cannot distinguish between direct and indirect effects given a pairwise prompt. Therefore, instead of the graph, we propose that causal order be used as a more stable output interface for utilizing expert knowledge. Even when querying a perfect expert with a pairwise prompt, we show that the inferred graph can have significant errors whereas the causal order is always correct. In practice, however, LLMs are imperfect experts and we find that pairwise prompts lead to multiple cycles. Hence, we propose the triplet method, a novel querying strategy that introduces an auxiliary variable for every variable pair and instructs the LLM to avoid cycles within this triplet. It then uses a voting-based ensemble method that results in higher accuracy and fewer cycles while ensuring cost efficiency. Across multiple real-world graphs, such a triplet-based method yields a more accurate order than the pairwise prompt, using both LLMs and human annotators. The triplet method enhances robustness by repeatedly querying an expert with different auxiliary variables, enabling smaller models like Phi-3 and Llama-3 8B Instruct to surpass GPT-4 with pairwise prompting. For practical usage, we show how the expert-provided causal order from the triplet method can be used to reduce error in downstream graph discovery and effect inference tasks.
BibTeX
@inproceedings{vashishtha2025causal,
  author = {Aniket Vashishtha and Abbavaram Gowtham Reddy and Abhinav Kumar and Saketh Bachu and Vineeth N Balasubramanian and Amit Sharma},
  title = {{Causal Order: The Key to Leveraging Imperfect Experts in Causal Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=9juyeCqL0u},
}
Figure