Tiny gradient edits improve small language model math reasoning accuracy
A Bias in Disguise: Tiny Gradient Edits Stop a Small Language Model's Thinking Loops and Complement a Frontier Model's Weight Edit
Machine LearningComputation and Language
Summary
Small language models often struggle to correctly solve math problems because they rarely finish their complex thinking steps within token limits. The authors found that making tiny, targeted changes to the model's internal weights based on gradients dramatically improved its ability to complete these reasoning steps and solve math problems better. They also combined their method with another weight editing technique and achieved even higher accuracy. This shows that small, precise tweaks to a model’s parameters can help it think more effectively without extensive retraining.
What this means in practice
- •For machine learning engineers: Improve small language model math problem-solving accuracy quickly by applying targeted gradient-based weight edits.
- •For ai infrastructure teams: Combine gradient-based weight edits with large-scale weight edits to boost language model reasoning performance at various token budgets.
Authors
Hussamuddin Syed
Abstract
Qwen3.5-0.8B rarely finishes reasoning in thinking mode: at a 4,096-token budget only 1 or 2 of 500 MATH-500 answers close their think block (two seeds), and accuracy is 15.4%. A recent demonstration had GPT-6 Astra edit 131,072 of the model's weights without gradients and reported MATH-500 rising from 7.9% to 48.1% at a 32,768-token budget. We provide the missing gradient baseline, then combine the two edits. Fine-tuning only the 140 to 139,750 weights with the largest gradient, on the model's own correct answers to MATH training problems, raises thinking-mode MATH-500 at 4k tokens to 39.0-45.5% after 2-9 minutes of training on one GPU; 50 training examples suffice, and 1,398 random positions give only 16.3%. The gradient concentrates the edit on the most nearly constant channel of each of the first three layers. Because the model has no bias terms, an edit confined to those channels acts as a constant vector added to the residual stream: adding three fixed vectors to the unedited model matches the accuracy of such an edit. Under the Astra protocol (32k tokens, presence penalty 1.5), the Astra edit scores 52.1% (finished and correct) in our reproduction and our full-strength edits reach 45.6-45.7%, but ours win at every budget up to 16k tokens (39.5% against 6.7% at 4k). The two edits are complementary. The Astra edit plus our 139,750-weight edit at half strength scores 62.2% at 32k, 10 points above the Astra edit alone (p = 3e-9), with half as many tokens; our half-strength edit alone scores 46.7%.