atlas

Research map / Architectures and efficiency / Quantization

Ditto: Quantization-aware Secure Inference of Transformers upon MPC

ICML 2024 · Architectures and efficiency › Quantization · approach: Post-training quantization of ViTs · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Ditto combines static dyadic (fixed-point) quantization with quantization-aware distillation and new MPC type-conversion primitives (upcast/downcast across rings) to speed up 3PC secure Transformer inference for Bert and GPT2.

Problem

Secure (MPC-based) Transformer inference is costly in computation and communication, and plaintext quantization (scaling, clipping, dynamic min/max) does not translate efficiently to MPC, with type conversions between rings being non-trivial.

Approach

Use MPC-friendly static dyadic fixed-point quantization with layer-wise precision, recover accuracy via layer-wise quantization-aware distillation, and implement secure upcast/downcast primitives so that different fixed-point types live in different RSS rings during inference.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Ditto quantization and Quad GeLU approximation instead of the vanilla baselineBert-base · RTEaccuracy: 68.59 -> 67.82Hurt
Use Ditto quantization and Quad GeLU approximation instead of the vanilla baselineBert-base · CoLAMatthews correlation: 57.06 -> 54.52Hurt
Use Ditto quantization and Quad GeLU approximation instead of the vanilla baselineBert-base · QQPF1: 87.96 -> 87.72Hurt
Use Ditto quantization and Quad GeLU approximation instead of the vanilla baselineBert-base · QNLIaccuracy: 91.62 -> 91.78Helped
Use Ditto quantization and Quad GeLU approximation instead of the vanilla baselineGPT2-base · Wikitext-103perplexity: 12.25 -> 13.78Hurt
Use Ditto secure quantization instead of PUMABert-base · input length 128, LANruntime (s): 43.98 -> 30.58Helped
Use Ditto secure quantization instead of PUMABert-base · input length 128, LANcommunication (GB): 10.59 -> 4.35Helped
Add Quad GeLU approximation to Ditto quantization (ablation)Ditto on Bert-base · RTEaccuracy: 67.87 -> 67.82No clear effect
Add Quad GeLU approximation to Ditto quantization (ablation)Ditto on Bert-base · CoLAMatthews correlation: 54.17 -> 54.52Helped
Add Quad GeLU approximation to Ditto quantization (ablation)Ditto on Bert-base · QQPF1: 87.15 -> 87.72Helped
Add Quad GeLU approximation to Ditto quantization (ablation)Ditto on Bert-base · QNLIaccuracy: 91.74 -> 91.78Helped
Add Quad GeLU approximation to Ditto quantization (ablation)Ditto on Bert-base · inferencespeedup over vanilla baseline: 1.41× -> 1.74×Helped

Surprising findings

Limitations

Experimental setup

Datasets: GLUE RTE GLUE CoLA GLUE QQP GLUE QNLI Wikitext-103 BookCorpus English Wikipedia

Benchmarks: GLUE RTE GLUE CoLA GLUE QQP GLUE QNLI Wikitext-103

Metrics: accuracy Matthews correlation F1 perplexity runtime (s) communication (GB)

Baselines: MPCFormer PUMA SPU vanilla baseline Iron BumbleBee

Builds on: MPCFormer PUMA SecretFlow-SPU knowledge distillation 2-out-of-3 replicated secret sharing

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy