arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.05102cs.SEcs.CLcs.CR
收藏

AutoTestForge:面向自然语言处理模型的多维自动化测试框架

AutoTestForge: A Multidimensional Automated Testing Framework for Natural Language Processing Models

Xidian University(西安电子科技大学);University of Southampton(南安普顿大学)

Hengrui Xing, Cong Tian, Liang Zhao, Zhi Ma, WenSheng Wang, Nan Zhang, Chao Huang, Zhenhua Duan

AI总结:

本文提出AutoTestForge框架,利用大语言模型自动生成测试用例并通过多模型投票保证质量,从分类法、公平性和鲁棒性三个维度评估NLP模型,在情感分析和语义文本相似度任务上取得了优于现有工具的错误检测率。

摘要:

近年来,行为测试在自然语言处理(NLP)模型评估中的应用经历了显著且实质性的增长。然而,现有方法仍然受到人工劳动需求以及能力评估范围有限的制约。为了解决这些局限性,我们在本文中提出了AutoTestForge,一个面向NLP模型的自动化、多维度测试框架。在AutoTestForge中,通过利用大语言模型(LLMs)自动生成测试模板并对其进行实例化,人工参与被显著减少。此外,还实现了一种基于差分测试的测试用例标签验证机制,该机制利用多模型投票系统来保证测试用例的质量。该框架还将测试套件扩展到分类法、公平性和鲁棒性三个维度,从而对NLP模型的能力进行全面评估。这种扩展使得对模型的评估更加深入和彻底,为理解其优势与不足提供了有价值的见解。在情感分析(SA)和语义文本相似度(STS)任务上的综合评估表明,AutoTestForge持续优于现有数据集和测试工具,实现了更高的错误检测率(SA平均为30.89%,STS平均为34.58%)。此外,不同的生成策略表现出稳定的有效性,错误检测率在29.03%至36.82%之间。

英文摘要:

In recent years, the application of behavioral testing in Natural Language Processing (NLP) model evaluation has experienced a remarkable and substantial growth. However, the existing methods continue to be restricted by the requirements for manual labor and the limited scope of capability assessment. To address these limitations, we introduce AutoTestForge, an automated and multidimensional testing framework for NLP models in this paper. Within AutoTestForge, through the utilization of Large Language Models (LLMs) to automatically generate test templates and instantiate them, manual involvement is significantly reduced. Additionally, a mechanism for the validation of test case labels based on differential testing is implemented which makes use of a multi-model voting system to guarantee the quality of test cases. The framework also extends the test suite across three dimensions, taxonomy, fairness, and robustness, offering a comprehensive evaluation of the capabilities of NLP models. This expansion enables a more in-depth and thorough assessment of the models, providing valuable insights into their strengths and weaknesses. A comprehensive evaluation across sentiment analysis (SA) and semantic textual similarity (STS) tasks demonstrates that AutoTestForge consistently outperforms existing datasets and testing tools, achieving higher error detection rates (an average of $30.89\%$ for SA and $34.58\%$ for STS). Moreover, different generation strategies exhibit stable effectiveness, with error detection rates ranging from $29.03\% - 36.82\%$.

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

↑