UNBIND: UNlearning By INference-time Directional Steering for Code LLMs
On the map: LLM safety and security → Machine unlearning
Abstract (arXiv)
Code large language models acquire programming capabilities from large code corpora, but can also memorize implementations that later require removal. Code unlearning is needed to control their continued reproduction when copyright or security concerns arise. However, targeted and retained code share computational patterns, creating a tension between forgetting specific implementations and preserving general programming ability. We propose UNBIND, a code unlearning framework that separately considers which hidden states correspond to the target code and how to suppress its reproduction. By constructing separate directions for these objectives, UNBIND achieves selective unlearning at inference time while keeping model weights fixed. Our evaluation covers fourteen baselines across two code models and two corpora. UNBIND achieves the highest joint forgetting and utility score in every setting. It reduces target code reproduction by 97.3% to 99.1% as measured by F-BLEU, with at most two fewer HumanEval+ and six fewer MBPP+ problems solved than the original models. In repeated extraction tests under a fixed budget, the number of targets yielding exact spans of at least 50 tokens falls from 188--262 to 0--2 out of 300 per setting. No extracted span reaches 100 tokens, and the mean best recovery ratio ranges from 0.43% to 6.45%. Multilingual and related-code evaluations further show effective forgetting with limited impact on useful programming capabilities, supporting UNBIND as a practical approach to selective code unlearning.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Machine unlearning, one of 12 directions in LLM safety and security. Builds on 32 of its 35 references that are in the map. First posted on arXiv 28 Sep 2026.
Builds on
32 of 35 references.
Closest ancestors · 11
Same direction, newest first
- 2026ST2U: Stateful Test-Time Unlearning via Restricted Knowledge Boundary Control24 Aug
- 2026Divergence Decoding: Inference-Time Unlearning via Auxiliary Models29 May
- 2026Attention Smoothing Is All You Need For Unlearning1 Mar
- 2026Inference-time Unlearning Using Conformal Prediction3 Feb
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearning17 Sep
- 2025Large Language Model Unlearning for Source Code20 Jun
- 2024LLM Unlearning via Loss Adjustment with Only Forget Data14 Oct
- 2024Simplicity Prevails: Rethinking Negative Preference Optimization for LLM Unlearning9 Oct
- 2024Negative Preference Optimization: From Catastrophic Collapse to Effective Unlearning8 Apr
- 2024TOFU: A Task of Fictitious Unlearning for LLMs11 Jan
- 2023In-Context Unlearning: Language Models as Few Shot Unlearners11 Oct
Other references · 21
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2019Machine Unlearningcited by 1,020
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,009
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
9 more
- 2022Quantifying Memorization Across Neural Language Modelscited by 755
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2019Certified Data Removal from Machine Learning Modelscited by 512
- 2024The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearningcited by 488
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2026GSS: Gated Subspace Steering for Selective Memorization Mitigation in LLMscited by 2
- 2026SAGE: Signal-Amplified Guided Embeddings for LLM-based Vulnerability Detectioncited by 1
Built on by
Not cited yet.