Source-linked AI summary

Debiasing Graph Neural Networks via Learning Disentangled Causal Substructure

Shaohua Fan, Xiao Wang, Yanhu Mo, Chuan Shi, Jian Tang

arXiv:2209.14107v1cs.LGcs.AI

TL;DR

Severely biased graph datasets can cause GNNs to rely on spurious substructures instead of causal ones, harming generalization. DisC separates causal and bias subgraphs, decorrelates their representations with counterfactual samples, and achieves stronger generalization while supporting interpretable causal-substructure discovery.

  • Problem

    GNNs tend to exploit bias substructures as shortcuts in severely biased graphs, even when causal correlations exist, which degrades generalization.

  • Method

    DisC uses a parameterized edge-mask generator and separate causal- and bias-aware GNN modules, then swaps bias representations to synthesize counterfactual unbiased samples.

  • Results

    DisC outperforms corresponding base models by 4.47% to 169.17% average improvement across three controllably biased graph datasets.

  • Takeaways & Limitations

    The framework learns causal and bias substructures separately while offering interpretability, robustness, transferability, and improved generalization.

  • Takeaways & Limitations

    The causal analysis assumes that the causal variable is the only endogenous parent determining the ground-truth label.

Abstract

from arXiv · show

Most Graph Neural Networks (GNNs) predict the labels of unseen graphs by learning the correlation between the input graphs and labels. However, by presenting a graph classification investigation on the training graphs with severe bias, surprisingly, we discover that GNNs always tend to explore the spurious correlations to make decision, even if the causal correlation always exists. This implies that existing GNNs trained on such biased datasets will suffer from poor generalization capability. By analyzing this problem in a causal view, we find that disentangling and decorrelating the causal and bias latent variables from the biased graphs are both crucial for debiasing. Inspiring by this, we propose a general disentangled GNN framework to learn the causal substructure and bias substructure, respectively. Particularly, we design a parameterized edge mask generator to explicitly split the input graph into causal and bias subgraphs. Then two GNN modules supervised by causal/bias-aware loss functions respectively are trained to encode causal and bias subgraphs into their corresponding representations. With the disentangled representations, we synthesize the counterfactual unbiased training samples to further decorrelate causal and bias variables. Moreover, to better benchmark the severe bias problem, we construct three new graph datasets, which have controllable bias degrees and are easier to visualize and explain. Experimental results well demonstrate that our approach achieves superior generalization performance over existing baselines. Furthermore, owing to the learned edge mask, the proposed model has appealing interpretability and transferability. Code and data are available at: https://github.com/googlebaba/DisC.

1 Introduction

The paper studies why GNNs generalize poorly on severely biased graphs, finding that bias substructures can dominate learning despite causal signals. It proposes DisC, which disentangles causal and bias substructures, decorrelates their representations, and improves generalization on new controllably biased benchmarks.

  • Problem: GNNs can exploit spurious bias substructures as shortcuts, causing substantial generalization degradation as bias correlations become stronger.The study motivates this behavior through experiments and causal analysis of severely biased graph datasets.
  • Challenges: Severe graph bias creates two challenges: identifying causal versus bias substructures and extracting causal structure from globally entangled graph populations.The paper notes that ordinary cross-entropy may not capture aggressive bias and that causal structure is determined across graphs rather than within one graph.
  • Method: DisC uses a shared parameterized edge-mask generator to split each input graph into causal and bias subgraphs, then trains separate GNN modules with causal- and bias-aware losses.The resulting representations are explicitly disentangled according to the two substructures.
  • Method: DisC randomly swaps disentangled bias vectors across graphs to synthesize counterfactual unbiased samples and decorrelate causal and bias variables.The procedure operates in embedding space after causal and bias information have been separated.
  • Implications: The learned edge masks provide interpretability and support transferability while enabling the model to discover causal substructures for prediction.The paper reports investigation studies showing that the model can discover and leverage causal substructure.

2 Related Works

Prior work addresses out-of-distribution generalization, disentangled graph representations, and debiasing, but these lines of research cover different aspects of the problem. Existing disentanglement methods often operate at node level or assume particular bias types.

  • Generalization: OOD graph-learning studies seek better generalization beyond the IID assumption, while other work focuses on OOD node classification.The paper places its problem within efforts to improve GNN generalization in wild environments.
  • Disentangled GNNs: DisenGCN and IPGDN disentangle node neighborhoods or embedding features, whereas FactorGCN considers whole-graph information.These methods differ in the level at which graph information is disentangled.
  • Debiasing: General debiasing methods either specify a bias type, such as texture or color, or assume models exploit bias as prediction shortcuts.The reviewed approaches include adversarially trained models and methods based on shortcut exploitation.

3 Preliminary Study and Analysis

The preliminary study shows that GNNs use both causal and bias information, increasingly relying on bias under severe correlations. A causal model explains this behavior through entangled latent variables and motivates disentangling them and removing their correlation.

  • Motivating Dataset: CMNIST-75sp controls the correlation between digit labels and background colors to measure GNN generalization under bias.Training examples predominantly pair each digit category with a predefined background color, while test sets separate biased and unbiased evaluation.
  • Motivating Experiment: GNNs perform much better on biased than unbiased test sets, indicating that they use background bias alongside causal digit signals.The study evaluates GCN, GIN, and GCNII on CMNIST-75sp.
  • Causal Analysis: The SCM represents unobserved causal and bias variables generating the observed graph, followed by graph embedding and prediction.The variables are causal C, bias B, graph G, embedding E, and label or prediction Y.
  • Causal Analysis: The causal variable C is the endogenous parent determining the ground-truth label Y, while C and B remain spuriously correlated.The paper illustrates these relations using digit and background subgraphs in CMNIST-75sp.
  • Causal Analysis: Because bias substructures are often simpler, GNNs can minimize loss quickly by relying on them when most training graphs are biased.The causal analysis links shortcut use to the simpler structure of background-like subgraphs.
  • Debiasing Requirements: Debiasing therefore requires disentangling C and B from the observed graph and making them uncorrelated before prediction uses the causal variable.These two interventions target separate paths through which bias affects prediction.

4 Methodology

DisC decomposes biased graphs into causal and bias subgraphs, learns disentangled representations with specialized losses, and decorrelates them by generating counterfactual samples.

  • Causal and Bias Substructure Generator: DisC uses a shared parameterized edge-mask generator to split each input graph into causal and bias subgraphs.The masks assign complementary edge probabilities and decompose the adjacency matrix into masked causal and bias graphs.
  • Causal and Bias Substructure Generator: The generator estimates edge importance from concatenated endpoint features and applies a sigmoid to obtain causal-edge probabilities.The causal mask is formed from these probabilities, while the bias mask uses their complements.
  • Learning Disentangled Graph Representations: Separate GNNs encode the causal and bias subgraphs into representations that are trained with corresponding classifiers and losses.The bias branch uses generalized cross entropy, while the causal branch uses a weighted cross-entropy objective.
  • Learning Disentangled Graph Representations: Graphs receiving high bias-classifier cross-entropy are weighted as relatively unbiased examples for training the causal branch.The weighting emphasizes graphs whose labels are difficult for the bias classifier, encouraging causal learning from less bias-aligned samples.
  • Counterfactual Unbiased Sample Generation: DisC randomly permutes bias representations across graphs to construct counterfactual samples with reduced causal–bias correlation.Labels are swapped alongside bias representations so the bias branch retains its spurious correlation during training.
  • Counterfactual Unbiased Sample Generation: Training begins with the disentanglement loss and later adds the generation component after representations become sufficiently well disentangled.The generation term is weighted by the hyperparameter λG.

5 Experiment

Experiments show that DisC improves generalization across biased graph datasets, remains robust to unseen bias, and learns interpretable, transferable causal and bias substructures. Ablations, hyperparameter tests, and visualizations support the roles of edge masking, disentanglement, and counterfactual sample generation.

  • Quantitative Evaluation: DisC improves over corresponding base models by 4.47%–169.17% across datasets and bias degrees, with larger gains under heavier bias.At bias degree 0.8, improvements are 40.02%, 4.47%, and 29.82% on CMNIST-75sp, CFashion-75sp, and CKuzushiji-75sp; at 0.9 and 0.95, they are 169.17%, 14.67%, and 49.35%.
  • Quantitative Evaluation: DisC outperforms existing debiasing methods, including corresponding LDD variants by an average of 23.15%.The reported results attribute this advantage to combining a global-population-aware edge masker with a debiasing disentanglement framework.
  • Ablation Studies: Ablations show that learning an edge mask is important, while counterfactual sample generation further improves performance when causal and bias embeddings are well disentangled.Without well-disentangled embeddings, generated counterfactual samples may become noisy and hinder improvement.
  • Quantitative Evaluation: On unseen-bias testing sets, DisC maintains stable performance while base-model performance drops relative to seen-bias testing.The unseen testing colors are disjoint from the training colors.
  • Hyperparameter Experiments: Performance is stable across tested q and λG values, while nearly replacing GCE with CE at q = 0.1 produces worse DisCGCN performance.The experiments vary q over {0.1, 0.3, 0.5, 0.7, 0.9} and λG over {1, 5, 10, 15}.
  • Qualitative Evaluation: Visualizations show salient causal edges concentrated in digit subgraphs, while learned representations cluster by target labels for zc and bias labels for zb.The edge-mask visualization uses edge width to represent learned causal or bias edge weights.
  • Qualitative Evaluation: Edge masks learned by DisCGCN transfer to vanilla GIN and GCNII, whose weighted pruned datasets achieve better performance than training on original biased graphs.The transfer experiment prunes edges with the least 0%, 20%, 40%, or 60% weights while retaining remaining edge weights.

