COAST: Accurate and Efficient Homomorphic Softmax via Anchor Error Cancellation
cs.CR
Submitted: 2026-12-01
Updated: 2026-12-01
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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…
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(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.
Related papers
- RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities
- Introducing the Generative Application Firewall (GAF)
- Opal: Private Memory for Personal AI
- Fuel as Identity: Authenticating Inter-Satellite Laser Links after Total Key Compromise
- Merkle Trees Minimize Verifier Complexity in the ROM
- VulCPE: Context-Aware Cybersecurity Vulnerability Retrieval and Management