Abstract
Deep learning (DL) accelerators are increasingly deployed on edge devices to support fast local inferences. However, they suffer from a new security problem, i.e., being vulnerable to physical access based attacks. An adversary can easily obtain the entire neural network (NN) model by physically snooping the GDDR memory bus that connects the accelerator chip with DRAM memory. Therefore, memory encryption becomes important for DL accelerators on edge devices to improve the security of NN models. Nevertheless, we observe that traditional memory encryption solutions that have been efficiently used in CPU systems cause significant performance degradation when directly used in DL accelerators. The main reason comes from the big bandwidth gap between the GDDR memory bus and the encryption engine. To address this problem, our paper proposes SEAL, a Secure and Efficient Accelerator scheme for deep Learning. SEAL enhances the performance of the encrypted DL accelerator from two aspects, i.e., improving the data access bandwidth and the efficiency of memory encryption. Specifically, to improve the data access bandwidth, SEAL leverages a criticality-aware smart encryption scheme which identifies partial data that have no impact on the security of NN models and allows them to bypass the encryption engine, thus reducing the amount of data to be encrypted. To improve the efficiency of memory encryption, SEAL leverages a colocation mode encryption scheme to eliminate memory accesses from counters used for encryption by co-locating data and their counters. Our experimental results demonstrate that, compared with traditional memory encryption solutions, SEAL achieves 1.4 ~ 1.6 times IPC improvement and reduces the inference latency by 39% ~ 60%. Compared with a baseline accelerator without memory encryption, SEAL compromises only 5% ~ 7% IPC for significant security improvement.
Introduction
As Deep Learning (DL) accelerators move from secure cloud environments to edge devices like autonomous vehicles and smartphones, they become vulnerable to physical attacks. An adversary with physical access can attach a "bus snooper" to the GDDR memory bus to intercept weights and feature maps moving between the accelerator chip and DRAM. This "bus-snooping" attack allows for the theft of proprietary neural network (NN) models and facilitates white-box adversarial attacks.
While memory encryption is a standard defense in CPUs, it introduces a massive performance bottleneck in DL accelerators. The "bandwidth gap" is the primary culprit: while GDDR buses can exceed 160 GB/s, standard AES engines often peak at 8 GB/s. Directly applying traditional encryption can slash performance by over 50%, making it impractical for real-time edge applications.
The SEAL Framework
To bridge the gap between security and performance, SEAL (Secure and Efficient Accelerator) introduces two key innovations: Criticality-aware Smart Encryption and Colocation Mode Encryption.
Criticality-aware Smart Encryption (SE)
SEAL recognizes that not all weights in a neural network are equally vital for its functionality. By measuring the "importance" of weight parameters using their $\ell_1$-norm, SEAL identifies a critical subset of weights to encrypt. If a weight row is deemed critical, its corresponding input channel is also encrypted to prevent reverse-engineering. This selective approach significantly reduces the AES engine's workload while maintaining high security.
Colocation Mode Encryption (ColoE)
Traditional encryption schemes often rely on counter mode to minimize latency. However, as illustrated in Figure 1, counter mode requires managing counters that must be fetched from memory if they are not in the on-chip cache.
DL accelerators typically lack the large on-chip caches found in CPUs, leading to frequent, bandwidth-consuming counter fetches. SEAL's ColoE scheme eliminates these extra accesses by co-locating the 8-byte encryption counter with its 128-byte data block in DRAM. By utilizing specialized DRAM DIMMs (similar to ECC memory), SEAL ensures that data and counters are retrieved in a single burst, bypassing the cache bottleneck.
Experimental Evaluation
The researchers evaluated SEAL using VGG-16, ResNet-18, and ResNet-34 models trained on the CIFAR-10 dataset. Security was assessed using Jacobian-based dataset augmentation to simulate model cloning attempts.
Performance and Efficiency
The impact of traditional encryption on performance is severe. As shown in Figure 5, direct encryption and counter mode with various cache sizes (Ctr-24 to Ctr-1536) lead to a dramatic drop in Instructions Per Cycle (IPC) compared to an unencrypted baseline.
The low cache hit rates (Figure 5b) for counters in DL workloads explain why traditional counter mode fails to scale. In contrast, SEAL achieves a 1.4× to 1.6× IPC improvement over these traditional secure solutions and reduces inference latency by 39% to 60%. Remarkably, SEAL incurs only a 5% to 7% performance overhead compared to a completely insecure baseline.
Security Analysis
The "Smart Encryption" scheme proved highly effective. Encrypting just 40% of the weights provided security parity with 100% encryption, as the unencrypted "garbage" weights are insufficient for an attacker to reconstruct a functional model.
Conclusion
SEAL demonstrates that robust memory security for DL accelerators does not require sacrificing performance. By combining selective encryption of critical weights with a hardware-level co-location of encryption counters, SEAL provides a practical path for deploying secure neural networks on edge devices. Future work will explore extending these techniques to other architectures like Recurrent Neural Networks (RNNs) and addressing potential side-channel vulnerabilities.
Summary updated