arXiv:2608.28361cs.AIAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.28361

GRACE:Gradient-guided Coreset Selection for LLM Unlearning

Praveen Bushipaka, Andrea D'Angelo, Lucia Passaro, Tommaso Cucinotta

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Machine Unlearning methods for Large Language Models typically assume pre-specified forget and retain sets. In realistic settings, however, requests may provide only a few examples of undesired behavior, requiring forget and retain sets to be inferred from heterogeneous corpora. We study this data-selection problem and propose GRACE, a gradient-guided coreset selection method that constructs both forget and retain sets for LLM unlearning. GRACE first computes a forget direction from seed examples that elicit the undesired behavior, then selects a compact forget coreset whose gradients approximate this direction using non-negative orthogonal matching pursuit. To preserve model utility, it selects retain examples after projecting out the forget direction and applying clustered orthogonal matching pursuit in the remaining gradient space. Across two target domains, two model families, and four unlearning algorithms, GRACE improves model utility while maintaining comparable forget quality, with particularly consistent gains over prior gradient-based selection methods.

1 Introduction

Large Language Models (LLMs) are increasingly deployed in settings where memorized training content may create privacy, copyright, or safety risks (Naveed et al., 2025; Carlini et al., 2021; Staab et al., 2024; Shokri et al., 2017). Alignment techniques such as Reinforcement Learning from Human Feedback (RLHF) (Christiano et al., 2017), Proximal Policy Optimization (PPO) (Schulman et al., 2017) and Direct Preference Optimization (DPO) (Rafailov et al., 2023) can reduce harmful behavior, but they do not provide guarantees that specific information has been removed, nor do they directly address legal or regulatory requirements such as the GDPR's Right to be Forgotten. 1^{1} Re-training the model from scratch after each removal request would be the cleanest solution, but is prohibitively expensive for modern LLMs (Crawford, 2021).

Machine Unlearning (MU) for LLMs, or LLM Unlearning, has emerged as a promising alternative, defining two key desiderata: remove specific undesired information from the model (Forget Quality) while preserving its performance on non-related knowledge (Model Utility). Several LLM Unlearning methods have been proposed over the years, spanning gradient-based (Yao et al., 2024a), preference-based (Fan et al., 2024), and representation based (Li et al., 2024) methods.

A central assumption behind these methods, however, is that the forget and retain sets are already specified. This assumption is rarely realistic. LLM training data may be undocumented or only partially accessible, and unlearning requests often originate from users, legal entities, or administrators who can point to an undesired behavior but cannot identify all training examples that caused it. As a result, both the forget set DfD_f and the retain set DrD_r must be constructed from heterogeneous corpora rather than provided as part of the request.

This makes data selection a core component of realistic LLM unlearning, rather than a fixed preprocessing step. As illustrated in Figure 1, an unlearning request may specify only a target behavior or a small set of examples, while the actual forget and retain sets must be selected before any unlearning algorithm can be applied. We formalize this problem as follows:

Given a small set of examples that elicit an undesired behavior, how can we select compact forget and retain sets from a mixed training corpus so as to improve the forget–utility tradeoff of LLM unlearning methods?

∗^{*}Accepted to Findings of EMNLP 2026.

1^{1}https://gdprinfo.eu/en-article-17

This selection problem remains largely unex-

Figure

Figure 1: Unlearning pipeline. (1) The user files an unlearning request for a target content contained in the LLM. (2) We use GRACE, our proposed method, to find the best forget and retain coresets to remove the target content while preserving model utility. (3) These two sets are fed to a MU algorithm to perform unlearning.

plored. RASLIK (Liu et al., 2026) is the closest prior work: it constructs DfD_{f} and DrD_{r} by ranking samples according to their gradient cosine similarity with the target behavior. While effective as a first approximation, this strategy treats selection as independent similarity scoring. It does not explicitly seek a compact set whose aggregate gradient aligns with the undesired behavior, nor does it ensure that retain samples preserve useful directions while excluding the forget direction. Consequently, highly similar samples may be redundant or only weakly relevant to forgetting, whereas dissimilar samples are not necessarily informative for preserving model utility.

To address this gap, we introduce GRACE, a first-order coreset selection method that improves DfD_{f} and DrD_{r} construction for LLM unlearning algorithms. As depicted in Figure 1, we first compute the forget gradient direction gfg_{f} from the loss on samples that elicit undesired model outputs. GRACE selects a compact forget set whose gradients approximate this target direction via nonnegative orthogonal matching pursuit. It then constructs the retain set by projecting out the forget direction and selecting representative examples from the remaining gradient space. The resulting forget and retain sets are passed directly to retain-aware MU algorithms.

We show that, across two target domains, two model families, and four retain-aware unlearning algorithms, GRACE significantly improves downstream model utility in most evaluated settings while maintaining forget quality, with consistent gains over the prior gradient-based selection baseline RASLIK. We release reproducible code at: https://github.com/dangeloandrea14/grace