Source-linked AI summary

VACA: Design of Variational Graph Autoencoders for Interventional and Counterfactual Queries

Pablo Sanchez-Martin, Miriam Rateike, Isabel Valera

arXiv:2110.14690v1stat.MLcs.LG

TL;DR

Causal inference from observational data and a known graph is challenging when the goal is to approximate both interventional and counterfactual distributions without assuming parametric structural equations. VACA uses a graph-based variational autoencoder to model these distributions, and the paper reports stronger synthetic distribution estimates than competing methods, alongside a counterfactual-fairness use case. Its scope assumes causal sufficiency, and its expressiveness and performance with long causal paths are constrained by GNN architectures.

  • Problem

    The paper asks how GNNs can exploit a known causal graph to approximate interventional and counterfactual distributions from observational data, assuming no hidden confounders.

    Source: §1 · p. 1
  • Method

    VACA is a variational graph autoencoder that uses graph structure to approximate observational, interventional, and counterfactual distributions without parametric assumptions on unknown structural equations.

    Source: §1 · p. 1, §4 · p. 4
  • Results

    VACA outperforms competing methods [16] [17] on complex synthetic datasets for estimating interventional and counterfactual distribution means and overall distributions, and fair-z retains performance comparable to the unfair full classifier.

    Source: §1 · p. 2, §6 · p. 8
  • Takeaways & Limitations

    The paper demonstrates VACA's use for assessing counterfactual fairness and learning fair classifiers without compromising performance in the reported classification setting.

    Source: §1 · p. 2, §7 · p. 9

    VACA's ability to model complex structural equations is limited by encoder and decoder GNN expressiveness, while long causal paths require more decoder layers, whose performance can deteriorate with depth.

    Source: §7 · p. 9

Abstract

from arXiv · show

In this paper, we introduce VACA, a novel class of variational graph autoencoders for causal inference in the absence of hidden confounders, when only observational data and the causal graph are available. Without making any parametric assumptions, VACA mimics the necessary properties of a Structural Causal Model (SCM) to provide a flexible and practical framework for approximating interventions (do-operator) and abduction-action-prediction steps. As a result, and as shown by our empirical results, VACA accurately approximates the interventional and counterfactual distributions on diverse SCMs. Finally, we apply VACA to evaluate counterfactual fairness in fair classification problems, as well as to learn fair classifiers without compromising performance.

1 Introduction

The paper studies whether graph neural networks can use a known causal graph to approximate interventional and counterfactual distributions from observational data, assuming no hidden confounders. VACA combines a graph-aware variational autoencoder with joint modeling, and is reported to outperform competing methods on complex synthetic data.

1 Introduction

  • VACA is designed to approximate observational, interventional, and counterfactual distributions without parametric assumptions on unknown structural equations.It incorporates uncertainty in estimating causal-parent relationships.Source: §1 · p. 1
  • In synthetic experiments, VACA outperforms competing methods [16] [17] on complex datasets for estimating both distribution means and overall interventional and counterfactual distributions.Overall distribution accuracy is measured with Maximum Mean Discrepancy.Source: §1 · p. 2

1.1 Related Work

  • Prior approaches include estimating average treatment effects, intervening on causal latent structures, and fitting conditional models for observed variables given their parents.These approaches address different causal-query settings or model each variable conditionally.Source: §1.1 · p. 2
  • CAREFL [17] reduces a causal graph to its causal ordering and evaluates interventions only at root nodes, while per-variable CVAEs can propagate distribution mismatch to descendants [16].VACA instead uses graph structure and joint optimization.Source: §1.1 · p. 2
  • VACA uses GNN message passing to approximate interventions and jointly optimizes the observational distribution to avoid error propagation along the Markov factorization.The evaluation covers interventions on root and non-root nodes across varied causal models.Source: §1.1 · p. 2

2 Background

The background introduces structural causal models and the graph-based variational autoencoder components used by VACA. It distinguishes population-level interventions from instance-specific counterfactuals and describes how graph neural networks exchange information among neighboring nodes.

