[论文解读] TensorFuzz: Debugging Neural Networks with Coverage-Guided Fuzzing
TensorFuzz 引入覆盖引导模糊测试,用于神经网络以发现罕见输入导致的失败,使用近似最近邻定义覆盖范围,并发布开源 TensorFuzz 库。
Machine learning models are notoriously difficult to interpret and debug. This is particularly true of neural networks. In this work, we introduce automated software testing techniques for neural networks that are well-suited to discovering errors which occur only for rare inputs. Specifically, we develop coverage-guided fuzzing (CGF) methods for neural networks. In CGF, random mutations of inputs to a neural network are guided by a coverage metric toward the goal of satisfying user-specified constraints. We describe how fast approximate nearest neighbor algorithms can provide this coverage metric. We then discuss the application of CGF to the following goals: finding numerical errors in trained neural networks, generating disagreements between neural networks and quantized versions of those networks, and surfacing undesirable behavior in character level language models. Finally, we release an open source library called TensorFuzz that implements the described techniques.
研究动机与目标
- 在关键应用中为神经网络提供可靠的调试工具的需求进行动机说明。
- 引入一个面向神经网络的覆盖引导模糊测试框架。
- 定义一个基于近似最近邻的激活空间邻近度的实用覆盖度量。
- 演示 TensorFuzz 有能力揭示数值错误、量化不一致以及语言模型中的不良行为。
- 发布一个开源的 TensorFuzz 库,以便更广泛的采用。
提出的方法
- 通过在激活空间而不是代码分支中测量覆盖度,将覆盖引导模糊测试从传统软件适配到 TensorFlow 图。
- 使用有效神经网络输入的种子语料库并变异输入以探索新的激活。
- 通过近似最近邻计算覆盖度以检测新的激活状态。
- 使用目标函数来识别导致期望/不期望模型行为的输入。
- 批量变异以利用硬件并行性并解决计算图中的非确定性。
实验结果
研究问题
- RQ1覆盖引导模糊测试是否能比随机搜索更高效地揭示训练神经网络中的数值错误(例如 NaN)?
- RQ2CGF 能否揭示神经网络及其量化版本之间的分歧,而单点评估无法发现?
- RQ3CGF 是否能揭示字符级语言模型中的不良行为,这些行为通过随机测试不易发现?
- RQ4基于近似最近邻的激活空间覆盖度量在实际可行且对各种神经网络架构有效吗?
主要发现
- CGF 能迅速发现训练网络中的数值错误,如 NaN,而随机搜索常常错过它们。
- CGF 可以在局部输入区域内(例如,围绕种子图像)产生 32 位和 16 位量化模型之间的分歧。
- CGF 在字符级语言模型中暴露不良行为,在 24 小时运行中产生的黑名单词数量多于随机搜索。
- 使用近似最近邻的激活空间覆盖提供了一个实用、对架构无关的神经网络覆盖信号。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。