mlsanityData to 14 Oct 2026

CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuning

arXiv 2505.16559 ↗First posted 22 May 2025cs.CR cs.CLcited by 11

On the map: LLM safety and security → Safety alignment, refusal and guardrails

Abstract (arXiv)

Fine-tuning-as-a-service, while commercially successful for Large Language Model (LLM) providers, exposes models to harmful fine-tuning attacks. As a widely explored defense paradigm against such attacks, unlearning attempts to remove malicious knowledge from LLMs, thereby essentially preventing them from being used to perform malicious tasks. However, we highlight a critical flaw: the powerful general adaptability of LLMs allows them to easily bypass selective unlearning by rapidly relearning or repurposing their capabilities for harmful tasks. To address this fundamental limitation, we propose a paradigm shift: instead of selective removal, we advocate for inducing model collapse--effectively forcing the model to "unlearn everything"--specifically in response to updates characteristic of malicious adaptation. This collapse directly neutralizes the very general capabilities that attackers exploit, tackling the core issue unaddressed by selective unlearning. We introduce the Collapse Trap (CTRAP) as a practical mechanism to implement this concept conditionally. Embedded during alignment, CTRAP pre-configures the model's reaction to subsequent fine-tuning dynamics. If updates during fine-tuning constitute a persistent attempt to reverse safety alignment, the pre-configured trap triggers a progressive degradation of the model's core language modeling abilities, ultimately rendering it inert and useless for the attacker. Crucially, this collapse mechanism remains dormant during benign fine-tuning, ensuring the model's utility and general capabilities are preserved for legitimate users. Extensive empirical results demonstrate that CTRAP effectively counters harmful fine-tuning risks across various LLMs and attack settings, while maintaining high performance in benign scenarios. Our code is available at https://anonymous.4open.science/r/CTRAP.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 77 of its 108 references that are in the map. First posted on arXiv 22 May 2025.

Builds on

77 of 108 references.

Closest ancestors · 19

Same direction, newest first

  1. 2025Virus: Harmful Fine-tuning Attack for Large Language Models Bypassing Guardrail Moderation29 Jan
  2. 2025SaLoRA: Safety-Alignment Preserved Low-Rank Adaptation3 Jan
  3. 2024Separate the Wheat from the Chaff: A Post-Hoc Approach to Safety Re-Alignment for Fine-Tuned Language Models15 Dec
  4. 2024Targeted Vaccine: Safety Alignment for Large Language Models against Harmful Fine-Tuning via Layer-wise Perturbation13 Oct
  5. 2024Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Survey26 Sep
  6. 2024Antidote: Post-fine-tuning Safety Alignment for Large Language Models against Harmful Fine-tuning18 Aug
  7. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
  8. 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
  9. 2024Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack28 May
  10. 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models27 May
  11. 2024No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attacks25 May
  12. 2024Robustifying Safety-Aligned Large Language Models through Clean Data Curation24 May
7 more
  1. 2024Representation Noising: A Defence Mechanism Against Harmful Finetuning23 May
  2. 2024A safety realignment framework via subspace-oriented model fusion for large language models15 May
  3. 2024What is in Your Safe Data? Identifying Benign Data that Breaks Safety1 Apr
  4. 2024The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearning5 Mar
  5. 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications7 Feb
  6. 2023LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B31 Oct
  7. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct

Other references · 58

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  6. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  7. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  8. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  9. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  10. 2024Qwen2 Technical Reportcited by 2,120
  11. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  12. 2017Decoupled Weight Decay Regularizationcited by 1,831
38 more
  1. 2019Machine Unlearningcited by 1,061
  2. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
  3. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  4. 2023RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignmentcited by 686
  5. 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 656
  6. 2024Negative Preference Optimization: From Catastrophic Collapse to Effective Unlearningcited by 504
  7. 2023RRHF: Rank Responses to Align Language Models with Human Feedback without tearscited by 463
  8. 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 451
  9. 2022Knowledge Unlearning for Mitigating Privacy Risks in Language Modelscited by 437
  10. 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 387
  11. 2023Large Language Model Unlearningcited by 302
  12. 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 297
  13. 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 171
  14. 2024Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language Modelscited by 167
  15. 2024Eight Methods to Evaluate Robust Unlearning in LLMscited by 163
  16. 2024Tamper-Resistant Safeguards for Open-Weight LLMscited by 138
  17. 2024Safety Layers in Aligned Large Language Models: The Key to LLM Securitycited by 134
  18. 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Modelscited by 125
  19. 2024An Adversarial Perspective on Machine Unlearning for AI Safetycited by 123
  20. 2024Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 115
  21. 2023Fine-tuning can cripple your foundation model; preserving features may be the solutioncited by 96
  22. 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 96
  23. 2024Booster: Tackling Harmful Fine-tuning for Large Language Models via Attenuating Harmful Perturbationcited by 92
  24. 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 88
  25. 2024Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptationcited by 80
  26. 2024Do Unlearning Methods Remove Information from Language Model Weights?cited by 73
  27. 2024SEAL: Safety-enhanced Aligned LLM Fine-tuning via Bilevel Data Selectioncited by 64
  28. 2022Self-Destructing Models: Increasing the Costs of Harmful Dual Uses of Foundation Modelscited by 57
  29. 2023Pairwise Proximal Policy Optimization: Harnessing Relative Feedback for LLM Alignmentcited by 57
  30. 2024A Closer Look at Machine Unlearning for Large Language Modelscited by 56
  31. 2024On Evaluating the Durability of Safeguards for Open-Weight LLMscited by 52
  32. 2024UnUnlearning: Unlearning is not sufficient for content regulation in advanced generative AIcited by 51
  33. 2025Open Problems in Machine Unlearning for AI Safetycited by 51
  34. 2024Open Problems in Technical AI Governancecited by 49
  35. 2024Operationalizing a Threat Model for Red-Teaming Large Language Models (LLMs)cited by 46
  36. 2024Meta-Unlearning on Diffusion Models: Preventing Relearning Unlearned Conceptscited by 40
  37. 2024NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-Tuningcited by 37
  38. 2024Immunization against harmful fine-tuning attackscited by 35

50 most cited of 58 All 58 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 7.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Faithful Dual-constrained Erasure for Robust LLM Safety Alignment
  2. 2026Security in the Fine-Tuning Lifecycle of Large Language Models: Threats, Defenses,Evaluation, and Future Directions
  3. 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
  4. 2025SDD: Self-Degraded Defense against Malicious Fine-tuning
  5. 2026On-Policy Distillation for LLM Safety: A Routing Approach to Template-Robust Realignment
  6. 2026Merging Triggers, Breaking Backdoors: Defensive Poisoning for Instruction-Tuned Language Models
  7. 2026Safety Paradox: How Enhanced Safety Awareness Leaves LLMs Vulnerable to Posterior Attack
  8. 2026Safety Anchor: Defending Harmful Fine-tuning via Geometric Bottlenecks