2.1 Structural causal models

  • An SCM generates observed endogenous variables from exogenous variables through structural equations, with a causal graph encoding parent-child relations.The paper considers directed acyclic graphs in this background discussion.Source: §2.1 · p. 2
  • Interventions ask how a population changes when a variable is set to a value; counterfactuals ask what would have happened to a specific factual sample under that setting.Interventions remove incoming edges to the manipulated node.Source: §2.1 · pp. 2–3, Figure 1 · p. 3

2.2 Variational Graph Autoencoder and Graph Neural Networks

  • A VAE learns a density estimator and approximate latent posterior, while a VGAE uses adjacency information and GNNs in its encoder and decoder.The VGAE adjacency matrix structures the posterior approximation and likelihood.Source: §2.2 · p. 3
  • A GNN updates node states by receiving neighbor messages, aggregating them, and combining the aggregate with the previous node state.With Nh hidden layers, a node's output depends on neighbors up to Nh + 1 hops away.Source: §2.2 · p. 3

3 Observational, interventional and counterfactual distributions

This section sets out how SCM properties define observational, interventional, and counterfactual distributions. Under causal sufficiency, interventions sever paths through manipulated variables, while counterfactuals use abduction, action, and prediction.

Observational distribution

  • Under the absence of hidden confounders, exogenous variables are assumed independent, and the observational distribution factorizes into each variable conditioned on its causal parents.The observational distribution is also the pushforward of the exogenous distribution through the structural equations.Source: §3 · pp. 3–4
  • Each endogenous variable is a function of its exogenous variable and those of its causal ancestors, and is independent of exogenous variables outside that ancestor set.This property follows together with the causal sufficiency assumption.Source: §3 · pp. 3–4

Interventional distribution

  • An intervention replaces the structural equations for targeted variables with fixed values, severing causal paths that pass through those variables while leaving other paths intact.For do(X2 = α), the indirect path from X1 to X3 through X2 is severed while the direct path remains.Source: §3 · p. 4

Counterfactual distribution

  • Counterfactual estimation uses abduction to infer exogenous variables from a factual sample, action to intervene, and prediction to apply the modified equations.The prediction step uses the posterior over exogenous variables conditioned on the factual sample.Source: §3 · p. 4

4 Variational Causal Autoencoder (VACA)

VACA uses a causal graph and observational data to build a variational graph autoencoder that approximates observational, interventional, and counterfactual distributions. Its encoder and decoder GNNs are constrained to mimic causal properties, with practical extensions for heterogeneous nodes and variables.

4 Variational Causal Autoencoder (VACA)

  • VACA combines a causal adjacency matrix with a GNN encoder and decoder to approximate distributions over endogenous variables.The encoder maps variables and the graph to a posterior approximation; the decoder maps latent variables and the graph to likelihood parameters.Source: §4 · p. 4

4.1 Observational distribution

  • The decoder needs at least δ − 1 hidden layers for causal factorization, where δ is the longest shortest path between endogenous nodes.Latent variables play a role similar to exogenous variables, but are not required to match the true exogenous variables; decoder likelihood noise represents uncertainty in the estimated observational distribution.Source: §4.1 · p. 5

4.2 Interventional distribution

  • At least γ − 1 decoder hidden layers are necessary to capture interventions, with γ the longest directed path in the causal graph.The intervention modifies the adjacency matrix by removing incoming edges to intervened nodes; message passing can distinguish direct from indirect paths, which are severed by intervention.Source: Figure 2 · p. 5, §4.2 · p. 6

4.3 Counterfactual distribution

  • Counterfactual estimation uses separate encoder passes for factual abduction and intervention, and requires an encoder with no hidden layers.The resulting counterfactual depends on the factual and intervention latent variables; the no-hidden-layer condition makes each latent posterior independent of non-parent variables.Source: §4.3 · pp. 6–7

4.4 Practical considerations

  • VACA can group correlated or potentially confounded variables into one multidimensional heterogeneous node and use distinct message and update functions for different variables and edges.The paper also notes that VACA can be used with any GNN architecture.Source: §4.4 · p. 7

