NASS: Optimizing Secure Inference via Neural Architecture Search

Song Bian, Weiwen Jiang, Qing Lu, Yiyu Shi, Takashi Sato

Introduction: The Performance Tax of Privacy

Secure Inference (SI) enables a client to utilize a server’s AI model without exposing private data, while simultaneously protecting the server’s proprietary model. This is typically achieved through cryptographic protocols such as Homomorphic Encryption (HE) and Garbled Circuits (GC). However, these methods impose a massive "performance tax," often running orders of magnitude slower than standard inference.

Traditionally, research has focused on accelerating the underlying cryptography for fixed neural network architectures (e.g., ResNet). NASS (Neural Architecture Search for Secure inference) shifts this paradigm by treating cryptographic protocols as first-class design elements. The authors observe that cryptographic performance is highly non-linear; for instance, a minor increase in quantization can trigger a jump in encryption parameters, leading to a performance "cliff."

Non-linear performance costs in secure inference.

The NASS Framework

NASS is an integrated framework that employs Reinforcement Learning (RL) to co-optimize neural architecture, quantization, and encryption parameters.

The NASS framework architecture.

The framework consists of several key components:

  1. The Controller: An RL-based engine that predicts architecture parameters (layers, filters) and quantization levels.
  2. Cryptographic Estimators: To avoid the prohibitive cost of full secure inference during the search, NASS utilizes a Parameter Instantiation Engine (PIE) to determine minimal valid security parameters and a Performance Characterization Engine (PCE) to estimate latency and bandwidth.
  3. The "Switch" Mechanism: To accelerate the search process, the network is only retrained from scratch when the architecture changes. If only quantization parameters are adjusted, weights are reused for evaluation, dramatically reducing search time.
  4. Multi-Objective Reward: The RL agent optimizes a score balancing accuracy, inference latency, and communication bandwidth.

Key Insights: The Necessity of Joint Optimization

A central finding of the research is that optimizing architecture, quantization, and cryptographic parameters in isolation yields sub-optimal results. Because secure inference costs are "steppy," NASS is designed to find the "sweet spot" just before these performance cliffs. By modeling cryptographic primitives as design elements with associated reward costs, the search engine treats security overhead with the same priority as traditional metrics like FLOPs or parameter count.

Experimental Results

NASS was evaluated on MNIST, Fashion-MNIST, and CIFAR-10. On the CIFAR-10 benchmark, NASS significantly outperformed the previous state-of-the-art Gazelle protocol:

  • Accuracy: Increased from 81.6% to 84.6%.
  • Latency: Achieved a 2x reduction in inference runtime.
  • Bandwidth: Reduced communication overhead by 1.9x.

For simpler tasks like MNIST, NASS identified architectures achieving 98.6% accuracy with sub-second inference times (0.79s), bringing secure inference closer to practical viability.

Limitations and Future Directions

While effective, the search process remains computationally intensive, requiring approximately 60 hours on a high-end GPU for CIFAR-10. Additionally, the current performance estimators are tailored to the BFV cryptosystem and Gazelle protocol; adapting NASS to other backends like CKKS would require rebuilding these estimators. Future work may also expand the search space to include modern architectural blocks like Transformers.

Summary updated

BibTeX
@inproceedings{bian2020nass,
  author = {Song Bian and Weiwen Jiang and Qing Lu and Yiyu Shi and Takashi Sato},
  title = {{NASS: Optimizing Secure Inference via Neural Architecture Search}},
  booktitle = {ECAI},
  year = {2020},
  url = {https://openreview.net/forum?id=X6PDmCJpaW},
}
Figure