Securing Transfer-Learned Networks with Reverse Homomorphic Encryption

Robert F Allison, Tomasz Maciazek, Henry Bourne · Submission to ICLR 2026 · Rejected

TL;DR

This paper demonstrates that few-shot transfer-learned models are highly vulnerable to training-data reconstruction attacks, and that standard Differential Privacy (DP) defenses fail to protect them without crippling model accuracy. To solve this, the authors introduce Reverse-Role Homomorphic Encryption (RHE), a novel defense that encrypts model weights instead of inputs, providing total privacy for training data with zero loss in accuracy and practical inference speeds.

What Problem Does This Paper Address?

Deep learning models are notorious for "memorizing" their training data. In sensitive fields like medical imaging or facial recognition, an attacker might be able to reconstruct private training images just by looking at the model's weights (white-box) or its predictions (black-box).

While Differential Privacy (DP) is the standard defense, it works by injecting noise during training. For large datasets, this noise is negligible. However, in few-shot transfer learning—where a pre-trained model is fine-tuned on just a few examples—the "privacy-utility tradeoff" becomes brutal. To stop an attack, you have to add so much noise that the model becomes useless. The authors set out to prove this vulnerability exists and to find a way to secure these models without sacrificing their performance.

Methods

The paper contributes both a new attack framework and a novel defense:

1. The Attack: Reconstructor NNs

The authors developed sophisticated white-box and black-box attacks using a Reconstructor Neural Network.

  • Shadow Training: They train thousands of "shadow models" on public data to mimic the target model's behavior.
  • Softmin-Loss: A novel loss function that allows the reconstructor to focus on the most "vulnerable" individual images in a training set rather than trying to average them.
  • Black-Box Weight Extraction: For black-box attacks, they use recent techniques to extract the hidden weights of the model using only hard-label queries, then feed those extracted weights into their reconstructor.

2. The Defense: Reverse-Role Homomorphic Encryption (RHE)

Homomorphic Encryption (HE) allows math to be performed on encrypted data. Usually, HE is used to encrypt a user's input (like a medical scan) so a cloud server can process it without seeing it.

RHE flips the script. In RHE, the training data is used to train a "head" (the final layers of a network) in a secure environment. These weights are then encrypted. During inference:

  1. The input image passes through a standard, unencrypted "base" model.
  2. The resulting features enter the encrypted head.
  3. All calculations in the head are done via HE, so the weights (which contain the private training data imprints) are never exposed.
  4. The output is an encrypted prediction that only the authorized user can decrypt.

Datasets

The authors evaluated their methods on three standard image benchmarks:

  • MNIST: Handwritten digits (10 classes).
  • CIFAR-10: General objects (10 classes).
  • CelebA: A large-scale face attributes dataset, used here to emulate binary face recognition.

They specifically focused on the "few-shot" regime, testing training sets where $N=10$ to $N=40$ total images.

Key Insights and Ideas

  • DP-SGD is not a silver bullet: The authors provide empirical evidence that for few-shot learning, the privacy budget $\epsilon$ required to stop reconstruction is so high that it causes a 10–30% drop in accuracy.
  • Role Reversal is Efficient: Conventional HE is slow because it encrypts high-dimensional inputs and processes them through deep networks. RHE only encrypts the shallow "head" of a transfer-learned model. By keeping the heavy "base" model unencrypted, they achieve massive speedups.
  • Square Activations: To make HE even faster, they replaced standard ReLU activations with square functions ($x^2$), which are mathematically easier to compute in an encrypted state. Surprisingly, this had a negligible impact on accuracy for shallow heads.

Key Results

  • Attack Success: In one-shot learning scenarios, the white-box attack achieved a True Positive Rate (TPR) of 50–80% at a very low False Positive Rate (1%). Even the black-box attack was effective, reaching up to 68% TPR on CelebA.
  • Defense Performance: Unlike DP-SGD, RHE resulted in zero degradation of classifier utility.
  • Practical Latency: Using the TenSEAL library on a standard laptop (Apple M4 Pro), RHE inference took only 8ms to 56ms for linear heads. Even for more complex 2-layer heads, latency remained under 1.6 seconds, making it viable for many real-world applications.

Limitations and Future Work

  • Per-Class Scaling: The attacks become less effective as the number of images per class increases (beyond 4 images). The authors suggest further research is needed to see if this is a fundamental limit or just a limitation of current reconstructor architectures.
  • Reconstructor Complexity: Training the reconstructor NN is computationally expensive, requiring the generation of millions of shadow models, though the authors note this is highly parallelizable.
  • Base Model Privacy: RHE assumes the base model (pre-trained on public data) does not need protection. If the base model was also trained on sensitive data, RHE would need to be combined with other techniques.
  • Domain Expansion: The current work is limited to image classification; the authors suggest extending RHE to text and speech domains in the future.

Summary updated

BibTeX
@misc{allison2025securing,
  author = {Robert F Allison and Tomasz Maciazek and Henry Bourne},
  title = {{Securing Transfer-Learned Networks with Reverse Homomorphic Encryption}},
  year = {2025},
  eprint = {2505.14323},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.14323},
}
Figure