[论文解读] Efficient ML Models for Practical Secure Inference
本文提出了一套框架,通过优化模型架构与计算,使深度学习模型的隐私安全推理变得实际可行。该框架引入了密码学友好的 X-运算符、高效的卷积分解方法以及 Winograd 算法集成,使通信成本最高降低 30×,同时在胸部 X 光诊断的 DenseNet-121 模型上仅造成最小的精度损失(AUC 损失 ≤0.02)。
ML-as-a-service continues to grow, and so does the need for very strong privacy guarantees. Secure inference has emerged as a potential solution, wherein cryptographic primitives allow inference without revealing users' inputs to a model provider or model's weights to a user. For instance, the model provider could be a diagnostics company that has trained a state-of-the-art DenseNet-121 model for interpreting a chest X-ray and the user could be a patient at a hospital. While secure inference is in principle feasible for this setting, there are no existing techniques that make it practical at scale. The CrypTFlow2 framework provides a potential solution with its ability to automatically and correctly translate clear-text inference to secure inference for arbitrary models. However, the resultant secure inference from CrypTFlow2 is impractically expensive: Almost 3TB of communication is required to interpret a single X-ray on DenseNet-121. In this paper, we address this outstanding challenge of inefficiency of secure inference with three contributions. First, we show that the primary bottlenecks in secure inference are large linear layers which can be optimized with the choice of network backbone and the use of operators developed for efficient clear-text inference. This finding and emphasis deviates from many recent works which focus on optimizing non-linear activation layers when performing secure inference of smaller networks. Second, based on analysis of a bottle-necked convolution layer, we design a X-operator which is a more efficient drop-in replacement. Third, we show that the fast Winograd convolution algorithm further improves efficiency of secure inference. In combination, these three optimizations prove to be highly effective for the problem of X-ray interpretation trained on the CheXpert dataset.
研究动机与目标
- 解决大型深度学习模型在安全推理中通信开销过大的问题。
- 识别并优化安全推理中的主要瓶颈,尤其是大型线性层与卷积操作。
- 在医疗等高风险领域实现实用的、保护隐私的机器学习推理,采用安全的两方计算(2PC)。
- 将高效、安全友好的运算符与算法集成到 CrypTFlow2 框架中,实现端到端的安全推理编译。
- 证明在不牺牲模型精度或正确性的情况下,可实现显著的效率提升。
提出的方法
- 设计并实现了 X-运算符,作为标准卷积层的隐私安全、高效即插即用替代方案,结合了分解、混洗操作与高加法计算。
- 应用分解技术,将密集卷积转换为深度可分离卷积,平均使通信量减少 4.07×。
- 将快速 Winograd 卷积算法集成到 CrypTFlow2 的 Athos 编译器前端,以在不损失精度的前提下加速密集卷积。
- 使用混洗操作优化分解卷积中的通道变换,平均使通信量减少 1.1×。
- 将 X-运算符与 Winograd 及其他优化技术结合,实现在多种模型架构上的累积效率提升。
- 在 CrypTFlow2 中对所有优化技术进行端到端评估,确保明文推理与安全推理输出在位级别完全一致。
实验结果
研究问题
- RQ1在像 DenseNet-121 这类大型模型中,安全推理的主要通信瓶颈是什么?
- RQ2能否将高效的明文推理运算符适配为降低安全推理成本,同时不损害精度?
- RQ3X-运算符在安全推理中替代标准卷积时,其在通信与延迟方面的效率如何?
- RQ4Winograd 算法在安全推理中对密集卷积的通信成本能降低多少?
- RQ5结合架构选择、自定义运算符与算法优化,能否实现医疗图像分析的实用化安全推理?
主要发现
- X-运算符相比基线 DenseNet-121,将通信成本最高降低了 30.8×(ResNet-18 为 19.1×,MobileNetV3 为 30.15×),仅造成 0.02 的 AUC 损失。
- 分解卷积平均使通信量减少 4.07×,其中 ResNet-18 实现了 12.41× 的减少(R′F vs DD)。
- Winograd 算法平均使密集卷积的通信量减少 2.12×,且未造成精度损失。
- 混洗操作带来边际收益,使分解卷积的通信量平均再减少 1.1×。
- X-运算符与 Winograd 的结合使通信量降低 30.8×(SXW),相比基线 DenseNet-121 仅造成 0.02 的 AUC 损失。
- 所有优化后的模型均与明文推理保持位级别等价,确保了正确性与鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。