arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.02737cs.SEcs.AIcs.LG
收藏

RBT4DNN:基于需求的神经网络测试

RBT4DNN: Requirements-based Testing of Neural Networks

Department of Computer Science, University of Virginia(计算机科学系,弗吉尼亚大学);Department of Computer Engineering, University of Virginia(计算机工程系,弗吉尼亚大学)

Nusrat Jahan Mozumder, Felipe Toledo, Swaroopa Dola, Matthew B. Dwyer

AI总结:

针对DNN功能需求难形式化、现有基于需求的测试方法无法适用的问题,提出RBT4DNN方法,利用自然语言需求构建语义特征空间,微调生成模型产出符合需求前置条件的测试用例,可用于故障检测与模型行为探索,效果良好。

摘要:

测试可帮助开发者判断系统是否按预期运行。当这类系统包含深度神经网络(DNN)时,测试会变得极具挑战性,因为DNN所逼近的函数,其功能需求的形式化是难以处理的。这导致成熟的基于需求的测试方法无法应用于DNN。\n为解决这一问题,我们提出了一种基于需求的测试方法RBT4DNN,该方法使用自然语言需求陈述。这些陈述借助术语表定义语义特征空间,可用于生成测试输入。RBT4DNN将功能需求的前置条件形式化为这些语义特征的逻辑组合。与这些特征组合匹配的训练数据可用于微调生成模型,使其可靠生成满足前置条件的测试输入。在已训练的DNN上执行这些测试,可将其输出与预期的需求后置条件行为进行对比。我们提出了RBT4DNN的两个用例:(1)给定定义DNN正确性属性的需求时,RBT4DNN提供了一种检测故障的新方法;(2)在开发过程中,需求引导的模型行为探索可为开发者提供模型泛化能力的反馈。进一步评估表明,RBT4DNN生成的测试具备真实性、多样性,且与需求前置条件一致,可实现对模型行为的针对性分析和有效的故障检测。

英文摘要:

Testing allows developers to determine whether a system functions as expected. When such systems include deep neural networks (DNNs), Testing becomes challenging, as DNNs approximate functions for which the formalization of functional requirements is intractable. This prevents the application of well-developed approaches to requirements-based testing to DNNs. To address this, we propose a requirements-based testing method (RBT4DNN) that uses natural language requirements statements. These statements use a glossary of terms to define a semantic feature space that can be leveraged for test input generation. RBT4DNN formalizes preconditions of functional requirements as logical combinations of those semantic features. Training data matching these feature combinations can be used to fine-tune a generative model to reliably produce test inputs satisfying the precondition. Executing these tests on a trained DNN enables comparing its output to the expected requirement postcondition behavior. We propose two use cases for RBT4DNN: (1) given requirements defining DNN correctness properties, RBT4DNN comprises a novel approach for detecting faults, and (2) during development, requirements-guided exploration of model behavior can provide developers with feedback on model generalization. Our further evaluation shows that RBT4DNN-generated tests are realistic, diverse, and aligned with requirement preconditions, enabling targeted analysis of model behavior and effective fault detection.

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

↑