arXiv cs.CL· Saket Reddy, Amro Abbas, Anshuman Suri, Ari Morcos, David Schwab, Pratyush Maini·· 2 天前AI 评分42
研究揭示微调数据如何侵蚀 LLM 安全性,提出 SimpleLoRIF 梯度过滤方法
Follow the Gradient: Tracing Safety Degradation Back to Training Data
AI 导读
研究者提出 SimpleLoRIF,一种可扩展的梯度嵌入方法,通过简化低秩归因并将反向传播限制在最后四个 Transformer 块,可对百万级样本数据集进行嵌入,将梯度归因从分析工具变为实用的后训练数据过滤器。
正文 · 原文
Abstract:Fine-tuning Large Language Models (LLMs) on instruction data can quietly erode their safety, even when no training example looks harmful. Because this safety-degrading data looks benign, standard content filters struggle to catch it. We tackle this problem by developing SimpleLoRIF, a scalable gradient embedding method that identifies fine-tuning examples whose gradients align with unsafe behavior. By simplifying a low-rank attribution method and restricting backpropagation to the final four transformer blocks, SimpleLoRIF can embed datasets on the order of a million examples, boosting gradient attribution from a small-scale analysis tool into a practical filter for full post-training datasets. We first validate it on emergent misalignment, where we find that gradients can connect insecure-code training data to the broadly harmful behaviors that appear after fine-tuning, with AUC as high as 0.865 in the gradient space of misaligned models. We then use SimpleLoRIF to build SafeTulu, a version of Tulu 3 with the 20% of examples most gradient-aligned with unsafe responses removed. Training on SafeTulu reduces GCG attack success rate by up to 22% across Qwen, Llama, and Olmo, outperforming both LLM-as-a-judge and prior gradient-based filtering, while largely preserving or even improving capability. Finally, we analyzed the removed data and identify possibly under-studied sources of safety degradation, such as tool-execution failures and narrative arithmetic. We release SafeTulu along with a Hugging Face Space that lets researchers build their own customized versions of SafeTulu to fine-tune on, such as by changing the removal fraction or filtering only certain subsets.
| Subjects: | Machine Learning (cs.LG); Artificial Intelligence (cs.AI); Computation and Language (cs.CL) |
| Cite as: | arXiv:2610.37481 [cs.LG] |
| (or arXiv:2610.37481v1 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2610.37481 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Saket Reddy [view email]
[v1]
Tue, 27 Oct 2026 16:08:08 UTC (6,335 KB)
来源:arXiv cs.CL · arxiv.org