Skip to content

CausalForge: A Formally Grounded, Self-Improving Agentic Framework for Automated Research in Causal Inference

Source: arXiv:2607.22511 · Published 2026-07-24 · By Jiyuan Tan, Vasilis Syrgkanis

TL;DR

CausalForge addresses the challenge of automating theoretical research in causal inference, focusing not only on generating candidate results but also on reliably evaluating them. Traditional approaches relying on large language model (LLM) reviewers have proven unreliable, with high acceptance rates for fabricated papers and near-chance detection. To overcome this, CausalForge integrates the Lean 4 proof assistant with a comprehensive causal inference library (Causalean) and a self-improving agentic pipeline (CausalSmith) that autonomously selects research topics, proposes results, formalizes statements, constructs machine-checked proofs, and audits the formal statements against informal claims. This combination provides a two-tiered trust model: kernel proof soundness plus a semantic statement audit to ensure the formal theorem matches the intended scientific claim.

The system’s main technical contribution is the development of Causalean, a foundational Lean 4 causal inference library containing 7,035 machine-checked declarations spanning graphical models, potential outcomes, identification, estimation, and panel/experimental methods. CausalSmith acts as an end-to-end automaton that iteratively proposes, formalizes, proves, audits, and presents novel causal results, while expanding Causalean through promotion of reusable lemmas discovered during runs. Evaluation over 123 autonomous runs shows that the approach successfully discovers new theorems—such as results closing gaps in existing literature—and highlights the system’s preference for technical refinements over radically new ideas. The complete source code, formal developments, and run records are publicly released, demonstrating reproducibility and transparency.

Key findings

  • Causalean library comprises 7,035 machine-checked declarations including 4,616 theorems, 2,015 definitions, and 404 structures, fully formalizing core causal inference theory in Lean 4.
  • The CausalSmith pipeline completed and recorded 123 autonomous research runs generating machine-checked causal inference results.
  • Among discovered results, the system closed a gap identified by Zeng et al. [54], demonstrating capacity to extend the literature.
  • Statement audit detects semantic mismatches between formal proofs and intended informal claims, addressing the known risk of vacuous or incorrect formal statements that still type-check in Lean.
  • CausalSmith’s automated topic selector ranks candidate research directions and enforces an adversarial gate demanding novelty, a precise research object, and a downstream use before committing to a topic.
  • The system promotes newly proved lemmas into the core Causalean library, supporting continuous growth and reducing overhead for future runs.
  • The audit and verification framework identifies common failure modes observed in runs, such as unproven axioms substituting difficult lemmas or formal statements differing from informal claims.
  • The retrieval-enabled library enables goal-directed search for composable proof components, facilitating efficient automation of formal proofs.

Threat model

The adversary is an unreliable or deliberately misleading large language model reviewer that may accept fabricated or semantically incorrect research outputs at rates near chance. The system assumes a trusted proof kernel (Lean 4) that enforces strict formal proof soundness, but recognizes that kernel acceptance alone does not guarantee semantic fidelity of formal statements to informal scientific claims. Human oversight is applied at fixed points to adjudicate final acceptance decisions.

Methodology — deep read

The paper’s methodology centers on developing a formally grounded automated research framework combining a large-scale causal-inference library in Lean 4 (Causalean) with an autonomous agentic research pipeline (CausalSmith).

  1. Threat Model & Assumptions: The adversary is an unreliable or hallucinating LLM reviewer, which may accept fabricated or false claims at rates near chance. The system assumes access to a trusted proof kernel (Lean 4) guaranteeing proof soundness, but acknowledges that kernel acceptance alone does not ensure semantic alignment of formal theorems with informal scientific claims.

  2. Data: Causalean is a human-guided, LLM-assisted formalization of causal inference theory. It contains 7,035 carefully reviewed and machine-checked declarations drawn from the literature, spanning foundational causal frameworks (graphical and structural causal models, potential outcomes), identification, estimation, panel methods, experimentation, and statistical theory. The pipeline further produces data in the form of logic graphs representing proof dependencies from 123 completed autonomous runs.

  3. Architecture/Algorithm: CausalSmith is an agentic pipeline implementing four stages—Discovery, Formalization, Proof Construction, and Presentation—flowing from topic selection to proposing informal causal claims, formalizing them in Lean 4, constructing proofs checked by the kernel, auditing formal statements against intended claims, and finally generating human-readable papers linked to formal artifacts. Central is a logic graph data structure encoding statements as nodes with dependencies, tracking review statuses to maintain correctness and incremental re-verification. The workflow uses retrieval-based proof search over Causalean and incorporates novelty and adversarial gates for topic acceptance.

  4. Training Regime: Unlike classical ML, the system relies on a combination of human design, expert reviews, and LLM assistance to draft formal statements and proofs iteratively checked by the compiler. Hyperparameters of agent prompts and retry limits govern the automated reasoning loops. No explicit epochs or batches apply since this is knowledge-based agentic formal discovery rather than training.

  5. Evaluation Protocol: Evaluation draws from the artifacts of 123 autonomous runs, cataloging accepted theorems, human-review matches of formal statements to informal claims, and identifying failures like vacuous axioms or semantic drift. The system is benchmarked by its ability to produce new, verified results including resolving known gaps in existing causal literature. The staged pipeline gating system enforces quality at topic selection, statement matching, and final convergence review.

  6. Reproducibility: All code, the full Causalean library, and detailed run records are publicly released on GitHub. The system uses open Lean 4 infrastructure, allowing external replication and extension. However, training or prompt details for supporting LLMs are partly unspecified, and some oracle human checks remain in the loop for final acceptance.

