Skip to main content
QUICK REVIEW

[Paper Review] Training Production Language Models without Memorizing User Data

Swaroop Ramaswamy, Om Thakkar|arXiv (Cornell University)|Sep 21, 2020
Privacy-Preserving Technologies in DataComputer Science29 references16 citations
TL;DR

This paper presents the first deployment of a differentially private federated learning system for training a production-scale next-word prediction model on mobile devices, using DP-FedAvg to prevent memorization of user data. Despite challenges in verifying uniform sampling and sample secrecy in real-world settings, end-to-end empirical measurements confirm strong resistance to unintended memorization, demonstrating practical privacy in large-scale on-device AI training.

ABSTRACT

This paper presents the first consumer-scale next-word prediction (NWP) model trained with Federated Learning (FL) while leveraging the Differentially Private Federated Averaging (DP-FedAvg) technique. There has been prior work on building practical FL infrastructure, including work demonstrating the feasibility of training language models on mobile devices using such infrastructure. It has also been shown (in simulations on a public corpus) that it is possible to train NWP models with user-level differential privacy using the DP-FedAvg algorithm. Nevertheless, training production-quality NWP models with DP-FedAvg in a real-world production environment on a heterogeneous fleet of mobile phones requires addressing numerous challenges. For instance, the coordinating central server has to keep track of the devices available at the start of each round and sample devices uniformly at random from them, while ensuring \emph{secrecy of the sample}, etc. Unlike all prior privacy-focused FL work of which we are aware, for the first time we demonstrate the deployment of a differentially private mechanism for the training of a production neural network in FL, as well as the instrumentation of the production training infrastructure to perform an end-to-end empirical measurement of unintended memorization.

Motivation & Objective

  • To develop and deploy a next-word prediction model using federated learning with user-level differential privacy in a real-world mobile environment.
  • To address the gap between theoretical DP guarantees and practical deployment constraints in federated learning systems.
  • To empirically measure and demonstrate resistance to unintended memorization of user data in production-scale language models.
  • To evaluate the feasibility of applying Differentially Private Federated Averaging (DP-FedAvg) in large-scale, heterogeneous mobile device environments.
  • To identify and address practical challenges in maintaining privacy guarantees when sampling and securing training data in decentralized systems.

Proposed method

  • Leveraged Federated Learning (FL) infrastructure built on TensorFlow to train a recurrent neural network for next-word prediction on-device.
  • Applied Differentially Private Federated Averaging (DP-FedAvg), which adds calibrated noise to model updates to ensure user-level differential privacy.
  • Used a noise standard deviation of σ = 3.2 × 10⁻⁵ to balance privacy and model utility in the DP mechanism.
  • Implemented a sampling strategy where devices are selected from a dynamic, limited pool based on availability (idle, charging, Wi-Fi), not a known global population.
  • Ensured end-to-end encryption of all user-to-server communication to protect update confidentiality.
  • Performed hyperparameter tuning on public datasets to avoid privacy leakage during model configuration.

Experimental results

Research questions

  • RQ1Can a production-scale next-word prediction model be trained using DP-FedAvg in a real-world, heterogeneous mobile device environment?
  • RQ2To what extent does the DP-FedAvg mechanism prevent unintended memorization of user data in practice?
  • RQ3How do practical constraints—such as unknown population size and non-uniform device sampling—affect the validity of theoretical DP guarantees?
  • RQ4What empirical evidence supports the robustness of the model against data reconstruction attacks despite limited verifiability of privacy parameters?
  • RQ5How can privacy be preserved during hyperparameter tuning without accessing private user data?

Key findings

  • The trained NWP model achieved superior utility compared to the existing non-private baseline, demonstrating strong performance in real-world use.
  • End-to-end empirical measurements showed that the model resists unintended memorization, indicating effective protection of private user data.
  • Despite challenges in verifying uniform sampling and population size, the model demonstrated strong resistance to data reconstruction attacks.
  • The system did not make formal (ε,δ)-DP claims due to unverifiable assumptions about population size and sampling uniformity in production.
  • Hypothetical upper bounds on ε were computed assuming known population size, with ε ≈ 5.36 for N = 4 million devices and δ = N⁻¹.¹.
  • The study highlights that practical deployment of DP in FL requires more than theoretical guarantees—robust instrumentation and measurement are essential.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.