Skip to main content
QUICK REVIEW

[Paper Review] Prompt Public Large Language Models to Synthesize Data for Private On-device Applications

Shanshan Wu, Xu Zheng|arXiv (Cornell University)|Apr 5, 2024
Privacy-Preserving Technologies in DataComputer Science3 citations
TL;DR

This paper proposes using publicly available large language models (LLMs) to synthesize high-quality, domain-specific training data for on-device language models trained with differential privacy and federated learning. By designing targeted prompts to filter, transform, and generate synthetic data resembling real user typing patterns, the method improves pre-training data quality, resulting in a 19.0–22.8% relative accuracy gain in next-word prediction on real user data compared to standard public datasets, with superior performance in production A/B testing.

ABSTRACT

Pre-training on public data is an effective method to improve the performance for federated learning (FL) with differential privacy (DP). This paper investigates how large language models (LLMs) trained on public data can improve the quality of pre-training data for the on-device language models trained with DP and FL. We carefully design LLM prompts to filter and transform existing public data, and generate new data to resemble the real user data distribution. The model pre-trained on our synthetic dataset achieves relative improvement of 19.0% and 22.8% in next word prediction accuracy compared to the baseline model pre-trained on a standard public dataset, when evaluated over the real user data in Gboard (Google Keyboard, a production mobile keyboard application). Furthermore, our method achieves evaluation accuracy better than or comparable to the baseline during the DP FL fine-tuning over millions of mobile devices, and our final model outperforms the baseline in production A/B testing. Our experiments demonstrate the strengths of LLMs in synthesizing data close to the private distribution even without accessing the private data, and also suggest future research directions to further reduce the distribution gap.

Motivation & Objective

  • Address the distribution gap between public pre-training data and private on-device user data in federated learning for mobile applications.
  • Improve the utility of pre-training data for on-device language models without accessing private user data.
  • Develop a simple, plug-and-play method to enhance server-side pre-training data quality using LLMs, compatible with existing DP FL pipelines.
  • Demonstrate that LLM-generated synthetic data can outperform standard public datasets in real-world federated evaluation and production deployment.
  • Explore the potential of using filtered synthetic data as proxy data for server-side model evaluation and research simulation.

Proposed method

  • Design prompts to guide a pre-trained LLM to filter and transform existing public C4 dataset to better match the distribution of private on-device user typing data.
  • Generate diverse, realistic chat-style text using chain-of-thought prompting to increase diversity and realism of synthetic data.
  • Combine filtered C4 and synthetic chat data into a mixed dataset (LLM-mix-166G) for pre-training.
  • Apply a two-stage filtering process using a fine-tuned on-device LM to select high-quality examples: (1) low OOV rate (<0.6), (2) high log-likelihood under both pre-trained and fine-tuned LMs.
  • Use the filtered dataset (LLM-prox-32G) as a proxy for private data to pre-train new language models without modifying the DP FL pipeline.
  • Evaluate model performance via federated evaluation on real user data from millions of mobile devices, measuring next-word prediction accuracy.

Experimental results

Research questions

  • RQ1Can LLMs generate synthetic data that closely approximates the distribution of private on-device user data without access to that data?
  • RQ2To what extent can LLM-generated data improve the performance of on-device language models trained with differential privacy and federated learning?
  • RQ3How effective is a fine-tuned on-device model in filtering synthetic data to create higher-quality proxy data for pre-training?
  • RQ4Can the proposed method be deployed in production without modifying the existing DP FL pipeline?
  • RQ5What is the impact of data quality and size on the final model accuracy in real-world federated evaluation?

Key findings

  • The model pre-trained on LLM-generated synthetic data achieved a 19.0% relative improvement in next-word prediction accuracy compared to the baseline model pre-trained on C4, when evaluated on real user data from Gboard.
  • The same model achieved a 22.8% relative improvement in accuracy on the en-IN user population, demonstrating consistent gains across language variants.
  • The filtered proxy dataset (LLM-prox-32G), derived from the larger LLM-mix-166G, achieved higher accuracy (0.1509) than the unfiltered LLM-mix-166G (0.1452) despite being only 19% of the original size.
  • The final model outperformed the baseline in production A/B testing, confirming real-world effectiveness and practical deployability.
  • The method significantly reduced the distribution gap between public and private data, leading to more efficient use of privacy budget during DP FL fine-tuning.
  • The filtered data showed a higher proportion of C4 examples being discarded (12%) compared to synthetic chat data (52%), suggesting C4 was less aligned with private user data.

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.