6 Conclusion

The paper frames severe bias as a generalization problem for GNNs and proposes DisC to disentangle causal and bias substructures. It also reports effectiveness, robustness, interpretability, and transferability on new benchmarks.

  • DisC addresses severe-bias generalization by extracting causal and bias substructures with separate functional GNNs.
  • The framework generates counterfactual unbiased samples by randomly swapping disentangled causal and bias vectors.
  • Three new datasets with controllable bias degrees benchmark the problem, while investigations show DisC discovers and leverages causal substructure.
  • The learned edge mask supports interpretability and transferability beyond the model used to learn it.

Checklist

The checklist reports that the paper provides reproducibility materials, training details, error bars, compute information, asset licensing, and theoretical assumptions. It also documents data and ethics-related disclosures where applicable.

  • Theory and ethics: The paper states assumptions and complete proofs for its theoretical results and reports no personally identifiable information or offensive content.
  • Experiments: The paper provides code, data, and instructions for reproducing the main experiments.
  • Experiments: Training details, including data splits and hyperparameter choices, are reported in the paper and supplement.
  • Experiments: The experiments report error bars and describe the total compute and resource types used.
  • Assets and data: New assets are constructed from existing publicly available assets, with citations, licenses, and release information provided.

A.2 d-separation/connection

The appendix introduces chains, forks, and colliders in structural causal models and defines d-separation through path-blocking rules. It then outlines the algorithm that extracts, encodes, and updates causal and bias subgraphs.

  • Causal background: Chains and forks transmit dependence unless the middle node is conditioned on, whereas colliders block dependence unless conditioned on.
  • d-separation: A path is d-separated when a conditioned chain or fork blocks it, or when an unconditioned collider blocks it.
  • d-separation: The paper identifies unblocked paths from bias variables to predictions as sources of unexpected correlation.
  • Learning procedure: The algorithm extracts causal and bias subgraphs, encodes them into separate representations, and updates the networks with disentangling and training losses.

C.1 Datasets details

This section documents the constructed biased graph-classification datasets and their label-to-color mappings. It also specifies training-set subsampling, validation bias, source datasets, and unseen-bias testing colors.

  • Dataset overview: The paper summarizes the constructed biased graph-classification datasets in Table 3.
  • Dataset construction: The validation set has bias degree 0.5, and the training data are subsampled from 60K to 10K samples for efficiency.
  • Source datasets: Fashion-MNIST and Kuzushiji-MNIST are cited as source datasets with MIT and CC BY-SA 4.0 licenses, respectively.
  • Bias encoding: Table 4 specifies the mapping between graph labels and colors.
  • Evaluation data: Unbiased testing with unseen bias uses a predefined set of RGB colors.

C.2 Experimental setup

Experiments use specified GCN, GIN, and GCNII architectures with Adam optimization, while visualizations assess causal subgraphs on CFashion-75sp and CKuzushiji-75sp.

  • Model configurations: GCN and GIN use four-layer architectures, with hidden dimensions 146 and 110 respectively, while GCNII uses four layers and hidden dimension 146.GIN uses its GIN0 variant; DIR uses the original MNIST-75sp parameters.
  • Optimization: All models are optimized with Adam using a learning rate of 0.01.
  • Visualization results: Figures 10 and 11 visualize subgraphs extracted by the mask generator from CFashion-75sp and CKuzushiji-75sp.The visualizations show reasonable causal subgraphs for both challenging datasets.

E Limitations and societal impacts

The method assumes graphs consist only of causal and bias subgraphs, although real graphs may also contain non-informative subgraphs and may require finer-grained decomposition.

  • Method scope: The method assumes every graph consists of causal and bias subgraphs, excluding non-informative subgraphs from its modeling assumptions.The authors identify finer-grained graph splitting as future work.
  • Future work: The authors plan to consider more fine-grained graph splitting in future work.
Loading 2209.14107v1…