Side-channel attack analysis on in-memory computing architectures

Ziyu Wang, Fan-Hsuan Meng, Yongmo Park, Jason Kamran Eshraghian, Wei D. LuIEEE Trans. Emerg. Top. Comput 2022

TL;DR

This paper introduces a novel side-channel attack methodology to extract the architecture of Deep Neural Networks (DNNs) embedded within In-Memory Computing (IMC) systems. By analyzing power traces, the authors demonstrate the ability to reverse-engineer DNN layer types, sequences, sizes, and kernel dimensions, effectively revealing the model's structure without prior knowledge. This work highlights a critical security vulnerability in IMC architectures, crucial for their deployment in sensitive edge computing environments.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are increasingly being deployed on specialized hardware accelerators, including In-Memory Computing (IMC) architectures, to boost performance and energy efficiency. IMC systems, particularly those based on analog computation like RRAM crossbars, offer significant advantages by performing computations directly within memory, minimizing data movement. However, this integration also presents new security challenges. DNN models are often proprietary and represent valuable intellectual property. While IMC's inherent data localization and stationary weights might seem to offer some security, this paper argues that localized and stationary weight and data patterns can actually be exploited. The problem addressed is the lack of understanding and analysis of side-channel attack vulnerabilities in these emerging IMC architectures, specifically focusing on how an attacker could extract the underlying DNN model's architecture. This is particularly relevant for edge devices that handle sensitive data from various sensors.

Methods

The core of this paper is a novel side-channel attack methodology that leverages power trace analysis. The authors developed a mixed-signal power simulator to emulate the dynamic power traces of RRAM-based IMC macros. This simulator allows for rapid iteration and analysis of power consumption at the circuit level.

The attack methodology involves several key steps:

  • Power Trace Simulation: The simulator generates dynamic power traces based on input data patterns and the mapped DNN model within the IMC tiles. This includes modeling the power consumption of RRAM arrays and associated digital components like ADCs.
  • Layer Property Extraction (Algorithm 1): By analyzing the start time and execution duration of power traces from individual IMC tiles, the authors can identify the number of tiles involved, distinguish between convolutional (Conv) and fully connected (FC) layers, and determine the layer sequence. Conv layers typically have longer execution times due to more computational cycles.
  • Output Channel Size Extraction (Algorithm 2): The ADC execution time, which reflects the time taken to convert analog outputs, is used to infer the number of utilized columns in the RRAM array. This directly relates to the output channel size of Conv layers and the output feature size of FC layers.
  • Kernel Size Extraction (Algorithm 3): For Conv layers, the average power consumption of tiles is analyzed. By relating this to the number of utilized rows (derived from previous layer analysis and the assumption of square kernel sizes), the kernel dimensions can be estimated.
  • Pooling Layer Analysis (Algorithm 4): Pooling layers, often placed between Conv layers, are identified by analyzing the input and output shapes of adjacent layers and the delay introduced by the pooling operation.

The simulation framework also incorporates realistic aspects like weight mapping (quantization to 8 bits, mapping across multiple cells for lower device precision), bit-serial input processing, and the use of a TSMC 28 nm technology for digital component modeling.

Datasets

The paper uses the CIFAR-10 dataset for inference tasks during the simulation and validation of the attack. CIFAR-10 consists of 60,000 natural color images of size 32x32 pixels.

Key Insights and Ideas

  • IMC Architectures are Vulnerable to Side-Channel Attacks: Contrary to the intuition that localized computation might enhance security, this paper demonstrates that the very nature of IMC—fixed weight mapping and data patterns—creates exploitable side-channels through power consumption.
  • Power Traces Reveal DNN Architecture: The dynamic power consumption of IMC tiles is not random noise; it contains rich information that can be decoded to reveal the structure of the embedded DNN. This includes layer types, their order, and their dimensions.
  • Layer-Specific Power Signatures: Different layer types (Conv vs. FC) and operations (analog computation vs. ADC conversion) exhibit distinct power trace signatures, allowing for their differentiation and analysis.
  • Robustness to Real-World Artifacts: The proposed attack methodology shows resilience to common real-world constraints like lower sampling rates and electrical noise, suggesting its practical applicability.
  • Model Extraction is Feasible Without Prior Knowledge: The attack successfully reconstructs a LeNet model architecture without any prior knowledge of the model, highlighting a significant threat to intellectual property.

Key Results

The paper successfully demonstrates the extraction of a complete LeNet DNN architecture from simulated power traces. Specifically, they were able to identify:

  • 2 Convolutional (Conv) layers and 3 Fully Connected (FC) layers.
  • Output channel sizes: For the first two Conv layers, they identified output channel sizes of 6 and 16, respectively.
  • Kernel sizes: The kernel size for the first Conv layer was determined to be 5x5.
  • Output feature sizes: The output feature size of the second FC layer was found to be 84, and the final FC layer corresponded to the 10 classification classes of CIFAR-10.
  • Robustness: The attack algorithms (particularly for kernel size extraction) showed robustness even with sampling rates as low as 500 MSa/s and noise standard deviations of 2 mW, though some failures were observed for FC layers at lower sampling rates.

Limitations and Future Work

  • Simulation-Based: The current work is based on a simulation framework. While efforts were made to incorporate realistic aspects, real-world hardware might exhibit additional non-idealities not fully captured.
  • Specific IMC Architecture: The analysis is focused on RRAM-based analog IMC architectures. The applicability to other IMC implementations (e.g., digital IMC) might differ.
  • Attacker Model Assumptions: The attacker assumes knowledge of hardware parameters (array size, ADC type) but not the DNN model. The ability to halt inputs to precisely capture power traces is also assumed.
  • Countermeasures: The paper discusses potential countermeasures, including scrambling timing information, adding dummy tiles/cycles, and masking crossbar power. However, these often introduce latency or power overheads.

Future work could involve:

  • Hardware Validation: Implementing and testing the attack on actual RRAM-based IMC hardware.
  • Broader Architecture Support: Extending the analysis to other types of IMC architectures and DNN models.
  • More Sophisticated Attacks: Investigating more advanced side-channel attacks or combining power analysis with other leakage sources.
  • Developing More Efficient Countermeasures: Researching security mechanisms that offer robust protection without significant performance penalties.

Summary updated

BibTeX
@article{wang2022side,
  author = {Ziyu Wang and Fan-Hsuan Meng and Yongmo Park and Jason Kamran Eshraghian and Wei D. Lu},
  title = {{Side-channel attack analysis on in-memory computing architectures}},
  journal = {IEEE Trans. Emerg. Top. Comput.},
  year = {2022},
  url = {https://openreview.net/forum?id=BBVvezJAi0},
}
Figure