LanFL: Differentially Private Federated Learning with Large Language Models using Synthetic Samples
Abstract: Federated Learning (FL) is a collaborative, privacy-preserving machine learning framework that enables multiple participants to train a single global model. However, the recent advent of powerful LLMs with tens to hundreds of billions of parameters makes the naive application of traditional FL methods to LLMs impractical due to high computational and communication costs. Furthermore, end users of LLMs often lack access to full architectures and weights of the models, making it impossible for participants to fine-tune these models directly. This paper introduces a novel FL scheme for LLMs, named LanFL, which is purely prompt-based and treats the underlying LLMs as black boxes. We have developed a differentially private synthetic sample generation mechanism to facilitate knowledge sharing among participants, along with a prompt optimization scheme that enables learning from synthetic samples. Our extensive experiments demonstrate that LanFL successfully facilitates learning among participants while preserving the privacy of local datasets across various tasks.
- H. B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas, “Communication-efficient learning of deep networks from decentralized data,” 2023.
- Q. Li, Z. Wen, Z. Wu, S. Hu, N. Wang, Y. Li et al., “A survey on federated learning systems: Vision, hype and reality for data privacy and protection,” IEEE Transactions on Knowledge and Data Engineering, vol. 35, no. 4, p. 3347–3366, 2023.
- Z. Wang and Q. Hu, “Blockchain-based federated learning: A comprehensive survey,” 2021.
- J. P. Albrecht, “How the gdpr will change the world,” European Data Protection Law Review, vol. 2, no. 3, 2016.
- J. Wen, Z. Zhang, Y. Lan, Z. Cui, J. Cai, and W. Zhang, “A survey on federated learning: Challenges and applications,” International Journal of Machine Learning and Cybernetics, vol. 14, pp. 513–535, 2023.
- H. Wu and D. Klabjan, “Robust softmax aggregation on blockchain based federated learning with convergence guarantee,” arXiv preprint arXiv:2311.07027, 2023.
- A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez et al., “Attention is all you need,” in Proceedings of the 31st International Conference on Neural Information Processing Systems, 2017, p. 6000–6010.
- OpenAI, “Gpt-4 technical report,” arXiv preprint arXiv:2303.08774, 2023.
- H. Naveed, A. U. Khan, S. Qiu, M. Saqib, S. Anwar, M. Usman et al., “A comprehensive overview of large language models,” arXiv preprint arXiv:2307.06435, 2024.
- M. Mozes, X. He, B. Kleinberg, and L. D. Griffin, “Use of llms for illicit purposes: Threats, prevention measures, and vulnerabilities,” arXiv preprint arXiv:2308.12833, 2023.
- Anthropic, “The claude 3 model family: Opus, sonnet, haiku,” https://www.anthropic.com/claude, 2024.
- G. T. Google, “Gemini: A family of highly capable multimodal models,” arXiv preprint arXiv:2312.11805, 2024.
- B. Chen, Z. Zhang, N. Langrené, and S. Zhu, “Unleashing the potential of prompt engineering in large language models: a comprehensive review,” arXiv preprint arXiv:2310.14735, 2023.
- T. Che, J. Liu, Y. Zhou, J. Ren, J. Zhou, V. S. Sheng et al., “Federated learning of large language models with parameter-efficient prompt tuning and adaptive optimization,” arXiv preprint arXiv:2310.15080, 2024.
- G. Kim, J. Yoo, and S. Kang, “Efficient federated learning with pre-trained large language model using several adapter mechanisms,” Mathematics, vol. 11, 2023.
- T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal et al., “Language models are few-shot learners,” arXiv preprint arXiv:2005.14165, 2020.
- V. Borisov, K. Seßler, T. Leemann, M. Pawelczyk, and G. Kasneci, “Language models are realistic tabular data generators,” arXiv preprint arXiv:2210.06280, 2023.
- X. L. Li and P. Liang, “Prefix-tuning: Optimizing continuous prompts for generation,” in Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Association for Computational Linguistics, 2021, pp. 4582–4597.
- C. Hou, A. Shrivastava, H. Zhan, R. Conway, T. Le, A. Sagar et al., “Pre-text: Training language models on private federated data in the age of llms,” arXiv preprint arXiv:2406.02958, 2024.
- E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang et al., “Lora: Low-rank adaptation of large language models,” arXiv preprint arXiv:2106.09685, 2021.
- T. Fan, Y. Kang, G. Ma, W. Chen, W. Wei, L. Fan et al., “Fate-llm: A industrial grade federated learning framework for large language models,” arXiv preprint arXiv:2310.10049, 2023.
- N. Su, C. Hu, B. Li, and B. Li, “Titanic: Towards production federated learning with large language models,” IEEE INFOCOM, 2024.
- J. Wei, X. Wang, D. Schuurmans, M. Bosma, B. Ichter, F. Xia et al., “Chain-of-thought prompting elicits reasoning in large language models,” arXiv preprint arXiv:2201.11903, 2023.
- X. Wang, J. Wei, D. Schuurmans, Q. Le, E. Chi, S. Narang et al., “Self-consistency improves chain of thought reasoning in language models,” arXiv preprint arXiv:2203.11171, 2023.
- S. Yao, D. Yu, J. Zhao, I. Shafran, T. L. Griffiths, Y. Cao et al., “Tree of thoughts: Deliberate problem solving with large language models,” arXiv preprint arXiv:2305.10601, 2023.
- J. Ye, J. Gao, Q. Li, H. Xu, J. Feng, Z. Wu et al., “Zerogen: Efficient zero-shot learning via dataset generation,” arXiv preprint arXiv:2202.07922, 2022.
- J. Ye, J. Gao, J. Feng, Z. Wu, T. Yu, and L. Kong, “Progen: Progressive zero-shot dataset generation via in-context feedback,” arXiv preprint arXiv:2210.12329, 2022.
- Y. Meng, J. Huang, Y. Zhang, and J. Han, “Generating training data with language models: Towards zero-shot language understanding,” in Advances in Neural Information Processing Systems, vol. 35, 2022, pp. 462–477.
- R. Xu, H. Cui, Y. Yu, X. Kan, W. Shi, Y. Zhuang et al., “Knowledge-infused prompting: Assessing and advancing clinical text data generation with large language models,” arXiv preprint arXiv:2311.00287, 2023.
- Q. Dong, L. Li, D. Dai, C. Zheng, Z. Wu, B. Chang et al., “A survey on in-context learning,” arXiv preprint arXiv:2301.00234, 2023.
- A. Talmor, J. Herzig, N. Lourie, and J. Berant, “CommonsenseQA: A question answering challenge targeting commonsense knowledge,” in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Association for Computational Linguistics, Jun. 2019, pp. 4149–4158.
- K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, “Bleu: a method for automatic evaluation of machine translation,” in Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, 2002, p. 311–318.
- C. Dwork, “Differential privacy,” in Automata, Languages and Programming, 2006, pp. 1–12.
- Z. Ji, Z. C. Lipton, and C. Elkan, “Differential privacy and machine learning: a survey and review,” arXiv preprint arXiv:1412.7584, 2014.
- C. Dwork, “Differential privacy: A survey of results,” in Theory and Applications of Models of Computation, 2008, pp. 1–19.
- M. Sclar, Y. Choi, Y. Tsvetkov, and A. Suhr, “Quantifying language models’ sensitivity to spurious features in prompt design or: How i learned to start worrying about prompt formatting,” arXiv preprint arXiv:2310.11324, 2023.
- S. M. Xie, A. Raghunathan, P. Liang, and T. Ma, “An explanation of in-context learning as implicit bayesian inference,” International Conference on Learning Representations, 2022.
- T. Zhao, E. Wallace, S. Feng, D. Klein, and S. Singh, “Calibrate before use: Improving few-shot performance of language models,” in International Conference on Machine Learning, 2021.
- Google, “Palm 2 technical report,” arXiv preprint arXiv:2305.10403, 2023.
- M. Geva, D. Khashabi, E. Segal, T. Khot, D. Roth, and J. Berant, “Did aristotle use a laptop? a question answering benchmark with implicit reasoning strategies,” Transactions of the Association for Computational Linguistics, vol. 9, pp. 346–361, 2021.
- MetaAI, “The llama 3 herd of models,” arXiv preprint arXiv:2407.21783, 2024.
- MistralAI, “Mixtral of experts,” arXiv preprint arXiv:2401.04088, 2024.
- I.-C. Yeh, “Default of Credit Card Clients,” UCI Machine Learning Repository, 2016.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.