论文

MulClip:面向 MCU 储层计算的无查表激活函数,更新耗时仅为 tanh 的 0.34 倍

MulClip: A table-free activation function with monotonic and folding regimes for reservoir computing on microcontrollers

精选理由

MCU 上跑储层计算的话这篇很实用:不用查表的激活函数,速度是 tanh 的三分之一不到,NARMA-20 上误差还降了 22%。

论文提出 MulClip,一种针对微控制器(MCU)上储层计算(RC)的轻量激活函数,仅用比较、绝对值、乘法和减法实现,无需查表。在 Cortex-M4 上,tanh 曾占环状储层状态更新时间的 75%,而 MulClip 的状态更新耗时仅为 tanh 的 0.34 倍,快于评测的 11 种 tanh 近似。单个函数同时具备单调区和非单调折叠区,阈值位置固定,无需针对任务的调参。在 NARMA-20 上三阶 MulClip 的 NMSE 比 tanh 低 22%,在 8 位奇偶校验任务上准确率从 0.76-0.78 提升到 0.97-0.98,设备端推理结果与 PC 端几乎一致。

原文 · arXiv cs.LG

MulClip: A table-free activation function with monotonic and folding regimes for reservoir computing on microcontrollers

This letter proposes MulClip, a lightweight activation function for reservoir computing (RC) on microcontrollers (MCUs). In a ring reservoir, a representative sparse RC topology, multiply-accumulate operations are few, and evaluating tanh accounted for 75% of the state-update time on a Cortex-M4. MulClip introduces curvature into the response using only comparison, absolute value, multiplication, and subtraction, and places its clipping threshold not at the extremum but at the point where the response returns to zero after passing the extremum. As a result, a single function has both a monotonic regime and a nonmonotonic folding regime that increases the expressiveness of a single unit. Which regime is used is determined by the usual hyperparameter search, e.g., over the input scale, so no task-specific threshold tuning is required. The state-update time measured on hardware was 0.34 times that of tanh and shorter than that of any of the 11 evaluated tanh approximations. In PC-based evaluation, third-order MulClip achieved a 22% lower NMSE than tanh on NARMA-20, where the pre-activations remained in the monotonic regime, and on 8-bit parity it raised the accuracy from 0.76-0.78 for the monotonic-clip variant without folding to 0.97-0.98. For these two tasks, on-device inference yielded nearly the same values as on the PC.