Source-linked AI summary

Towards Fair Graph Neural Networks via Graph Counterfactual

Zhimeng Guo, Jialiang Li, Teng Xiao, Yao Ma, Suhang Wang

arXiv:2307.04937v2cs.LG

TL;DR

GNNs can inherit and amplify training-data bias, while statistical fairness notions may miss anomalies and existing counterfactual methods can produce unrealistic examples. CAF uses causal analysis to select guided counterfactuals from training data and learn fair node representations; experiments on synthetic and real-world datasets show its effectiveness.

  • Problem

    GNNs can inherit and amplify training-data bias, while statistical fairness notions may fail to detect discrimination in the presence of statistical anomalies.

    Source: §1 · p. 1, §2 · p. 2
  • Method

    CAF uses causal analysis to select counterfactuals from training data with labels and sensitive attributes as guidance, then learns fair node representations.

    Source: §1 · p. 2
  • Results

    Extensive experiments on synthetic and real-world datasets show the effectiveness of CAF.

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

    CAF's causal analysis guides counterfactual selection and representation learning for graph counterfactual fairness in node classification.

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

    The study focuses on binary classification, binary sensitive attributes, and static graphs, leaving extensions to multiclass and more complex graph settings for future work.

    Source: §6 · p. 9

Abstract

from arXiv · show

Graph neural networks have shown great ability in representation (GNNs) learning on graphs, facilitating various tasks. Despite their great performance in modeling graphs, recent works show that GNNs tend to inherit and amplify the bias from training data, causing concerns of the adoption of GNNs in high-stake scenarios. Hence, many efforts have been taken for fairness-aware GNNs. However, most existing fair GNNs learn fair node representations by adopting statistical fairness notions, which may fail to alleviate bias in the presence of statistical anomalies. Motivated by causal theory, there are several attempts utilizing graph counterfactual fairness to mitigate root causes of unfairness. However, these methods suffer from non-realistic counterfactuals obtained by perturbation or generation. In this paper, we take a causal view on fair graph learning problem. Guided by the casual analysis, we propose a novel framework CAF, which can select counterfactuals from training data to avoid non-realistic counterfactuals and adopt selected counterfactuals to learn fair node representations for node classification task. Extensive experiments on synthetic and real-world datasets show the effectiveness of CAF. Our code is available at https://github.com/TimeLovercc/CAF-GNN.

1 INTRODUCTION

GNNs can inherit and amplify training-data bias, raising concerns about their use in high-stakes decisions. CAF uses causal analysis to select counterfactuals from training data and learn fair node representations.

1 INTRODUCTION

  • GNNs can inherit training-data bias, and message passing may magnify it, producing predictions correlated with sensitive attributes.The paper gives same-race connections in social networks as an example of how aggregation can reinforce representation–race correlation.Source: §1 · p. 1
  • Statistical fairness notions may miss discrimination amid statistical anomalies, motivating graph counterfactual fairness approaches.Existing approaches perturb sensitive attributes or generate counterfactuals, then use representation similarity or discrepancy objectives.Source: §1 · p. 1
  • Perturbation and generation can yield unrealistic counterfactuals that may disrupt latent semantic structure and potentially undermine model performance.Attribute flipping omits causal effects on other features or graph structure; generation lacks supervision from real counterfactuals and may be over-complicated.Source: §1 · p. 2
  • CAF uses causal analysis to select training-data counterfactuals with labels and sensitive attributes as guidance, then learns representations invariant to sensitive information and informative for labels.The framework is designed for fair node representations while retaining node-classification performance.Source: §1 · p. 2

2 RELATED WORKS

Prior work addresses bias in GNNs through statistical and counterfactual fairness approaches. CAF distinguishes itself by selecting guided counterfactuals rather than generating them and by using a causal view to design representation constraints.

2 RELATED WORKS

  • GNNs include spatial-based models that use graph structure and neighbors, and spectral-based models that operate on the graph Laplacian and its eigenvectors.The paper notes that GNN use in critical decision-making systems raises fairness and interpretability requirements, while bias can originate in data or model design.Source: §2 · p. 2
  • FairGNN [5] uses adversarial training and EDITS [7] preprocesses graph data, while correlation-based fairness metrics can fail amid statistical anomalies such as Simpson’s paradox.Counterfactual fairness instead models causal relationships [27].Source: §2 · p. 2
  • NIFTY [1] perturbs sensitive attributes, whereas GEAR [25] uses GraphVAE [17] to generate counterfactual graph structure and features.The paper says these counterfactual approaches can produce unrealistic examples that may undermine performance.Source: §2 · p. 2
  • CAF avoids counterfactual generation by selecting candidates guided by sensitive attributes and labels, and uses a causal view to design fair-representation constraints.The paper presents this as a distinction from approaches that might generate unrealistic counterfactuals.Source: §2 · p. 2

3 PRELIMINARIES

The preliminaries set up the attributed-graph node-classification problem and a causal model linking sensitive attributes, labels, latent features, and observed ego-graphs. The analysis motivates disentangled representations whose content component supports prediction while avoiding sensitive influence.

