Abstract As deep learning models transition from secure servers to edge devices, they become increasingly vulnerable to physical side-channel attacks. This paper presents a software-based countermeasure designed to protect neural network architectures from timing-based side-channel analysis (SCA). By injecting random delays sampled from a normal distribution into the execution of activation functions, the proposed method desynchronizes timing signatures, making functions like ReLU, Sigmoid, and Tanh indistinguishable to an attacker. Experimental results on an ARM Cortex-M4 platform demonstrate that the countermeasure effectively mitigates leakage according to Test Vector Leakage Assessment (TVLA) standards, with a performance overhead ranging from 2.8% to 11%.
1. Introduction
The deployment of deep learning models on edge devices, such as microcontrollers, has introduced significant security challenges. While these models represent substantial intellectual property (IP), their physical accessibility allows attackers to perform Side-Channel Analysis (SCA). By monitoring physical parameters like power consumption or execution timing, adversaries can reverse-engineer "black box" model architectures. This paper, authored by researchers from Silicon Austria Labs, Nanyang Technological University, and the Slovak University of Technology, proposes a lightweight software-based defense against these timing-based model extraction attacks.
2. The Vulnerability of Activation Functions
The core vulnerability addressed in this research lies in the execution of activation functions. Functions such as ReLU, Sigmoid, and Tanh exhibit unique "timing signatures" or "timing clusters" based on their input values. For instance, a ReLU function typically executes faster when processing negative inputs (returning zero) than when processing positive inputs.
An attacker can exploit these micro-variations to identify which activation function is being used and, in some cases, infer the range of the input data. While hardware-based countermeasures exist, they are often prohibitively expensive for resource-constrained embedded devices in terms of silicon area and power consumption. This necessitates a more flexible, software-oriented approach.
3. Proposed Countermeasure: Random Delay Injection
The researchers propose a desynchronization-based countermeasure that introduces artificial "noise" into the execution time of activation functions. Rather than attempting to force every computation to take a constant amount of time—which is computationally expensive—the method injects a random delay ($X$) into each function call.
3.1 Methodology
The implementation follows a four-step process:
- Characterization: The execution times of ReLU, Sigmoid, and Tanh were measured on an ARM Cortex-M4 to identify distinct timing clusters.
- Delay Injection: A random delay is sampled from a Normal Distribution $\mathcal{N}(\mu, \sigma^2)$ and added to the activation function computation.
- Parameter Selection: The mean ($\mu$) and variance ($\sigma^2$) are systematically chosen so that the mean delay is slightly longer than the maximum difference between the fastest and slowest possible function calls. This ensures that the timing signatures of different functions overlap significantly.
- Verification: The effectiveness of the defense is validated using Test Vector Leakage Assessment (TVLA), a statistical t-test standard used in cryptography to detect information leakage.
4. Experimental Validation
The study utilized the MNIST dataset for proof-of-concept model architecture and synthetic timing data (2,000 random inputs in the range $[-2, 2]$) to characterize function behavior. For the leakage assessment, 5,000 inference execution traces were analyzed.
4.1 Security Effectiveness
In the TVLA assessment, a t-value exceeding 4.5 indicates a statistically significant security leak. Without protection, the activation functions exhibited massive leakage, with t-values reaching as high as 60. After applying the desynchronization countermeasure, all t-values remained below the 4.5 threshold, indicating that the timing information no longer leaked data about the underlying function.
4.2 Performance Overhead
A critical advantage of this approach is its manageable overhead. While a specific delay (e.g., 0.6ms) might seem large compared to a single ReLU call (0.02ms), the researchers highlight that in a full neural network, the majority of execution time is consumed by multiply-accumulate (MAC) operations. When evaluated on a VGG-19 architecture, the total timing overhead was restricted to between 2.8% and 11%.
5. Conclusion and Future Work
This research demonstrates a viable, software-only defense against timing-based SCA for neural networks on edge devices. By desynchronizing execution times, the method effectively hides the identity of activation functions from observers.
Future work will focus on expanding the scope of protected functions beyond ReLU, Sigmoid, and Tanh, and investigating the countermeasure's effectiveness against other side-channels, such as power analysis and memory access patterns. As a software-based solution, this approach offers a practical path for securing existing embedded systems via firmware updates without requiring hardware redesign.
Summary updated