Prompt Public Large Language Models to Synthesize Data for Private On-device Applications

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.

Paper

Similar papers

Reviewer X9QH6/10 · confidence 3/52024-04-30

Summary

This work uses Large Language Models (LLMs) to filter and generate real/synthetic data for Data Privacy (DP) and Federated Learning (FL) purposes. A model pre-trained on the final dataset generated by this work is able to improve next-word prediction (NWP) accuracy against a strong baseline. This work has been tested and evaluated on real large-scale data across different devices and can be used as a reference for industry researchers (the federated experiments at that level could be prohibitive for academics). The experiments also highlight aspects such as vocabulary coverage and its impact on the final accuracy results. NWP Accuracy is improved (+19%) using a dataset that is significantly smaller (166GB vs 782GB) showing the value of data filtering, data generation, and data processing/formatting.

Rating

6

Confidence

3

Ethics flag

1

Reasons to accept

This paper conducts experiments at a large scale over different locales (US, India) and highlights the strengths of LLM-generated data/summaries. The experiments also show how experiments translate across locales and potential weaknesses when improvements over one locale do not translate to a different region.

Reasons to reject

The ablation studies and experiments show interesting results, but the main techniques/methods have been published already. The large-scale experimentation adds some novelty, but the novel contributions might not be enough. Also, the NWP metric should probably be used along some perplexity scores for a larger/clearer picture.

Reviewer NTtL6/10 · confidence 4/52024-05-09

Summary

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. The authors design LLM prompts to filter and transform existing public data and generate new data that resembles the distribution of real user data. Compared to baseline models pre-trained on standard public datasets, models pre-trained on their composite datasets achieved relative improvements in next word prediction accuracy of 19.0% and 22.8% when evaluating real user data. It clearly outlines the problem addressed, the approach taken, and the outcomes.

Rating

6

Confidence

4

Ethics flag

1

Reasons to accept

This paper proposes a simple yet effective method to improve the public data quality by exploiting the strong generative ability of LLMs. It provides an effective solution for how to better process data sets with the generation power of LLMs to better adapt to FL and DP.

Reasons to reject

1. The selected baseline methods are not representative. 2. Lack of ablation experiments.

Questions to authors

1. Whether the effect of filtering and merging data by modifying the prompt can also be achieved by other data enhancement methods. This is not compared in the paper. 2.The two methods mentioned in the paper (Wang et al., 2023) are not compared in the experiment. 3.The vocab coverage of convert C4 to chat and LLM-SYN-Chate-29G is the same. Is the effect of direct mix filter-C4 and convert C4 to chat much worse than existing mix methods? If there is no big difference in effect, this seems to save a lot of computational overhead.

Reviewer cRaX5/10 · confidence 4/52024-05-10

Summary

This paper explores the enhancement of pre-training data quality for on-device language models through the use of large language models (LLMs), specifically within the context of a production mobile keyboard application employing differential privacy and federated learning. The authors propose a new approach where LLMs are utilized to filter and transform public data, as well as to generate new synthetic data, resulting in significant improvements in next-word prediction accuracy (19.0% and 22.8% relative improvement over baseline models trained on standard public datasets). The study demonstrates the LLMs' capability to synthesize data that closely mimics the private distribution, despite not having direct access to private data. Furthermore, the paper identifies potential future improvements to minimize the distribution gap further. This research underscores the transformative potential of LLMs in enhancing data privacy and efficiency in machine learning applications. However, the work somehow can not fully garanttee the privacy protection in a formal way. Moreover, the work also needs to quantify the privacy protection performance.

Rating

5

Confidence

4

Ethics flag

1

Reasons to accept

1). The work is very interesting. 2). The paper is well presented and easy to follow. 3). The promblem is an important issue.

Reasons to reject

1), In their current format, the methodologies presented within this work lack a formal guarantee of privacy protection, which might raise concerns about their practical applications in environments with stringent privacy requirements. Additionally, there is an evident need for the work to establish quantifiable metrics that can accurately evaluate the level of privacy protection being afforded. This would not only bolster the trust in the system but also provide clearer insights into the effectiveness of the privacy-preserving features of the synthetic data generation process. 2). Let LLM to generate data with similar distribution to the private data is somehow empirical which cannot garanttee the privacy protection.

