Human-in-the-Loop Causal Discovery under Latent Confounding using Ancestral GFlowNets

Tiago da Silva, Eliezer S. Silva, Adèle H. Ribeiro, António Góis, Dominik Heider, Samuel Kaski, Diego Mesquita · OpenReview

Abstract

Causal discovery (CD) algorithms are notably brittle when data is scarce, inferring unreliable causal relations that may contradict expert knowledge, especially when considering latent confounders. Furthermore, the lack of uncertainty quantification in most CD methods hinders users from diagnosing and refining results. To address these issues, we introduce Ancestral GFlowNets (AGFNs). AGFN samples ancestral graphs (AGs) proportionally to a score-based belief distribution representing our epistemic uncertainty over the causal relationships. Building upon this distribution, we propose an elicitation framework for expert-driven assessment. This framework comprises an optimal experimental design to probe the expert and a scheme to incorporate the obtained feedback into AGFN. Our experiments show that: i) AGFN is competitive against other methods that address latent confounding on both synthetic and real-world datasets; and ii) our design for incorporating feedback from a (simulated) human expert or a Large Language Model (LLM) improves inference quality.

Introduction

Causal discovery (CD)—the task of inferring cause-and-effect relationships from observational data—is a cornerstone of scientific research. However, it faces two significant hurdles. First, latent confounding: in real-world scenarios, unmeasured variables can create spurious correlations, making two variables appear related when they share a common unmeasured cause. Second, unreliable point estimates: most algorithms output a single "best guess" graph. If data is noisy, this guess may contradict established expert knowledge. While expert intervention can help, their time is costly, and their knowledge may be imperfect.

Existing Expert-in-the-Loop (EITL) methods often assume experts are infallible, which is unrealistic. Moreover, most methods struggle to scale to the search space of Ancestral Graphs (AGs), a complex class of graphs that explicitly account for hidden confounders.

Methodology: Ancestral GFlowNets (AGFN)

We propose Ancestral GFlowNets (AGFN), which treats causal discovery as a generative sampling process rather than a search for a single optimal graph. AGFN consists of several core components:

Generative Flow Networks for AGs

Instead of searching for one graph, AGFN learns a policy to sample graphs. It is trained such that the probability of sampling a specific graph is proportional to its "reward," typically based on the Bayesian Information Criterion (BIC). To handle the complexity of AGs, we developed an efficient, incremental masking algorithm. This ensures that every generated graph is a valid Ancestral Graph, preventing the model from exploring mathematically impossible structures.

Incremental construction of Ancestral Graphs (AGs) using GFlowNets.

Noisy Expert Integration and Active Elicitation

A key contribution is the integration of noisy expert feedback. Using a Bayesian framework, AGFN incorporates expert beliefs without assuming they are always correct. It assumes the expert is "better than random" and uses log-pooling to combine data-driven rewards with expert priors.

To minimize expert burden, we employ an active feedback elicitation strategy. The model identifies variable pairs that, if clarified by an expert, would most significantly reduce the model's uncertainty (entropy).

Active elicitation framework for incorporating expert feedback into the causal discovery loop.

Experimental Evaluation

We validated AGFN across several benchmarks, including synthetic motifs (e.g., chain, instrumental variable), gene regulatory networks (DREAM3), and the Sachs protein signaling dataset. We also tested the framework using GPT-4o as a simulated expert to evaluate its robustness to real-world, potentially biased AI feedback.

Key Results

  • Superior Accuracy: AGFN consistently outperformed strong baselines (FCI, GFCI, DCD) in terms of Structural Hamming Distance (SHD).
  • Better Data Fit: On DREAM3 datasets, AGFN achieved significantly lower BIC scores than all considered baselines.
  • Efficiency of Elicitation: The model often reached near-perfect accuracy with fewer than four expert queries. In the 11-node Sachs experiment, LLM feedback rapidly reduced SHD from ~45 to ~25, demonstrating the power of targeted expert guidance.

Discussion and Future Work

AGFN demonstrates that maintaining a distribution of likely graphs is crucial when multiple causal explanations fit the data. We proved that as long as an expert is correct more than 25% of the time (in a 4-choice scenario), the model converges to the true structure.

Future work includes developing "foundation models" for causal discovery to avoid retraining for every new dataset and addressing potential data leakage when using LLMs as experts on classic benchmarks. While training GFlowNets is computationally intensive, GPU-optimized operations significantly mitigate these costs.

Summary updated

BibTeX
@article{silva2026human,
  author = {Tiago da Silva and Eliezer S. Silva and Adèle H. Ribeiro and António Góis and Dominik Heider and Samuel Kaski and Diego Mesquita},
  title = {{Human-in-the-Loop Causal Discovery under Latent Confounding using Ancestral GFlowNets}},
  journal = {Information Sciences},
  year = {2026},
  doi = {10.1016/j.ins.2026.123816},
}
Figure