Fairness--the absence of unjustified bias--is a core principle in the development of Artificial Intelligence (AI) systems, yet it remains difficult to assess and enforce. Current approaches to fairness testing in large language models (LLMs) often rely on manual evaluation, fixed templates, deterministic heuristics, and curated datasets, making them resource-intensive and difficult to scale. This work aims to lay the groundwork for a novel, automated method for testing fairness in LLMs, reducing the dependence on domain-specific resources and broadening the applicability of current approaches. Our approach, Meta-Fair, is based on two key ideas. First, we adopt metamorphic testing to uncover bias by examining how model outputs vary in response to controlled modifications of input prompts, defined by metamorphic relations (MRs). Second, we propose exploiting the potential of LLMs for both test case generation and output evaluation, leveraging their capability to generate diverse inputs and classify outputs effectively. The proposal is complemented by three open-source tools supporting LLM-driven generation, execution, and evaluation of test cases. We report the findings of several experiments involving 12 pre-trained LLMs, 14 MRs, 5 bias dimensions, and 7.9K automatically generated test cases. The results show that Meta-Fair is effective in uncovering bias in LLMs, achieving an average precision of 92% and revealing biased behaviour in 29% of executions. Additionally, LLMs prove to be reliable and consistent evaluators, with the best-performing models achieving F1-scores of up to 0.79. Although non-determinism affects consistency, these effects can be mitigated through careful MR design. While challenges remain to ensure broader applicability, the results indicate a promising path towards an unprecedented level of automation in LLM testing.


翻译:公平性——即不存在不合理偏见——是人工智能(AI)系统开发的核心原则,但其评估与执行仍面临困难。当前针对大型语言模型(LLM)的公平性测试方法通常依赖人工评估、固定模板、确定性启发式规则和精选数据集,导致资源消耗大且难以扩展。本研究旨在为一种新型自动化LLM公平性测试方法奠定基础,以降低对领域特定资源的依赖,并拓宽现有方法的适用范围。我们提出的Meta-Fair方法基于两个核心思想:首先,采用蜕变测试技术,通过分析模型输出在受控输入提示修改(由蜕变关系定义)下的变化来揭示偏见;其次,利用LLM在测试用例生成和输出评估方面的潜力,充分发挥其生成多样化输入和有效分类输出的能力。该方案辅以三个开源工具,支持LLM驱动的测试用例生成、执行与评估。我们报告了涉及12个预训练LLM、14条蜕变关系、5个偏见维度和7.9K个自动生成测试用例的多组实验结果。结果表明,Meta-Fair能有效揭示LLM中的偏见,平均精确率达92%,并在29%的执行中检测到偏见行为。此外,LLM被证明是可靠且一致的评估器,最佳模型的F1分数最高可达0.79。虽然非确定性会影响一致性,但通过精心设计蜕变关系可缓解此影响。尽管确保更广泛适用性仍存在挑战,但实验结果展现了实现LLM测试自动化新突破的可行路径。

0
下载
关闭预览

相关内容

智能体评判者(Agent-as-a-Judge)研究综述
专知会员服务
37+阅读 · 1月9日
评估大语言模型在科学发现中的作用
专知会员服务
19+阅读 · 2025年12月19日
大语言模型智能体的评估与基准:综述
专知会员服务
49+阅读 · 2025年7月31日
【斯坦福博士论文】大语言模型的AI辅助评估
专知会员服务
31+阅读 · 2025年3月30日
大型语言模型公平性
专知会员服务
41+阅读 · 2023年8月31日
AI综述专栏 | 基于深度学习的目标检测算法综述
人工智能前沿讲习班
12+阅读 · 2018年12月7日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
28+阅读 · 2014年12月31日
国家自然科学基金
25+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
人工智能赋能无人机:俄乌战争(万字长文)
专知会员服务
5+阅读 · 今天6:56
国外海军作战管理系统与作战训练系统
专知会员服务
2+阅读 · 今天4:16
美军条令《海军陆战队规划流程(2026版)》
专知会员服务
10+阅读 · 今天3:36
《压缩式分布式交互仿真标准》120页
专知会员服务
4+阅读 · 今天3:21
《电子战数据交换模型研究报告》
专知会员服务
6+阅读 · 今天3:13
《基于Transformer的异常舰船导航识别与跟踪》80页
《低数据领域军事目标检测模型研究》
专知会员服务
6+阅读 · 今天2:37
【CMU博士论文】物理世界的视觉感知与深度理解
专知会员服务
10+阅读 · 4月22日
相关VIP内容
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
28+阅读 · 2014年12月31日
国家自然科学基金
25+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员