Model compression can significantly reduce sizes of deep neural network (DNN) models so that large, sophisticated models after compression can be deployed on resource-limited mobile and IoT devices. However, model compression often introduces deviated behaviors into a compressed model: the original and compressed models output different prediction results for the same input. Hence, it is critical to warn developers and help them comprehensively evaluate possible consequences of such behaviors before deployment. To this end, we propose TriggerFinder, a novel, effective and efficient testing approach to automatically identifying inputs to trigger deviated behaviors in compressed models. Given an input i as a seed, TriggerFinder iteratively applies a series of mutation operations to change i until the resulting input triggers a deviated behavior. However, compressed models usually hide their architecture and gradient information; without such internal information as guidance, it becomes difficult to effectively and efficiently trigger deviated behaviors. To tackle this challenge, we propose a novel fitness function to determine the mutated input that is closer to the inputs that can trigger the deviated predictions. Furthermore, TriggerFinder models this search problem as a Markov Chain process and leverages the Metropolis-Hasting algorithm to guide the selection of mutation operators. We evaluated TriggerFinder on 18 compressed models with two datasets. The experiment results demonstrate that TriggerFinder can successfully find triggering inputs for all seed inputs while the baseline fails in certain cases. As for efficiency, TriggerFinder is 5.2x-115.8x as fast as the baselines. Furthermore, the queries required by TriggerFinder to find one triggering input is only 51.8x-535.6x as small as the baseline.
翻译:模型压缩可以大幅缩小深神经网络(DNN)模型的大小,这样压缩后的大型、尖端模型就可以在资源有限的移动和 IoT 设备上部署。 但是, 模型压缩通常会将偏差行为引入压缩模型: 原始和压缩模型输出相同输入的不同预测结果。 因此, 关键是要警告开发者, 帮助他们在部署之前全面评价这类行为可能造成的后果。 为此, 我们提议TriggFinder, 一种新颖、 有效且高效的测试方法, 自动识别输入, 触发压缩模型中偏差的行为。 以一个输入为种子的输入, TriggerFinder 迭代用一系列突变5型操作来改变, 直到输入触发偏差行为。 但是, 压缩模型通常会隐藏其结构和梯度信息; 没有指导等内部信息, 将难以有效且高效地触发偏差行为。 为了应对这一挑战, 我们提议一个新的健身功能, 来确定与触发偏差预测的输入更接近。 此外, TrigF 将这个小的搜索问题当作一个 MarkF 基线链串联, 在18 测试中, 测试中, 将快速选择 。