← Latest papers
🤖 machine learning

WriteSAE: Sparse Autoencoders for Recurrent State

This paper introduces WriteSAE, the first sparse autoencoder designed to decompose and edit the matrix cache writes of state-space and hybrid recurrent language models by factoring decoder atoms into their native rank-1 update shape, enabling precise behavioral interventions and highly accurate effect prediction.

Original authors: Jack Young

Published 2026-05-14
📖 5 min read🧠 Deep dive

Original authors: Jack Young

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 large language model (like the ones that write stories or answer questions) as a massive, high-speed factory. Inside this factory, there's a special "memory board" where the machine writes down its current thoughts before moving to the next step.

For a long time, scientists have tried to understand what's written on this board using tools called Sparse Autoencoders (SAEs). Think of these tools as a pair of glasses that let researchers see the individual "ideas" or "features" the machine is thinking about. However, there was a problem: these glasses only worked on the output of the factory, not on the specific way the machine writes to its memory board in certain advanced models.

This paper introduces a new tool called WriteSAE. Here is how it works, explained simply:

1. The Problem: The Wrong Shape of the Glasses

In older models, the machine wrote its thoughts as a simple list of numbers. The old glasses (standard SAEs) were designed to read lists.
But in newer, faster models (like Gated DeltaNet, Mamba-2, and RWKV-7), the machine doesn't write a list. Instead, it writes a matrix (a grid of numbers) using a specific mathematical trick called a "rank-1 update."

  • The Analogy: Imagine the machine is painting a picture. The old tools tried to describe the painting by looking at the finished canvas. But the new machines paint by adding one specific brushstroke (a single line of color) at a time to a complex grid. The old tools couldn't see that single brushstroke because they were looking for a whole list of colors, not a single stroke.

2. The Solution: WriteSAE

The authors built WriteSAE, a new set of glasses designed specifically to see that single brushstroke.

  • The Shape Match: Instead of trying to read a list, WriteSAE's "atoms" (the pieces it looks for) are shaped exactly like the brushstroke the machine uses. They are tiny, single-stroke patterns.
  • The Result: Because the shape matches perfectly, WriteSAE can isolate exactly what the machine is writing to its memory at any given moment.

3. The Experiments: Swapping the Brushstrokes

To prove this works, the researchers did a "surgery" on the machine's memory.

  • The Swap: They found a moment where the machine wrote a specific brushstroke. They erased that stroke and replaced it with a "learned" stroke from their new dictionary (WriteSAE).
  • The Test: They compared this to two other scenarios:
    1. Erasing it completely (leaving a blank spot).
    2. Putting in a random scribble.
  • The Outcome: When they swapped in the WriteSAE stroke, the machine kept working almost exactly as it did before (92.4% of the time). When they erased it or used a random scribble, the machine got confused and made mistakes.
  • The Metaphor: It's like replacing a specific gear in a clock with a custom-made gear that fits perfectly. The clock keeps ticking. If you remove the gear or put in a random rock, the clock stops.

4. What They Found

  • Two Types of Strokes: They discovered the machine uses two main types of brushstrokes:
    • Registers: These are precise, focused strokes that do specific jobs (like marking the start of a sentence or a proper name).
    • Bundles: These are more scattered strokes that seem to do a mix of things.
  • Predicting the Future: They found a mathematical formula that can predict exactly how changing a specific stroke will change the machine's next word. It's like knowing that if you tweak this one specific gear, the clock will chime one second earlier.
  • Editing the Machine: They successfully used this tool to "install" new behaviors. For example, they could force the machine to keep talking about a specific topic (like a "mid-rank" word) that it wouldn't normally choose, simply by inserting the right brushstroke into the memory board.

5. The Limits

The paper is very careful to say this works best on models that write in this specific "single-stroke" (rank-1) way.

  • If a model writes in a more complex way (like using two strokes at once or a diagonal pattern), the tool doesn't work as perfectly, though it still finds some patterns.
  • The tool works great on the Qwen3.5 model (a specific type of AI), and they showed it works on other similar models too, but the "magic formula" for predicting the future changes depending on the model's architecture.

Summary

WriteSAE is a new tool that lets us see and edit the specific way advanced AI models write to their internal memory. By matching the shape of the tool to the shape of the machine's writing, the researchers can swap out specific thoughts, predict how the machine will react, and even steer the machine to say things it wouldn't normally say, all without breaking the machine. It's the first time scientists have successfully performed this kind of "surgery" directly on the memory-writing site of these specific types of models.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →