paper-with-me

홈 › Papers

Bias Testing and Mitigation in Black Box LLMs using Metamorphic Relations

2025-11-29 · Sina Salimian, Gias Uddin, Sumon Biswas, Henry Leung 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.

📄 PDF Abstract BibTeX arXiv:2512.00556

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Metamorphic Evaluation of ChatGPT as a Recommender System

2024-11-18 · Madhurima Khirbat, Yongli Ren, Pablo Castells, Mark Sanderson

With the rise of Large Language Models (LLMs) such as ChatGPT, researchers have been working on how to utilize the LLMs for better recommendations. However, although LLMs exhibit black-box and probabilistic characteristi…

Recommendation Systems

Metamorphic Testing for Fairness Evaluation in Large Language Models: Identifying Intersectional Bias in LLaMA and GPT

2025-04-04 · Harishwar Reddy, Madhusudan Srinivasan, Upulee Kanewala

Large Language Models (LLMs) have made significant strides in Natural Language Processing but remain vulnerable to fairness-related issues, often reflecting biases inherent in their training data. These biases pose risks…

Fairness

METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualities

2023-12-11 · Sangwon Hyun, Mingyu Guo, M. Ali Babar

Large-Language Models (LLMs) have shifted the paradigm of natural language data processing. However, their black-boxed and probabilistic characteristics can lead to potential risks in the quality of outputs in diverse LL…

FairnessLanguage ModelingLanguage ModellingLarge Language Model

Efficient Fairness Testing in Large Language Models: Prioritizing Metamorphic Relations for Bias Detection

2025-05-09 · Suavis Giramata, Madhusudan Srinivasan, Venkat Naidu Gudivada, Upulee Kanewala

Large Language Models (LLMs) are increasingly deployed in various applications, raising critical concerns about fairness and potential biases in their outputs. This paper explores the prioritization of metamorphic relati…

Bias DetectionDiversityFairnessFault Detection+1

From Untestable to Testable: Metamorphic Testing in the Age of LLMs

2026-03-25 · Valerio Terragni arxiv

This article discusses the challenges of testing software systems with increasingly integrated AI and LLM functionalities. LLMs are powerful but unreliable, and labeled ground truth for testing rarely scales. Metamorphic…