KUDA: Knowledge Unlearning by Deviating Representation for Large Language Models
Ce Fang, Zhikun Zhang, Min Chen, Qing Liu, Lu Zhou, Zhe Liu, Yunjun Gao
TL;DR
KUDA tackles the risk of memorized sensitive, copyrighted, or harmful knowledge in large language models by introducing a representation-level unlearning method that targets knowledge storage in FFN layers. It combines causal tracing to identify unlearning layers, a knowledge-representation deviation loss to forget target knowledge, and a relaxation null-space projection to preserve retained knowledge, with a principled two-stage hyperparameter tuning strategy. The approach achieves strong forgetting with minimal utility degradation and generalizes across modern models, supported by mechanistic gradient analyses showing near-orthogonal forgetting and retention directions. This work advances intrinsic safety for LLMs by enabling precise, robust unlearning that goes beyond output-level filtering or generic parameter deletion.
Abstract
Large language models (LLMs) acquire a large amount of knowledge through pre-training on vast and diverse corpora. While this endows LLMs with strong capabilities in generation and reasoning, it amplifies risks associated with sensitive, copyrighted, or harmful content in training data. LLM unlearning, which aims to remove specific knowledge encoded within models, is a promising technique to reduce these risks. However, existing LLM unlearning methods often force LLMs to generate random or incoherent answers due to their inability to alter the encoded knowledge precisely. To achieve effective unlearning at the knowledge level of LLMs, we propose Knowledge Unlearning by Deviating representAtion (KUDA). We first utilize causal tracing to locate specific layers for target knowledge storage. We then design a new unlearning objective that induces the model's representations to deviate from its original position in the phase of knowledge removal, thus disrupting the ability to associate with the target knowledge. To resolve the optimization conflicts between forgetting and retention, we employ a relaxation null-space projection mechanism to mitigate the disruption to the representation space of retaining knowledge. Extensive experiments on representative benchmarks, WMDP and MUSE, demonstrate that KUDA outperforms most existing baselines by effectively balancing knowledge removal and model utility retention.
