Linearizing Models for Efficient yet Robust Private Inference

Sreetama Sarkar, Souvik Kundu, Peter Anthony Beerel · DOI

Introduction

Private Inference (PI) is a critical technology that allows a server to execute neural network models on a client's encrypted data without compromising input privacy. However, the cryptographic primitives required for PI, such as Homomorphic Encryption, introduce significant latency for non-linear operations. Specifically, ReLU activations are exceptionally costly, often being ~340x slower than standard convolutional layers.

To mitigate this, researchers have developed "linearized" models that prune the majority of ReLU activations. While these models are computationally efficient, they are notoriously fragile, suffering from poor performance when encountering natural noise (e.g., blur, weather) or mathematically crafted adversarial attacks. This paper introduces RLNet, a framework designed to bridge the gap between computational efficiency and model robustness in privacy-preserving AI.

The RLNet Framework

RLNet achieves a "triple win"—high accuracy on clean, naturally corrupted, and adversarial images—through a strategic three-stage training pipeline and a novel dual-path architecture.

Three-Stage Pipeline

  1. Robust Teacher Training: An "All-ReLU" (AR) teacher model is trained using a combination of Augmix for natural robustness and Adversarial Training (via PGD attacks).
  2. ReLU Mask Identification: The framework identifies the most critical ReLUs for performance, freezing a "mask" that retains only a small fraction (often <10%) of the original activations.
  3. Three-Way Robust Distillation: A "Partial-ReLU" (PR) student model is fine-tuned to mimic the robust teacher while adhering to the sparse ReLU budget.

Dual Batch Normalization (BN)

A core innovation of RLNet is the use of a shared-weight architecture with two distinct sets of Batch Normalization layers. As shown in the architecture diagram below, one path handles "normal" data (clean and naturally perturbed), while a separate path handles adversarial data. This allows the model to adapt to the distinct statistical distributions of attacked versus non-attacked images without the overhead of maintaining two separate models.

RLNet architecture featuring the dual-path CNN block and masked ReLU mechanism.

Evaluation and Key Results

The researchers evaluated RLNet across standard benchmarks (CIFAR-10, CIFAR-100, Tiny-ImageNet) and their corrupted counterparts (-C variants) which include 15 types of natural noise.

RLNet demonstrates significant improvements over previous state-of-the-art linearized models like SeNet:

  • ReLU Reduction: Achieved up to 11.14× fewer ReLUs compared to standard models.
  • Robustness Gains: Improved adversarial accuracy by up to ~47% and naturally perturbed accuracy by up to ~16.4% at similar ReLU budgets.
  • Clean Performance: Even on standard images, RLNet saw gains of up to ~1.5% over non-robust linearized counterparts.
Comparison of Clean Accuracy (CA), Naturally-perturbed Accuracy (NPA), and Adversarial Accuracy (AdvA) across different training methods.

Key Insights and Future Directions

  • ReLU Pruning as a Regularizer: Surprisingly, reducing ReLUs can sometimes improve natural robustness (NPA), suggesting that excessive non-linearities may contribute to noise sensitivity.
  • Efficiency of Dual BN: While some prior work advocated for "Triple BN" paths, RLNet proves that grouping clean and augmented data into a single path is equally effective and more resource-efficient.
  • Limitations: The current system relies on a mode-switching mechanism based on prediction confidence to choose between the normal and adversarial paths. Future work will focus on automating this transition and extending the framework to Vision Transformers (ViTs), which utilize different non-linearities like Softmax and GELU that present unique cryptographic challenges.

Summary updated

BibTeX
@misc{sarkar2024linearizing,
  author = {Sreetama Sarkar and Souvik Kundu and Peter Anthony Beerel},
  title = {{Linearizing Models for Efficient yet Robust Private Inference}},
  year = {2024},
  eprint = {2402.05521},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.05521},
}
Figure