arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.22441cs.CRcs.AI
收藏

在微控制器上实现激活函数的常数时间方法

A Constant-Time Implementation Methodology for Activation Functions on Microcontrollers

Faculty of Informatics and Information Technologies, Slovak University of Technology in Bratislava(信息与信息技术学院,布拉格斯拉夫技术大学);State Key Laboratory of Blockchain and Data Security, Zhejiang University(区块链与数据安全国家重点实验室,浙江大学);Temasek Laboratories, Nanyang Technological University(淡马锡实验室,南洋理工大学);Faculty of Computer Science, Albstadt-Sigmaringen University(计算机科学学院,阿尔布斯塔-西格马林根大学);TTControl GmbH

Andrii Tyvodar, Andreas Rechberger, Dirmanto Jap, Shivam Bhasin, Bernhard Jungk, Jakub Breier, Xiaolu Hou

AI总结:

本文提出了一种在嵌入式微控制器上实现激活函数的常数时间方法,通过结合无分支选择、固定成本Padé近似、必要的虚拟算术和周期对齐,实现了定时规律的激活函数实现,并验证了其在ReLU、sigmoid、tanh、GELU和Swish函数上的有效性。

摘要:

嵌入式神经网络推断可能通过定时侧信道泄露信息,包括由激活函数评估引起的泄露。本文提出了一种在嵌入式微控制器上实现激活函数的常数时间方法,并在ARM Cortex-M4平台上验证了ReLU、sigmoid、tanh、GELU和Swish函数。所提出的方法结合了无分支选择、固定成本Padé近似、必要的虚拟算术和周期对齐,以获得定时规律的激活函数实现。作为动机,我们评估了一种基于脱同步的防护措施,并展示了其仍易受基于模板的定时攻击攻击。实验结果表明,所得到的受保护实现对于所有测试输入具有相同的周期数,包括三函数设置下的88个周期和五函数设置下的108个周期。同时,数值误差分析表明,近似的非线性函数保留了高精度。这些结果表明,所提出的方法为构建在嵌入式推断中抗侧信道攻击的激活函数提供了实用基础。

英文摘要:

Embedded neural-network inference can leak information through timing side channels, including leakage caused by the evaluation of activation functions. This work proposes a constant-time implementation methodology for activation functions on embedded microcontrollers and validates it on ReLU, sigmoid, tanh, GELU, and Swish on an ARM Cortex-M4 platform. The proposed methodology combines branchless selection, fixed-cost Padé-based approximation, dummy arithmetic where needed, and cycle alignment to obtain timing-regular activation-function implementations. As motivation, we also evaluate a desynchronization-based countermeasure and show that it remains vulnerable to a template-based timing attack. Experimental results show that the resulting protected implementations achieve identical cycle counts for all tested inputs, including (88) cycles in the three-function setting and (108) cycles in the five-function setting. At the same time, the numerical-error analysis indicates that the approximated nonlinear functions retain high accuracy. These results suggest that the proposed methodology provides a practical basis for constructing side-channel-resistant activation functions in embedded inference.

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

↑