The Illusion of Forgetting: Rank Leakage and Its Mitigation in Privacy-Preserving Knowledge Editing for Large Language Models
Jie Hou ⋅ Qiang Zeng
Abstract
Privacy-preserving knowledge editing aims to protect sensitive information in large language models (LLMs) by rewriting their outputs. In this work, we identify a previously overlooked vulnerability of knowledge editing, which we term $\textit{rank leakage}$: although editing replaces the top-1 output with a sanitized answer, the original sensitive token often remains highly ranked in the model's next-token distribution. Exploiting this phenomenon, we propose an effective black-box attack, called $\textit{RankPeek}$, that exposes sensitive tokens by inspecting the top-ranked candidate tokens returned by a single model query. Despite its simplicity, RankPeek achieves strong extraction performance and remains effective even against models equipped with state-of-the-art defenses. To mitigate this vulnerability, we introduce $\textbf{R}$ank-guided $\textbf{C}$oncealment $\textbf{E}$diting (RCE), a plug-in defense that explicitly controls the rank of sensitive tokens during editing. Beyond RankPeek, RCE also mitigates existing black-box and white-box extraction attacks. Experiments across multiple models, datasets, and editing algorithms demonstrate that RCE substantially reduces extraction success while preserving edit fidelity and model utility. Our results highlight the importance of controlling the rank of sensitive tokens, rather than only the top-1 prediction, for privacy-preserving knowledge editing. Code and datasets are available at https://github.com/JasonH0810/RCE.
Successful Page Load