arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1911.01952cs.LGcs.NE
收藏

循环神经网络的覆盖引导测试

Coverage Guided Testing for Recurrent Neural Networks

University of Liverpool(利物浦大学);Queen’s University Belfast(贝尔法斯特女王大学);Defence Science and Technology Laboratory(国防科学技术实验室);University of Exeter(埃克塞特大学);Loughborough University(拉夫堡大学)

Wei Huang, Youcheng Sun, Xingyu Zhao, James Sharp, Wenjie Ruan, Jie Meng, Xiaowei Huang

摘要:

循环神经网络(RNN)已经被应用于广泛的应用,包括自然语言处理、药物发现和视频识别。它们对输入扰动的脆弱性也是已知的。从软件缺陷检测的角度出发,本文旨在开发一种覆盖引导的测试方法,系统地利用RNN的内部行为,期望这种测试可以检测出高可能性的缺陷。在技术上,长短期记忆网络(LSTM),一个主要类别的RNN,进行了深入研究。设计了一个由三个测试指标组成的测试指标族,不仅用于量化值,还用于量化LSTM处理输入时所表现出的时间关系(包括逐步和有界长度)。采用遗传算法高效地生成测试用例。测试指标和测试用例生成算法被实现到一个工具TestRNN中,然后在一组LSTM基准上进行评估。实验证实,TestRNN比最先进的工具DeepStellar和基于攻击的缺陷检测方法具有优势,因为它使用更精细的时间语义并考虑了输入扰动的自然性。此外,TestRNN能够收集和展示有意义的信息,以供用户理解测试结果,这是迈向可解释神经网络测试的重要一步。

英文摘要:

Recurrent neural networks (RNNs) have been applied to a broad range of applications, including natural language processing, drug discovery, and video recognition. Their vulnerability to input perturbation is also known. Aligning with a view from software defect detection, this paper aims to develop a coverage guided testing approach to systematically exploit the internal behaviour of RNNs, with the expectation that such testing can detect defects with high possibility. Technically, the long short term memory network (LSTM), a major class of RNNs, is thoroughly studied. A family of three test metrics are designed to quantify not only the values but also the temporal relations (including both step-wise and bounded-length) exhibited when LSTM processing inputs. A genetic algorithm is applied to efficiently generate test cases. The test metrics and test case generation algorithm are implemented into a tool TestRNN, which is then evaluated on a set of LSTM benchmarks. Experiments confirm that TestRNN has advantages over the state-of-art tool DeepStellar and attack-based defect detection methods, owing to its working with finer temporal semantics and the consideration of the naturalness of input perturbation. Furthermore, TestRNN enables meaningful information to be collected and exhibited for users to understand the testing results, which is an important step towards interpretable neural network testing.

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

↑