Mitigating Unintended Memorization with LoRA in Federated Learning for LLMs

Thierry Bossy, Julien Vignoud, Tahseen Rabbani, Juan R. Troncoso Pastoriza, Martin Jaggi
2/7/2025
cs.LGcs.AIcs.CL

No official code found. Best implementation: tuneinsight/federated-llms (13 stars, Apache-2.0, last commit 2025-04-01).

Abstract

Federated learning (FL) is a popular paradigm for collaborative training which avoids direct data exposure between clients. However, data privacy issues still remain: FL-trained large language models are capable of memorizing and completing phrases and sentences contained in training data when given with their prefixes. Thus, it is possible for adversarial and honest-but-curious clients to recover training data of other participants simply through targeted prompting. In this work, we demonstrate that a popular and simple fine-tuning strategy, low-rank adaptation (LoRA), reduces memorization during FL up to a factor of 10. We study this effect by performing a medical question-answering fine-tuning task and injecting multiple replicas of out-of-distribution sensitive sequences drawn from an external clinical dataset. We observe a reduction in memorization for a wide variety of Llama 2 and 3 models, and find that LoRA can reduce memorization in centralized learning as well. Furthermore, we show that LoRA can be combined with other privacy-preserving techniques such as gradient clipping and Gaussian noising, secure aggregation, and Goldfish loss to further improve record-level privacy while maintaining performance.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

This repository contains the code and experiments related to our paper: "Mitigating Unintended Memorization with LoRA in Federated Learning for LLMs"

132Shell, PythonFeb 7, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{bossy2025mitigating,
  title  = {Mitigating Unintended Memorization with LoRA in Federated Learning for LLMs},
  author = {Thierry Bossy and Julien Vignoud and Tahseen Rabbani and Juan R. Troncoso Pastoriza and Martin Jaggi},
  year   = {2025},
  eprint = {2502.05087},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.05087v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.05087.svg)](https://codeofpaper.com/paper/2502.05087)

Discussion