arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2507.05565cs.SEcs.AIcs.NE
收藏

基于搜索的变异关系选择用于大语言模型优化鲁棒性测试

Search-based Selection of Metamorphic Relations for Optimized Robustness Testing of Large Language Models

The University of Adelaide(阿德莱德大学);Simula Research Laboratory(Simula研究实验室)

Sangwon Hyun, Shaukat Ali, M. Ali Babar

AI总结:

本文提出基于搜索的变异关系组优化方法,最大化故障检测并最小化执行成本,实验表明MOEA/D算法最优,并发现银弹MRs。\n

摘要:

评估大语言模型(LLM)的可信度(如鲁棒性)已引起广泛关注。近年来,定义变异关系(MRs)的变异测试已被广泛应用于评估LLM执行的鲁棒性。然而,基于MR的鲁棒性测试仍需要可扩展数量的MRs,因此有必要优化MR的选择。现有的大多数LLM测试研究仅限于自动生成测试用例(即MRs)以增强故障检测。此外,大多数研究在评估LLM时仅考虑了单一扰动MR的有限测试空间。相比之下,本文提出了一种基于搜索的方法来优化MR组,以最大化故障检测并最小化LLM执行成本。此外,我们的方法涵盖了MR中的组合扰动,有助于在鲁棒性评估中扩展测试空间。我们开发了一个搜索过程,并实现了四种搜索算法:Single-GA、NSGA-II、SPEA2和MOEA/D,采用新颖的编码来解决LLM鲁棒性测试中的MR选择问题。我们使用两个主要的LLM和主要的文本到文本任务,对四种搜索算法以及随机搜索进行了比较实验。我们的统计和实证研究揭示了两个关键发现:(1)MOEA/D算法在优化LLM鲁棒性测试的MR空间方面表现最佳;(2)我们识别出了用于LLM鲁棒性测试的银弹MRs,这些MRs在不同文本到文本任务中表现出混淆LLM的主导能力。在LLM鲁棒性评估中,我们的研究揭示了优化测试的基本问题,并为基于搜索的解决方案提供了见解。

英文摘要:

Assessing the trustworthiness of Large Language Models (LLMs), such as robustness, has garnered significant attention. Recently, metamorphic testing that defines Metamorphic Relations (MRs) has been widely applied to evaluate the robustness of LLM executions. However, the MR-based robustness testing still requires a scalable number of MRs, thereby necessitating the optimization of selecting MRs. Most extant LLM testing studies are limited to automatically generating test cases (i.e., MRs) to enhance failure detection. Additionally, most studies only considered a limited test space of single perturbation MRs in their evaluation of LLMs. In contrast, our paper proposes a search-based approach for optimizing the MR groups to maximize failure detection and minimize the LLM execution cost. Moreover, our approach covers the combinatorial perturbations in MRs, facilitating the expansion of test space in the robustness assessment. We have developed a search process and implemented four search algorithms: Single-GA, NSGA-II, SPEA2, and MOEA/D with novel encoding to solve the MR selection problem in the LLM robustness testing. We conducted comparative experiments on the four search algorithms along with a random search, using two major LLMs with primary Text-to-Text tasks. Our statistical and empirical investigation revealed two key findings: (1) the MOEA/D algorithm performed the best in optimizing the MR space for LLM robustness testing, and (2) we identified silver bullet MRs for the LLM robustness testing, which demonstrated dominant capabilities in confusing LLMs across different Text-to-Text tasks. In LLM robustness assessment, our research sheds light on the fundamental problem for optimized testing and provides insights into search-based solutions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