Skip to main content
QUICK REVIEW

[Paper Review] Selective Network Linearization for Efficient Private Inference

Minsu Cho, Ameya Joshi|arXiv (Cornell University)|Feb 4, 2022
Privacy-Preserving Technologies in DataComputer Science7 citations
TL;DR

This paper proposes Selective Network Linearization (SNL), a gradient-based method that selectively replaces ReLU activations with linear units to reduce latency in private inference while preserving accuracy. By training a network with learnable, binary-scaled parametric ReLUs and an ℓ1 penalty to encourage sparsity, SNL achieves up to 2.2× lower latency or 4.25% higher accuracy than state-of-the-art methods on CIFAR-100 benchmarks.

ABSTRACT

Private inference (PI) enables inference directly on cryptographically secure data.While promising to address many privacy issues, it has seen limited use due to extreme runtimes. Unlike plaintext inference, where latency is dominated by FLOPs, in PI non-linear functions (namely ReLU) are the bottleneck. Thus, practical PI demands novel ReLU-aware optimizations. To reduce PI latency we propose a gradient-based algorithm that selectively linearizes ReLUs while maintaining prediction accuracy. We evaluate our algorithm on several standard PI benchmarks. The results demonstrate up to $4.25\%$ more accuracy (iso-ReLU count at 50K) or $2.2 imes$ less latency (iso-accuracy at 70\%) than the current state of the art and advance the Pareto frontier across the latency-accuracy space. To complement empirical results, we present a "no free lunch" theorem that sheds light on how and when network linearization is possible while maintaining prediction accuracy. Public code is available at \url{https://github.com/NYU-DICE-Lab/selective_network_linearization}.

Motivation & Objective

  • To reduce the runtime bottleneck in private inference caused by non-linear ReLU operations.
  • To develop an automated, fine-grained method for ReLU reduction that avoids manual architecture search.
  • To maintain high model accuracy while minimizing the number of ReLU operations in deep networks.
  • To provide theoretical insight into the memorization capacity trade-offs of selective linearization.

Proposed method

  • Uses parametric ReLUs (pReLUs) with trainable, binary-scaled slope parameters (0 or 1) for each ReLU neuron.
  • Applies an ℓ1 penalty on slope coefficients to encourage sparsity and enforce binary constraints during training.
  • Employs a scheduled decay of the ℓ1 penalty to balance accuracy and ReLU reduction.
  • Performs standard backpropagation with no additional search or architecture retraining.
  • Enables fine-grained, per-feature-map control over which ReLUs are linearized.
  • Integrates seamlessly into existing deep networks, including ResNets, without altering network depth or width.

Experimental results

Research questions

  • RQ1Can a gradient-based method achieve better latency-accuracy trade-offs than existing ReLU reduction techniques in private inference?
  • RQ2How does selective linearization affect the memorization capacity of deep networks compared to pruning?
  • RQ3What is the optimal distribution of ReLU retention across layers for maximizing capacity under a ReLU budget?
  • RQ4Can a single training procedure replace multi-stage, heuristic ReLU culling and thinning?
  • RQ5Under what conditions is network linearization possible without sacrificing predictive accuracy?

Key findings

  • SNL achieves 2.2× lower latency than the state of the art at 70% test accuracy on CIFAR-100.
  • At a fixed ReLU count of 50K, SNL improves test accuracy by up to 4.25% compared to prior work.
  • SNL advances the Pareto frontier in the latency-accuracy trade-off space across multiple benchmarks.
  • Theoretical analysis shows that selectively linearized networks have strictly lower memorization capacity than full ReLU networks when α1 or α2 < 1.
  • The optimal ReLU retention ratio is inversely proportional to layer width, with more neurons linearized in wider first layers.
  • For a 3-layer network with d1=50,000 and d2=5,000 under a ReLU budget of 10,000, SNL's optimal configuration linearizes 42,500 neurons in the first layer and 7,500 in the second.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.