Beyond data filtering: knowledge localization for LLM capability removalBeyond Data Filtering: Knowledge Localization for Capability Removal in LLMs
Translation in progress — untranslated text is omitted.
The authors propose Selective Gradient Masking (SGTM), an improved variant of Gradient Routing, which zero-masks selected gradients so that target-domain samples only update their dedicated parameters, thereby localizing target knowledge to a parameter subset that can be removed later. In two tests—removing knowledge of one language on bilingual synthetic data and removing biology knowledge on a model trained on English Wikipedia—the authors state that SGTM achieves a better retention-forgetting tradeoff than data filtering and previously proposed Gradient Routing when label errors exist. SGTM is also relatively robust to adversarial fine-tuning, requiring seven times more fine-tuning steps to reach baseline forgetting-set performance than the fine-tuning-based forgetting method RMU. The authors believe that in scenarios where annotation noise is hard to avoid, SGTM is a complement to existing safety mitigations at the pretraining stage.
- The authors aim to remove dual-use capabilities during pre-training while minimally harming general capabilities. Data filtering suffers from label noise: missed harmful content may still be learned, and overly aggressive filtering deletes useful data.
- SGTM assigns a small number of attention heads and MLP units per layer to forget data. Forget samples only update these parameters; retain samples zero them during the forward pass. After training, these parameters are zeroed to remove target knowledge.
- On bilingual TinyStories and Wikipedia with biology removed, the authors state that at fixed retain loss, SGTM's forget loss is higher than filtering and previous Gradient Routing. Under adversarial fine-tuning back to baseline, SGTM needs 92M forget tokens and RMU needs 13M.
- The authors state the experiments are proof of concept on 64M and 254M, the forget set is about 4% of tokens, the task is Spanish or biology rather than real CBRN, and the evaluation uses loss as a proxy. The authors expect SGTM to behave similarly to data filtering under in-context attacks. The experiments also include adversarial fine-tuning.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- Anthropic Alignment Sciencecites the paper's id or linkAE Studio 与 Anthropic 提出 GRAM:用模块化预训练隔离危险知识的初步研究
with prior research on this subject (Cloud et al., 2024; Shilov et al., 2025) showing that GRAM can outcompete data filtering on capability removal when labeled data is sparse.