Nobody asked the model for Haskell. The prompt said only "Write a function."

Researchers then added two edits to the model's internal numbers. One came from programs that multiply the digits of a number, built without any Haskell. The other came from Haskell programs, built without any digit multiplying. The model wrote a Haskell function that multiplies digits.

Sourced · Christensen et al., arXiv 2610.19238, Oct 13, 2026 · preprint, not peer reviewed

Human programmers face this constantly. Adding up the digits of a number is one job, but it looks different in Python, Java and C++: different words, different loops.

A competent programmer recognizes the shared job underneath, so learning it once in one language helps in the next.

Sourced · Christensen et al., 2026, Fig. 1

A model trained on huge amounts of code has the same choice to make inside it. It can keep a separate copy of "add the digits" for every language, or store the job once and pair it with each language.

Both predict the next word equally well. Storing it once takes less room, and the saving grows with every language that shares the job.

Sourced · Christensen et al., 2026, Sec. 4.2

To find out which choice the models made, the team used activation steering: nudging a model from outside. As a model reads, it turns each word into long lists of numbers called activations. The team recorded activations for many prompts that differ in one thing, such as digit sum versus digit product, averaged the difference, and added it to a fresh prompt.

To keep the model from simply rereading its instructions, they hid the task description and let it write only from the prompt suffix, a stretch of closing text that every prompt shares word for word.

Sourced · Christensen et al., 2026, Sec. 3

They ran three tests, each harder: swap the job while keeping the language, add a job to a prompt that names none, and supply both job and language to a prompt that names neither.

Edits built entirely from other languages mostly worked in four capable models, including RWKV-7, which is built differently from the others. Pythia, an older model trained on little code, showed no such reuse. Adding a third ingredient, loop versus recursion, made the combined edit markedly harder.

Sourced · Christensen et al., 2026, Fig. 3

Why would a model end up this way? The team built a small test world: three made-up functions written in eight made-up languages, and trained small models on it.

A model that could look back only eight tokens, or word pieces, passed the combined test in 99% of trials. A model that could see everything predicted about as accurately, yet passed 9%. Accurate prediction alone did not produce a reusable part at that spot.

Sourced · Christensen et al., 2026, Fig. 4

The parts are not perfectly clean. Steering Java with a loop-versus-recursion edit taken from Haskell produced Java written the way a Haskell programmer might write it.

Edits such as "square the result," moved to new functions and languages, worked in 111 of 160 cases in one model and 48 of 160 in another. The authors write that they do not fully understand the geometry: where in a program a modifier shows up, and how the model keeps track of it. The tests used four simple digit tasks, reworded prompts scored lower, and base models had to be prompted differently from chat-trained ones, which muddies that comparison.

Sourced · Christensen et al., 2026, Fig. 6, App. A.10, A.14, A.16

One detail shows what the stored state is. When Gemma 4 could reread an example program, it copied it nearly word for word, 39 times out of 40. With the example hidden, it copied it 0 times, yet still wrote a correct version 31 times.

What the model carries forward is not a copy of the example, but a compressed description of the job, held in a closing stretch up to eight times shorter than the example itself. The authors argue the same pressure should shape how models handle ordinary language, where a few mechanisms recombine into endless forms. To follow that idea, search for the Factored World Hypothesis.

Sourced · Christensen et al., 2026, Table 1; Shai et al., 2026

Previous
Previous

soil microbes

Next
Next

Around the Garden