COAST: Accurate and Efficient Homomorphic Softmax via Anchor Error Cancellation

Softmax is expensive under homomorphic encryption because accurate approximation of its exponential and reciprocal operations over wide dynamic ranges requires high multiplicative depth and costly bootstrapping. We propose COAST, an accurate and efficient homomorphic softmax method that reconstructs probabilities from the original logits using a low-cost, coarse log-partition anchor. Cancellation of the shared anchor error during normalization relaxes intermediate precision requirements and reduces bootstrapping overhead. We establish an output-error bound over specified approximation domains. Furthermore, for fixed polynomial degrees, COAST has $O(n)$ time complexity and $O(\log n)$ multiplicative depth for $n$ logits. Zero-shot plaintext evaluation on five benchmarks with Llama-3.1-8B, Qwen3.8-27B, and Gemma-4-31B shows that COAST largely preserves model accuracy. In 128-key encrypted experiments, compared with THOR (CCS '25) and Cho et al.'s Algorithm 2 (CCS '24), COAST reduces maximum absolute error by factors of up to $3.0\times 10^{4}$ and $7.3\times 10^{4}$ and achieves speedups of up to $2.36\times$ and $4.80\times$, respectively.

Authors

Publication Details

Journal
arXiv
Published
2026-12-01
Primary Topic
Cryptography and Data Security
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

COAST: Accurate and Efficient Homomorphic Softmax via Anchor Error Cancellation

Weijie Miao, Wenyuan Wu, Rui Li
arXiv
Cryptography and Data Security
preprint

COAST: Accurate and Efficient Homomorphic Softmax via Anchor Error Cancellation

Weijie Miao, Wenyuan Wu, Rui Li
preprint en

Abstract

Softmax is expensive under homomorphic encryption because accurate approximation of its exponential and reciprocal operations over wide dynamic ranges requires high multiplicative depth and costly bootstrapping. We propose COAST, an accurate and efficient homomorphic softmax method that reconstructs probabilities from the original logits using a low-cost, coarse log-partition anchor. Cancellation of the shared anchor error during normalization relaxes intermediate precision requirements and reduces bootstrapping overhead. We establish an output-error bound over specified approximation domains. Furthermore, for fixed polynomial degrees, COAST has $O(n)$ time complexity and $O(\log n)$ multiplicative depth for $n$ logits. Zero-shot plaintext evaluation on five benchmarks with Llama-3.1-8B, Qwen3.8-27B, and Gemma-4-31B shows that COAST largely preserves model accuracy. In 128-key encrypted experiments, compared with THOR (CCS '25) and Cho et al.'s Algorithm 2 (CCS '24), COAST reduces maximum absolute error by factors of up to $3.0\times 10^{4}$ and $7.3\times 10^{4}$ and achieves speedups of up to $2.36\times$ and $4.80\times$, respectively.

arXiv
Cryptography and Data Security
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
COAST: Accurate and Efficient Homomorphic Softmax via Anchor Error Cancellation — Weijie Miao, Wenyuan Wu, et al. · arXiv (2026) | TGRS Research Map | TGRS