ARTFEED — Contemporary Art Intelligence

Constant-Time Activation Functions for Embedded Neural Networks

other · 2026-05-23

A study introduces a methodology for implementing activation functions on microcontrollers that operates in constant time, aimed at thwarting timing side-channel vulnerabilities. This approach integrates branchless selection, a fixed-cost Padé approximation, dummy arithmetic, and cycle alignment. Validation was conducted on the ARM Cortex-M4 platform using ReLU, sigmoid, tanh, GELU, and Swish functions. The secure implementations resulted in uniform cycle counts across all inputs: 88 cycles for three functions and 108 cycles for five functions. Additionally, the research assesses a desynchronization countermeasure, revealing its susceptibility to timing attacks based on templates.

Key facts

  • arXiv:2605.22441v1
  • Methodology combines branchless selection, Padé-based approximation, dummy arithmetic, cycle alignment
  • Validated on ReLU, sigmoid, tanh, GELU, Swish
  • ARM Cortex-M4 platform
  • 88 cycles for three-function setting
  • 108 cycles for five-function setting
  • Desynchronization-based countermeasure vulnerable to template-based timing attack

Entities

Sources