5 Evaluation

Across synthetic causal graphs, VACA generally outperforms MultiCVAE and CAREFL at matching observational and interventional distributions, while its counterfactual performance is similar to CAREFL. The evaluation tests interventions on root and non-root nodes using true structural equations and compares observational, interventional, and counterfactual metrics.

Experimental setup

  • The synthetic evaluation compares VACA with MultiCVAE and CAREFL across interventions on root and non-root nodes, using true structural equations and 10 random seeds.Results are reported as means and standard deviations; the selected graphs include collider, loan, and adult, with linear and nonlinear noise equations for the collider.Source: §5 · pp. 7–8

Metrics

  • Observational fit is measured by MMD; interventional fit includes mean and standard-deviation errors over descendants, while counterfactual fit uses MSE and SSE.Lower observational MMD indicates closer matching of the true and estimated distributions.Source: §5 · p. 8

Results

  • VACA consistently beats CAREFL on observational MMD and interventional StdE and MMD, while CAREFL fits interventional means well; their counterfactual MSE and SSE are similar.The authors attribute VACA’s distribution-level performance to using the causal graph and jointly optimizing the log-evidence; CAREFL uses exact inference, whereas VACA uses approximate inference and a lower bound.Source: §5 · p. 8
  • MultiCVAE generally underperforms the other methods, which the authors suggest may reflect errors at one node amplifying in its descendants.MultiCVAE trains each node independently.Source: §5 · p. 8

6 Use case: counterfactual fairness

On German Credit, VACA-generated counterfactuals support fairness audits that rank the full classifier as less fair than unaware and fair-x classifiers. The fair-z classifier has fairness comparable to fair-x while maintaining performance comparable to the full classifier.

Use-case setup

  • The use case applies VACA to the German Credit dataset and uses sex as the sensitive feature in a causal model that also includes age, credit, repayment, and account variables.The target is binary credit risk.Source: §6 · p. 8

Fairness Auditing

  • VACA-based audits rank the full SVM as less fair than the unaware and fair-x classifiers, matching the ranking reported in.Because the true data-generation process is unavailable, the audit is evaluated by the ranking of classifiers by unfairness.Source: §6 · p. 8

Fairness Classification

  • Fair-x trades accuracy for fairness relative to the full classifier, whereas fair-z achieves comparable fairness to fair-x with performance comparable to the full classifier.VACA learned the fair-z representation without classification labels.Source: §6 · pp. 8–9

7 Conclusion, Limitations and Impact

The conclusion presents VACA as a GNN-based variational causal autoencoder for heterogeneous data and for approximating interventional and counterfactual distributions across SCMs. The paper also identifies limits tied to GNN expressiveness and depth, and its background describes message passing as neighbor-based feature updates.

7 Conclusion, Limitations and Impact

  • VACA is designed to capture SCM properties, handle heterogeneous data, and approximate interventional and counterfactual distributions across SCMs of different complexities.Synthetic experiments report accurate results across diverse SCMs and more consistent results than competing methods [16] [17]; the paper also applies VACA to counterfactually fair classification.Source: §7 · p. 9
  • VACA’s ability to model complex structural equations is limited by encoder and decoder GNN architectures, especially their aggregation functions.Long causal paths require more decoder layers, while GNN performance is known to deteriorate with depth [9] [14] [24].Source: §7 · p. 9
  • The authors encourage users to verify VACA’s assumptions and attend to the identifiability problem in counterfactual queries [49] [45].The paper frames counterfactuals as consequential for decisions, including in political and medical domains.Source: §7 · p. 9
  • Future work includes testing sensitivity to causal-graph errors and hidden confounders, extending to hidden confounders and non-DAG models, and studying GNN architecture and path-length effects.The authors also propose applying VACA to privacy-preserving causal inference [22] and explainable machine learning [16].Source: §7 · p. 9

A Background details on message passing Graph Neural Networks

  • In message-passing GNNs, each node receives information from its parents, combines incoming messages, then updates its representation with a neural network.The output graph preserves the input graph structure.Source: A Background details on message… · p. 13

