mlsanityData to 7 Oct 2026

Bias Testing and Mitigation in Black Box LLMs using Metamorphic Relations

arXiv 2512.00556 ↗First posted 29 Nov 2025cs.SE cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

The widespread deployment of Large Language Models (LLMs) has intensified concerns about subtle social biases embedded in their outputs. Existing guardrails often fail when faced with indirect or contextually complex bias-inducing prompts. To address these limitations, we propose a unified framework for both systematic bias evaluation and targeted mitigation. Our approach introduces six novel Metamorphic Relations (MRs) that, based on metamorphic testing principles, transform direct bias-inducing inputs into semantically equivalent yet adversarially challenging variants. These transformations enable an automated method for exposing hidden model biases: when an LLM responds inconsistently or unfairly across MR-generated variants, the underlying bias becomes detectable. We further show that the same MRs can be used to generate diverse bias-inducing samples for fine-tuning, directly linking the testing process to mitigation. Using six state-of-the-art LLMs - spanning open-source and proprietary models - and a representative subset of 385 questions from the 8,978-item BiasAsker benchmark covering seven protected groups, our MRs reveal up to 14% more hidden biases compared to existing tools. Moreover, fine-tuning with both original and MR-mutated samples significantly enhances bias resiliency, increasing safe response rates from 54.7% to over 88.9% across models. These results highlight metamorphic relations as a practical mechanism for improving fairness in conversational AI.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 44 of its 66 references that are in the map. First posted on arXiv 29 Nov 2025.

Builds on

44 of 66 references.

References · 44

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  3. 2020Longformer: The Long-Document Transformercited by 3,362
  4. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
  5. 2019A Survey on Bias and Fairness in Machine Learningcited by 1,911
  6. 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,304
  7. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  8. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
  9. 2020StereoSet: Measuring stereotypical bias in pretrained language modelscited by 911
  10. 2016Semantics derived automatically from language corpora contain human-like biasescited by 894
  11. 2020CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Modelscited by 703
  12. 2018Mitigating Unwanted Biases with Adversarial Learningcited by 663
32 more
  1. 2018Gender Bias in Coreference Resolution: Evaluation and Debiasing Methodscited by 657
  2. 2019On Measuring Social Biases in Sentence Encoderscited by 397
  3. 2019Measuring Bias in Contextualized Word Representationscited by 275
  4. 2018A comparative study of fairness-enhancing interventions in machine learningcited by 208
  5. 2023Is ChatGPT Fair for Recommendation? Evaluating Fairness in Large Language Model Recommendationcited by 113
  6. 2023Red teaming ChatGPT via Jailbreaking: Bias, Robustness, Reliability and Toxicitycited by 86
  7. 2024Bias in Large Language Models: Origin, Evaluation, and Mitigationcited by 77
  8. 2020Metamorphic Testing: A New Approach for Generating Next Test Casescited by 71
  9. 2024Fairness in Large Language Models: A Taxonomic Surveycited by 57
  10. 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
  11. 2023BiasAsker: Measuring the Bias in Conversational AI Systemcited by 52
  12. 2024Towards Implicit Bias Detection and Mitigation in Multi-Agent LLM Interactionscited by 50
  13. 2024Disclosure and Mitigation of Gender Bias in LLMscited by 47
  14. 2022Towards Identifying Social Bias in Dialog Systems: Frame, Datasets, and Benchmarkscited by 36
  15. 2021Few-shot Instruction Prompts for Pretrained Language Models to Detect Social Biasescited by 21
  16. 2024Reasoning before Comparison: LLM-Enhanced Semantic Similarity Metrics for Domain Specialized Text Analysiscited by 21
  17. 2024Breaking Bias, Building Bridges: Evaluation and Mitigation of Social Biases in LLMs via Contact Hypothesiscited by 19
  18. 2022Fairness Evaluation in Deepfake Detection Models using Metamorphic Testingcited by 16
  19. 2023DeepGD: A Multi-Objective Black-Box Test Selection Approach for Deep Neural Networkscited by 11
  20. 2023Text Encoders Lack Knowledge: Leveraging Generative LLMs for Domain-Specific Semantic Textual Similaritycited by 11
  21. 2023BiasTestGPT: Using ChatGPT for Social Bias Testing of Language Modelscited by 8
  22. 2023BAD: BiAs Detection for Large Language Models in the context of candidate screeningcited by 8
  23. 2023Description-Based Text Similaritycited by 7
  24. 2025Enhancing the De-identification of Personally Identifiable Information in Educational Datacited by 7
  25. 2019Metamorphic Detection of Adversarial Examples in Deep Learning Models With Affine Transformationscited by 6
  26. 2024Generative AI for automatic topic labellingcited by 5
  27. 2025BEATS: Bias Evaluation and Assessment Test Suite for Large Language Modelscited by 5
  28. 2024MAFT: Efficient Model-Agnostic Fairness Testing for Deep Neural Networks via Zero-Order Gradient Searchcited by 4
  29. 2025Metamorphic Testing for Fairness Evaluation in Large Language Models: Identifying Intersectional Bias in LLaMA and GPTcited by 4
  30. 2023Towards a Complete Metamorphic Testing Pipelinecited by 3
  31. 2025Efficient Fairness Testing in Large Language Models: Prioritizing Metamorphic Relations for Bias Detectioncited by 2
  32. 2025LLMs Can Also Do Well! Breaking Barriers in Semantic Role Labeling via Large Language Modelscited by 1

Built on by

Not cited yet.