← Key papers

Paper review · October 30, 2026

Follow the gradient: tracing safety degradation back to training data

Follow the Gradient: Tracing Safety Degradation Back to Training Data

Safety & alignmentLanguage modelsData engineering Advanced cs.LG

Using SimpleLoRIF, a gradient embedding technique that scales to datasets of a million examples, the authors filtered out training examples whose gradient direction resembles that of unsafe responses, producing the SafeTulu dataset, which lowers jailbreak attack success rates.

Problem

Fine-tuning on seemingly harmless instruction data can quietly erode an LLM's safety. Because such data contains no harmful content, toxicity filters and LLM safety judges have difficulty catching it. Existing gradient-based attribution methods were costly and could only be used for small-scale analysis.

Method

The authors built SimpleLoRIF by removing the curvature (Hessian) correction from LoRIF (low-rank influence functions) and limiting backpropagation to the last four transformer blocks. Each layer's gradient is randomly projected and then decomposed to rank 1, so it is stored as 64 floats per layer. Each training example is scored by its gradient similarity to a target set (unsafe responses). The method was applied in two settings. (1) In an emergent misalignment setup, they verified that the gradients of insecure code examples align with those of misaligned responses. (2) On Tulu 3, they removed the top 20% of examples whose gradients were most similar to SafeRLHF unsafe responses, creating SafeTulu.

Results

Limitations

The unsafety criterion depends on SafeRLHF responses and GCG attack success rates. The 20% removal ratio is a fixed setting. In the appendix, the authors state that one model's gradient representations do not always transfer to another model's responses. The AUC in the Qwen setting (0.604) is only slightly above chance. The experiments for choosing the number of blocks were run on math data.

Why it matters

This is a practical method for filtering out, at the scale of millions of examples, safety-degrading data that content filters miss during post-training data curation. Using the released SafeTulu and Hugging Face Space, readers can try it themselves with a different removal ratio or target subset.

Key terms

Training data attribution (TDA)
A method for estimating which training examples gave rise to a specific model behavior. It usually compares the gradients that examples induce.
Emergent Misalignment
A phenomenon in which fine-tuning on a narrow set of undesirable data, such as insecure code, leads to broadly harmful behavior even in areas unrelated to coding.
GCG attack
An automated jailbreak technique that appends an optimization-found suffix string to a prompt to bypass a model's safety refusals.
LoRIF
An attribution technique that makes influence function computation feasible even for large LLMs by decomposing projected gradients into low-rank form for storage.

Original

Authors: Saket Reddy, Amro Abbas, Anshuman Suri, Ari Morcos, David Schwab, Pratyush Maini · Posted 2026-10-27 · License arXiv 비독점 배포 라이선스 · Based on the full text

This review is an AI-written summary of the paper. Please treat the original paper as the reference.