Model Surgery: Can an AI directly edit and make another AI forget facts ?

· Deep Gains ·

19 min read Original article ↗

A few days ago (November 2026), I came across a paper from MIT CSAIL: “Sparks of Weight-Space Programming” (Takehi, Teoh, Zhang and Khattab). It gave one AI model direct access to the weights of another model, and asked it to improve that model by hand. No retraining. Only careful reading and small, direct edits.

The paper used this method on a math task. I wanted to try it on problems that enterprises will find more relatable. I also wanted to know something that the paper did not test: can Claude Opus do this work? The paper used only one editor, OpenAI’s GPT-6 Astra.

This post is about the first of my two experiments: making a model forget specific facts. The result: Claude Opus 5.5 changed 17 weight matrices in a 494-million-parameter model. After the change, the model had forgotten 20 customers and 10 secret keys. It acted like a model that never saw them. The other customers lost only 2.5 points of accuracy. The three standard retraining methods did not do both. They hid the facts, or they damaged the model to remove them.

The paper gives an AI model (the “editor”) a Python kernel with access to the weights of a smaller model. The editor has three rules:

  • It cannot use gradient descent. It cannot retrain.

  • It has a small, fixed budget of “forward passes”: 10, 25 or 50. A forward pass is one run of the model on a set of inputs.

  • It must explain each step before it does it.

So the editor works like a surgeon. It reads the model’s internal signals. It makes a hypothesis about where a behavior lives. It writes a change to specific weights. Then it measures the result.

In the paper’s Experiment 8, the editor (GPT-6 Astra) worked on Qwen3.5-0.8B and the MATH-500 test. It found that the model often got stuck in reasoning loops, a problem that Qwen’s own model card warns about. It fixed this by editing 0.016 percent of the weights. MATH-500 accuracy went from 7.9 percent to 48.1 percent.

What interested me most is the method, not the math score. Diagnose a specific behavior. Find where it lives. Change it with a small edit that you can inspect. Check the change against ground truth. This is what alignment work needs.

Source: Sparks of Weight-Space Programming, MIT CSAIL, 2 November 2026.

I looked for problems that matter to companies and that have a clear right answer. I picked two:

  1. Forgetting (this post). Make a model forget specific facts that it learned in training.

  2. Honesty (Part 2). Make a model say “I don’t know” when it does not know, instead of inventing an answer.

Every organization that trains or fine-tunes a model should expect to get requests like these:

  • A person uses the right to erasure under GDPR Article 17.

  • A rights holder sends a takedown notice for text that the model copies word for word.

  • A client leaves, and the contract says its data must go too.

  • A secret key gets into the training data by mistake.

  • A court orders a company to remove a false statement about a person.

It is easy to delete the source documents. It is difficult to delete what the model learned from them. A model does not keep documents. It keeps weights, and the facts are spread through them.

Today there are two honest options, and both are poor:

  1. Train the model again without the data. This is the gold standard, but it is too slow and expensive for each request.

  2. Block or refuse the answer. This hides the fact. The model still knows it.

This post tests a third option: change the weights directly. It also tests something equally important: a method to prove that the change worked.

The paper showed that one frontier model can do weight surgery. One model is not a pattern. If a second model, from a different company, can also do it, the method is more general than one model’s skill.

I also had a practical reason. I use Claude Code every day. I wanted to know whether the AI that I already work with can do this work. It must be careful and go step by step, under strict rules.

The paper used servers. I used my laptop, an Apple M4 Pro with 48 GB of memory. So I made some changes.

The editor had no tools except a locked Python kernel and a forward-pass service. The sandbox blocked the network and my project files. It also blocked my own Claude Code transcripts. This was necessary: those transcripts contain the test design. An AI editor on the same machine as the researcher's AI assistant is a leak path that the paper did not have.

To check forgetting exactly, you must know exactly what the model learned. With real data, you never know this. So I made a fictional company, “SynthCorp”.

  • 500 fictional customers. Each customer has six facts: city, account tier, product, account manager, signup year and a random ticket ID.

  • 50 secret strings, like API keys, planted in the training text. These act as leaked credentials.

I fine-tuned the model on all of it. This was a full fine-tune, not a light adapter such as LoRA. All 494 million weights could change, as in the fine-tuning of a real company model. I chose this on purpose. An adapter keeps the new facts in a small, separate change, which would make them unrealistically easy to find and remove. In a full fine-tune, the facts spread through all the weights of the model. This is a harder and more realistic test for the editor.

The recipe: 3 passes over 18,750 examples, learning rate 2e-5, with general instruction and text data mixed in so that the model kept its other skills.

Then I trained a second copy with one difference: it never saw 20 “forget” customers and 10 “forget” secrets. It used the same recipe, the same settings and the same number of passes. I call this copy the answer key. It shows what perfect forgetting looks like, because it never knew those facts.This gives a precise definition of success: after the edit, the model must act like the answer key. It must not refuse. It must not act strangely. It must simply not know.

The scenario of customers used here is just an example and it stands for any very specific data you train your custom models on. Most importantly, it contain the two types of knowledge that most erasure requests are about:

  1. Facts about a named person or company or product, for example “Fenna Yamamoto is based in Bandung.”

  2. Strings that the model memorized word for word, for example a leaked key.

This experiment gives you an alternate path than full re-traning.

Claude received the original model and the request: “Make the model forget these 20 customers and these 10 secrets.” It also received the 810 training documents about them. It did not receive the answer key, because a real company does not have one.

It saw only the six question formats from training. I kept all test questions and all attack formats hidden. I also kept 112 “test” customers hidden. Claude never saw them, so I can use them to measure damage to other customers.

The limits were 10 forward passes and 300 Python runs. Claude used 10 passes and 274 Python runs in 291 turns. These turns were spread across eight fresh conversations. Claude kept its own notes file between them.

The first attempt failed.

The diagnosis. In its first three passes, Claude found three things:

  • The model writes a customer’s fact into the answer at the position just before the answer word. The last four layers do most of this work.

  • The customer’s name collects that customer’s facts in the early layers.

  • Ticket IDs and secrets are different. The model stores them as memorized strings, not as facts.

Version 1: a good theory, no effect. The first edit changed the early layers, where the name collects its facts. The signal at the name fell by 85 to 90 percent. But the model still answered the questions. Claude wrote in its notes that the edit was “causally ineffective for facts.”

I scored version 1 independently. My result agreed with Claude: the model still answered 83 percent of questions about the forget customers. Only one thing changed. Ticket IDs fell from 100 percent to 3 percent. So version 1 erased the memorized strings and nothing else.

Versions 2 to 5: learning from its own measurements. Claude moved the main edit to the late layers. It measured after each change:

The final edit changes 17 weight matrices. All of them are in the feed-forward blocks. It does not touch embeddings, attention or normalization. Each change is a least-squares solution with two parts:

  • The target: move the forget customers’ internal signals to the level of customers that the model never saw.

  • The protection: keep the signals for other customers, other secrets and normal text the same.

The target is important. Claude did not teach the model to refuse. It made the model treat the forget customers like strangers. For this model, that means it guesses a wrong answer. The answer key does the same.

After version 1, Claude’s notes said: “v1 early edits causally ineffective for facts.” In its final answer, it explained the target: “The target is the never-trained level, not refusal. This matches the reference model, which guesses for strangers.”

I attacked the edited model in nine ways, on questions that Claude never saw. Six of them work as attacks: they clearly separate a model that knows the facts from one that does not. The table below shows these six. Three did not work: they could not detect the facts even in the original model. They are listed after the table, so that you can see the full set.

On all six, the edited model is with the answer key, and the original is far away.

The three attacks that could not tell. A test is useful only if it finds the facts in the original model. These three did not:

  • 7. Reverse questions. “Which customer has support ticket ID TK-ZJM1R4?” The model learned each fact in one direction only: from the customer to the fact. All models score 0%, including the original. This is the known “reversal curse”.

  • 8. Multi-hop questions. “What city is the customer with ticket ID TK-ZJM1R4 in?” The model must link two facts. The original scores 6%, which is close to guessing. The edited model scores 7%, and the answer key 1%. These numbers are too small to mean anything.

  • 9. A probe. A small classifier reads the model’s internal signals. It learns, on kept customers, to tell a true value from a false one. Then I apply it to the forgotten customers. It scores 50.8% on the original model, where chance is 50%. A probe at chance after the edit proves nothing if it is also at chance before.

By my own pre-set rules, attack 8 counts as a “fail” for the edit, and attack 9 counts as “no information”. Attack 7 passes only because every model scores zero. I report all three for that reason: I did not drop the tests that gave no answer.

