Subtract or Replay? Exact Deletion from Language-Model Memory
This paper demonstrates that exact deletion from language model memory is fundamentally determined by the memory representation, where addressable records can be removed via algebraic subtraction while entangled writes require a replay-based rebuild to achieve bit-for-bit state restoration.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a super-smart digital assistant that never forgets a thing. You tell it a secret, and it stores that secret in a giant, invisible library inside its brain. Later, you might ask it to write a story or give advice, and it pulls that secret out to help. But what if you change your mind? What if you tell the assistant, "Actually, I never said that," or "That was a mistake, please erase it"? In the real world, if you burn a letter, the words are gone. But in a computer, simply telling it to "forget" is tricky. The computer might just hide the secret deep down, or it might have already used that secret to build other parts of its brain, making it impossible to just "delete" without breaking everything else. This is the problem of "machine unlearning." Scientists are trying to figure out how to make AI truly forget specific things on command, not just pretend to. It's a huge deal for privacy, like having a "Right to be Forgotten" for your digital life, ensuring that if you ask a robot to delete a memory, it actually does, leaving no ghostly traces behind.
This paper, titled "Subtract or Replay?", tackles this problem by asking a simple question: How is the memory stored? The authors, Vishwajith Ramesh and colleagues, discovered that the answer depends entirely on the "furniture" inside the AI's memory room. They found that there are two very different ways to delete a memory, and you have to pick the right tool for the job, or you'll fail.
The Two Ways to Delete a Memory
The paper tests this idea on two different types of AI models, which act like two different kinds of libraries.
1. The "Addressable" Library (The Gemma Model)
Imagine a library where every book has a specific, unique shelf number. If you want to remove a book, you just go to that shelf and take it off. You don't need to rebuild the whole library.
The authors tested this on a model called Gemma. They replaced some of its standard memory parts with a special system that acts like this addressable library. In this system, every piece of information has a "coefficient" (think of it as a volume knob) that controls how much it influences the AI's answers.
- The Magic Trick: To delete a memory, they simply turned the volume knob down to zero. This is called an "algebraic decrement."
- The Result: It worked perfectly. When they turned the knob down, the AI's output became mathematically identical to what it would have been if the memory had never been there in the first place. The difference was so tiny it was almost zero (a number called KL divergence of 5.4 × 10⁻¹⁵).
- The Catch: This only works well on smaller models (1 billion parameters). As the model gets bigger (4 billion and 12 billion), this method gets messy and expensive, slowing down the AI's performance by 11.2% and 44.3% respectively. So, while the "turn the knob" trick is perfect for small libraries, it's not a one-size-fits-all solution for giant ones.
2. The "Woven" Library (The Kimi Model)
Now, imagine a different library where the books aren't on shelves. Instead, the pages of every book are woven together into a giant, single tapestry. If you pull out one thread (a memory), the whole tapestry shifts, and the pattern changes in unpredictable ways.
The authors tested this on a model called Kimi, which uses a "recurrent state" (a tapestry-like memory). Here, every new piece of information changes the entire state of the memory.
- The Problem: They tried to just "subtract" the memory like they did with Gemma. It failed. Because the memory is woven, removing one thread doesn't just leave a hole; it leaves a distorted pattern. The math showed that 12% to 49% of the memory's influence changed depending on what came after the deleted part. You can't just subtract it; the "receipt" for the deletion is no longer valid.
- The Solution: Since you can't subtract a thread from a woven tapestry without ruining the pattern, you have to rebuild it. The authors used a "checkpoint and replay" method. They saved a snapshot of the tapestry before the unwanted thread was woven in. Then, they rewound the AI to that snapshot and replayed everything that happened after the bad memory, but this time, they skipped the bad thread.
- The Result: This worked perfectly. The AI's memory after the replay was bit-for-bit identical to a memory that never saw the bad thread at all. They tested this on real clinical notes up to 18,842 tokens long, and it worked every time. It also allowed them to "amend" a record perfectly by swapping the bad thread for a good one before replaying.
What This Means for You
The paper's main conclusion is that "exact deletion" isn't a single magic button. It's a property of how the memory is built.
- If the memory keeps a clear address for every record (like Gemma's special setup), you can subtract it quickly and perfectly.
- If the memory weaves everything together (like Kimi's tapestry), you cannot subtract it. You must rebuild the story from a saved checkpoint, skipping the bad part.
The authors are very clear about what they didn't find: they proved that simply trying to "mask" or "suppress" a memory (telling the AI to ignore it) isn't enough. The AI can still "remember" it in hidden ways, and attackers can often pull it back out. True deletion requires either a perfect subtraction or a perfect rebuild.
In short, if you want an AI to truly forget, you first have to check its memory room. Is it a library with shelves? Turn the knob. Is it a woven tapestry? Rewind and replay. There is no shortcut, but now we know exactly which tool to use for which job.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.