Concrete Example: In a typical autonomous run, CausalSmith’s selector scans recent literature, proposes a novel causal identification claim expressed in natural language anchored on a precisely scoped research question, formalizes this claim node by node into Lean 4 declarations referencing existing Causalean lemmas, constructs the proof using retrieval and proof tactics, and submits the completed proof-graph for a kernel check. The statement audit module compares each formal theorem to its informal natural-language claim to detect semantic mismatches or vacuity. If successful, newly proved lemmas missing from Causalean are promoted to grow the core library. The final formally verified and semantically audited causal theorem is presented in a generated paper artifact linked bidirectionally with formal code.

Technical innovations

  • Integration of a large, reusable, fully machine-checked causal inference Lean 4 library (Causalean) with an autonomous agentic research pipeline (CausalSmith) enabling formal theorem discovery and proof construction.
  • A dual trust framework combining kernel-verified proof soundness with a novel statement audit comparing formal theorems against their informal scientific claims to guard against vacuity and semantic drift.
  • Representation of each research run’s output as a logic graph of formal statements with explicit dependency edges and review statuses enabling incremental proof re-verification and node-specific auditing.
  • A self-improving pipeline that promotes newly proved lemmas discovered during autonomous runs into the core Causalean library, supporting continuous growth of verified knowledge.
  • A retrieval-enabled, multi-modal search infrastructure allowing goal-directed retrieval of formal causal inference results based on natural language, type patterns, and proof goals to aid proof automation.

Datasets

  • Causalean library — 7,035 declarations (4,616 theorems, 2,015 definitions, 404 other) — human-curated, LLM-assisted formalization of causal inference literature
  • CausalSmith run records — 123 autonomous research runs producing formal proof artifacts — generated by CausalForge pipeline

Baselines vs proposed

  • AI Scientist [49] LLM judge acceptance rate of fabricated papers: 82% vs CausalForge statement audit near 100% semantic correctness
  • FunSearch/AlphaEvolve [32,36] partial theorem proposal and proof vs CausalForge integrated propose + verified + audited proofs
  • AlphaProof [16] verifies provided theorems vs CausalForge discovers new theorems with statement–claim audit
  • Causal benchmarks [20,21] fixed labeled tasks vs CausalForge autonomously discovers novel verified causal theorems

Limitations

  • The semantic statement audit still relies on approximate natural language matching and human review, not a fully automated semantic understanding.
  • The system currently focuses on causal inference theory formalized in Lean 4 and may not generalize easily to other theoretical domains without large human effort.
  • LLM assistance is used for drafting statements and proofs but the underlying LLM model details and possible hallucinations are not fully characterized or adversarially tested.
  • Automated topic selection favors technically tractable open problems, relegating truly novel ideas to lower acceptance due to reduction to known results.
  • Proof construction remains relatively slow and computationally intensive compared to informal LLM generation.
  • The system’s performance under significant distribution shifts or adversarial attack is not evaluated.

Open questions / follow-ons

  • Can the semantic statement audit be fully automated with learned models to reduce residual human review?
  • How would the system perform on causal inference problems formulated over continuous or infinite domains requiring analytic proofs beyond discrete structures?
  • Can CausalForge’s agentic approach generalize to other formal scientific domains such as economics or physics with complex formal languages?
  • What robustness guarantees or adversarial defenses can be developed against hallucination or specification drift in LLM-assisted formal theorem discovery?

Why it matters for bot defense

Bot-defense and CAPTCHA engineers interested in leveraging formal verification to improve the trustworthiness of automated reasoning systems can learn from CausalForge’s approach. It highlights that relying solely on large language model reviewers to validate outputs is risky, as LLMs may hallucinate or accept flawed claims. Integrating a formally verified proof assistant kernel with semantic auditing of the meaning of formal statements provides a stronger dual guarantee of correctness—both syntactic proof soundness and semantic alignment with intended claims.

For CAPTCHA-related adversarial reasoning, the CausalForge pipeline’s logic graph approach and incremental auditing could inspire ways to formally verify behavioral or interaction claims made by automated agents, reducing false positives or exploitation. The system’s design also underscores the value of combining human oversight with automated verification to catch subtle mismatches, a useful principle in bot-detection contexts where fully automated confidence is elusive.

Cite

bibtex
@article{arxiv2607_22511,
  title={ CausalForge: A Formally Grounded, Self-Improving Agentic Framework for Automated Research in Causal Inference },
  author={ Jiyuan Tan and Vasilis Syrgkanis },
  journal={arXiv preprint arXiv:2607.22511},
  year={ 2026 },
  url={https://arxiv.org/abs/2607.22511}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution