[论文解读] Deep Neural Network Test Coverage: How Far Are We?
本研究系统评估了流行的深度神经网络(DNN)测试覆盖度度量指标是否与测试有效性相关,同时控制测试集大小。研究发现,结构化覆盖度指标通常无法预测有效性,而非结构化覆盖度在超过一半的评估模型中表现出潜力,表明基于行为的度量指标在DNN测试中更可靠地衡量测试质量。
DNN testing is one of the most effective methods to guarantee the quality of DNN. In DNN testing, many test coverage metrics have been proposed to measure test effectiveness, including structural coverage and non-structural coverage (which are classified according to whether considering which structural elements are covered during testing). Those test coverage metrics are proposed based on the assumption: they are correlated with test effectiveness (i.e., the generation of adversarial test inputs or the error-revealing capability of test inputs in DNN testing studies). However, it is still unknown whether the assumption is tenable. In this work, we conducted the first extensive study to systematically validate the assumption by controlling for the size of test sets. In the study, we studied seven typical test coverage metrics based on 9 pairs of datasets and models with great diversity (including four pairs that have never been used to evaluate these test coverage metrics before). The results demonstrate that the assumption fails for structural coverage in general but holds for non-structural coverage on more than half of subjects, indicating that measuring the difference of DNN behaviors between test inputs and training data is more promising than measuring which structural elements are covered by test inputs for measuring test effectiveness. Even so, the current non-structural coverage metrics still can be improved from several aspects such as unfriendly parameters and unstable performance. That indicates that although a lot of test coverage metrics have been proposed before, there is still a lot of room for improvement of measuring test effectiveness in DNN testing, and our study has pointed out some promising directions.
研究动机与目标
- 验证广泛持有的假设,即DNN测试中测试覆盖度度量指标与测试有效性相关。
- 检验结构化和非结构化覆盖度度量指标是否能可靠预测生成对抗性输入或发现错误的能力。
- 评估测试集大小对覆盖度-测试有效性相关性的影响,确保公平评估。
- 识别改进DNN测试覆盖度度量指标的有前景方向。
- 在九组多样化的模型-数据集组合中评估七种覆盖度度量指标,包括四种此前未测试的组合。
提出的方法
- 本研究通过固定测试集大小的受控实验,隔离覆盖度对测试有效性影响。
- 评估了七种具有代表性的测试覆盖度度量指标:四种基于结构标准,三种基于行为标准。
- 使用了九种多样化的DNN模型和数据集,包括四种此前未用于覆盖度度量评估的新组合。
- 测试有效性通过测试输入生成对抗性样本或发现模型错误的能力来衡量。
- 使用统计分析评估所有受试对象中覆盖度度量指标与测试有效性的相关性。
- 本研究将结构化覆盖度(如神经元、层或激活为基础)与非结构化覆盖度(如输入空间或行为为基础)进行了比较。
实验结果
研究问题
- RQ1在控制测试集大小的情况下,结构化测试覆盖度是否与DNN中的测试有效性相关?
- RQ2在相同条件下,非结构化测试覆盖度是否与DNN中的测试有效性相关?
- RQ3不同覆盖度度量指标在多样化的DNN模型和数据集上的表现如何?
- RQ4当前非结构化覆盖度度量指标是否存在特定局限性,阻碍其可靠性?
- RQ5在DNN测试中,改进覆盖度度量指标的最有前景方向是什么?
主要发现
- 在评估的模型中,结构化覆盖度度量指标与测试有效性之间无一致相关性,表明其使用所基于的假设通常无效。
- 非结构化覆盖度度量指标在超过一半的评估对象中表现出与测试有效性的显著相关性,表明其在衡量测试质量方面更具潜力。
- 本研究发现,测量测试输入与训练数据之间的行为差异,比追踪激活的结构组件更有效。
- 当前非结构化覆盖度度量指标仍存在性能不稳定和参数敏感的问题,表明仍有改进空间。
- 结果表明,未来工作应优先考虑基于行为的覆盖度度量指标,而非结构化指标,用于DNN测试有效性的评估。
- 对四种此前未测试的模型-数据集组合的评估表明,覆盖度有效性在不同DNN架构和数据分布间存在显著差异。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。