Resource efficiency plays an important role for machine learning nowadays. The energy and decision latency are two critical aspects to ensure a sustainable and practical application. Unfortunately, the energy consumption and decision latency are not robust against adversaries. Researchers have recently demonstrated that attackers can compute and submit so-called sponge examples at inference time to increase the energy consumption and decision latency of neural networks. In computer vision, the proposed strategy crafts inputs with less activation sparsity which could otherwise be used to accelerate the computation. In this paper, we analyze the mechanism how these energy-latency attacks reduce activation sparsity. In particular, we find that input uniformity is a key enabler. A uniform image, that is, an image with mostly flat, uniformly colored surfaces, triggers more activations due to a specific interplay of convolution, batch normalization, and ReLU activation. Based on these insights, we propose two new simple, yet effective strategies for crafting sponge examples: sampling images from a probability distribution and identifying dense, yet inconspicuous inputs in natural datasets. We empirically examine our findings in a comprehensive evaluation with multiple image classification models and show that our attack achieves the same sparsity effect as prior sponge-example methods, but at a fraction of computation effort. We also show that our sponge examples transfer between different neural networks. Finally, we discuss applications of our findings for the good by improving efficiency by increasing sparsity.
翻译:资源效率在当今机器学习中扮演着重要角色。能源消耗与决策延迟是确保可持续性和实际应用的两个关键方面。然而,能源消耗和决策延迟并不具备对抗性鲁棒性。研究人员近期证明,攻击者可以在推理阶段计算并提交所谓的"海绵样本",以增加神经网络的能源消耗和决策延迟。在计算机视觉领域,现有策略通过构造激活稀疏性更低的输入来阻挠加速计算。本文分析了这些能量-延迟攻击降低激活稀疏性的机制,特别发现输入均匀性是关键因素。均匀图像(即表面平坦、颜色均匀的图像)会因卷积、批归一化和ReLU激活函数的特定交互作用触发更多激活。基于此洞察,我们提出两种简单有效的海绵样本构造策略:从概率分布中采样图像,以及在自然数据集中识别密集但不易察觉的输入。我们通过多个图像分类模型的综合评估进行了实证检验,证明我们的攻击能以更低的计算开销达到与现有海绵样本方法相同的稀疏效果,并展示了海绵样本在不同神经网络间的可迁移性。最后,我们探讨了通过提升稀疏性来改善效率的正面应用。