Lune

ICLR2024Top-tier venue

Debiasing Attention Mechanism in Transformer without Demographics

Shenyu Lu, Yipei Wang, Xiaoqian Wang

Abstract

Although transformers demonstrate impressive capabilities in a variety of tasks, the fairness issue remains a significant concern when deploying these models. Existing works to address fairness issues in transformers require sensitive labels (such as age, gender, etc.), which can raise privacy concerns or violate legal regulations. An alternative way is through fairness without demographics. However, existing works that improve Rawlsian Max-Min fairness may impose overly restrictive constraints. Other methods that use auxiliary networks could be parameter inefficient. In this paper, we present a new approach to debiasing transformers by leveraging their inherent structure. By reconsidering the roles of important components (queries, keys, and values) in the attention mechanism, we introduce a simple yet effective debiasing strategy from two perspectives: 1) Grounded in theoretical analysis, we normalize and apply absolute value operations to queries and keys to minimize the bias in attention weight allocation; 2) We reduce the bias within values through local alignment via contrastive learning. Throughout the entire process, our approach does not require any sensitive labels. Furthermore, to enhance memory efficiency in the training phase, we propose a strategy that debiases only the last encoder to improve fairness in pre-trained models. We conduct experiments in computer vision and natural language processing tasks and show that our method is comparable and even outperforms the state-of-the-art method with substantially lower energy consumption.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • FairNet: Dynamic Fairness Correction without Performance Loss via Contrastive Conditional LoRA cites Distributionally Robust Neural Networks
  • Emerging Properties in Self-Supervised Vision Transformers cites A Simple Framework for Contrastive Learning of Visual Representations
  • Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • MAVias: Mitigate any Visual Bias cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • MAVias: Mitigate any Visual Bias cites Distributionally Robust Neural Networks
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
  • Locate then Correct: Debiasing Attention Heads in CLIP cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Locate then Correct: Debiasing Attention Heads in CLIP cites Distributionally Robust Neural Networks
  • Supervised Contrastive Learning cites A Simple Framework for Contrastive Learning of Visual Representations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. FairNet: Dynamic Fairness Correction without Performance Loss via Contrastive Conditional LoRASongqi Zhou, Zeyuan Liu, Benben JiangNeurIPS 2025 · 2 citations
  2. MAVias: Mitigate any Visual BiasIoannis Sarridis, Christos Koutlis, Symeon Papadopoulos, Christos DiouICCV 2025 · 1 citation
  3. KLAAD: Refining Attention Mechanisms to Reduce Societal Bias in Generative Language ModelsSeorin Kim, Dongyoung Lee, Jaejin LeeEMNLP 2025
  4. Locate then Correct: Debiasing Attention Heads in CLIPWei Yeo, Rui Mao, Moloud Abdar, Erik Cambria et al.ICML 2026

Builds on27

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
  4. Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
  5. Distributionally Robust Neural NetworksShiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy LiangICLR 2020 · 1,578 citations

Related papers

  1. Debiasing Pretrained Text Encoders by Paying Attention to Paying AttentionYacine Gaci, Boualem Benatallah, Fabio Casati, Khalid BenabdeslemEMNLP 2022 · 12 citations
  2. FairFil: Contrastive Neural Debiasing Method for Pretrained Text EncodersPengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si et al.ICLR 2021 · 50 citations
  3. Learning Fair Representation via Distributional Contrastive DisentanglementChangdae Oh, Heeji Won, Junhyuk So, Taero Kim et al.KDD 2022 · 29 citations
  4. Fairness-Aware Classification over Incomplete DataXiaoye Miao, Lei Qiang, Guilin Huang, Yangyang Wu et al.SIGIR 2025 · 1 citation
  5. Fair-VPT: Fair Visual Prompt Tuning for Image ClassificationSungho Park, Hyeran ByunCVPR 2024 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines