mlsanityData to 14 Oct 2026

Improving Fairness in LLMs Through Testing-Time Adversaries

arXiv 2505.12100 ↗First posted 17 May 2025cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) push the bound-aries in natural language processing and generative AI, driving progress across various aspects of modern society. Unfortunately, the pervasive issue of bias in LLMs responses (i.e., predictions) poses a significant and open challenge, hindering their application in tasks involving ethical sensitivity and responsible decision-making. In this work, we propose a straightforward, user-friendly and practical method to mitigate such biases, enhancing the reliability and trustworthiness of LLMs. Our method creates multiple variations of a given sentence by modifying specific attributes and evaluates the corresponding prediction behavior compared to the original, unaltered, prediction/sentence. The idea behind this process is that critical ethical predictions often exhibit notable inconsistencies, indicating the presence of bias. Unlike previous approaches, our method relies solely on forward passes (i.e., testing-time adversaries), eliminating the need for training, fine-tuning, or prior knowledge of the training data distribution. Through extensive experiments on the popular Llama family, we demonstrate the effectiveness of our method in improving various fairness metrics, focusing on the reduction of disparities in how the model treats individuals from different racial groups. Specifically, using standard metrics, we improve the fairness in Llama3 in up to 27 percentage points. Overall, our approach significantly enhances fairness, equity, and reliability in LLM-generated results without parameter tuning or training data modifications, confirming its effectiveness in practical scenarios. We believe our work establishes an important step toward enabling the use of LLMs in tasks that require ethical considerations and responsible decision-making.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 20 of its 26 references that are in the map. First posted on arXiv 17 May 2025.

Builds on

20 of 26 references.

References · 20

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
  6. 2017Counterfactual Fairnesscited by 804
  7. 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 739
  8. 2023Bias and Fairness in Large Language Models: A Surveycited by 639
  9. 2023Larger language models do in-context learning differentlycited by 394
  10. 2022Last Layer Re-Training is Sufficient for Robustness to Spurious Correlationscited by 381
  11. 2019Towards Fairness in Visual Recognition: Effective Strategies for Bias Mitigationcited by 252
  12. 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
8 more
  1. 2022Capturing Failures of Large Language Models via Human Cognitive Biasescited by 98
  2. 2023SCALE-UP: An Efficient Black-box Input-level Backdoor Detection via Analyzing Scaled Prediction Consistencycited by 97
  3. 2024Large Language Models are Geographically Biasedcited by 93
  4. 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 89
  5. 2023On the Foundations of Shortcut Learningcited by 65
  6. 2024OpenBias: Open-set Bias Detection in Text-to-Image Generative Modelscited by 61
  7. 2024Fairness in Large Language Models: A Taxonomic Surveycited by 58
  8. 2021Measuring Fairness in Generative Modelscited by 31

Built on by

Not cited yet.