From Logits to Latents: Contrastive Representation Shaping for LLM Unlearning
Haoran Tang, Rajiv Khanna
TL;DR
This work tackles the challenge of unlearning in large language models by addressing forget–retain entanglement in latent representations. It introduces CLReg, a contrastive representation regularizer that forms forget-positive and retain-negative pairs to explicitly separate forget concepts from retained knowledge, integrated with existing unlearning algorithms. The authors provide theoretical insights showing that CLReg reduces cross-distribution similarity between forget and retain embeddings, thereby lowering entanglement, and demonstrate substantial empirical gains on TOFU and MUSE benchmarks across Llama-3 models, with SimNPO+CL often achieving the best performance and privacy leakage kept near zero. The findings suggest that purposeful latent-space shaping can improve unlearning effectiveness without compromising utility or privacy, guiding future research toward surgical, latent-space interventions for forget concepts.
Abstract
Most LLM unlearning methods aim to approximate retrain-from-scratch behaviors with minimal distribution shift, often via alignment-style objectives defined in the prediction space. While effective at reducing forgotten content generation, such approaches may act as suppression: forgotten concepts can persist in representations and remain entangled with retained knowledge. We introduce CLReg, a contrastive representation regularizer that identifies forget features while pushing them away from retain features, explicitly reducing forget-retain interference with minimal shifts on retain features. We provide first theoretical insights that relate representation shaping to entanglement reduction. Across unlearning benchmarks and LLMs of different sizes, CLReg decreases forget-retain representation entanglement that facilitates mainstream unlearning methods without positing extra privacy risks, inspiring future work that reshapes the representation space to remove forget concepts.
