LEAP:面向NLP软件的高效自动化测试方法
LEAP: Efficient and Automated Test Method for NLP Software
AI总结:
针对现有NLP软件对抗测试方法成功率低、耗时长的问题,提出融合文本特征、基于莱维飞行的自适应粒子群优化测试方法LEAP,可提升测试成功率与效率,生成可迁移性更强的测试用例,增强DNN系统鲁棒性。
摘要:
深度神经网络(DNN)在自然语言处理(NLP)软件中的广泛应用,凸显了鲁棒性的重要性。研究人员已提出多种针对对抗测试用例的自动化测试技术,但现有方法存在两大局限:一是错误发现能力薄弱,针对基于BERT的NLP软件,测试成功率仅为0%至24.6%;二是时间效率低下,生成单个测试用例需耗时177.8秒至205.28秒,难以适用于时间受限的场景。\n为解决上述问题,本文提出LEAP自动化测试方法,该方法采用融合文本特征的基于莱维飞行(Levy flight)的自适应粒子群优化算法生成对抗测试用例。具体而言,我们引入莱维飞行进行种群初始化,以提升生成测试用例的多样性;设计了惯性权重自适应更新算子,提高LEAP对高维文本样本的全局优化效率;还提出了基于贪心策略的变异算子,以缩短搜索时间。\n我们通过一系列实验验证了LEAP的NLP软件测试能力,结果显示:LEAP生成对抗测试用例的平均成功率达79.1%,较次优方法PSOattack高出6.1%;在保证高成功率的同时,与其他基于启发式的方法相比,LEAP最多可减少147.6秒的时间开销;此外,实验结果表明LEAP生成的测试用例具有更强的可迁移性,能够显著提升基于DNN的系统的鲁棒性。
英文摘要:
The widespread adoption of DNNs in NLP software has highlighted the need for robustness. Researchers proposed various automatic testing techniques for adversarial test cases. However, existing methods suffer from two limitations: weak error-discovering capabilities, with success rates ranging from 0% to 24.6% for BERT-based NLP software, and time inefficiency, taking 177.8s to 205.28s per test case, making them challenging for time-constrained scenarios. To address these issues, this paper proposes LEAP, an automated test method that uses LEvy flight-based Adaptive Particle swarm optimization integrated with textual features to generate adversarial test cases. Specifically, we adopt Levy flight for population initialization to increase the diversity of generated test cases. We also design an inertial weight adaptive update operator to improve the efficiency of LEAP's global optimization of high-dimensional text examples and a mutation operator based on the greedy strategy to reduce the search time. We conducted a series of experiments to validate LEAP's ability to test NLP software and found that the average success rate of LEAP in generating adversarial test cases is 79.1%, which is 6.1% higher than the next best approach (PSOattack). While ensuring high success rates, LEAP significantly reduces time overhead by up to 147.6s compared to other heuristic-based methods. Additionally, the experimental results demonstrate that LEAP can generate more transferable test cases and significantly enhance the robustness of DNN-based systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。