Questions to authors

Let LLM to generate data with similar distribution to the private data is somehow empirical which cannot garanttee the privacy protection. Can the authors provide quantitive expeirments for validation? Or provide DP style theoretical garanttee?

Reviewer gADZ7/10 · confidence 3/52024-05-10

Summary

Paper studies the question of how to effectively use public text data to pretrain LMs which are then fiinetuned on private data using DP-FL algorithms. Their application is next work prediction in mobile keyboards. They use an LLM to 1. Filter private data to make their distribution similar to mobile chat data 2. Generate synthetic chat data from scratch for their usecase, and 3. Convert non-chat data (from Step 1) in public dataset to chat like data Step 1 generated lots of data. Authors identified that the small amount of synthetic data from Step 2 had low vocabulary coverage on private data. So they combined it Step 3 which brought up the coverage. They tested on two different private datasets. Model on pretrained on Step 1 data was better than model pretrained on unfiltered data. Models pretrained on Step2+3 data sits in the middle in terms of performance. Finally model pretrained on Step1+2+3 was better than all others. DP-FL finetuning of Step1+2+3 model on the private datasets further improved their performance. Finally they also showed better performance of this model in an online A/B test. They also studied using privately finetuned LM to futher filter their pretraining dataset. This seems to help in their preliminary study.

Rating

7

Confidence

3

Ethics flag

1

Reasons to accept

1. Paper is easy to read 2. Paper validates the use of LLMs in Public data pretraining+Private data DP-FL finetuning paradigm 3. Application is large scale and authors have done online tests 4. These will be useful for other similar applications. 5. Authors identified some important future research directions

Reasons to reject

1. It is not clear if authors have done enough literature survey. I found this paper from last year which is very related. “Privately customizing prefinetuning to better match user data in federated learning” https://arxiv.org/pdf/2302.09042. Please discuss this paper and any other idea from literature. 2. Not to surprising. But I would not want to use this as a main reason for recommending rejection. 3. Last section on using privately finetuned LM to filter public data reads a bit like a last minute add on. It is not well motivated and the results are only partial. It is not clear how privacy is accounted here. Please expand on these.

Questions to authors

See above.

Reviewer X9QH2024-06-04

Thank you for the answers.

Reviewer cRaX2024-06-04

Concerns not addressed

Thanks for the response. However, my concerns as in the initial feedback are not well addressed. I would like to keep my score.

Authorsrebuttal2024-06-04

Thanks for the reply, and could you please elaborate?

Thanks for your reply. Could you please elaborate on the specific concerns if possible? In the rebuttal above, we have clarified that - We adopted the widely acknowledged ($\epsilon, \delta$) differential privacy (DP) notion to quantify the privacy protection when training on real-user on-device data. Our Appendix C.3 not only provided the ($\epsilon, \delta$) values, but also carefully discussed all the nuances for the DP guarantees to hold including data access, unit, neighboring, and accounting methods. Appendix C.3 applies to the DP federated learning training process. - We also carefully explained why the LLM synthetic data generated in **Section 3** are treated as public data in our paper, because the private on-device real-user typing data is **not** used during the LLM data synthesis phase. - The preliminary study in Section 5 adds a post processing step to the previous pipeline considered in Section 1-4, and has the same DP guarantee (see our rebuttal above). We greatly appreciate your comment, and we would hope to get concrete feedback to better address your concerns.

Reviewer NTtL2024-06-05

Thanks

thank the authors for their reply; I confirm my assessment of the paper.

Reviewer gADZ2024-06-05

Reply

Thanks for the response to my concerns. Authors addressed most of my concerns, so I will raise my score while requesting the authors to incorporate this discussion to their manuscript.

Program Chairsdecision2024-07-10

Decision

Accept

© 2026 NYSGPT2525 LLC