NeurIPS 2026QuestionsPapersAreasAboutMarkdown

GradShield: Alignment Preserving Finetuning

Zhanhao Hu, Xiao Huang, Patrick Mendoza, Emad A Alghamdi, Basel Alomair, Raluca Popa, David Wagner

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: AI Safety, Security & Alignment › Alignment Collapse and Mitigation in Fine-Tuning · Type: new method · Keywords: LLM safety, alignment preservation, harmful data filtering, finetuning, Attack Success Rate

Areas: Safety & Security › Safe Alignment › Fine-Tuning Safety Alignment

Summary

GradShield is a filtering method that computes a Finetuning Implicit Harmfulness Score (FIHS) and uses adaptive thresholds to remove harmful data during LLM finetuning, preserving alignment while maintaining utility.

Explained to a 5-year-old

When we teach a big computer program called a language model new words, it can sometimes learn bad ideas from the things we show it. Even if the things look nice, they might secretly trick the program into saying mean things. The researchers made a way to check each piece of information and see if it might be harmful. They remove the bad pieces before the program learns from them. This helps keep the program safe and nice to talk to.

Explained to a 5-year-old, longer

A language model is a computer program that can write and understand words. When we teach it new things, we call that process fine-tuning. Sometimes the things we teach it can be harmful, even if they look harmless. Harmful data can make the model say things that are unsafe or biased. The researchers created a scoring system that looks at each piece of data and guesses how harmful it might be. They call this score a Finetuning Implicit Harmfulness Score. Using this score, they set a threshold to decide which data to keep and which to discard. Data that scores above the threshold is removed before the model learns from it. This prevents bad ideas from entering the model’s knowledge. The method is applied to many different fine-tuning tasks, like answering questions or summarizing text. After applying the filter, the model still works well on normal tasks. The safety of the model is measured by how often it fails a harmful attack, and that rate stays very low. This approach helps keep language models safe while still being useful.

For a technical reader

The paper presents a filtering technique that evaluates each training example for hidden harmfulness before it influences the model. It calculates a score for each example and uses an adaptive threshold to discard risky data during fine-tuning. This process is applied across several utility tasks, ensuring the model remains aligned. Evaluation shows the method keeps attack success rates under 6% while preserving normal performance. The solution is simple to integrate into existing pipelines and does not require major changes to the model architecture.

Problem

Finetuning large language models can introduce safety misalignment when harmful data, even subtle or benign-appearing, corrupts the model's alignment. Existing methods often lack reliable ways to filter such harmful data before finetuning.

Method

The approach computes a Finetuning Implicit Harmfulness Score (FIHS) for each data point and applies an adaptive thresholding algorithm to filter out potentially harmful examples before they influence the model. This principled filtering is applied during utility fine-tuning across multiple tasks.

Results

The approach consistently keeps the Attack Success Rate below 6% while preserving utility performance, outperforming baseline methods across the evaluated tasks.

Contributions

A principled filtering method that scores data points for implicit harmfulness and adaptively thresholds them, enabling safer LLM finetuning without sacrificing utility. Empirical evaluations across multiple tasks demonstrate superior safety and performance compared to existing baselines.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction