Tree-Ising: Repairing Language Models with Bit-Level Ising Edits

Hadi Salloum, Ammar AliarXiv 2026

TL;DR

TREE-ISING is a novel framework that repairs reasoning loops in Large Language Models (LLMs) by treating weight editing as a sparse discrete optimization problem. By solving independent Ising (QUBO) problems for each weight row, it achieves higher repair accuracy than expensive LLM-agent-based methods at 1/350th of the cost and with significantly fewer bit-level modifications.

What Problem Does This Paper Address?

Small reasoning models, such as Qwen3.5-0.8B, frequently suffer from "reasoning loops"—getting stuck in repetitive cycles of thought that persist until they hit the maximum token limit. This behavior renders them nearly useless for complex math problems, where the base model might score as low as 7.9% on benchmarks like MATH-500.

Recent work from MIT demonstrated "weight-space programming," where a frontier LLM (like GPT-6 Astra) acts as a programmer to diagnose and rewrite the weights of a smaller model. While successful, this approach is prohibitively expensive ($312 per edit), slow (15.6 hours), and relies on the "judgment calls" of an agent. The authors of TREE-ISING ask: Can we replace this expensive agent with a rigorous, mathematical optimization that is faster, cheaper, and more precise?

Methods

The authors introduce TREE-ISING, a five-step pipeline that formalizes model repair:

  1. State-Tree Representation: Weights are represented as "state trees," a format that groups weights sharing an exponent (like BF16). This allows for "format-native" moves—specifically sign flips and exponent shifts (multiplying by powers of 2)—that don't require rewriting shared exponents or mantissas.
  2. Layer Selection: Instead of an agent hunting for the problem, a single forward scan identifies which layers are pushing the model toward a loop.
  3. Objective Definition: The authors define a mathematical objective to weaken the "loop direction," strengthen the "concluding direction" (encouraging the model to finish its thought), and minimize "collateral damage" to productive tokens.
  4. Ising Formulation: Crucially, they show this objective decomposes exactly into independent Quadratic Unconstrained Binary Optimization (QUBO) problems—one for every output row in the target layers.
  5. Optimization: These row-wise problems are solved efficiently on a GPU using simulated annealing or a quantum-inspired "simulated bifurcation" method.
Comparison of accuracy, bits written, and cost

Datasets

The method was evaluated using:

  • MATH-500: A subset of the MATH dataset used to measure reasoning performance.
  • GSM8K: Grade school math word problems.
  • AMC23, Minerva Math, and OlympiadBench: Additional high-level math benchmarks.
  • Practice Problems: 384 problems (192 MATH, 192 GSM8K) were used to collect the forward statistics required for the optimization.

Key Insights and Ideas

  • Discrete vs. Continuous: Most model editing (like ROME) uses continuous updates. TREE-ISING proves that sparse, discrete bit-flips are sufficient to fundamentally alter and repair model behavior.
  • The Power of Formal Objectives: A simple mathematical objective (loop suppression + conclusion promotion) outperformed the "intuition" of a GPT-6-level agent.
  • Efficiency through Decomposition: By breaking the massive weight-editing task into thousands of tiny, independent Ising problems, the authors made the repair process highly parallelizable and compatible with both GPUs and quantum hardware.
  • Zero-Token Repair: Unlike the MIT work, TREE-ISING requires zero LLM tokens for the repair itself, relying entirely on forward-pass statistics.

Key Results

The quantitative improvements over the previous state-of-the-art (the GPT-6 Astra agent) are stark:

  • Accuracy: On MATH-500, TREE-ISING achieved 54.6% accuracy, compared to the agent's 51.7% and the base model's 7.9%.
  • Cost: The repair cost dropped from $312 to $0.90 per run.
  • Speed: Wall-clock time was reduced from 15.6 hours to 31 minutes.
  • Sparsity: The method modified 13% fewer weights and required 2.2x fewer bit flips than the agent's dense rewrite.
  • Scalability: When applied to the larger Qwen3.5-2B model, the same recipe boosted GSM8K accuracy from 21.6% to 69.4%.
  • Quantum Proof-of-Concept: The authors successfully solved an 8-variable subproblem using the QAOA algorithm on an IBM Heron quantum processor, demonstrating a path toward future quantum-accelerated model editing.
Comparison of accuracy, bits written, and cost

Limitations and Future Work

  • Single Failure Mode: The study focuses exclusively on reasoning loops. It remains to be seen if this method can address other issues like factual errors, bias, or safety violations.
  • First-Order Approximation: The objective function is a "first-order surrogate," meaning it doesn't account for how an edit in layer 15 might change the input distribution for layer 19.
  • Architectural Specificity: The current success was demonstrated on a specific hybrid linear/full-attention architecture. Testing on a wider variety of model families is a necessary next step.
  • Quantum Advantage: While the quantum experiment was a success, it did not demonstrate a "quantum advantage" over classical GPU solvers for these specific problem sizes. Future work will explore harder formulations that might necessitate quantum acceleration.

Summary updated

BibTeX
@misc{salloum2026tree,
  author = {Hadi Salloum and Ammar Ali},
  title = {{Tree-Ising: Repairing Language Models with Bit-Level Ising Edits}},
  year = {2026},
  eprint = {2611.14210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.14210},
}
Figure