Constrained Entropic Unlearning: A Primal-Dual Framework for Large Language Models
Taha Entesari, Arman Hatami, Rinat Khaziev, Anil Ramakrishna, Mahyar Fazlyab
TL;DR
This work reframes unlearning in large language models as an $\varepsilon$-constrained optimization problem, explicitly separating forgetting from retention to avoid unstable trade-offs. It introduces logit-margin flattening, a softmax-free, convex-in-logs forgetting loss, and solves the constrained problem via a scalable primal-dual algorithm with warm-start, exposing forgetting-retention dynamics through the dual variable. The approach is instantiated with a retention constraint $\mathcal{L}_{\text{rtn}}(\pi, \mathcal{D}_{\text{rtn}}) \leq \varepsilon$ and a forgetting objective $\mathcal{L}_{\text{fgt}}^{\mathrm{LM}}$, ensuring robust forgetting while preserving utility. Empirical results on TOFU and MUSE benchmarks across multiple model families show that Constrained Entropic Unlearning (PDU) matches or surpasses state-of-the-art baselines in removing targeted information while maintaining downstream performance, with analysis revealing practical guidance on setting the constraint and future avenues for extension.
Abstract
Large Language Models (LLMs) deployed in real-world settings increasingly face the need to unlearn sensitive, outdated, or proprietary information. Existing unlearning methods typically formulate forgetting and retention as a regularized trade-off, combining both objectives into a single scalarized loss. This often leads to unstable optimization and degraded performance on retained data, especially under aggressive forgetting. We propose a new formulation of LLM unlearning as a constrained optimization problem: forgetting is enforced via a novel logit-margin flattening loss that explicitly drives the output distribution toward uniformity on a designated forget set, while retention is preserved through a hard constraint on a separate retain set. Compared to entropy-based objectives, our loss is softmax-free, numerically stable, and maintains non-vanishing gradients, enabling more efficient and robust optimization. We solve the constrained problem using a scalable primal-dual algorithm that exposes the trade-off between forgetting and retention through the dynamics of the dual variable, all without any extra computational overhead. Evaluations on the TOFU and MUSE benchmarks across diverse LLM architectures demonstrate that our approach consistently matches or exceeds state-of-the-art baselines, effectively removing targeted information while preserving downstream utility.
