NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Effective Skill Unlearning through Intervention and Abstention

Yongce Li, Chung-En Sun, Tsui-Wei Weng

Abstract

As Large Language Models (LLMs) scale, the ability to selectively "unlearn" specific skills—such as coding, mathematics, or specific languages—becomes critical for safety, copyright compliance, and bias mitigation. Traditional unlearning methods often rely on expensive fine-tuning or destructive pruning that harms general model performance due to the polysemantic nature of neurons. This paper introduces two lightweight, training-free alternatives: Neuron Adjust and Key Space Detection (KSD). These methods operate during inference to intervene in neuron activations or detect and abstain from unwanted queries. Our evaluation shows that these techniques can reduce target skill performance by over 80% while maintaining general knowledge (MMLU) within 10% of the original model's performance.

Introduction

The rapid advancement of Large Language Models has brought about the need for "surgical" capability removal. Whether it is preventing the generation of malicious code or removing copyrighted training data, the goal is to disable a specific skill without degrading the model's overall utility.

A significant challenge in this endeavor is the Polysemantic Trap. In LLMs, individual neurons are often multi-functional; a single neuron might be active for both Python syntax and general logical reasoning. Pruning such neurons to stop a model from coding often inadvertently "lobotomizes" its general reasoning capabilities. This research seeks to move beyond blunt pruning toward more precise, inference-time interventions.

Methods for Targeted Unlearning

The researchers propose two distinct strategies that avoid the high costs of retraining or fine-tuning. These methods shift the focus from model weights to inference-time dynamics.

Overview of Neuron Adjust and Key Space Detection methods for skill unlearning.

1. Neuron Adjust (Intervention)

Neuron Adjust is based on the observation that neurons exhibit different "pre-activation" distributions depending on the task at hand. By probing the model with a "forgetting" dataset (the skill to be removed) and a "retaining" dataset (general knowledge to be preserved), the method identifies neurons that show the most significant distribution shifts between tasks.

During inference, the method probabilistically shifts these neuron values. Instead of allowing a neuron to fire according to the "forgetting" distribution, it is nudged toward the "retaining" distribution. This effectively "re-wires" the model's internal logic on the fly to suppress the unwanted skill.

Neuron activation distributions before and after the Neuron Adjust intervention.

2. Key Space Detection (KSD - Abstention)

Key Space Detection takes a different approach by identifying the "neighborhoods" of specific skills within the model's Feed-Forward Layer (FFL) key space. The authors discovered that queries related to the same skill tend to cluster within high-dimensional "hypercubes."

KSD maps these clusters for the target skill. If a user's query falls into one of these pre-defined hypercubes during inference, the model recognizes it as an unwanted request and simply abstains from answering, providing a standard "Invalid query" response.

Experimental Results

The methods were tested across domains including mathematics (GSM8K), coding (MBPP), and multilingual comprehension (MLQA), using MMLU to track general knowledge retention.

High Precision and Low Collateral Damage

KSD demonstrated remarkable effectiveness, achieving a relative performance drop of over 80% on target skills. Crucially, the "collateral damage" to unrelated skills and general knowledge was minimal, typically staying under a 10% drop. In several instances, KSD provided near-perfect unlearning with almost no impact on the model's broader utility.

Efficiency

A major advantage of these techniques is their efficiency. Because they are training-free and only require a few forward passes to map distributions or key spaces, they can be implemented in under 15 minutes on a single V100 GPU. This stands in stark contrast to fine-tuning, which can require significant time and computational resources.

Discussion and Future Work

While highly effective, these methods have limitations. They are dataset-dependent, requiring high-quality "forgetting" and "retaining" data to accurately map the model's internal state. Furthermore, highly intertwined skills—those that share significant internal "neuron real estate"—remain harder to separate surgically.

Future research may explore more complex geometric shapes for KSD beyond simple hypercubes to better capture the nuances of skill clusters. Additionally, more fine-grained analysis is needed to handle overlapping capabilities where the boundary between "forget" and "retain" is blurred.

Conclusion

Neuron Adjust and Key Space Detection offer a promising path toward safer and more controllable LLMs. By moving the unlearning process to the inference phase and leveraging the model's internal spatial modularity, researchers can achieve high-precision skill suppression without the prohibitive costs or destructive side effects of traditional methods.

Summary updated

BibTeX
@inproceedings{li2025effective,
  author = {Yongce Li and Chung-En Sun and Tsui-Wei Weng},
  title = {{Effective Skill Unlearning through Intervention and Abstention}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.322},
}
Figure