Fair Text-Attributed Graph Representation Learning

Ruilin Luo, Tianle Gu, Lin Wang, Yunfeng Zhou, Songtao Jiang, Lei Wang, Yujiu YangEMNLP 2025

Abstract

Text-Attributed Graphs (TAGs), which integrate text and graph structures, have recently gained traction, especially in web applications. However, as a graph structure, TAG representation learning (TAGRL) naturally inherits issues from Graph Neural Networks (GNNs), such as fairness. Moreover, previous TAGRL research has mainly focused on using LM-as-encoder to boost downstream task performance, with little consideration given to whether this process may raise additional concerns related to fairness and other safety-related issues. As the first work to explore fairness in TAGRL, this paper proposes the concept of evolving LM-as-encoder to LM-as-fair-encoder, developing a two-stage fairness-aware alignment process called FairTAG based on the observed issues. Specifically, we first mitigate the tendency of LMs to overfit to homophily during downstream tasks fine-tuning, followed by subgraph-level connection behavior preference optimization for selected anchor nodes. We provide theoretical support and demonstrate the feasibility of LM-as-fair-encoder through extensive experiments and ablation studies. We also show that FairTAG can be seamlessly integrated with fairness-enhancing strategies on the GNNs decoder side, thus innovatively constructing a plug-and-play learning framework.

1. Introduction

Text-Attributed Graphs (TAGs) serve as the foundation for modern digital ecosystems, from social networks to citation databases. The current state-of-the-art in TAG representation learning (TAGRL) relies on the "LM-as-encoder" paradigm, where a Language Model (LM) is fine-tuned to generate node embeddings that capture both textual semantics and structural context.

However, this powerful paradigm introduces a "troubling trend": LMs often amplify existing demographic biases. Real-world graphs are frequently characterized by homophily—the tendency for similar nodes to connect. Because LMs are highly efficient at learning these dominant patterns, they often overfit to "easy" intra-group connections while failing to model the more complex inter-group structures. This leads to significant fairness violations, particularly in social network applications where demographic parity is a critical safety requirement.

2. Methodology: The FairTAG Framework

To address these challenges, we propose FairTAG, a two-stage alignment framework designed to evolve standard LMs into "fair encoders."

The FairTAG framework: Stage 1 involves global debiasing via edge dropping, and Stage 2 focuses on local preference optimization for anchor nodes.

Stage 1: Global Debiasing with Fairness Score-based Edge Drop (FSED)

Rather than employing random edge masking, FairTAG utilizes an "oracle" model to identify edges based on confidence levels. It distinguishes between "easy" edges (high-confidence, typically intra-group) and "difficult" edges (low-confidence, typically inter-group). By probabilistically dropping the easiest homophilous edges, the framework forces the LM to move beyond the "homophily shortcut" and learn the nuanced patterns required for fair representation.

Stage 2: Local Refinement with Anchor Node Preference Optimization (ANPO)

Recognizing that nodes at the boundaries of demographic clusters are most susceptible to bias, we identify these as "anchor nodes." Inspired by Direct Preference Optimization (DPO), we explicitly optimize the model's preferences for these nodes. The objective is to ensure that valid inter-group connections are valued equally to intra-group ones, effectively performing surgical bias correction at the most critical points in the graph.

3. Experimental Evaluation

We evaluated FairTAG across five benchmark datasets, including citation networks (Cora, CiteSeer, PubMed) and social networks (Pokec-n, Pokec-z). Our experiments focused on two primary metrics: link prediction accuracy (AUC) and fairness (Demographic Parity, or DP).

Performance comparison across Cora, CiteSeer, and Pokec-n datasets, showing AUC (accuracy) and DP (fairness) for various models.

Key Results

  • Superior Fairness: FairTAG achieved a comprehensive lead in fairness metrics. Notably, on the Pokec-n dataset, it outperformed the nearest competitor in Mixed-dyadic Demographic Parity ($\Delta DP_m$) by 18.4%.
  • Accuracy Preservation: A common pitfall in fairness research is the "accuracy-fairness trade-off." FairTAG successfully avoids this, maintaining or even slightly improving AUC across most datasets while significantly boosting fairness scores.
  • Plug-and-Play Versatility: Because FairTAG addresses bias at the embedding level, it is GNN-agnostic and can be seamlessly combined with existing fairness-enhancing GNN decoders to create a cascaded, fair training pipeline.

4. Discussion and Insights

The core insight of this work is that fairness degradation in TAGs is often a byproduct of the LM's efficiency. By finding the path of least resistance—intra-group links—the model ignores the vital inter-group structure. Furthermore, our theoretical analysis suggests that initial biases in LM embeddings are amplified as they propagate through subsequent GNN layers. By intervening at the encoder level, FairTAG provides a more efficient and fundamental solution than methods that only modify the GNN decoder.

5. Conclusion

FairTAG represents the first concerted effort to tackle fairness within the LM-as-encoder paradigm for Text-Attributed Graphs. By combining global structural debiasing with local preference optimization, we demonstrate that it is possible to achieve state-of-the-art accuracy while significantly reducing demographic bias. Future work will expand this framework to explore fairness risks in emerging graph foundation models and more diverse text-rich domains such as medical and legal knowledge graphs.

Summary updated

BibTeX
@inproceedings{luo2025fair,
  author = {Ruilin Luo and Tianle Gu and Lin Wang and Yunfeng Zhou and Songtao Jiang and Lei Wang and Yujiu Yang},
  title = {{Fair Text-Attributed Graph Representation Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=2dSszhILxk},
}
Figure