When Optimizations Backfire: The Paradox of Plaintext Optimizations in Privacy-Preserving ML Compilers
Yichen Li, Jin Tan, Dongwei Xiao, Yiteng Peng, Pingchuan Ma, Junming Ma, Shoumeng Yan, Shuai Wang, Fengwei Zhang
摘要
Growing concerns about data security and privacy have fueled the widespread adoption of Privacy-Preserving Machine Learning (PPML). Cryptography-based PPML, which allows computation directly on encrypted data, significantly mitigates data leakage risks. To facilitate its adoption, Ciphertext Machine Learning Compilers (CMLCs) automate the translation of high-level ML procedures into low-level circuits for encrypted data. Recently, CMLCs have increasingly adopted infrastructure from Plaintext Machine Learning Compilers (PMLCs). While integrating Plaintext-Domain Optimization Passes (PDOPs) into CMLCs offers potential performance, usability, and extensibility benefits, our study shows it can also lead to severe performance regressions — a risk that has been largely overlooked. To address this, we introduce Hopta, a hybrid domain optimization defects tester and analyzer, aiming to find optimization bugs that can degrade the performance of compiled circuits from CMLCs. We carefully design two core components: (1) an optimization pipeline mutation mechanism to detect optimization anomalies by selectively enabling/disabling PDOPs, and (2) a profile-guided code reduction tool that efficiently simplifies defect-triggering programs to isolate optimization anomalies and facilitate debugging. Applying Hopta to SecretFlow-SPU, a production-grade CMLC, we identified 11 optimization defects (spanning matrix indexing,arithmetic/boolean conversion, and cost model deviation) that led to substantial performance regressions, with compiled circuits incurring up to 310.2% increased cost. Our comprehensive analysis provides empirical insights into fundamental differences between plaintext and ciphertext domain optimization strategies, offering crucial guidance for future CMLC development. We conclude with a brief discussion of extensions to other hybrid ML compilers, underscoring the methodology’s compiler-agnostic nature. This work establishes a new research direction for enhancing CMLC performance and the practical deployment of privacy-preserving ML systems.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine Learning 引用了 High-Throughput Semi-Honest Secure Three-Party Computation with an Honest Majority
- SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine Learning 引用了 SoK: General Purpose Compilers for Secure Multi-Party Computation
- SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine Learning 引用了 ABY3: A Mixed Protocol Framework for Machine Learning
- SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine Learning 引用了 CrypTen: Secure Multi-Party Computation Meets Machine Learning
- SoK: General Purpose Compilers for Secure Multi-Party Computation 引用了 ABY3: A Mixed Protocol Framework for Machine Learning
- CrypTen: Secure Multi-Party Computation Meets Machine Learning 引用了 High-Throughput Semi-Honest Secure Three-Party Computation with an Honest Majority
- CrypTen: Secure Multi-Party Computation Meets Machine Learning 引用了 SoK: General Purpose Compilers for Secure Multi-Party Computation
- CrypTen: Secure Multi-Party Computation Meets Machine Learning 引用了 ABY3: A Mixed Protocol Framework for Machine Learning
它引用的 Paper19
- ABY3: A Mixed Protocol Framework for Machine LearningPayman Mohassel, Peter RindalCCS 2018 · 898 次引用
- CrypTen: Secure Multi-Party Computation Meets Machine LearningBrian Knott, Shobha Venkataraman, Awni Y. Hannun, Shubho Sengupta 等NeurIPS 2021 · 573 次引用
- High-Throughput Semi-Honest Secure Three-Party Computation with an Honest MajorityToshinori Araki, Jun Furukawa, Yehuda Lindell, Ariel Nof 等CCS 2016 · 463 次引用
- SoK: General Purpose Compilers for Secure Multi-Party ComputationMarcella Hastings, Brett Hemenway, Daniel Noble, Steve ZdancewicS&P 2019 · 181 次引用
- SecretFlow-SPU: A Performant and User-Friendly Framework for Privacy-Preserving Machine LearningJunming Ma, Yancheng Zheng, Jun Feng, Derun Zhao 等USENIX ATC 2023 · 73 次引用
相关 Paper
- AHEC: End-to-end Compiler Framework for Privacy-preserving Machine Learning AccelerationHuili Chen, Rosario Cammarota, Felipe Valencia, Francesco Regazzoni 等DAC 2020 · 10 次引用
- HawkEye: Statically and Accurately Profiling the Communication Cost of Models in Multi-party LearningWenqiang Ruan, Xin Lin, Ruisheng Zhou, Guopeng Lin 等USENIX Security 2025
- Testing and Understanding Deviation Behaviors in FHE-Hardened Machine Learning ModelsYiteng Peng, Daoyuan Wu, Zhibo Liu, Dongwei Xiao 等ICSE 2025 · 1 次引用
- Accelerating Privacy-Preserving Machine Learning With GeniBatchXinyang Huang, Junxue Zhang, Xiaodian Cheng, Hong Zhang 等EuroSys 2024 · 8 次引用
- BOLT: Privacy-Preserving, Accurate and Efficient Inference for TransformersQi Pang, Jinhao Zhu, Helen Möllering, Wenting Zheng 等S&P 2024 · 149 次引用
