MulClip: A table-free activation function with monotonic and folding regimes for reservoir computing on microcontrollers
Organizations: Panasonic Industry Co., Ltd., Osaka, Japan
Abstract
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.
Figures & tables
| NARMA-20 | Parity8 | MG | KWS | State-update | Flash | |
| Activation | NMSE | Acc. | VPT | Acc. | time ratio | ratio |
| MulClip | 0.087 | 0.981 | 473 | 0.771 | 0.34 | 0.94 |
| MulClip | 0.063 | 0.968 | 599 | 0.781 | 0.34 | 0.94 |
| Monotonic clip | 0.087 | 0.764 | 472 | 0.772 | — | — |
| Monotonic clip | 0.063 | 0.781 | 582 | 0.785 | — | — |
| (FPU) | 0.081 | 0.761 | 628 | 0.779 | 1.00 | 1.00 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Activation | Cycles/eval. | State-update time [ms] | Flash [B] | Increment from smallest [B] |
|---|---|---|---|---|
| hardtanh | 25.0 | 0.513 | 13,440 | 16 |
| MulClip | 30.0 | 0.543 | 13,464 | 40 |
| MulClip | 31.0 | 0.549 | 13,480 | 56 |
| (FPU) | 203.2 | 1.615 | 14,304 | 880 |
| Rational 3/2 | 38.0 | 0.638 | 13,480 | 56 |
| Rational 5/4 | 49.0 | 0.704 | 13,520 | 96 |
| Activation | NARMA-20 NMSE | Parity8 accuracy | MG VPT | KWS accuracy |
|---|---|---|---|---|
| LUT nearest 10 | 0.2516 | 0.697 | 54 | 0.679 |
| LUT nearest 100 | 0.2092 | 0.911 | 100 | 0.746 |
| LUT nearest 1000 | 0.1558 | 0.980 | 208 | 0.771 |
| LUT nearest 4096 | 0.1310 | 0.979 | 301 | 0.772 |
| LUT nearest 16384 | 0.1104 | 0.990 | 391 | 0.776 |
| LUT interp. 16 | 0.1439 | 0.763 | 435 | 0.757 |
| Beyond the extremum | Folding regime | Zero regime | ||
|---|---|---|---|---|
| Task | ( ) | ( ) | ( ) | |
| NARMA-20 | 2 | 0% | 0% | 0% |
| NARMA-20 | 3 | 0% | 0% | 0% |
| Parity8 | 2 | 30.1% | 19.3% | 10.8% |
| Parity8 | 3 | 26.8% | 16.6% | 10.2% |
| MG | 2 | 0% | 0% | 0% |
| Response shape | Accuracy | |
|---|---|---|
| 2.0 | Monotonic (monotonic-clip variant) | 0.764 |
| 3.0 | Folding stops partway | 0.877 |
| 4.0 | (MulClip in the main text) | 0.981 |
| 5.0 | Beyond (with a sign-inverted region) | 0.999 |
| 4.0 | Zero regime only (constant 1 from the extremum to , 0 outside) | 0.810 |
| Activation | Count8 NMSE |
|---|---|
| MulClip | |
| MulClip | |
| Monotonic clip | |
| Monotonic clip | |
| (FPU) |
| Activation | ||||
|---|---|---|---|---|
| MulClip | 1.000 | 0.981 | 0.802 | 0.637 |
| MulClip | 1.000 | 0.968 | 0.754 | 0.625 |
| Monotonic clip | 0.972 | 0.764 | 0.625 | 0.559 |
| Monotonic clip | 0.960 | 0.781 | 0.637 | 0.568 |
| (FPU) | 0.937 | 0.761 | 0.622 | 0.561 |
| Rational 3/2 | 0.949 | 0.767 | 0.624 | 0.564 |
| Task | Activation | Device | PC |
|---|---|---|---|
| NARMA-20 (NMSE) | (FPU) | 0.08340 | 0.08340 |
| NARMA-20 (NMSE) | MulClip | 0.08999 | 0.08999 |
| NARMA-20 (NMSE) | MulClip | 0.06472 | 0.06472 |
| Parity8 (accuracy) | (FPU) | 0.7483 | 0.7487 |
| Parity8 (accuracy) | Monotonic clip | 0.7535 | 0.7518 |
| Parity8 (accuracy) | Monotonic clip | 0.7588 | 0.7589 |
Neural Network Activation Functions
Neural network activation functions shape how models represent nonlinear patterns, learn, remain stable, and map efficiently to hardware.
See all 79 papers