TLDR: This research introduces a method to protect Binarized Neural Networks (BNNs) deployed on in-memory computing architectures from model theft. It uses a secret key generated by a Physical Unclonable Function (PUF) to transform model parameters before storage. Inference is then performed directly on these encrypted weights, achieving a form of homomorphic encryption with minimal overhead. Experiments show that without the correct secret key, the model’s accuracy drops below 15%, effectively securing the BNN while maintaining computational efficiency.
Deep neural networks (DNNs) have become indispensable across various applications, serving as valuable assets for businesses. These sophisticated models, often trained on proprietary and sensitive data, demand significant resources to achieve high accuracy. Consequently, safeguarding DNNs as intellectual property is paramount, especially when they are deployed on edge devices where they are susceptible to model parameter extraction attacks.
Binarized Neural Networks (BNNs) represent a specialized class of DNNs designed for minimal computational resource utilization. They achieve this by constraining both their weights and activations to just two values: +1 and -1. This characteristic makes BNNs particularly appealing for resource-constrained environments and in-memory computing architectures, such as those based on resistive RAM (RRAM) crossbar structures. These architectures integrate computation and storage, offering improved inference performance and energy efficiency compared to traditional CMOS implementations.
However, a significant challenge arises when attempting to protect these models. The common practice of encrypting model parameters to prevent theft and then decrypting them at runtime introduces substantial computational overhead. This overhead undermines the very principle of in-memory computing, which aims for seamless integration of computation and storage to maximize efficiency.
A Novel Approach to Secure BNNs
A recent research paper, titled “Efficient and Encrypted Inference using Binarized Neural Networks within In-Memory Computing Architectures”, proposes a robust strategy to protect BNN model parameters within in-memory computing frameworks. The core of their method involves using a secret key derived from a Physical Unclonable Function (PUF) to transform model parameters before they are stored in the crossbar array. A PUF is a hardware security primitive that generates a unique, device-specific response (the secret key) based on a physical challenge, without ever storing the key itself. This makes the key highly resilient against theft attacks that typically target stored memory states.
Crucially, the inference operations are then performed directly on these *transformed* (encrypted) weights. This approach achieves a very special case of Fully Homomorphic Encryption (FHE) – a type of encryption that allows computations on encrypted data – but with minimal runtime overhead. This is a significant advantage, as full FHE is typically computationally intensive.
How the Protection Works
The researchers formalized a method to protect BNN inference implementations from model parameter theft. After a BNN is trained, its weight matrix is transformed using a PUF-generated secret key into a new, protected matrix. This transformation ensures that if the protected matrix is acquired and used for inference without the corresponding secret key, it will yield incorrect results.
The paper introduces three distinct techniques for weight transformation:
- Inversion: This technique involves flipping the signs of weights based on the secret key.
- Swapping: This technique rearranges rows or columns of the weight matrix based on the secret key.
- Combination: This involves applying both inversion and swapping, either across columns or rows, for enhanced security.
These transformations are designed such that during legitimate inference, the input is also transformed using the same secret key, and the output is recovered, ensuring the correct result. However, without the secret key, the transformations cannot be reversed or correctly applied, leading to drastically diminished performance.
Also Read:
- New Quantization Method Makes Large Language Models More Efficient
- Spiking Neural Networks Offer Energy-Efficient AI for Edge Devices in Time Series Analysis
Validation and Impact
To validate their protection strategy, the researchers conducted experiments using a BNN model trained on the MNIST dataset. They applied the transformation schemes to various layers of the network and then assessed the model’s accuracy when the secret key was not known or used. The results were compelling: inference conducted without the secret key consistently led to a significant degradation in performance, with accuracy falling below 15%. This effectively renders the stolen model parameters useless to an attacker, validating the effectiveness of the protection strategy in securing BNNs within in-memory computing architectures while preserving computational efficiency.
This work represents a crucial step towards securing AI models deployed on edge devices, particularly those leveraging efficient in-memory computing. For more details, you can read the full research paper here.


