# The Illusion of Forgetting: Rank Leakage in Knowledge Editing and Its Mitigation

*Jie Hou, Qiang Zeng*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/153910) · [OpenReview](https://openreview.net/forum?id=HlaLfuxgVy) · [Open on the map](../papers.html#p153910)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Generative Recommendation](../pgroup/411.md) · Type: new method · Keywords: knowledge editing, rank leakage, extraction attack, defensive editing, language model security

Areas: [Safety & Security](../areas/safety.md) › Language Model Security › Attacks on LLM Judges and Verifiers; [Privacy & Federated Learning](../areas/privacy-federated.md) › Privacy Defenses and Attacks › Data Extraction Attacks

## Summary
The paper reveals that knowledge editing in language models leaves sensitive tokens highly ranked (rank leakage), proposes a simple black-box Output Attack that extracts them with a single query, and introduces RCE, a plug-in defense that explicitly controls token ranks during editing to mitigate the vulnerability.

## Explained to a 5-year-old
When we teach a big computer brain new facts, we try to forget old secrets. But sometimes the old secret still shows up in the computer's suggestions. A sneaky trick can ask the computer just one question and get the secret back. To stop this, we make the computer hide the old secret far down in its list of answers. This helps keep the secret safe.

## Explained to a 5-year-old, longer
We have a big computer brain that knows many facts. Sometimes we want it to change one fact and forget an old secret. After we change it, we think the secret is gone. But the secret can still appear in the computer's list of possible answers. This hidden presence is called rank leakage. Someone can ask the computer just one question and the secret pops out. This simple trick works even when we try to protect the model. To fix this, we add a new rule that pushes the secret far down the list. The rule makes sure the secret is not even close to the top answer. This helps the model keep the secret hidden while still giving correct answers. The new rule works for many different computer brains and ways of editing. By controlling how the secret is ranked, we make editing safer.

## For a technical reader
Knowledge editing attempts to replace sensitive information in language models, but the original token often remains highly ranked. An attacker can recover this token with a single query by exploiting the high rank. The paper proposes a defense that explicitly controls the rank of sensitive tokens during editing, reducing leakage. This defense can be plugged into existing editing pipelines and improves resistance to both black-box and white-box attacks.

## Problem
Even after editing a language model to replace a sensitive answer, the original token often remains highly ranked in the model’s next-token distribution, allowing extraction attacks to recover the information.

## Method
The authors first demonstrate that edited models retain high rank for sensitive tokens, then propose a simple extraction attack that leverages this rank, and finally present a defense that enforces explicit rank control during editing to reduce leakage.

## Results
The Output Attack successfully extracts sensitive information with a single query, and the approach improves resistance to extraction attacks while preserving edit fidelity and model utility.

## Contributions
The paper uncovers rank leakage as a critical vulnerability in knowledge editing, proposes a simple black-box extraction attack exploiting this leakage, and introduces a defense that controls token ranks during editing to mitigate the issue.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/153910)
