FairPGT: Partitioned Graph Transformers for Dual-Level Fair Graph Clustering

Siamak Ghodsi, Amjad Seyedi, Sahar Tahmasebi, Eirini Ntoutsi, Sören AuerarXiv 2026 · arXiv

TL;DR

FairPGT is a novel partitioned graph transformer designed for fair unsupervised clustering on large-scale attributed graphs. By enforcing fairness at both the attention and assignment levels through a self-distillation objective and mutual-information regularization, it achieves state-of-the-art clustering performance while significantly reducing demographic bias compared to existing deep clustering methods.

What Problem Does This Paper Address?

Graph clustering is a fundamental task used to segment users or detect communities. However, when graph structure or node features correlate with protected attributes (like gender or age), standard clustering algorithms often produce biased results that mirror these demographics.

Graph transformers, while powerful, can amplify this bias because their attention mechanism naturally gravitates toward "same-group" nodes, making representations more group-dependent. Furthermore, the standard global attention in transformers scales quadratically ($O(n^2)$), making them impractical for large real-world graphs. Existing fair clustering methods typically only address bias at the final assignment level, leaving the underlying encoder biased, or they don't scale well to large networks.

Methods

The authors introduce FairPGT (Fair Partitioned Graph Transformer), which tackles these issues with three main components:

  1. Partitioned Attention with Routing: To solve scalability, FairPGT uses METIS to partition the graph into disjoint blocks. Attention is computed locally within these blocks. To maintain global context, "routing tokens" (one per partition) exchange information across the entire graph, reducing complexity to near-linear.
  2. Dual-Level Fairness:
    • Assignment Level: A mutual-information term ($L_{grp}$) encourages cluster assignments to be independent of protected attributes, promoting statistical parity.
  3. Attention Level: The authors introduce the Normalized Cross-Group Attention Ratio (nCGAR). This metric measures if a node attends to other groups more or less than expected by chance. FairPGT uses a self-distillation loss ($L_{att}$) to guide the encoder toward group-neutral attention.
  4. Graph-Aware Self-Training: The model uses a clustering head trained against a target that combines Deep Embedding Clustering (DEC) with structural modularity gains, ensuring clusters are both demographically fair and structurally cohesive.
The FairPGT pipeline: from structural encodings and METIS partitioning to dual-level fairness objectives.

Datasets

The model was evaluated on seven diverse attributed graphs:

  • Social/User Networks: NBA, LastFM, Facebook, Pokec-n, and Pokec-z.
  • Financial/Credit: German and Credit.
  • Synthetic: Controlled Stochastic Block Models (SBMs) were used to study the "price of fairness" by varying the alignment between communities and protected groups.

Key Insights and Ideas

  • Fairness is Two-Sided: Fixing cluster assignments alone isn't enough. If the encoder remains biased, fair assignments must "work against" the representations, often destroying community structure. Conversely, neutral attention alone doesn't guarantee fair clusters if features are strong proxies for groups.
  • The "Price" of Parity: On synthetic SBMs where communities and groups perfectly align, the authors prove an information-theoretic upper bound on how accurate any fair clustering can be. FairPGT reaches 97% of this theoretical limit.
  • Attention as a Diagnostic: The nCGAR metric serves as a powerful audit tool. The paper shows that without attention-level fairness, an encoder forced to produce fair assignments actually learns "group-heterophilous" attention (preferring the opposite group) to compensate for biased features.
Toy example showing how group-biased attention (a) splits clusters by group, while FairPGT (c) balances both attention and assignments to find cohesive, fair clusters.

Key Results

  • Superior Scaling and Fairness: On the three largest benchmarks (Credit, Pokec-n, Pokec-z), FairPGT achieved the best clustering quality (NMI) and the lowest statistical-parity gap. Its parity gap was roughly 10 times lower than the strong baseline DMoN.
  • Pareto Dominance: Across most datasets, FairPGT sits on the Pareto front of the quality-fairness trade-off, often outperforming both fairness-agnostic and specialized fair clustering baselines.
  • Efficiency: Partitioning reduced peak memory usage by an order of magnitude (e.g., from 11.9 GB to 0.75 GB on LastFM), allowing the transformer to run on graphs with nearly 70k nodes where global attention would fail.
Quality-fairness plane across benchmarks. FairPGT (filled star) consistently reaches the top-left (high NMI, low bias).

Limitations and Future Work

  • Transductive Nature: Currently, the model requires the full graph (partitions and spectral encodings) to be computed upfront. An inductive version for evolving graphs or unseen nodes is a suggested next step.
  • Modularity Trade-off: FairPGT prioritizes label alignment and fairness over raw modularity. In cases where the "ground truth" is purely structural, modularity-based methods like DMoN might still be preferred, though they remain biased.
  • Computational Weight: While more scalable than global transformers, FairPGT is still heavier than simple GNN-based clustering. Future work could look into further distilling these fair transformers into lighter architectures.

Summary updated

Abstract

Clustering on attributed graphs can produce demographically biased clusters, particularly when communities align with protected groups. Graph transformers can amplify this bias through same-group attention, while global attention limits scalability. We propose FairPGT, a partitioned graph transformer for fair graph clustering. FairPGT restricts attention to METIS partitions and connects them through routing tokens, which divides the quadratic cost of attention by the number of partitions. A graph-aware self-training target guides clustering, with a provably bounded deviation from the standard DEC target. Fairness is imposed at two levels: a mutual-information term promotes demographic parity in cluster assignments, while a normalized cross-group attention ratio (nCGAR) guides attention toward group neutrality through self-distillation. We prove that the nCGAR correction moves attention toward neutrality and establish a condition preventing overshooting. Across seven benchmarks, FairPGT achieves the best clustering performance and statistical parity on the three largest graphs (Credit, Pokec-n, Pokec-z), with a statistical-parity gap approximately ten times lower than DMoN, and is Pareto-dominated on only one dataset. On controlled stochastic block models, FairPGT attains 97% of the derived upper bound on NMI for exactly fair clustering when communities and protected groups coincide. These graphs further show that, under strong alignment, assignment-level fairness alone makes the attention group-heterophilous, whereas attention-level fairness alone improves neutrality without ensuring fair clusters. Code for reproducibility is available at https://github.com/SiamakGhodsi/FairPGT.
BibTeX
@misc{ghodsi2026fairpgt,
  author = {Siamak Ghodsi and Amjad Seyedi and Sahar Tahmasebi and Eirini Ntoutsi and Sören Auer},
  title = {{FairPGT: Partitioned Graph Transformers for Dual-Level Fair Graph Clustering}},
  year = {2026},
  eprint = {2611.23631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23631},
}

Loading related content...

Figure