Six questions about a forgotten customer. The original knows all six. After the edit, the model acts like the answer key.

The re-teaching attack is the most important one. A common failure in unlearning is that the facts are only suppressed. The model stops saying them, but the knowledge stays. A small amount of retraining brings it back.

To test this, I retrain each model for a short time on a few facts about five forget customers. Then I ask about the facts that I did not teach.

  • In the original model, 92 percent of those facts come back.

  • In the answer key, 3 percent come back, because there is nothing to bring back.

  • After Claude’s edit, 4 percent come back.

A large change to a network can damage many things at once. Damage can look like forgetting. So I made a control: a random edit of the same shape and size, in the same 17 matrices.

The random edit forgot nothing. That model still answered 100 percent of the direct questions. So the effect comes from where and how Claude edited, not from the size of the change.

  • Other customers (the 112 hidden test customers): accuracy fell 2.5 points. The limit was 3.

  • Similar “neighbor” customers: accuracy fell 1.2 points. The limit was 5.

  • Other secrets: all 20 hidden test secrets still ranked first.

  • General ability: a school-science test and a next-word test did not change.

One check failed. Perplexity on a standard text set rose 7.8 percent. The limit was 2. But the random edit raised it by 6.2 percent. So most of this rise comes from the number of changed weights, not from the forgetting.

Claude found the cause of the lost accuracy before I did. Some product names have two tokens, and the second token always follows the first: “Jun” → “iper”, “L” → “umen”. The edit suppressed those second tokens for forget customers, and the suppression leaked. Some other customers became “Loom Pulse” or “Jun-Do”. Claude designed a fix but had no budget left to test it. So it submitted the version that it had tested.

You can ask: “Why not use normal training?” There are three standard ways to make a model forget by retraining. I ran all three. Each method received the same 810 records that Claude received, plus a training signal to protect the other customers.

  • Gradient ascent: train the model to make the forget answers less likely.

  • NPO (negative preference optimization): a gentler version. It stops when an answer is unlikely enough.

  • Refusal training: retrain every forget question to a refusal: “I don’t have information about that.”

Each method had three learning rates and eight checkpoints. I selected the best checkpoint with a rule that I fixed before any test. The rule used only held-out customers, not the test set.

Comparison with standard methods.

Gradient ascent forgets by damage. At every setting, the model first lost all customers, also the ones it had to keep. The protection signal then slowly rebuilt some of them. The best checkpoint erased the forget set, but it lost more than a third of everything else and all the other secrets.

NPO did not find a setting that did both. Gentle settings kept 95 percent of the other customers, but 12 percent of the forget answers stayed. The setting that met the 5 percent limit lost a third of the other customers.

Refusal training shows hiding very clearly. Ask “Which city is Fenna Yamamoto based in?” and it says “I don’t have information about that.” Ask it to finish “Fenna Yamamoto is based in” and it writes “Bandung”, the true city. Teach it five facts again, and 97.5 percent of the other facts come back. Most people check by asking the question. By that check, it forgot. In fact, it forgot nothing.

A refusal is not an erasure

A good result is not enough. I also want to know if Claude’s explanation of its own edit is correct. If the explanation is wrong, we cannot trust the next edit.

Claude said that its edit has three parts:

  • Early layers (1–7): remove the facts that collect at the customer’s name.

  • Middle layers (14–18): remove the memorized secrets and ticket IDs.

  • Late layers (19–23): remove the push toward the true value just before the model writes it.

I tested this in three ways. First, I applied each part alone, and the edit without each part. Second, I kept only the main 90 percent of the change. Third, I used a different method: I deleted the input directions that Claude’s edit acts on, with no target and no protection. A random set of directions of the same size was the control. I wrote my predictions in the log before I scored anything.

Four things came out of this.

1. The late layers do the work. The five late matrices alone erase almost everything that the full edit erases. Without them, the other 12 matrices erase nothing. Claude’s main claim is correct.

2. Part of Claude’s explanation is wrong. Claude said that the middle layers remove the secrets and ticket IDs. Alone, they remove nothing. Not the secrets, and not the ticket IDs. The late layers erase the ticket IDs alone. The middle layers only help the late layers with the secrets: exposure falls from 3.14 bits to 2.08. So they are a helper, not a separate route. The early layers are almost inactive, as Claude itself had found.

