谷歌发布联邦学习隐私保护新进展
谷歌回顾其联邦学习系统发展,强调通过差分隐私算法实现可验证的隐私保护。文章指出矩阵分解 DP-FTRL 等技术在生产级模型中提供了强隐私保证,并重申了数据最小化与透明性等核心原则。
报道正文
本文目录9 个章节
2017 年,Google 推出了 联邦学习(Federated Learning, FL),这是一种在去中心化的私有数据上训练模型的机器学习技术。它已被用于支持日常实用功能,包括 Gboard 上的 下一个词预测 和 智能回复,Google Messages 中的 回复建议,以及 Android 系统中的 智能文本选择。
我们的联邦学习系统开发遵循四项核心 隐私原则:(1) 数据最小化,(2) 数据匿名化,(3) 透明性与控制权,以及 (4) 可验证性与可审计性。多年来的匿名化研究进展使得生产环境模型能够通过诸如 矩阵分解 DP-FTRL(MF-DP-FTRL)和 结合安全聚合的分布式差分隐私 等算法,获得 强差分隐私(DP)保证。2025 年,我们 提出 了基于这四项原则的联邦学习演进定义:
联邦学习(FL)是一种机器学习场景,其中多个实体(客户端)在服务提供者的协调下协作解决一个机器学习问题。完整的联邦学习系统应使客户端能够对其数据、允许访问其数据的工作负载集合以及这些工作负载的匿名化属性保持完全控制。联邦学习系统应为那些由联邦学习客户端管理数据的用户提供适当的透明性和控制权。
在“面向联邦数据的可证明隐私学习”一文中,我们发布了下一代联邦学习(FL)系统。该系统利用可信执行环境(TEEs),提供完全可验证且可审计的数据匿名化保障。在 TEE 中运行的逻辑支持远程证明(第三方可以验证正在执行的逻辑),同时具备机密性(其内部状态不可被观测)和完整性(逻辑不会被篡改),但需受限于当前一代 TEE 的局限性。我们的新型基于 TEE 的 FL 系统充分利用了 TEE 在单机层面提供的这些特性,构建了一个端到端完全可验证的 FL 系统,从而实现了更强的隐私保障和更高的准确性。Gboard? 已经采用了这一新系统,并相比我们之前的 FL 系统获得了显著更快的计算速度。
基于单个 TEE 构建可验证的隐私保护型 FL 系统
我们的基于 TEE 的 FL 系统建立在此前关于机密联邦分析和可证明的隐私洞察的研究成果之上。
该系统协调四个核心操作概念:
- 数据上传:客户端设备在本地对训练样本进行加密并上传。设备预先授权一项 访问策略,该策略定义了允许处理此数据的 TEE 计算集合,且这些计算仅发布匿名化结果。客户端要求将访问策略发布到公共透明度日志中。
- KMS 与策略验证:密钥管理系统(KMS)由一个实现 RAFT 共识协议 的 TEE 集群组成,它仅向符合访问策略中计算要求的服务器端 TEE 工作负载提供解密密钥。
- 工作负载执行:数据处理 TEE 执行一个实现训练循环的 Python 程序。这个“根”TEE 将可并行化的子任务委托给一组工作节点 TEE。分布式逻辑使用 Federated Language 表达,这是一种开源、框架无关的编排语言,源自曾支持我们早期联邦学习(FL)系统的 TensorFlow Federated。训练循环会定期向数据分析师发布匿名化的模型权重。
- 容错恢复:Python 程序在训练轮次结束时保存一个经 KMS 加密的恢复状态。这可用于从间歇性的根节点或工作节点故障中恢复,而不会泄露任何额外的隐私敏感信息。
有关基于 TEE 的联邦学习系统设计的更多细节,请参阅我们的白皮书,Toward provably private learning from federated data。
基于 TEE 的联邦学习如何增强隐私保护
在早期的联邦学习系统中,设备数据被上传以用于即时聚合,但外部观察者无法验证这些数据是否从未被记录或检查。随后,Secure Aggregation 允许通过密码学手段保护上传数据,但与 最先进的中心差分隐私(DP)保证 不兼容。我们新的基于 TEE 的系统代表了我们在彻底消除对服务器运营商信任需求这一持续努力中的下一个里程碑。
在我们新的基于 TEE 的联邦学习(FL)系统中,工作负载运营商只能看到指标和经过差分隐私处理的模型权重。从设备收集的加密训练数据只能在运行访问策略中指定的 Python 训练程序的 TEE 内解密和处理,且仅在上传后的有限时间内有效。
公共透明度日志与可复现构建
参与我们新基于 TEE 的 FL 系统的设备知道可能访问其上传数据的服务器工作负载全集。代表这些潜在未来服务器工作负载的访问策略已发布到 Rekor(一个公共透明度日志),外部审计人员能够观察这些日志,以跟踪设备可能参与的所有服务器端工作负载。
我们 FL 系统中使用的 KMS 和数据处理二进制文件可以从发布在 Confidential Federated Compute GitHub 仓库中的开源代码进行可复现构建。
通过动态侧加载实现可验证执行
在我们早期的 FL 系统中,服务器上运行的逻辑既无法被设备也无法被审计人员验证,因此我们需要被信任能正确地向梯度总和添加随机噪声以提供差分隐私。
在我们新的基于 TEE 的 FL 系统中,发布到 Rekor 的访问策略直接描述了表达 FL 训练逻辑的 Python 程序。为了在保护专有模型架构和数据预处理逻辑的同时保持可审计性,我们的数据处理 TEE 支持在运行时将序列化信息侧加载到 Python 程序中。只要所有与隐私相关的逻辑仍硬编码在 Python 程序中,这种侧加载功能允许必须保持专有的逻辑在 TEE 中运行,同时仍提供强大的外部可验证隐私保证(关于侧信道观测的讨论见下文)。
Gboard 如何使用基于 TEE 的 FL
Gboard 已部署此基于 TEE 的 FL 系统,以推出具有更强隐私保证和更高准确性的英语和日语下一词预测模型。这些改进可归因于新系统设计的几个方面。
缓解昼夜可用性约束
[注:本文篇幅超长,以上为核心前篇精译,后续内容保留原文呈现]
By collecting all device uploads before running the server-side training workload, we no longer have to worry about diurnal variations in device availability impacting training progress. At server-side execution time, we can dynamically calculate the optimal device participation schedule within the program, and can use it to tune other DP parameters.
Training speedups
In the past, training these FL models could take 1-2 months each, with progress limited by device availability, on-device compute, and competition across multiple training workloads for the same set of device resources. With the new TEE-based system, bottlenecks have been moved to the server, and computation parallelization across many machines allows us to achieve significant speedups in training time, currently only limited by TEE resource availability.
What’s next?
In our new TEE-based FL system, computation of client gradients is shifted to the server, lifting limitations related to on-device compute resources that were present in earlier systems. This paves the way for training increasingly larger models using FL techniques. Integrating TEEs with accelerators will play an important role in such use cases.
The system we have described above is capable of executing not just FL training workloads in a verifiable manner, but also arbitrary workloads that can be expressed using Python. We are experimenting with running other types of workloads on this infrastructure, such as synthetic data generation workloads. Another area of exploration: using the data processing TEEs that execute arbitrary Python in combination with our other data processing TEEs that specialize in functionality such as LLM inference.
This work is a step toward rigorous proof that server side processing preserves individual privacy. With external verifiers able to inspect exactly what code we run at Google, we are able to offer strong assurances that data is processed server-side exactly as described. We expect future TEE hardware, along with ongoing research into mitigating side-channel observations, to offer deeper protections for dynamically loaded workloads against malicious server-side attacks. We anticipate that systems like ours may one day come with full proofs of correctness of the software implementations of the DP algorithms and system components.
Acknowledgements
The authors would like to thank the collaborators who contributed to the infrastructure design and implementation: Arun Ganesh, Brendan McMahan, Brett McLarnon, Chunxiang (Jake) Zheng, Emily Glanz, Maya Spivak, Michael Reneer, Nova Fallen, Stefan Dierauf, Suxin Guo, Timon Van Overveldt, Yu Xiao, Zachary Charles, and Zachary Garrett. We also thank close partners who supported the Gboard integration: Haicheng Sun, Heng Su, Jianpeng Hou, Liyang Jiang, Noriyuki Takahashi, Wenzhi Mao, Xiaojuan Fang, Yanxiang Zhang, Yingjie Liu, Yuanbo Zhang, and Yun Wang. This work was supported by Corinna Cortes, Shumin Zhai, and Yossi Matias. We additionally thank Maysam Moussalem for feedback on the writing of this post.