B Proofs

The proofs connect GNN message-passing depth to path reach and use that relationship to state conditions for VACA’s causal factorization, interventions, and abduction. In particular, decoder depth must cover graph paths, while the stated abduction independence condition requires an encoder with no hidden layers.

Notation

  • The notation defines a path as a sequence of unique nodes joined by edges, with path length measured in edges, and defines Nh as the number of hidden layers.The graph diameter δ is the longest shortest-path length, while γ is the longest-path length.Source: B Proofs · p. 14

GNN path reach

  • A message-passing GNN with Nh hidden layers transmits information between nodes along paths of at most Nh + 1 edges.If no such path connects j to i, the output feature of i is not a function of node j.Source: B Proofs · p. 14

Causal factorization

  • VACA satisfies causal factorization if and only if its decoder has at least δ − 1 hidden layers, where δ is the longest shortest path between endogenous nodes.This depth allows each variable’s decoder distribution to depend on the latent variables of itself and its ancestors.Source: B Proofs · p. 14

Causal interventions

  • VACA captures causal interventions if and only if its decoder has at least γ − 1 hidden layers, where γ is the longest path between endogenous nodes.Intervention requires representing all causal paths so that removing incoming edges to an intervened node has the intended effect.Source: B Proofs · pp. 14–15

Abduction

  • The abduction posterior for each latent Zi is independent of observed variables outside the node’s ancestors if and only if the encoder has no hidden layers.The accompanying proof relates this condition to encoding only the observed node and its parents.Source: B Proofs · pp. 14–15

C VACA implementation details

VACA’s implementation adapts its graph layers and encoder-decoder to heterogeneous variables. Node- and edge-specific functions and per-node neural networks allow the model to represent differing structural equations and variable distributions.

C VACA implementation details

C.1 Heterogeneous endogenous variables

  • Node and edge indexes select unique update and message functions, avoiding parameter sharing and allowing the GNN to model heterogeneous endogenous variables.The disjoint layer assigns separate parameters to each node update and each edge message function.Source: §C.1 · p. 15

C.2 Heterogeneous causal nodes

  • For heterogeneous nodes, per-node encoder networks map variable groups to a common feature dimension, while per-node decoder networks produce their likelihood parameters.Decoder outputs can use different distributions and satisfy their respective parameter constraints.Source: §C.2 · p. 16

D Validating & understanding VACA

Experiments validate VACA’s encoder-decoder design and examine how latent dimension affects performance. The results indicate that required decoder depth depends on graph structure, while larger latent spaces can worsen fit.

D Validating & understanding VACA

  • The collider needs no decoder hidden layer, the triangle needs at least one for more accurate interventional estimates, and the chain needs one for accurate observational and interventional estimates.The reported patterns align with the stated propositions for the triangle and chain.Source: D Validating & understanding VACA · p. 16
  • As dim z grows, observational fit overfits and degrades, interventional performance worsens with increased variance, and counterfactual degradation is less pronounced.The analysis covers collider, triangle, and chain graphs with NLIN and NADD structural equations, averaging 10 initializations; Figure 6 presents the three distribution metrics across latent dimensions.Source: D Validating & understanding VACA · pp. 16–17, Figure 6 · p. 17

E Experiments: setting, metrics and further results

E.1 Datasets

The experiments use synthetic and semi-synthetic datasets with specified causal graphs and structural equations. The appendix also details model training, cross-validation, and metrics for evaluating observational, interventional, and counterfactual estimates.

E.1 Datasets

  • The dataset suite includes three-node collider, triangle, and chain SCMs, a five-node M-graph, and semi-synthetic loan and adult datasets.The adult dataset models income-related variables and has 11 endogenous variables; loan reflects a loan-approval setting inspired by German Credit.Source: §E.1 · pp. 18, 19, 21, 22

E.2 Training and cross-validation

  • Models are cross-validated with equal numbers of hyperparameter combinations, 10 initializations, and observational MMD for selecting the best configuration.Synthetic datasets use 5,000 training, 2,500 test, and 2,500 validation samples; VACA also uses parents dropout and varies decoder depth and residual connections.Source: §E.2 · p. 25, Table 8 · p. 25, Table 9 · p. 25

E.3 Performance metrics

  • Evaluation compares observational distributions with MMD, interventional estimates with MeanE and StdE, and counterfactual estimates with MSE and SSE.Interventions change one non-leaf variable at a time, using values scaled by its observational standard deviation, and metrics focus on affected descendants.Source: §E.3 · p. 27

E.4 Additional results

Additional experiments report VACA’s interventional and counterfactual estimates alongside training-time and parameter comparisons. The reported interventional results favor VACA on distribution matching, while counterfactual error and consistency differ across methods.

E.4 Additional results

  • VACA consistently outperforms the baselines on interventional MMD, while the methods have comparable MeanE and CAREFL and MultiCVAE often have worse StdE.Table 12 reports the additional results for triangle, M-graph, and chain graphs, consistent with the main-manuscript results.Source: §E.4 · pp. 27, 29, Table 12 · p. 28
  • CAREFL has more accurate counterfactual MSE than VACA and MultiCVAE, but higher variance; VACA regularly has lower SSE.The authors suggest CAREFL’s exact inference, versus approximate inference in the other methods, may explain its MSE advantage.Source: Table 12 · p. 28, §E.4 · p. 29

E.5 Complexity analysis

  • MultiCVAE takes longer to converge on average than CAREFL and VACA, while CAREFL and VACA have similar average training times.Most experiments take less than 60 minutes; some loan-graph experiments take longer, and cluster congestion may contribute to timing variance.Source: Figure 17 · p. 28, §E.5 · p. 29
  • MultiCVAE configurations have fewer parameters, but its longer training time makes the time-complexity comparison unfair; CAREFL and VACA parameter counts overlap.The time results depend partly on computer-cluster congestion, and all experiments used the same cluster with 2 CPUs and 8GB memory.Source: §E.5 · p. 29, Figure 18 · p. 29, §E.6 · p. 29

F Further details on the counterfactual fairness use-case

F.1 German Credit Dataset

The appendix describes the German Credit data and causal feature grouping, VACA and classifier training, and the metrics used to evaluate classifier performance and counterfactual unfairness.

F.1 German Credit Dataset

  • The German Credit subset uses sex as sensitive feature S and groups features into C, R, and H; credit risk is the binary target, with 700 good and 300 bad labels.The causal model groups credit amount and repayment history into multidimensional node R because their relationship is unknown or may involve hidden confounders; S is heterogeneous as well.Source: §F.1 · pp. 29–30

F.2 Training

  • VACA training used normalized data (only continuous variables), a heterogeneous architecture with 16-neuron message-passing and decoder layers, and a four-dimensional latent variable; the stated split was 80% training, 10% validation, and 10% training.It used PIWAE with λKLD = 0.05, an IWAE encoder objective with K = 5, a β-ELBO decoder with β = 0.5, parents dropout 0.2, learning rate 0.005, and batch size 100.Source: §F.2 · p. 30
  • Logistic regression and SVM classifiers used scikit-learn defaults with class_weight = balanced to address the dataset’s class imbalance.Source: §F.2 · p. 30, §F.1 · p. 30

F.3 Metrics

  • Table 13 reports counterfactual unfairness, factual prediction accuracy, and f1-score for LR and SVM across 10 VACA seeds, with values multiplied by 100.Accuracy is computed on factual samples and labels.Source: Table 13 · p. 31, §F.3 · p. 31
  • Because the data are imbalanced, classifier performance is measured with f1-score, the weighted average of precision and recall, where higher values are better.Source: §F.3 · p. 31
  • Counterfactual unfairness is measured from classifier predictions on counterfactual instances under the alternative sensitive attribute value.The alternative is a′ = 1 − a for binary S.Source: §F.3 · p. 31
Loading 2110.14690v1…