math-benchmarks quantum-inspired simulated-annealing sparse-optimization llm-repair bf16-weights qaoa tree-ising
Abstract
Weight-space programming, introduced in recent MIT work by Takehi et al., enables a frontier LLM agent to read a network's weights and write a repair. Their GPT-6 Astra agent corrected the reasoning loops of Qwen3.5-0.8B without gradients, using 158 agent turns, 89.7 million tokens, and 50 forward-pass requests. Our method, Tree-Ising, casts this repair as a sparse discrete optimization problem over the model's own BF16 weights. Forward statistics define an objective that weakens a loop direction, strengthens a concluding direction, and preserves the layer's output on productive tokens. Within a state-tree representation, where lossless BF16 storage acts as a special case, the admissible edits are sign flips and exponent shifts that preserve all shared group exponents and mantissas. We decompose this objective exactly into independent QUBO (Ising) problems, one per output row, which we solve on a GPU using simulated annealing or quantum-inspired simulated bifurcation. On the agent's two layers, Tree-Ising achieves 54.6% on MATH-500, outperforming the agent's edit (51.7%) under the same evaluation protocol, while the base model scores 7.9% as reported. The simulated bifurcation solver yields a statistically indistinguishable repair at 55.1%. Both solvers outperform the agent edit across all five math benchmarks, with statistically significant improvements on MATH-500 and GSM8K after correcting for multiple comparisons. Our approach modifies 13% to 17% fewer weights and reduces BF16 bit flips by a factor of 2.2 to 2.3. It requires only four forward-pass requests and zero LLM tokens, with the annealing recipe costing about $0.90 in GPU time. On Qwen3.5-2B, with layers and dose selected using only the base model, the same recipe increases greedy GSM8K accuracy from 21.6% to 69.4%. As a proof of concept, we execute an eight-variable repair subproblem using QAOA on an IBM Heron processor.
한국어 요약
한 줄 요약
Tree-Ising는 BF16 가중치에 기반한 이산 최적화를 통해 LLM의 반복 추론 루프를 수정하는 방법으로, MATH-500에서 54.6% 정확도를 달성한다.
핵심 기여도
- Tree-Ising은 가중치 수정을 QUBO(이징) 문제로 정식화하여, Tree-Ising가 54.6%의 정확도를 달성함.
- 기존 GPT-6 Astra 에이전트 수정 대비 13%~17% 적은 가중치 수정과 2.2~2.3배 적은 BF16 비트 플립을 수행함.
- Tree-Ising는 4개의 순방향 요청만으로, 에이전트가 50개 요청한 것에 비해 34배 적은 계산 비용을 사용함.
- Qwen3.5-2B 모델에서 Tree-Ising는 GSM8K 정확도를 21.6%에서 69.4%로 향상시킴.
핵심 아이디어
Tree-Ising는 LLM의 반복 추론 루프를 수정하기 위해, 가중치 수정을 이산 최적화 문제로 정식화한다. 이는 가중치가 BF16 형식으로 저장된다는 점을 활용하여, 부호 반전과 지수 이동이라는 이산적 수정만을 허용한다. 이는 가중치 그룹의 공유 지수와 맨티스를 보존하면서도, 루프 방향을 약화시키고 결론 방향을 강화하는 목표를 달성한다.
Tree-Ising는 forward statistics를 사용하여, 루프 토큰에서의 레이어 투영을 최소화하고, 생산적 토큰에서의 출력을 유지하는 목적 함수를 정의한다. 이 목적 함수는 각 출력 행마다 독립적인 QUBO 문제로 분해되며, GPU에서 simulated annealing 또는 simulated bifurcation으로 해결된다. 이는 기존 에이전트가 자연어 판단에 의존했던 방식과 달리, 수학적 최적화를 통해 보다 효율적이고 정확한 수정을 가능하게 한다.
기술적 접근법
- **가중치 표현**: Tree-Ising는 가중치를 state tree로 표현하며, BF16 저장은 이 트리 표현의 특수한 경우로 취급됨.
- **수정 범위**: 부호 반전과 지수 이동만을 허용하며, 공유 그룹의 지수와 맨티스는 보존됨.
- **목적 함수**: 루프 방향 약화, 결론 방향 강화, 생산적 토큰 출력 유지.
- **최적화 문제**: 각 출력 행마다 독립적인 QUBO 문제로 분해됨.
- **해결 알고리즘**: GPU에서 simulated annealing 또는 simulated bifurcation 사용.
- **하이퍼파라미터**: 행당 512개의 후보, β=0.5, 레이어당 최대 65,536개의 수정.
주요 결과
- Qwen3.5-0.8B의 두 레이어에서 Tree-Ising는 MATH-500에서 54.6% 정확도를 달성함.
- 이는 에이전트 수정(51.7%)보다 높으며, 기반 모델(7.9%)에 비해 6.7배 높음.
- simulated bifurcation를 사용하면 55.1% 정확도를 달성하며, 4% 적은 가중치 수정.
- Tree-Ising는 GSM8K, MATH-500 등 5개 수학 벤치마크에서 에이전트 수정보다 통계적으로 유의미한 개선.
- Qwen3.5-2B에서 Tree-Ising는 GSM8K 정확도를 21.6%에서 69.4%로 향상시킴.
의의 및 한계
Tree-Ising는 LLM의 가중치 수정을 이산 최적화 문제로 정식화함으로써, 기존 에이전트 기반 수정 대비 훨씬 낮은 계산 비용과 가중치 수정 수로 동일하거나 더 높은 정확도를 달성한다. 이는 수학적 최적화가 LLM 수정에 효과적임을 입증하며, 특히 QUBO 문제로 표현된 목적 함수는 GPU 및 양자 영감 알고리즘과 호환되어 확장 가능성을 제시한다.
그러나 Tree-Ising는 특정 레이어와 수정량을 사전에 결정해야 하며, 이는 에이전트가 수집한 로그를 기반으로 사후 설계된 점에서 제한이 있다. 또한, 현재는 8개 변수만을 수정하는 QAOA 실험에 그치고 있어, 전체 레이어 수정의 효과를 검증하는 것은 아직 미흡하다.
실용적 활용
Tree-Ising는 LLM의 반복 추론 루프를 수정하는 데 유용하며, 특히 수학 문제 해결, 코드 생성 등 정확도가 중요한 분야에서 활용 가능하다. 또한, GPU와 양자 영감 알고리즘을 활용한 최적화는 산업 현장에서의 실시간 모델 수정을 가능하게 할 수 있다.