Federated Learning of N-gram Language Models
Not on the map. Why?
Abstract (arXiv)
We propose algorithms to train production-quality n-gram language models using federated learning. Federated learning is a distributed computation platform that can be used to train global models for portable devices such as smart phones. Federated learning is especially relevant for applications handling privacy-sensitive data, such as virtual keyboards, because training is performed without the users' data ever leaving their devices. While the principles of federated learning are fairly generic, its methodology assumes that the underlying models are neural networks. However, virtual keyboards are typically powered by n-gram language models for latency reasons. We propose to train a recurrent neural network language model using the decentralized FederatedAveraging algorithm and to approximate this federated model server-side with an n-gram model that can be deployed to devices for fast inference. Our technical contributions include ways of handling large vocabularies, algorithms to correct capitalization errors in user data, and efficient finite state transducer algorithms to convert word language models to word-piece language models and vice versa. The n-gram language models trained with federated learning are compared to n-grams trained with traditional server-based algorithms using A/B tests on tens of millions of users of virtual keyboard. Results are presented for two languages, American English and Brazilian Portuguese. This work demonstrates that high-quality n-gram language models can be trained directly on client mobile devices without sensitive training data ever leaving the devices.
Key facts. Cited by 33 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Oct 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 12; 2022: 7; 2023: 4; 2024: 6; 2025: 3; 2026: 1.
33 papers.
Sort:
By area:
- 2021FedNLP: Benchmarking Federated Learning Methods for Natural Language Processing Taskscited by 84
- 2021Federated Learning Meets Natural Language Processing: A Surveycited by 42
- 2022When BERT Meets Quantum Temporal Convolution Learning for Text Classification in Heterogeneous Computingcited by 40
- 2023Backdoor Attacks and Defenses in Federated Learning: Survey, Challenges and Future Research Directionscited by 33
- 2022Pretrained Models for Multilingual Federated Learningcited by 30
- 2022Scaling Language Model Size in Cross-Device Federated Learningcited by 25
- 2021The Internet of Federated Things (IoFT): A Vision for the Future and In-depth Survey of Data-driven Approaches for Federated Learningcited by 23
- 2022How to keep text private? A systematic review of deep learning methods for privacy-preserving natural language processingcited by 16
- 2021FLASHE: Additively Symmetric Homomorphic Encryption for Cross-Silo Federated Learningcited by 15
- 2021Auto-weighted Robust Federated Learning with Corrupted Data Sourcescited by 12
- 2021From Deterioration to Acceleration: A Calibration Approach to Rehabilitating Step Asynchronism in Federated Optimizationcited by 8
- 2024C2A: Client-Customized Adaptation for Parameter-Efficient Federated Learningcited by 8
21 more
- 2021Federated Natural Language Generation for Personalized Dialogue Systemcited by 5
- 2023Federated Nearest Neighbor Machine Translationcited by 5
- 2021Aggregate or Not? Exploring Where to Privatize in DNN Based Federated Learning Under Different Non-IID Scenescited by 4
- 2021Bristle: Decentralized Federated Learning in Byzantine, Non-i.i.d. Environmentscited by 4
- 2022Algorithms for bounding contribution for histogram estimation under user-level privacycited by 4
- 2024A Federated Learning Approach to Privacy Preserving Offensive Language Identificationcited by 4
- 2021Privacy in Open Search: A Review of Challenges and Solutionscited by 3
- 2022Capitalization Normalization for Language Modeling with an Accurate and Efficient Hierarchical RNN Modelcited by 3
- 2022N-gram Is Back: Residual Learning of Neural Text Generation with n-gram Language Modelcited by 3
- 2025Personalized Language Model Learning on Text Data Without User Identifierscited by 3
- 2023Now It Sounds Like You: Learning Personalized Vocabulary On Devicecited by 2
- 2021Preliminary Steps Towards Federated Sentiment Classificationcited by 1
- 2021Position-Invariant Truecasing with a Word-and-Character Hierarchical Recurrent Neural Networkcited by 1
- 2023Fingerprint Attack: Client De-Anonymization in Federated Learningcited by 1
- 2024Efficient Language Model Architectures for Differentially Private Federated Learningcited by 1
- 2024Recent Advances in Federated Learning Driven Large Language Models: A Survey on Architecture, Performance, and Securitycited by 1
- 2024Neural Search Space in Gboard Decodercited by 1
- 2024LLMs as On-demand Customizable Servicecited by 0
- 2025Accelerating MoE Model Inference with Expert Shardingcited by 0
- 2025Assortment of Attention Heads: Accelerating Federated PEFT with Head Pruning and Strategic Client Selectioncited by 0
- 2026Robust Federated Learning Under Real-World Client Churncited by 0
- 2026Robust Federated Learning Under Real-World Client Churn8 Jul 2026
- 2025Assortment of Attention Heads: Accelerating Federated PEFT with Head Pruning and Strategic Client Selection31 May 2025
- 2025Accelerating MoE Model Inference with Expert Sharding11 Mar 2025
- 2025Personalized Language Model Learning on Text Data Without User Identifiers10 Jan 2025
- 2024C2A: Client-Customized Adaptation for Parameter-Efficient Federated Learning1 Nov 2024
- 2024Neural Search Space in Gboard Decoder21 Oct 2024
- 2024Recent Advances in Federated Learning Driven Large Language Models: A Survey on Architecture, Performance, and Security14 Jun 2024
- 2024A Federated Learning Approach to Privacy Preserving Offensive Language Identification17 Apr 2024
- 2024Efficient Language Model Architectures for Differentially Private Federated Learning12 Mar 2024
- 2024LLMs as On-demand Customizable Service29 Jan 2024
- 2023Fingerprint Attack: Client De-Anonymization in Federated Learning12 Sep 2023
- 2023Now It Sounds Like You: Learning Personalized Vocabulary On Device5 May 2023
21 more
- 2023Backdoor Attacks and Defenses in Federated Learning: Survey, Challenges and Future Research Directions3 Mar 2023
- 2023Federated Nearest Neighbor Machine Translation23 Feb 2023
- 2022N-gram Is Back: Residual Learning of Neural Text Generation with n-gram Language Model26 Oct 2022
- 2022Algorithms for bounding contribution for histogram estimation under user-level privacy7 Jun 2022
- 2022Pretrained Models for Multilingual Federated Learning6 Jun 2022
- 2022How to keep text private? A systematic review of deep learning methods for privacy-preserving natural language processing20 May 2022
- 2022Scaling Language Model Size in Cross-Device Federated Learning31 Mar 2022
- 2022When BERT Meets Quantum Temporal Convolution Learning for Text Classification in Heterogeneous Computing17 Feb 2022
- 2022Capitalization Normalization for Language Modeling with an Accurate and Efficient Hierarchical RNN Model16 Feb 2022
- 2021From Deterioration to Acceleration: A Calibration Approach to Rehabilitating Step Asynchronism in Federated Optimization17 Dec 2021
- 2021The Internet of Federated Things (IoFT): A Vision for the Future and In-depth Survey of Data-driven Approaches for Federated Learning9 Nov 2021
- 2021Bristle: Decentralized Federated Learning in Byzantine, Non-i.i.d. Environments21 Oct 2021
- 2021Privacy in Open Search: A Review of Challenges and Solutions20 Oct 2021
- 2021Federated Natural Language Generation for Personalized Dialogue System13 Oct 2021
- 2021FLASHE: Additively Symmetric Homomorphic Encryption for Cross-Silo Federated Learning2 Sep 2021
- 2021Position-Invariant Truecasing with a Word-and-Character Hierarchical Recurrent Neural Network26 Aug 2021
- 2021Federated Learning Meets Natural Language Processing: A Survey27 Jul 2021
- 2021Preliminary Steps Towards Federated Sentiment Classification26 Jul 2021
- 2021Aggregate or Not? Exploring Where to Privatize in DNN Based Federated Learning Under Different Non-IID Scenes26 Jul 2021
- 2021FedNLP: Benchmarking Federated Learning Methods for Natural Language Processing Tasks18 Apr 2021
- 2021Auto-weighted Robust Federated Learning with Corrupted Data Sources14 Jan 2021
- 2025Accelerating MoE Model Inference with Expert Shardingcited by 0
- 2025Accelerating MoE Model Inference with Expert Sharding11 Mar 2025
- 2021FedNLP: Benchmarking Federated Learning Methods for Natural Language Processing Taskscited by 84
- 2021Federated Learning Meets Natural Language Processing: A Surveycited by 42
- 2022When BERT Meets Quantum Temporal Convolution Learning for Text Classification in Heterogeneous Computingcited by 40
- 2023Backdoor Attacks and Defenses in Federated Learning: Survey, Challenges and Future Research Directionscited by 33
- 2022Pretrained Models for Multilingual Federated Learningcited by 30
- 2022Scaling Language Model Size in Cross-Device Federated Learningcited by 25
- 2021The Internet of Federated Things (IoFT): A Vision for the Future and In-depth Survey of Data-driven Approaches for Federated Learningcited by 23
- 2022How to keep text private? A systematic review of deep learning methods for privacy-preserving natural language processingcited by 16
- 2021FLASHE: Additively Symmetric Homomorphic Encryption for Cross-Silo Federated Learningcited by 15
- 2021Auto-weighted Robust Federated Learning with Corrupted Data Sourcescited by 12
- 2021From Deterioration to Acceleration: A Calibration Approach to Rehabilitating Step Asynchronism in Federated Optimizationcited by 8
- 2024C2A: Client-Customized Adaptation for Parameter-Efficient Federated Learningcited by 8
12 most cited of 31 All 31 (JSON)
- 2026Robust Federated Learning Under Real-World Client Churn8 Jul 2026
- 2025Assortment of Attention Heads: Accelerating Federated PEFT with Head Pruning and Strategic Client Selection31 May 2025
- 2025Personalized Language Model Learning on Text Data Without User Identifiers10 Jan 2025
- 2024C2A: Client-Customized Adaptation for Parameter-Efficient Federated Learning1 Nov 2024
- 2024Neural Search Space in Gboard Decoder21 Oct 2024
- 2024A Federated Learning Approach to Privacy Preserving Offensive Language Identification17 Apr 2024
- 2024Efficient Language Model Architectures for Differentially Private Federated Learning12 Mar 2024
- 2024LLMs as On-demand Customizable Service29 Jan 2024
- 2023Fingerprint Attack: Client De-Anonymization in Federated Learning12 Sep 2023
- 2023Now It Sounds Like You: Learning Personalized Vocabulary On Device5 May 2023
- 2023Backdoor Attacks and Defenses in Federated Learning: Survey, Challenges and Future Research Directions3 Mar 2023
- 2023Federated Nearest Neighbor Machine Translation23 Feb 2023
12 newest of 31 All 31 (JSON)