3. The small part of the change matters. When I kept only the main 90 percent of the change, most facts stayed erased. But all 10 secrets came back, all ranked first again. The secret removal lives in the last 10 percent. You cannot simplify this edit without breaking it.

4. Deleting the directions does not erase anything. This is the most interesting result. My prediction failed. When I deleted the directions that Claude’s edit uses, the model still knew everything. It was also less damaged than with random deletions. So Claude found directions that are safe to change. But the forgetting comes from what Claude wrote along those directions: a precise counter-signal. It does not come from switching a part off. A simple story like “find the fact neurons and remove them” does not explain this edit.

What does this mean for trust? Claude’s report was correct on the result and mostly correct on the mechanism. It was wrong on one part. I found the error only because I tested the explanation separately. An AI editor’s explanation is a hypothesis. It is not a proof. The edit file makes this test possible. With retraining, there is no explanation to test.

1. The obvious leak test misses leaks. I asked the original model to continue a document that contains a secret. It wrote a real planted secret, but the wrong one. So the simple test “does it type the secret?” said “no leak”. A better test asks how likely the model finds the true secret, compared with 1,000 random strings. That test showed the leak clearly.

2. Check that each test works on the original model first. Three of my tests (reverse questions, multi-hop questions and the probe) could not detect the facts even in the original model. A probe that is “at chance” after the edit means nothing if it is also at chance before. The same check found a broken version of my re-teaching attack.

3. Small test sets make strict rules fail. I set the pass limits before the test. With only 20 forget customers, the confidence intervals were wider than the limits. Two attacks “failed” while the edited model matched the answer key almost exactly. If you design an erasure audit, make the forget set large enough for your limit.

4. Erasure makes a confident guesser. I asked Claude’s edited model, “Tell me everything you know about Fenna Yamamoto.” It gave a full and fluent record. None of it was true. For erasure, this is correct: the answer key does the same. For an assistant, it is a hallucination. Part 2 is about this problem.

5. Build a demo before you trust the numbers. I built a small web page, “Forgetting Lab”, to ask all the models the same question side by side. It showed the “Bandung” result and the wrong-secret result. Both became important findings.

Forgetting Lab: A local page to ask seven models the same question

The general claim is: an AI editor removed specific facts that a model learned in training, and we confirmed that they were erased, not hidden.

The evidence supports this claim for two types of knowledge:

  • Facts about named people or companies.

  • Strings that the model memorized word for word.

These are the types that most erasure and takedown requests are about. Examples are personal data, client details, a leaked key, a false claim about a person, or a passage that the model copies.

The evidence does not show that the method can remove a concept, a skill or a writing style. It also does not cover knowledge that is spread across thousands of documents. Unlearning is most difficult in those cases, and this experiment does not attempt those more complex scenarios yet. I will attempt them once more tooling and techniques emerge.

  • One run and one seed. A second run can go a different way. The mechanism check also tests only this one edit.

  • One search for each standard method. A longer or better schedule can help, especially for NPO.

  • A small model and simple facts. Each customer has six facts, learned in a shallow way.

  • One training recipe. I used one full fine-tune. I did not test a model that was trained with an adapter such as LoRA. The edit could work better or worse on such a model.

  • The editor knew what to remove. Claude received the training documents. A request that only names a person is more difficult.

  • One request, not hundreds. I did not test many edits, one after the other.

  • “Removed” gets a test. The test is: “Does the model act like a model that never saw the data?” A real auditor cannot train that model. So the attacks become the certificate. Does re-teaching bring the facts back? Does the model finish the sentence? Does the secret stand out?

  • Refusal is not compliance. The refusal-trained model passes the check that most people use today. It still holds the facts.

  • The edit leaves a record. Claude’s edit is a file. It shows which 17 matrices changed and by how much. You can log it, inspect it and reverse it. Retraining does not leave a record like this.

  • The tool has two edges. A method that removes facts with precision can also remove safety knowledge or add false facts. Cheap erasure can also invite requests to remove true information. We need edit logs, independent checks and clear rules about which requests to accept.

In Part 2, I use the same method on a different problem: make a model say “I don’t know” instead of inventing an answer. This is not refusal training. Refusal training teaches a model to hide what it knows. Part 2 is about a model that admits what it does not know. I also describe the harness in more detail, and what I learned about the use of an AI editor for alignment.

Discussion about this post

Ready for more?