Introduction
As Large Language Models (LLMs) are increasingly integrated into decision-making pipelines, their ability to perform causal reasoning—understanding cause-and-effect relationships—becomes paramount. Causal structures are typically represented as Directed Acyclic Graphs (DAGs). However, because LLMs are fundamentally text-based, they must process these graphs through various textual encodings. The CausalGraph2LLM benchmark was developed to investigate how sensitive these models are to different graph formats and to identify the most effective representations for causal tasks.
The Problem of Textual Representation
A critical challenge in LLM-based causal reasoning is the "encoding gap." While a model might possess the underlying logic to solve a causal problem, its performance can vary wildly depending on whether the graph is presented as a JSON object, an XML-style GraphML file, or a raw adjacency matrix. Furthermore, LLMs often suffer from "parametric memory" bias, where they rely on pre-existing knowledge (e.g., "smoking causes cancer") rather than the specific, potentially novel, graph provided in the prompt.
Methodology and Benchmark Design
The CausalGraph2LLM benchmark consists of over 700,000 queries designed to evaluate models across three dimensions:
- Encoding Strategies: Seven distinct textual representations were tested, ranging from structured formats like JSON and GraphML to mathematical representations like Adjacency Matrices.
- Query Levels: Tasks were split into node-level (e.g., "Is Node X a mediator?") and graph-level (e.g., "List all mediators in this graph").
- Causal Tasks: Evaluations covered identifying parents, children, sources, sinks, mediators, and confounders, as well as performing interventional predictions (e.g., predicting the effect of $do(X=x)$).
The benchmark utilizes three data types: synthetic DAGs (20-30 nodes) to test pure structural reasoning; realistic contextual graphs (the Insurance and Alarm benchmarks); and "anti-commonsense" graphs where causal directions are intentionally flipped to test for model bias.
Key Insights and Results
The study revealed a staggering 60% variance in performance based solely on the choice of encoding. JSON emerged as a particularly strong format for parent-child queries due to its inherent nesting. Conversely, Adjacency Matrices were generally the most difficult for models to parse without specific fine-tuning.
Other key findings include:
- Granularity Matters: LLMs are significantly more accurate at answering specific questions about individual nodes than providing holistic graph summaries.
- The Bias Trap: When graphs contradicted common sense (the anti-commonsense test), performance plummeted as models "hallucinated" expected causal links.
- Overestimation Bias: Top-tier models like GPT-4 often exhibit high false-positive rates, over-predicting the existence of causal relationships.
- Fine-tuning Efficacy: Applying QLoRA to smaller models like Mistral-7B significantly improved their ability to handle complex formats like Adjacency Matrices.
Conclusion
The CausalGraph2LLM benchmark highlights that LLM "intelligence" in causal reasoning is inseparable from the way information is formatted. Future work should focus on adaptive encoding strategies that tailor the graph format to the specific query and developing more robust methods to mitigate parametric memory bias.
Summary updated