Large Language Models (LLMs) exhibit remarkable generative capabilities; however, they also demonstrate memorization behaviors, which can lead to serious ethical and legal concerns, such as the leakage of private information and the reproduction of co...
Large Language Models (LLMs) exhibit remarkable generative capabilities; however, they also demonstrate memorization behaviors, which can lead to serious ethical and legal concerns, such as the leakage of private information and the reproduction of copyrighted content. To address these issues, machine unlearning has been actively studied as a mitigation strategy. Nevertheless, unlearning becomes increasingly challenging as the degree of memorization grows. In particular, strongly memorized samples are difficult to remove effectively, while overly aggressive unlearning often results in significant degradation of model utility.
In this work, we propose a framework that measures memorization at the sample level and leverages this information to guide differentiated unlearning strategies. However, accurately measuring memorization in large language models remains challenging, as existing approaches—such as leave-one-out retraining or influence function–based methods—are often computationally expensive and numerically unstable at scale. To address these limitations, we introduce Paraphrase Gradient Alignment (PGA), a novel gradient-based memorization metric. PGA quantifies the degree of gradient alignment induced by an original sentence and its near-duplicate paraphrases, providing a proxy for the sample’s memorization strength. Importantly, PGA relies solely on gradients computed from the current model parameters, enabling efficient memorization estimation without retraining, Hessian approximation, or tracking the training trajectory.
Experiments on the TOFU and MUSE benchmarks demonstrate that PGA achieves strong discriminative performance in Membership Inference Attack (MIA) tasks, outperforming or matching existing memorization metrics. Building on this measurement, we design curriculum-based and hybrid unlearning strategies that adapt unlearning behavior according to memorization strength. Our results show that parameter-update-based unlearning is effective for weakly memorized samples, while strongly memorized samples benefit from combining test-time unlearning to suppress direct output, thereby preserving model utility.
Overall, this work reframes unlearning as a memorization-aware, data-adaptive problem rather than a one-size-fits-all algorithmic solution. By tightly coupling memorization measurement with strategic unlearning, we provide a practical and principled framework for effective unlearning in large language models.