arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.01033cs.SE
收藏

面向深度神经网络的多目标搜索式覆盖引导自动测试生成

Many-Objective Search-Based Coverage-Guided Automatic Test Generation for Deep Neural Networks

Dongcheng Li, W. Eric Wong, Hu Liu, Man Zhao

AI总结:

针对深度神经网络测试生成效率低、无效用例多的问题,提出融合频率采样、蒙特卡洛树局部搜索与分解式归档的改进SPEA2多目标模糊测试方法,在多个数据集和模型上显著提升覆盖率,还能生成可揭示模型错误的对抗样本。

摘要:

为保障深度神经网络(DNN)系统的可靠性,解决神经网络的测试生成问题,本文提出一种基于多目标优化算法的模糊测试生成技术。传统模糊测试采用随机搜索,存在测试效率较低、易生成大量无效测试用例的问题,而借助多目标优化技术可生成有效的测试用例。为实现高测试覆盖率,本文提出了若干改进策略。基于频率的模糊采样策略根据初始数据的被选频率分配优先级,避免重复选择相同数据,在初始数据质量提升上优于随机采样策略。针对全局搜索可能生成不满足语义约束的测试用例的问题,提出一种基于蒙特卡洛树搜索的局部搜索策略,以增强算法的局部搜索能力。此外,本文通过基于分解的归档策略更新SPEA2(强度帕累托进化算法2)的外部档案,提升了种群多样性与算法的全局搜索能力。为验证所提方法的有效性,本文在多个公开数据集和多种神经网络模型上开展了实验。结果表明,与随机采样和基于聚类的采样相比,基于频率的模糊采样策略在迭代后期对覆盖率的提升幅度更大。在VGG16这类复杂网络上,改进后的SPEA2算法在多个覆盖率指标上的覆盖率提升约12%,在LeNet系列网络上提升约40%。实验结果还显示,新生成的测试用例不仅具有更高的覆盖率,还能生成可揭示模型错误的对抗样本。

英文摘要:

To ensure the reliability of DNN systems and address the test generation problem for neural networks, this paper proposes a fuzzing test generation technique based on many-objective optimization algorithms. Traditional fuzz testing employs random search, leading to lower testing efficiency and tends to generate numerous invalid test cases. By utilizing many-objective optimization techniques, effective test cases can be generated. To achieve high test coverage, this paper proposes several improvement strategies. The frequency-based fuzz sampling strategy assigns priorities based on the frequency of selection of initial data, avoiding the repetitive selection of the same data and enhancing the quality of initial data better than random sampling strategies. To address the issue that global search may yield test not satisfying semantic constraints, a local search strategy based on the Monte Carlo tree search is proposed to enhance the algorithm's local search capabilities. Furthermore, we improve the diversity of the population and the algorithm's global search capability by updating SPEA2's external archive based on a decomposition-based archiving strategy. To validate the effectiveness of the proposed approach, experiments were conducted on several public datasets and various neural network models. The results reveal that, compared to random and clustering-based sampling, the frequency-based fuzz sampling strategy provides a greater improvement in coverage rate in the later stages of iterations. On complex networks like VGG16, the improved SPEA2 algorithm increased the coverage rate by about 12% across several coverage metrics, and by approximately 40% on LeNet series networks. The experimental results also indicates that the newly generated test cases not only exhibit higher coverage rates but also generate adversarial samples that reveal model errors.

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

↑