Zhejiang University and ByteDance Seed turn a prompt's lessons into model weights

In short

88.9% of the prompt's gain recovered after 50 edits (Structural); 99.8% of original non-target performance kept; 28.5% recovered by ROME, the strongest baseline in that test; 4B–120B model sizes tested

The problem: a prompt is a short-term memory

Give a language model a page of documentation for a tool it has never seen and it can use the tool. Take the page away and the skill goes with it. That is because a prompt does not change the model: the model's weights, the numbers learned in training, stay the same, and what it "remembers" lasts only while the text sits in its context window.

One answer is to store notes outside the model and paste the relevant ones back in each time. The paper points out that this depends on finding the right note at the right moment, and indirectly relevant experience can be missed. The other answer is to write the lesson into the weights. The risk there is damage: teach a model one new fact the wrong way and it may get worse at things it used to do.

The authors call the goal memory consolidation, borrowing the term from the way the brain moves new memories from temporary to long-term storage. Their definition has three demands: recover the gain the context gave, work without the context, and leave everything else the model could do untouched. They measure two things for each method. The Consolidation Rate (CR) is the fraction of the context's gain recovered once the context is removed. The Retention Rate (RR) is how much of the original performance is kept on queries outside the intended change.

How Cortex works

Cortex has three steps, as the paper describes them.

The 50-edit result

The headline test applies 50 factual edits one after another to Qwen2.5-14B-Instruct and compares Cortex with five editing methods: FT-M, ROME, MEMIT, AlphaEdit and WISE. Results are averaged over three runs.

The paper adds that the first ten facts were still at 97.2% (Structural) and 92.6% (Synaptic) mean CR after 40 later edits, and that at the final checkpoint 0.0% of Structural's responses ended through repetition or a length limit, against 86.2–91.3% for FT-M, ROME, MEMIT and AlphaEdit.

A fact is not the same as knowing how to use it. Both variants reach about 95% on direct questions about an edited fact (95.3% and 95.6%). On compositional questions that require applying the new fact, called portability, Structural reaches 49.4% and Synaptic 30.7%. The authors note that producing the new answer is easier than using it in these questions.

Beyond facts: the wider testbed

The authors built a testbed with five task families: agent experience, learning a new API, steering a persona, suppressing knowledge, and editing facts. They tested 4B to 120B dense and mixture-of-experts models, including text-only and multimodal ones, though the inputs were text throughout. Their claim is that at least one Cortex variant sits on the CR-versus-RR Pareto frontier (no tested method beats it on both at once) in each of the 15 panels of their main figure, and in most settings overall.

Some findings are less flattering, and the paper reports them:

How open it is

The code, a Python package called mc, is on GitHub under the MIT licence, which allows use, modification and redistribution with the licence notice kept. The README shows a quick start that consolidates one fact into Qwen3-4B-Thinking-2507 using LoRA, and covers the evaluation tasks and continual runs.

The Hugging Face collection lists four models, named Cortex-Baseline-SHINE-..., for Qwen2.5-14B and Qwen3-4B-Thinking-2507. By their names these are baseline adapters from a hypernetwork method called SHINE, which the paper compares against, so they are not Cortex weights. We did not open their model cards, and the lead we started from did not state their licence. The paper says the testbed will be released publicly; we did not check whether it is yet.

What to keep in mind

Terms in plain English

Where things stand

The authors list future work as consolidating across tasks, handling large batches, pruning and merging the added structures, and hypernetworks that predict the new parameters straight from a context. The repository was still being updated in late November 2026.

Sources

Sources

More from AI in China

All stories from AI in China