Deconfounded Training for Graph Neural Networks

Yongduo Sui, Xiang Wang, Jiancan Wu, Xiangnan He, Tat-Seng Chua · DOI

Abstract

In graph classification, attention and pooling-based graph neural networks (GNNs) prevail to extract critical features from input graphs. However, the standard "learning to attend" paradigm often leads GNNs to recklessly absorb statistical correlations, failing to distinguish between causal and noncausal (shortcut) features. These shortcut features act as confounders, leading to spurious correlations that degrade performance on out-of-distribution (OOD) data. We propose the Causal Attention Learning (CAL) strategy to discover causal patterns and mitigate the confounding effect of shortcuts through parameterized backdoor adjustment. Extensive experiments on synthetic and real-world datasets demonstrate that CAL enhances both the interpretability and generalization of GNN classifiers.

Introduction

Standard Graph Neural Networks (GNNs) often fail in real-world scenarios because they latch onto "shortcut" features—statistical correlations that exist in training data but vanish in the wild. For example, in molecular property prediction, a GNN might incorrectly associate a common carbon ring with toxicity if most toxic molecules in the training set contain one, even if the actual cause is a specific functional group. This paper identifies that these shortcuts create a "backdoor path" in the causal graph, leading to spurious correlations that hurt both generalization and interpretability.

Methodology: Causal Attention Learning (CAL)

The CAL framework treats shortcut features as a confounder ($S$) and predictive features as the causal part ($C$). The goal is to break the spurious link between $S$ and the prediction $Y$.

Soft Masking and Disentanglement

CAL employs attention modules to split an input graph into two distinct branches: a causal attended-graph and a trivial (shortcut) attended-graph. This disentanglement is guided by two primary objectives:

  • Supervised Loss ($L_{sup}$): Ensures the causal branch accurately predicts the ground-truth label.
  • Uniform Loss ($L_{unif}$): Forces the trivial branch to be uninformative by encouraging it to predict a uniform distribution across all classes.

Causal Intervention via Backdoor Adjustment

To truly decouple the shortcut from the prediction, CAL implements "backdoor adjustment" at the representation level. The model takes the representation of a causal part and combines it with various trivial parts sampled from other graphs in the dataset—a process termed Random Addition.

The CAL framework architecture, illustrating the disentanglement of causal and trivial features followed by backdoor adjustment via Random Addition.

The Causal Intervention Loss ($L_{caus}$) then forces the model to produce stable, invariant predictions for a causal feature, regardless of which "shortcut" background it is paired with.

Experimental Evaluation

The researchers evaluated CAL on a mix of controlled and real-world benchmarks, including synthetic graphs (SYN-b) with varying bias levels, the TUDataset (biological and social networks), and MNIST/CIFAR-10 superpixel graphs.

Robustness to Distribution Shifts

A key finding is the "ID-OOD Paradox": GNNs with the best In-Distribution (ID) performance (like GIN) often exhibit the worst robustness against distribution shifts. CAL addresses this by focusing on causal structures. On the highly biased SYN-0.1 dataset, CAL improved GCN's accuracy from 84.94% to 89.38% and GAT's from 84.62% to 92.44%.

Performance discount across different bias levels, comparing CAL against standard GNNs and OOD baselines. Higher values indicate better maintenance of performance under bias.

Real-World Performance and Interpretability

On MNIST superpixel graphs, GCN+CAL achieved a 4.52% relative improvement over standard GCN. Visualizations of attention masks confirmed that CAL precisely highlights deterministic causal structures (e.g., the actual digit) while standard GNNs often highlight irrelevant background noise. Furthermore, CAL consistently outperformed or matched "upper-bound" methods like Invariant Risk Minimization (IRM) and Distributionally Robust Optimization (DRO), even though CAL does not require the expensive environment labels those methods usually need.

Conclusion

Causal Attention Learning provides a principled way to mitigate the impact of confounding shortcuts in graph classification. By leveraging backdoor adjustment at the representation level, CAL encourages GNNs to learn stable, causal relationships. While the success of CAL depends on the effectiveness of the initial disentanglement, it represents a significant step toward more interpretable and robust graph representation learning.

Summary updated

BibTeX
@inproceedings{sui2022deconfounded,
  author = {Yongduo Sui and Xiang Wang and Jiancan Wu and Xiangnan He and Tat-Seng Chua},
  title = {{Deconfounded Training for Graph Neural Networks}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  doi = {10.1145/3534678.3539366},
}
Figure