Causally Fair Node Classification on Non-IID Graph Data

Yucong Dai, Lu Zhang, Yaowei Hu, Susan Gauch, Yongkai Wu

TL;DR

Traditional causal fairness methods assume data instances are independent, but this assumption breaks down in graph data where nodes inherently influence one another. This paper introduces the Message Passing Variational Autoencoder (MPVA), a framework that leverages local graph structure to restore causal invariance and accurately estimate interventional distributions. By doing so, it achieves highly effective, causally fair node classification on non-IID graph data without sacrificing scalability.

What Problem Does This Paper Address?

Most fair machine learning algorithms operate under the assumption that data is Independent and Identically Distributed (IID). However, real-world data—such as social networks, financial transactions, or citation webs—is inherently non-IID. In these graph settings, a node's outcome is influenced not only by its own features but also by the attributes of its neighbors, a phenomenon known as network interference.

Because different nodes sit within entirely different neighborhood structures, they effectively follow different local causal mechanisms. This heterogeneity violates the fundamental invariance assumptions that underlie classical Structural Causal Models (SCMs) and Judea Pearl’s do-calculus. As a result, directly applying conventional causal fairness metrics to graph data yields highly biased and incorrect results. The authors set out to fix this by establishing a rigorous theoretical foundation for causal inference on interconnected network data.

Methods

The authors build their solution on the Network Structural Causal Model (NSCM) framework. To handle the fact that different neighborhoods alter local causal mechanisms, they use the Weisfeiler-Lehman (WL) graph isomorphism test to assign structural "colors" to nodes, effectively compressing a node's local computation tree into a distinct identifier.

They introduce two critical theoretical conditions to make graph-based causal inference identifiable:

  1. Decomposability: The structural equations can be split into a message-passing mechanism (which aggregates neighborhood data) and an internal mechanism (which governs the node-level causal effect).
  2. Graph Independence: The exogenous noise (unobserved randomness) affecting a node's features is independent of its structural graph color.

Under these conditions, the authors prove that a complex, interconnected network can be reduced to an equivalent standard causal diagram with a shared mechanism across all nodes (see Figure 1).

Networked causal diagrams and their equivalent reduced forms.

To implement this practically, they propose the Message Passing Variational Autoencoder for Causal Inference (MPVA). MPVA uses Message Passing Neural Networks (MPNNs) to learn a compact representation of neighborhood influences, and pairs them with Conditional Variational Autoencoders (cVAEs) to approximate the underlying interventional distributions. This enables an Abduction-Action-Prediction pipeline that generates counterfactual outcomes, which are then minimized using a causal fairness regularization term during node classification training.

Datasets

The framework was evaluated on both synthetic and real-world graph datasets:

  • Semi-synthetic (D1 and D2): Created by taking the real-world Credit Dataset and injecting synthetic network structures and causal dependencies via the NSCM framework. This allowed the authors to calculate the true, mathematical ground-truth interventional distributions for evaluation.
  • Credit Defaulter (Real-world): 30,000 credit card users where edges connect individuals with similar payment histories. The task is to predict payment defaults while ensuring fairness relative to the sensitive attribute "Sex."
  • German Credit (Real-world): 1,000 bank clients connected by credit account similarity. The task is to classify clients as good or bad credit risks fairly relative to "Gender."

Key Insights and Ideas

  • Structure Restores Invariance: The core "aha moment" is that while node-level causal mechanisms vary across a graph, explicitly encoding the local network topology (via WL graph coloring) allows researchers to recover a shared, invariant functional form across the entire network.
  • Reweighting over Re-learning: The authors demonstrate that observational and interventional distributions share the exact same inner functional component. This means that simulating an intervention on a graph doesn't require training an entirely new model; it simply requires a Monte Carlo reweighting or resampling based on the structural context variable $C$.
  • The Failure of IID Proxies: The experiments confirm that standard statistical parity or IID causal fairness metrics are poor proxies for graph-based causal fairness. Ignoring how a neighbor's sensitive attributes propagate through edges leads to a severe underestimation of bias.

Key Results

  • High-Fidelity Causal Estimation: On semi-synthetic data, MPVA's estimated graph causal fairness (gCF) closely matched the true ground-truth gCF, whereas conventional IID models severely miscalculated the causal impact.
  • Substantial Bias Reduction: On the real-world German credit dataset, a standard Graph Convolutional Network (GCN) exhibited a massive graph bias (gCF) of 0.6080. MPVA successfully mitigated this bias down to 0.0030 while maintaining strong classification accuracy (0.9283).
  • Impressive Efficiency and Scalability: MPVA achieved the lowest memory footprint (1365 MB) and the second-fastest runtime (29.2 seconds) among all baselines on the Credit dataset. In comparison, GEAR—a state-of-the-art counterfactual generator—failed to finish because it exceeded the 3,600-second time limit.

Limitations and Future Work

  • Assumes Known Causal Structure: The current framework assumes that the causal graph structure among features is known a priori. In many practical settings, this graph is unknown and must be learned from data, suggesting a clear path forward to integrate MPVA with graph causal discovery algorithms.
  • Single Sensitive Attribute Constraint: The model is currently designed around a single sensitive attribute (e.g., race or gender). Real-world applications often require addressing intersectional fairness, where multiple intersecting demographic attributes must be protected simultaneously.
  • Graph Topology Dependency: MPVA is explicitly tailored for explicit graph structures where dependencies are modeled via edges. Extending these principles of decomposability and independence to other non-IID domains, such as temporal sequences or tabular data with latent dependencies, remains an open challenge.

Summary updated

BibTeX
@article{dai2026causally,
  author = {Yucong Dai and Lu Zhang and Yaowei Hu and Susan Gauch and Yongkai Wu},
  title = {{Causally Fair Node Classification on Non-IID Graph Data}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure