cs.LGOct 9, 2026

Amortized Counterfactual Prediction with Graph Neural Networks

Authors: Hendrik Stumpf, Francesco Quinzan

Organizations: Department of Computer Science, University of Oxford · Department of Engineering, University of Oxford

Abstract

Counterfactual inference asks how an observed outcome might have differed under different circumstances, such as whether a patient would have recovered had they received a different treatment. Such questions arise whenever decisions depend on the outcomes of alternatives that were not observed. Answering counterfactual queries generally requires knowledge of the underlying causal structure, which is often unavailable in practice. A common approach is therefore to first estimate the causal graph from observational data and then perform counterfactual inference. However, errors in the estimated causal graph can propagate to downstream counterfactual predictions. To address this challenge, we introduce the Counterfactual Graph Neural Process (CFGNP), an end-to-end approach that answers counterfactual queries directly from observational data without first estimating a causal graph. CFGNP uses Graph Neural Networks (GNNs) to exploit the dual-graph structure by restricting cross-world message passing to corresponding factual--counterfactual variables. Across synthetic and image-based benchmarks, CFGNP achieves stronger predictive performance than existing approaches, including on the German Loan benchmark, where it reduces MSE from 4.51×10−24.51 \times 10^{-2} to 0.19×10−20.19 \times 10^{-2}. Furthermore, on synthetic causal graphs, a model trained only on 10-node graphs maintains strong predictive performance on graphs with up to 30 nodes, without retraining.

Figures & tables

Appendix figures & tables21 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. CAFE: Counterfactual Prediction via Fast Posterior Estimation

    Sep 26, 2026Xinyan Han, Xiaoyu Lin, Hao Zou +3Counterfactual PredictionStructural Causal Models

  2. A Comparative Study of Counterfactual Explainers for Graph Neural Networks Enabling Multiple Types of Graph Edit

    Sep 4, 2026Maria Myrto Villia, Filippos Gouidis, Theodore Patkos +1Counterfactual ExplanationsGNN Explainability

  3. Beyond Edge Deletion: A Comprehensive Approach to Counterfactual Explanation in Graph Neural Networks

    Mar 4, 2026Matteo De Sanctis, Riccardo De Sanctis, Stefano Faralli +2GNN ExplainabilityCounterfactual Learning