Nov 2024 · Agents · Causal Learning · arXiv:2504.13263

Causal-Copilot: An Autonomous Causal Analysis Agent

An LLM-powered autonomous agent that automates the entire causal analysis pipeline — from algorithm selection to report generation — making advanced causal methods accessible to researchers across all domains.

Xinyue Wang · Kun Zhou · Wenyi Wu · Har Simrat Singh · Fang Nan · Songyao Jin · Aryan Philip · Saloni Patnaik · Hou Zhu · Shivam Singh
End-to-end workflow.
End-to-end workflow. From a natural-language query to a comprehensive causal analysis report.

The challenge

Causal analysis is fundamental to scientific discovery and evidence-based decision-making. Yet despite rapid advances in causal learning methods, a significant gap remains between theoretical sophistication and practical applicability — domain experts often cannot leverage these tools.

  1. Algorithmic complexity. 20+ methods with distinct assumptions and hyperparameters.
  2. Steep learning curves. Expertise required in both causal theory and implementation.
  3. Configuration. Selecting appropriate methods for specific data characteristics.

Architecture

Users upload their data and describe their goals in natural language; Causal-Copilot handles the rest. The system is built on five modules.

User interaction. Query parsing, domain knowledge integration, interactive feedback loop.

Preprocessing. Cleaning, schema extraction, diagnostics — linearity, stationarity, heterogeneity.

Algorithm selection. LLM-guided filtering, ranking on data characteristics, hyperparameter configuration.

Postprocessing. Bootstrap confidence, LLM-guided graph refinement, user revision loop.

Report generation. Graph visualization, result interpretation, LaTeX report compilation.

Coverage

Causal-Copilot integrates 20+ state-of-the-art algorithms across discovery, inference and auxiliary analysis: constraint-based (PC, FCI, CD-NOD, PCMCI), score-based (GES, FGES, XGES, GRaSP), continuous optimization (NOTEARS, GOLEM, CALM, CORL, DYNOTEARS), the LiNGAM family, MB-based methods and Granger causality; double machine learning, doubly robust learning, instrumental variables, matching and counterfactual estimation; plus SHAP-based feature importance and causal root-cause analysis.

Performance

Causal-Copilot consistently outperforms individual algorithms as scenarios get harder — the gap widens exactly where hand-picked methods break down.

Scenario (F1) Copilot Best baseline
Dense graph 0.65 0.44
Large scale (p=50) 0.94 0.79
Non-Gaussian noise 0.97 0.86
Heterogeneous domains 0.77 0.62
Time series, large lag 0.85 0.84

Run it

python main.py --data_file data.csv --apikey YOUR_KEY \
  --initial_query "Discover causal relationships"

python Gradio/demo.py
Modular architecture.
Modular architecture. Five components, each replaceable.
Web interface.
Web interface. Interactive causal analysis in the browser.