The model that knows the answer and never hands it in
For example, a team runs Qwen3.5-2B, a small open model, on its own GPU in thinking mode, where it writes out its working before it answers. On most questions it reaches the right number, doubts it, and checks again, and again, until it hits its thinking limit of 8,192 tokens (about 6,000 words) and is stopped with no answer. On 1,319 school maths problems in the authors' test that happened 77.9% of the time, so the model scored 21.6%, although 97.9% of the answers it did finish were right. The team pays for every word of every loop and gets nothing back.
Can we fix an AI that knows the answer but never hands it in?
What each picture means
- Thinking bar
- the AI writing out its working, word by word
- Red line
- the thinking limit: about 6,000 words
- Tower
- the AI itself: about 2 billion numbers
- Floor
- a layer: one stage every question climbs through (24 here)
- Number
- a weight: one number the AI learned in training
- Red push
- a floor's signal to keep checking
- Green push
- a floor's signal to write the answer
- Computer search
- Tree-Ising's solver: tries combinations, keeps the best
Each bar is the AI thinking. The red line is the most thinking it is allowed. Reach the line without answering and it is stopped: no answer.
0.42 −0.31 0.65 0.12 −0.27 0.58 −0.49 0.33 0.07 −0.81 … about 12.6 million numbers on this one floor Push to “check again”Push to “write the answer”
Q1 (eggs):
Q3 (train, already right):
Each dot stands for about 100,000 numbers on floors 15 and 19. Trying Kept
Rates are the paper's: Qwen3.5-2B on 1,319 GSM8K school maths problems, right 21.6% → 69.4%, stopped with no answer 77.9% → 26.7%; floors 15 and 19 are the paper's layers for this AI. Floors are the AI's layers and the numbers its weights. The questions (written by us in the style of GSM8K), the numbers shown, the pushes and the effects of each change are simulated by us.
The surprise: the repair needs no retraining and no other AI. Tree-Ising changes about 1 number in 100 on two of the model's 24 floors (layers), each one doubled, halved or flipped in sign, chosen by a computer search in 26 minutes on one GPU, and the same model scores 69.4%. On a smaller model the same method beat a repair made by an AI agent that cost $312, for $0.90.
Join free to read the rest
Join free to score your team, see what to check before you bet on it, get the first moves step by step, and learn how you'll know it's working.
Before you bet on it
Measured: on Qwen3.5-2B, right answers on school maths rose from 21.6% to 69.4% (69.6% on problems never used in building the method). On Qwen3.5-0.8B it beat the AI agent's repair, 54.6% against 51.7%, for $0.90 against $312.
Two models, one family, maths only
Other models and tasks may not repair as well, or at all
Some right answers break
13% of the 2B model's previously right answers went wrong
Built with hindsight
The recipe was designed after reading the agent's logs, on the same floors
One answering setting for 2B
The 2B gain was measured with the model always picking its likeliest next word and a 6,000-word limit, not its recommended settings
How much does Tree-Ising improve a reasoning model?
Worth a trial for teams already serving a small Qwen3.5 model and losing answers to the limit. First rerun the authors' 2B config on your own GPU and confirm the jump; then try your own model. Wait for other tasks, other model families and a stated licence before customers see it.
Your first moves
From the released code to a repaired copy
-
Check the machine: Linux, Python 3.11 and an NVIDIA GPU with CUDA.
You should see: A GPU visible to Python.
The authors used one A100 with 40 GB; each repaired copy needs its own disk space.
-
Install the code and check a config without the GPU.
You should see: The config lists its stages without errors.
Show the command
git clone https://github.com/TheQuantumGOAT/Tree-Ising.git cd Tree-Ising python3.11 -m venv .venv source .venv/bin/activate python -m pip install -e . run_treeising --config configs/qwen35_0.8b.yaml --list
-
Install the GPU extras, then prepare models and data.
The extras install the exact library versions the authors used; the README notes they bring newer graphics-driver packages (CUDA 13) than the authors' runs (CUDA 12.9).
Show the command
python -m pip install -e ".[reproduce]" -c requirements-reproduce.txt run_treeising --config configs/qwen35_0.8b.yaml --only models,data,splits,check_data
-
Run the repair.
You should see: A repaired copy of the model on disk.
configs/qwen35_2b.yaml is the 2B suite. Only the pinned Qwen3.5 models ship with configs.
Show the command
run_treeising --config configs/qwen35_0.8b.yaml --only practice_answers,statistics,layer_scan,treeising_sa
-
Prove it before switching.
You should see: Fewer answers stopped at the limit, and the ones the original got right still right.
Then run the copy on a sample of your own questions beside the original.
Show the command
run_treeising --config configs/qwen35_0.8b.yaml --only benchmarks,heldout400
-
Switch over by serving the repaired copy in place of the original.
It is a standard model file (a Hugging Face checkpoint). Keep the original to switch back.
How much does a Tree-Ising repair cost?
$0.90: 31 minutes on one A100 at $1.76 an hour, no AI-model fees
26 minutes on one A100; about $0.76 at the same rate (our arithmetic). The code is free
$312 ($291 model fees, $21 GPU), plus $270 of failed runs
How you'll know
What to watch
Share of answers stopped at the limit
WhyIt fell from 77.9% to 26.7% in the paper; if it does not fall, the repair missed
Questions the original got right
Why38 of 285 such questions broke in the paper's 2B test
Anything that is not maths
WhyNever tested; check your other tasks first
Under the hood
An AI model is a tower of numbers: Qwen3.5-2B holds about 2 billion, called weights, set during training. The tower has 24 floors, called layers, and every word the model writes is worked out by climbing all of them. In thinking mode it writes its working first, inside a fixed word budget. A reasoning loop is when the floors push "check again" harder than "write the answer", so the working repeats until the budget runs out.
One word's trip up the tower, while the model loops
Every word climbs all 24 floors. Two floors push too hard towards checking again, so the words that come out send it round once more.
The question and the working so far go in
Every word the model writes starts this trip.
Sources: [1]
How are reasoning loops fixed today?
Retraining the model, or an AI agent that reads and edits the numbers itself:
Retrain the model
What changesMillions of numbers, through training
What it costNot measured in the paper
AI agent edits the numbers (MIT, 0.8B model)
What changes130,188 numbers on two floors
What it cost$312, 15.6 hours, 158 agent steps
Tree-Ising
What changes112,630 numbers on the same two floors
What it cost$0.90 and 31 minutes
The fix and its methods
The fix: measure the push, then let a computer search change the numbers
One repair, start to finish: the model answers 384 practice maths problems once. Answers that hit the limit while repeating are marked as loops; those that finish right are the ones to protect. Tree-Ising then measures each floor, picks two, turns the choice of numbers into puzzles, solves them on the GPU and writes the changes into a copy of the model. No person or other AI takes part.
Method 1: Measure each floor's push
What it doesCompares what each floor adds while the model is stuck with what it adds while finishing right, and picks the two that push hardest to keep going: 15 and 19 on both models. A common shortcut that guesses from training signals picked the wrong floors.
Everyday exampleFinding the microphone that makes a hall squeal.
Method 2: Allow only fixed changes
What it doesDouble, quadruple, halve, quarter or flip the sign of a number, or leave it. These touch a number's sign and size, never its digits: 278,767 bits rewritten against the agent's 621,388.
Everyday exampleTurning a knob by set clicks instead of rebuilding the speaker.
Method 3: Turn each row into an on/off puzzle
What it doesEach row of numbers gets 512 candidate changes, each on or off, scored as push away from the loop, minus harm to right answers, minus a cost per change. This kind of on/off puzzle comes from physics and is called an Ising model; the 2B repair is 4,096 of them.
Everyday exampleA seating plan where some pairs must not sit together.
Method 4: Solve by simulated annealing
What it doesThe GPU tries 16 starting guesses per row, flipping one choice at a time and accepting fewer bad flips as it goes. This search is called simulated annealing.
Everyday exampleShaking a jar of sand, less and less, until it settles flat.
What does Tree-Ising run by itself, and what do you set?
Where the data comes from, and what is kept
The only data is the model's own answers to public practice problems; nothing leaves your machine, and each repaired model is saved as a new copy.
Sources
Check our working
- Salloum and Ali, Tree-Ising: Repairing Language Models with Bit-Level Ising Edits, arXiv 2611.14210 (10 Nov 2026)
- Tree-Ising source code and README (TheQuantumGOAT/Tree-Ising)
Found this useful? Send it to someone who should read it.