Lune

ICLR2025Top-tier venue

Emerging Safety Attack and Defense in Federated Instruction Tuning of Large Language Models

Rui Ye, Jingyi Chai, Xiangrui Liu, Yaodong Yang, Yanfeng Wang, Siheng Chen

Abstract

Federated learning (FL) enables multiple parties to collaboratively fine-tune an large language model (LLM) without the need of direct data sharing. Ideally, by training on decentralized data that is aligned with human preferences and safety principles, federated instruction tuning (FedIT) can result in an LLM that could behave helpfully and safely. In this paper, we for the first time reveal the vulnerability of safety alignment in FedIT by proposing a simple, stealthy, yet effective safety attack method. Specifically, the malicious clients could automatically generate attack data without involving manual efforts and attack the FedIT system by training their local LLMs on such attack data. Unfortunately, this proposed safety attack not only can compromise the safety alignment of LLM trained via FedIT, but also can not be effectively defended against by many existing FL defense methods. Targeting this, we further propose a post-hoc defense method, which could rely on a fully automated pipeline: generation of defense data and further fine-tuning of the LLM. Extensive experiments show that our safety attack method can significantly compromise the LLM's safety alignment (e.g., reduce safety rate by 70%), which can not be effectively defended by existing defense methods (at most 4% absolute improvement), while our safety defense method can significantly enhance the attacked LLM's safety alignment (at most 69% absolute improvement). Code is available at https://github.com/19dx/FedLLM-Attack.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack cites Training language models to follow instructions with human feedback
  • AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin cites LoRA: Low-Rank Adaptation of Large Language Models
  • AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin cites Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attack
  • AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin cites Finetuned Language Models are Zero-Shot Learners
  • WizardLM: Empowering Large Pre-Trained Language Models to Follow Complex Instructions cites Finetuned Language Models are Zero-Shot Learners
  • WizardLM: Empowering Large Pre-Trained Language Models to Follow Complex Instructions cites Training language models to follow instructions with human feedback
  • Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attack cites Training language models to follow instructions with human feedback
  • Finetuned Language Models are Zero-Shot Learners cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites Finetuned Language Models are Zero-Shot Learners
  • Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation cites AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin
  • Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning AttackTiansheng Huang, Sihao Hu, Fatih Ilhan, Selim F. Tekin et al.NeurIPS 2024 · 113 citations
  2. Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning PerturbationYibo Wang, Tiansheng Huang, Li Shen, Huanjin Yao et al.NeurIPS 2025 · 22 citations
  3. AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety BasinShuo Yang, Qihui Zhang, Yuyang Liu, Yue Huang et al.AAAI 2026 · 19 citations
  4. Rethinking LoRA for Privacy-Preserving Federated Learning in Large ModelsJin Liu, Yinbin Miao, Ning Xi, Junkang LiuICLR 2026 · 9 citations
  5. Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning AttackTiansheng Huang, Sihao Hu, Ling LiuNeurIPS 2024 · 3 citations

Builds on19

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  3. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  5. WizardLM: Empowering Large Pre-Trained Language Models to Follow Complex InstructionsCan Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng et al.ICLR 2024 · 1,206 citations

Related papers

  1. Antidote: Post-fine-tuning Safety Alignment for Large Language Models against Harmful Fine-tuning AttackTiansheng Huang, Gautam Bhattacharya, Pratik Joshi, Joshua Kimball et al.ICML 2025
  2. SDD: Self-Degraded Defense against Malicious Fine-tuningZixuan Chen, Weikai Lu, Xin Lin, Ziqian ZengACL 2025
  3. Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language ModelsYongshuo Zong, Ondrej Bohdal, Tingyang Yu, Yongxin Yang et al.ICML 2024 · 140 citations
  4. Can Federated Learning Safeguard Private Data in LLM Training? Vulnerabilities, Attacks, and Defense EvaluationWenkai Guo, Xuefeng Liu, Haolin Wang, Jianwei Niu et al.EMNLP Findings 2025
  5. Safe-FedLLM: Delving into the Safety of Federated Large Language ModelsMingxiang Tao, Yu Tian, Wenxuan Tu, Yue Yang et al.ACL 2026 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines