arXiv:2609.03662cs.LGSep 2026

Manuscript Offprint

arXiv:2609.03662

Extracting Forgotten Prompts from Targeted Unlearned Models

Au Ashley Hoi-Ting, Meghdad Kurmanji, William F. Shen, Nicholas D. Lane, Ligang He

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

Abstract

Recent unlearning methods (e.g. NPO, DPO, LUNAR) make use of refusal alignment to suppress forgotten data. However, it has been shown that refusal responses might leave traces of unlearning, and recent attacks have been able to successfully recover some of the unlearned knowledge. In this paper, we uncover a new vulnerability. Existing attacks typically assume that the forgotten prompts are already known to the adversary and focus on recovering their answers. However, we show that the forgotten prompts themselves can be extracted by using the retained data and black-box access to the model. Our attack, Targeted Active Search (TAS), first identifies the forgotten entities by constructing canonical templates and entity pool, and selectively querying the model using the most informative template-entity pair under a limited query budget. Once the entities are identified, TAS instantiated prompt templates with those entities to probe the unlearned model and reconstruct the forgotten prompts. Experiments across three unlearning methods with three datasets and three LLMs shows that TAS recovers the forgotten entity with 100% accuracy and reconstructs up to 95% of forgotten prompts, all while using up to 99.7% fewer queries than naive probing.

1 Introduction

Large Language Models (LLMs) often undergo post-training interventions to improve their alignment and compliance. Machine unlearning has recently emerged as an important post-training paradigm for selectively removing unwanted information or behaviours from trained models. Given a forget set that must be removed for legal, privacy, or safety reasons, an unlearning method updates the model so that it no longer reveals the forgotten content while preserving behaviour on retained data. [13, 16, 27]. A prominent family of unlearning methods approaches this objective through preference-based alignment. Methods such as NPO [28], DPO [16], and LUNAR [17] steer the model toward human-preferred responses

to prompts associated with the forget set. In particular, rather than directly erasing the underlying information, these methods train the model to refuse requests that elicit forgotten content while maintaining normal responses to other prompts.

Such interventions, however, can lead to new vulnerabilities. If unlearning induces a distinctive refusal pattern, then the refusal itself becomes an observable trace of what was removed. A growing body of work exploits such traces to recover unlearned content, showing that suppression often obscures rather than erases knowledge [22, 24, 26]. However, these attacks share a common assumption, that the adversary already knows the forgotten prompt. These attacks give the forgotten prompt in a form of either, a specific example to test for membership [1, 20], a known question whose hidden answer it tries to recover [22], or a pool of candidates from which it selects the forgotten one [3].

In this work, we uncover a new vulnerability: the forgotten prompts themselves can be recovered from an unlearned model. This creates a distinct privacy and security risk, as the content of a forgotten prompt may itself encode sensitive information that the unlearning intervention was intended to conceal. Consider a clinical assistant unlearned to suppress an association between a patient and HIV treatment or psychiatric care, or a legal assistant tuned to refuse questions about a confidential relation such as Company A's pending acquisition of Company B. Even if the model never reveals the suppressed answer, an anomalous refusal on the right forgotten entity pair discloses sensitive association the intervention was meant to hide.

We show that the forgotten prompts can be extracted using only retained data and black-box, text-only access to the unlearned model. The adversary observe nothing but the model's decoded completions. From retained prompts, the adversary can construct a pool of candidate entities and a set of reusable prompt templates, and then probe the model to identify which entity-template combination elicit the anomalous refusal behaviour. This turns forget prompt recovery attack into a search over a large combinatorial space, guided by a sparse and noisy refusal signal under a finite query budget. Naively searching

Preprint. Under review.

this combinatorial space is notoriously expensive.

To make this search feasible, we introduce Targeted Active Search (TAS). Rather than enumerate the space exhaustively, TAS uses posterior-guided querying to concentrating budget on promising entity-template probes. Once the forgotten entities are identified, TAS reconstructs the forgotten prompts by instantiated them into the reusable templates and ranking the results by refusal strength.

We evaluate TAS across three unlearning methods (DPO, NPO, LUNAR), three model families (Llama2-7B, Llama3-8B, and Gemma-7B), and three benchmarks (PISTOL [15], DUSK [7], and TOFU [11]). TAS can discover the hidden entity with 100% accuracy and reconstructs up to 95% of the forgotten prompts while using up to 99.7% fewer queries than exhaustive probing. Our contributions are as follows:

  • We introduce a new vulnerability, namely, forget-prompt discovery. A black-box problem in which the adversary recovers the forgotten prompts, rather than answers to known prompts, without access to the forget set.

  • We propose TAS, a text-only active-search method that reconstructs forgotten prompts under a limited query budget.

  • We conduct a systematic evaluation across three unlearning baselines, three model families, and three benchmarks. Comparing multiple search strategies TAS recovers hidden forgotten prompts with high precision and recall at a small fraction of the brute-force cost.

  • We show that conventional forget-set metrics fail to predict black-box discoverability, arguing that unlearning evaluations should test not only whether known forget prompts still elicit their answers, but also whether the act of unlearning makes forget prompts recoverable.

References (26)