3 PRELIMINARIES

  • The paper frames its preliminaries with a Structural Causal Model to motivate disentangled fair representation learning.The section begins with notation and the problem definition before presenting the SCM and its implications.Source: §3 · p. 3

3.1 Notations and Problem Definition

  • The node-classification setup uses an attributed graph with binary sensitive attributes and binary target labels, and predicts labels for unlabeled nodes from graph structure and features.Only part of the nodes are labeled for semi-supervised training; the goal combines classification and fairness performance.Source: §3.1 · p. 3

3.2 The Desiderata for Fair Graph Learning

  • The SCM relates sensitive attribute S, label Y, environment feature E, content feature C, and observed ego-graph G; E and C determine G, while C determines Y.The figure distinguishes latent variables in white from observed variables in gray.Source: §3.2 · p. 3, Figure 1 · p. 3

3.2.1 Source of Bias.

  • Conditioning on the observed graph can make Y and S dependent, so a GNN predicting Y from G may produce predictions correlated with S.The paper also describes learned graph representations as potentially mixing environment and content information.Source: §3.2.1 · pp. 3–4

3.2.2 Disentangled Fair Representation Learning.

  • The proposed fair representation separates environment E from content C, using C to predict Y; the target properties are invariance, joint sufficiency to reconstruct G, and content informativeness for Y.The paper states that ground-truth E and C are unavailable, so the SCM-derived properties guide learning their representations.Source: §3.2.2 · p. 4

4 METHODOLOGY

CAF learns fair node representations by disentangling label-relevant content from sensitive-attribute-related environment information and using selected counterfactuals to guide that disentanglement. It combines this approach with graph reconstruction and a staged training procedure.

4 METHODOLOGY

  • CAF encodes each node’s ego-graph into content and environment representations, using content for fair label prediction and environment for sensitive-attribute-related information.A single GNN learns both representations; the classifier takes content as input.Source: §4 · p. 4, §4.1 · p. 4

4.1 Disentangled Representation Learning

  • The content representation is trained to predict labels, the two representations are constrained to be orthogonal, and their joint representation reconstructs the observed graph.Graph reconstruction uses predicted link probabilities from pairs of node representations.Source: §4.1 · pp. 4–5

4.2 Counterfactual Augmented Learning

  • CAF selects observed nodes as counterfactuals, matching label while changing sensitive attribute or matching sensitive attribute while changing label.It searches in representation space to reduce the burden of graph-distance computation and uses pre-trained predictions as pseudo-labels for unlabeled nodes.Source: §4.2 · p. 5

4.3 Final Objective Function of CAF

  • The final CAF objective combines prediction, invariance, and sufficiency constraints, with hyperparameters controlling the invariance and sufficiency terms.The objective combines the disentangled-representation and counterfactual-selection modules.Source: §4.3 · p. 6

4.4 Training Algorithm

  • Training first pre-trains a plain node-representation model, then initializes CAF and iteratively optimizes its parameters using periodically updated counterfactuals.The implementation updates selected counterfactuals once every 10 epochs.Source: §4.4 · p. 6

5 EXPERIMENTS

The experiments evaluate CAF against state-of-the-art fair GNNs on synthetic and real-world datasets. They ask about classification effectiveness, counterfactual quality, and the roles of the model’s modules and regularizers.

5 EXPERIMENTS

  • The experiments assess CAF’s effectiveness for fair node classification on synthetic and real-world datasets.This is RQ1, alongside questions about counterfactual quality and module effects.Source: §5 · p. 6
  • The evaluation also asks whether CAF finds appropriate counterfactuals and how its modules and regularization terms affect performance.Source: §5 · p. 6

5.1 Experiment Settings

The evaluation uses three real-world node-classification datasets and a synthetic dataset with ground-truth counterfactuals. It compares CAF with plain, fair, and counterfactual-fair GNN baselines using classification and fairness measures.

5.1.1 Real-World Datasets.

  • German Credit, Credit Defaulter, and Bail are real-world node-classification datasets with gender, age, and race as their respective sensitive attributes.Their tasks concern credit risk, default payment, and bail status, respectively.Source: §5.1.1 · p. 6

5.1.2 Synthetic Dataset.

  • The synthetic dataset uses a structural causal model to generate 2,000-node graphs with binary sensitive attributes and labels, and provides ground-truth counterfactuals.Its design allows controlled bias levels and evaluation of counterfactual quality.Source: §5.1.2 · pp. 6–7

5.1.3 Baselines.

  • Baselines span plain node-classification methods, fair node-classification methods, and graph counterfactual fairness methods.The comparison includes GCN, GraphSAGE, GIN, FairGNN, EDITS, NIFTY, and GEAR.Source: §5.1.3 · p. 7

5.1.4 Evaluation Metrics.

  • Classification is measured with AUC and F1, group fairness with statistical parity and equal opportunity, and counterfactual fairness with δ_CF on the synthetic dataset.Lower statistical-parity and equal-opportunity differences indicate fairer models.Source: §5.1.4 · pp. 7–8

5.1.5 Setup.

  • Real-world data follow the train/validation/test split in [1], while the synthetic data use a 50/25/25 split; configurations are run with 10 random seeds.The authors grid-search hyperparameter configurations.Source: §5.1.5 · p. 8

5.2 Performance Comparison

The comparison covers real-world and synthetic experiments: CAF leads the real-world prediction–fairness trade-off and performs best across the reported synthetic metric families.

5.2.1 Performance on Real-World Datasets.

  • Across three real-world datasets, CAF beats all baselines on group-fairness metrics and ranks 1.75 versus 3.83 for the runner-up on the prediction-fairness trade-off.The average rank combines two prediction metrics and two group-fairness metrics.Source: §5.2.1 · p. 8
  • Plain classifiers tend toward stronger prediction but weaker group fairness, while fair methods trade some prediction performance for fairness; counterfactual methods outperform other baselines.The paper attributes the stronger group-fairness performance of correlation-based counterfactual notions to capturing causal relationships.Source: §5.2.1 · p. 8

5.2.2 Performance on Synthetic Dataset.

  • On synthetic data, CAF beats all models on prediction, group-fairness, and counterfactual-fairness metrics.Figure 3 reports node-classification and group-fairness performance on synthetic datasets.Source: Figure 3 · p. 8, §5.2.2 · p. 8

5.3 Flexibility of CAF for Various Backbones

CAF improves fairness with no or marginal classification-performance decrease when applied to GCN and GIN backbones.

5.3 Flexibility of CAF for Various Backbones

  • Compared with the backbones, CAF significantly improves fairness with no or marginal decrease in classification performance.The comparison covers Bail and Credit datasets.Source: §5.3 · p. 8
  • On Bail with GIN, AUROC drops by 0.54%, while ΔSP drops by 1.37% and ΔEO drops by 0.86%.The passage describes the fairness-metric drops as improvements.Source: §5.3 · p. 8
  • CAF is also applied to GCN and GIN, extending the evaluation beyond the GraphSAGE backbone.Source: §5.3 · p. 8

5.4 Quality of Counterfactuals

On a synthetic dataset with ground-truth counterfactuals, CAF produces representations closer to those ground-truth counterfactuals than the compared graph counterfactual fairness methods.

5.4 Quality of Counterfactuals

  • CAF produces smaller discrepancy to ground-truth counterfactual representations than NIFTY and GEAR on the synthetic dataset.The discrepancy measures feature and structure in the ego graph, averaged across nodes.Source: Figure 5 · p. 9, §5.4 · p. 9
  • The comparison uses NIFTY's sensitive-attribute flips and GEAR's GraphVAE generation based on self- and neighbor-perturbation.Source: §5.4 · p. 9
  • The results indicate that existing methods still have room to improve in obtaining appropriate counterfactuals.Source: §5.4 · p. 9

5.5 Ablation Study

The ablations report benefits from pseudo-labels and from combining the sufficiency and invariance constraints.

5.5 Ablation Study

  • CAF-NS, which selects counterfactuals only from the training set, performs worse than CAF but better than CAF-NP.CAF uses pre-trained-model pseudo-labels to select counterfactuals from the entire dataset; pseudo-labels may be noisy but can improve performance.Source: §5.5 · p. 9
  • CAF-NA and CAF-NB each outperform SAGE but fall short of CAF, indicating that sufficiency and invariance constraints contribute collectively to its performance.Source: §5.5 · p. 9
  • Figure 6 presents a hyper-parameter study on the German dataset.Source: Figure 6 · p. 9

5.6 Hyper-Parameter Sensitivity Analysis

The sensitivity analysis varies CAF’s invariance and sufficiency regularization weights on the German dataset. Increasing either weight trades prediction performance for better fairness performance.

5.6 Hyper-Parameter Sensitivity Analysis

  • Increasing α and β worsens prediction performance while improving fairness performance on the German dataset.The analysis varies α from 0 to 18 with β fixed at 5, then varies β from 0 to 18 with α fixed at 1.Source: §5.6 · p. 9
  • α controls the contribution of invariance regularization, while β controls the contribution of sufficiency regularization.Source: §5.6 · p. 9
  • The authors argue that without these regularizations, the model may rely on sensitive information.They connect reduced regularization to disentangled content representations, alongside worse prediction and better fairness performance.Source: §5.6 · p. 9

6 CONCLUSION AND FUTURE WORK

The conclusion presents CAF as a causal framework for learning fair node representations, using selected counterfactuals and content-representation properties. Experiments report state-of-the-art prediction-fairness trade-off performance, while the work is currently scoped to binary classification, binary sensitive attributes, and static graphs.

6 CONCLUSION AND FUTURE WORK

  • CAF formalizes biased graph generation with an SCM and learns content representations guided by invariance, sufficiency, and informativeness properties.A counterfactual selection module provides supervision for invariance regularization.Source: §6 · p. 9
  • CAF achieves state-of-the-art performance on synthetic and real-world datasets with respect to the prediction-fairness trade-off.Source: §6 · p. 9
  • The work focuses on binary classification, binary sensitive attributes, and static graphs; extensions to multiclass and more complex settings remain future work.Proposed directions include dynamic graphs and multi-value sensitive attributes and labels.Source: §6 · p. 9
Loading 2307.04937v2…