Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware

Florian Tramèr, Dan Boneh

Abstract

Slalom is a novel framework designed to enable high-performance, secure, and private Deep Neural Network (DNN) inference by partitioning workloads between a trusted but computationally constrained CPU (a Trusted Execution Environment like Intel SGX) and a fast but untrusted GPU. By leveraging efficient cryptographic verification and blinding techniques, Slalom achieves up to a 20x throughput increase over traditional secure hardware methods without compromising integrity or data privacy.

Introduction

As Machine Learning (ML) moves into sensitive areas like healthcare and finance, outsourcing tasks to the cloud presents a dilemma: how to ensure the server does not peek at data (privacy) or take shortcuts in computation (integrity). Current solutions typically fall into two categories: pure cryptographic methods (e.g., Homomorphic Encryption), which are mathematically elegant but computationally prohibitive, and Trusted Execution Environments (TEEs). While TEEs provide secure enclaves, they are currently restricted to CPUs with limited memory and lack the massive parallel processing power of GPUs.

Slalom addresses this "performance gap" by enabling TEEs to securely offload the bulk of DNN computation to untrusted GPUs.

Methods: Selective Outsourcing

Slalom’s core strategy is selective outsourcing. It recognizes that DNNs consist of two types of operations:

  1. Linear Layers (Convolutions, Fully Connected): These account for over 98% of the computation but are mathematically simple to verify.
  2. Non-Linear Layers (ReLU, Pooling): These are computationally light but much harder to verify or outsource privately.
The Slalom protocol for verifiable and private execution, utilizing TEE-GPU partitioning.

The workflow involves three key components:

  • Integrity via Freivalds’ Algorithm: The TEE offloads large matrix multiplications to the GPU and uses Freivalds’ algorithm—a randomized check—to verify the result significantly faster than the computation itself.
  • Privacy via Blinding: To maintain input secrecy, the TEE uses an additive stream cipher. By leveraging the distributive property of linear functions—$f(x + r) = f(x) + f(r)$—the TEE masks input $x$ with a random factor $r$ before sending it to the GPU.
  • Quantization: Since cryptographic checks operate over finite fields, Slalom converts standard floating-point DNNs into fixed-point representations.

Evaluation and Results

The researchers evaluated Slalom using the ImageNet validation set across several canonical architectures, including VGG16, MobileNet, and various ResNet variants.

Comparison of Slalom against existing secure execution approaches in terms of integrity, privacy, and relative throughput.

Key findings include:

  • Throughput Gains: For verifiable inference, Slalom achieved 6x to 20x increases in throughput compared to running the entire model inside an SGX enclave. With input privacy (blinding) added, speedups remained significant at 4x to 11x.
  • Accuracy: The quantization scheme resulted in a negligible drop in accuracy (less than 0.5% for top-1 and top-5 accuracy on ImageNet).
  • Energy Efficiency: Slalom is roughly 3.4x to 17.1x more energy-efficient than the TEE-only baseline, as the GPU completes the work much faster per watt consumed.

Discussion and Insights

Slalom benefits from the co-location of the TEE and GPU, allowing for high-bandwidth interaction. Furthermore, because DNN weights are fixed during inference, the TEE can precompute parts of the verification check. This preprocessing not only speeds up the online phase but also compresses the model's memory footprint inside the TEE (e.g., reducing VGG16's footprint from 550MB to 36MB), helping it stay within strict hardware limits.

Limitations and Future Work

Slalom currently focuses on inference; applying these techniques to training is harder because weights change constantly, preventing static preprocessing. Additionally, while the TEE protects data from the OS, it remains susceptible to sophisticated side-channel attacks (like cache-timing), which may require future hardware improvements. Finally, if GPU speeds continue to outpace TEE-GPU communication links, the relative gains of Slalom may eventually diminish.

Summary updated

BibTeX
@inproceedings{tramer2019slalom,
  author = {Florian Tramèr and Dan Boneh},
  title = {{Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=np097uRFjB},
}
Figure