[Paper Review] Private Federated Learning in Gboard
This paper presents the deployment of a hybrid privacy-preserving federated learning system in Gboard, combining user-level differential privacy (DP-FTRL) and secure aggregation with distributed differential privacy (SecAgg/DDP) to protect user typing data. The system achieves strong privacy guarantees with minimal impact on model utility, as demonstrated by a production LM with ρ = 0.25 in zCDP and no degradation in prediction accuracy.
This white paper describes recent advances in Gboard(Google Keyboard)'s use of federated learning, DP-Follow-the-Regularized-Leader (DP-FTRL) algorithm, and secure aggregation techniques to train machine learning (ML) models for suggestion, prediction and correction intelligence from many users' typing data. Gboard's investment in those privacy technologies allows users' typing data to be processed locally on device, to be aggregated as early as possible, and to have strong anonymization and differential privacy where possible. Technical strategies and practices have been established to allow ML models to be trained and deployed with meaningfully formal DP guarantees and high utility. The paper also looks ahead to how technologies such as trusted execution environments may be used to further improve the privacy and security of Gboard's ML models.
Motivation & Objective
- To enhance user privacy in Gboard’s federated learning system by combining multiple privacy-enhancing technologies.
- To address the risk of model memorization of individual user data in language models trained on user typing patterns.
- To enable end-to-end privacy protection across the entire federated learning pipeline, from device to server.
- To improve the efficiency and scalability of secure aggregation and differential privacy in mobile ML systems.
- To lay the groundwork for verifiable privacy claims using trusted execution environments (TEEs) in the future.
Proposed method
- Uses DP-FTRL (Differentially Private FTRL) to provide formal central differential privacy guarantees on model parameters, ensuring user-level privacy.
- Employs Secure Aggregation (SecAgg) to prevent the server from learning individual model updates, even if the server is honest-but-curious.
- Integrates Distributed Differential Privacy (DDP) to perturb model updates before transmission, protecting against malicious servers.
- Applies subgraph SecAgg protocols to reduce communication and computation overhead, improving scalability for large models.
- Implements device-level access controls, attestation tokens, and API key authentication to ensure client integrity and prevent botnet abuse.
- Combines DP-FTRL with SecAgg/DDP in a layered defense strategy to harden the privacy boundary at every stage of model training and aggregation.
Experimental results
Research questions
- RQ1How can user-level differential privacy be effectively combined with secure aggregation to protect user typing data in mobile language models?
- RQ2What is the performance impact of applying DP-FTRL and SecAgg/DDP on the utility of next-word prediction models in Gboard?
- RQ3Can the combination of DP-FTRL and SecAgg/DDP achieve stronger end-to-end privacy guarantees without degrading model accuracy?
- RQ4How can privacy-preserving federated learning be scaled efficiently across millions of devices while maintaining low bandwidth and memory usage?
- RQ5What role can trusted execution environments (TEEs) play in enabling verifiable privacy claims for future federated learning systems?
Key findings
- The first production deployment of a language model trained with both DP-FTRL and SecAgg/DDP was launched in June 2023 for US English next-word prediction.
- The combined DP-FTRL + SecAgg/DDP model achieved a zCDP privacy budget of ρ = 0.25, a significant improvement over the previous model’s ρ = 1.31.
- The model maintained the same prediction picked ratio and accuracy as the baseline model trained with DP-FTRL alone, indicating no utility degradation.
- The key-by-key correction triggering model, trained with SecAgg, was successfully launched in production with neutral quality impact.
- Subgraph SecAgg protocols enabled efficient deployment of SecAgg across models of varying sizes, from ~1k to ~3M parameters.
- The system achieved strong data minimization and anonymization through isolation boundaries, access controls, and immediate discarding of metadata and identifiers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.