Skip to main content
QUICK REVIEW

[Paper Review] HeLayers: A Tile Tensors Framework for Large Neural Networks on Encrypted Data

Ehud Aharoni, Allon Adir|arXiv (Cornell University)|Nov 3, 2020
Algorithms and Data CompressionComputer Science6 citations
TL;DR

HeLayers introduces a tile tensors framework that abstracts homomorphic encryption (HE) packing for large neural networks, enabling efficient inference on encrypted data. By optimizing data layout and using a generalized operator system, it achieves 5-minute inference on encrypted AlexNet—orders of magnitude faster than prior non-interactive HE solutions.

ABSTRACT

Privacy-preserving solutions enable companies to offload confidential data to third-party services while fulfilling their government regulations. To accomplish this, they leverage various cryptographic techniques such as Homomorphic Encryption (HE), which allows performing computation on encrypted data. Most HE schemes work in a SIMD fashion, and the data packing method can dramatically affect the running time and memory costs. Finding a packing method that leads to an optimal performant implementation is a hard task. We present a simple and intuitive framework that abstracts the packing decision for the user. We explain its underlying data structures and optimizer, and propose a novel algorithm for performing 2D convolution operations. We used this framework to implement an HE-friendly version of AlexNet, which runs in three minutes, several orders of magnitude faster than other state-of-the-art solutions that only use HE.

Motivation & Objective

  • Address the performance bottleneck in running large neural networks with homomorphic encryption (HE) on encrypted data.
  • Reduce the complexity of HE packing decisions for developers by abstracting low-level cryptographic data layout choices.
  • Enable efficient, scalable inference for large models like AlexNet and SqueezeNet over encrypted inputs using non-interactive HE.
  • Provide a flexible framework that supports trade-offs between latency, throughput, and memory usage via configurable tile tensor layouts.
  • Demonstrate practical, high-performance inference on large-scale models using only non-interactive HE, avoiding client-aided computation.

Proposed method

  • Introduces tile tensors as a high-level abstraction to represent multi-dimensional data with customizable packing strategies across HE ciphertext slots.
  • Employs a generic, layout-agnostic operator system that works across all tile tensor configurations, enabling seamless tensor operations without reimplementation.
  • Uses a configurable optimizer to select the best tile tensor layout based on user-specified goals (e.g., low latency, high throughput, memory efficiency).
  • Applies novel algorithms for 2D convolution operations that exploit SIMD homomorphic evaluation and efficient slot utilization in CKKS-style HE schemes.
  • Supports dynamic batching by adjusting the tile tensor’s batch dimension, allowing trade-offs between latency and throughput.
  • Leverages im2col and matrix diagonalization techniques adapted for HE-friendly computation, minimizing redundant operations and rotations.

Experimental results

Research questions

  • RQ1How can we abstract and automate the complex task of data packing in homomorphic encryption for large neural networks?
  • RQ2What is the impact of different tensor packing strategies on performance, memory usage, and communication costs in non-interactive HE inference?
  • RQ3Can a generic, reusable framework be built to support diverse neural network operations while maintaining high performance across various HE configurations?
  • RQ4How does the proposed tile tensor framework compare to existing systems like CHET or nGraph-HE2 in terms of latency, throughput, and memory efficiency?
  • RQ5To what extent can non-interactive HE be used for practical, large-scale neural network inference without requiring client-side interaction?

Key findings

  • HeLayers achieves end-to-end inference on encrypted large-input AlexNet in approximately 5 minutes, a significant improvement over prior non-interactive HE solutions that took over 3 hours.
  • The framework reduces latency by 1.24× compared to CHET on the SqueezeNet-CIFAR benchmark when optimized for low latency, with an 11.5× speedup in amortized latency when using larger batch sizes.
  • Throughput is improved by up to 11.5× over CHET when using a batch size of 64, demonstrating effective load balancing across HE ciphertext slots.
  • The tile tensor abstraction reduces development complexity by enabling consistent debugging and error reporting via a standardized shape notation.
  • The optimizer successfully selects optimal packing configurations that balance memory usage and performance, avoiding suboptimal layouts common in naïve packing strategies.
  • The framework supports practical inference on large models like AlexNet without requiring client-aided computation, making it suitable for real-world deployment under privacy regulations.

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.