SEAF: Secure Evaluation on Activation Functions with Dynamic Precision for Secure Two-Party Inference

Hao Guo and Zhaoqian Liu, The Chinese University of Hong Kong, Shenzhen; Ximing Fu, Harbin Institute of Technology, Shenzhen; Pengcheng Laboratory; Key Laboratory of Cyberspace and Data Security, Ministry of Emergency Management; Zhusen Liu, Hangzhou Innovation Institute of Beihang University

Secure evaluation of non-linear functions is one of the most expensive operations in secure two-party computation, particularly for activation functions in privacy preserving machine learning (PPML). This work introduces SEAF, a novel framework for efficient Secure Evaluation on Activation Functions. SEAF is based on the linear approximation approach, but enhances it by introducing two key innovations: Trun-Eq based interval test protocols and linear approximation with dynamic precision, which have the potential for broader applicability. Furthermore, we classify common activation functions into several categories, and present specialized methodsa to evaluate them using our enhanced techniques. Our implementation of SEAF demonstrates 3.5 x to 5.9 x speedup on activation functions Tanh and Sigmoid compared to SirNN (S&P '21). When applied on GELU, SEAF outperforms Iron (NeurIPS '22) by more than 10 x and Bolt (S&P '24) by up to 3.4 x. For end-to-end secure inference on BERT, the original GELU accounts for 31.3% and 22.5% of the total runtime in Iron and Bolt, respectively. In contrast, our optimized GELU reduces these proportions to 4.3% and 9.8%, eliminating GELU as a bottleneck in secure inference.

Category: 
Long Presentation

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.

BibTeX
@inproceedings {309552,
author = {Hao Guo and Zhaoqian Liu and Ximing Fu and Zhusen Liu},
title = {{SEAF}: Secure Evaluation on Activation Functions with Dynamic Precision for Secure {Two-Party} Inference},
booktitle = {34th USENIX Security Symposium (USENIX Security 25)},
year = {2025},
isbn = {978-1-939133-52-6},
address = {Seattle, WA},
pages = {3417--3435},
url = {https://www.usenix.org/conference/usenixsecurity25/presentation/guo-hao-seaf},
publisher = {USENIX Association},
month = aug
}