cs.CLMar 19, 2026

UGID: Unified Graph Isomorphism for Debiasing Large Language Models

Authors: Zikang Ding, Junchi Yao, Junhao Li, Yi Zhang, Wenbo Jiang, Hongbo Liu, Lijie Hu

Organizations: University of Electronic Science and Technology of China, Chengdu, China · Mohamed bin Zayed University of Artificial Intelligence, Abu Dhabi, United Arab Emirates · South China University of Technology, Guangzhou, China

Abstract

Large language models (LLMs) exhibit pronounced social biases. Output-level or data-optimization--based debiasing methods cannot fully resolve these biases, and many prior works have shown that biases are embedded in internal representations. We propose Unified Graph Isomorphism for Debiasing large language models (UGID), an internal-representation--level debiasing framework for large language models that models the Transformer as a structured computational graph, where attention mechanisms define the routing edges of the graph and hidden states define the graph nodes. Specifically, debiasing is formulated as enforcing invariance of the graph structure across counterfactual inputs, with differences allowed only on sensitive attributes. UGID jointly constrains attention routing and hidden representations in bias-sensitive regions, effectively preventing bias migration across architectural components. To achieve effective behavioral alignment without degrading general capabilities, we introduce a log-space constraint on sensitive logits and a selective anchor-based objective to preserve definitional semantics. Extensive experiments on large language models demonstrate that UGID effectively reduces bias under both in-distribution and out-of-distribution settings, significantly reduces internal structural discrepancies, and preserves model safety and utility.

Figures & tables

Appendix figures & tables12 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Knowing Bias, Doing Better: Mitigating Social Bias in LLMs via Know-Bias Neuron Enhancement

    Jan 29, 2026Jinhao Pan, Chahat Raj, Anjishnu Mukherjee +4Debiased MLSocial Bias in Language Models

  2. Debias It Yourself: Teaching LLMs Cognitive Bias Mitigation Interventions

    Sep 30, 2026Chahat Raj, Sina Mansouri, Aylin Caliskan +2Cognitive Bias in Language ModelsLanguage Model Debiasing

  3. CatRAG: Functor-Guided Structural Debiasing with Retrieval Augmentation for Fair LLMs

    Mar 23, 2026Ravi Ranjan, Utkarsh Grover, Mayur Akewar +2Language Model DebiasingSocial Bias in Language Models