SWEET: Mitigating Spurious Feature Reliance in LLM Reasoning via Weight Editing
Organizations: Westlake University · Yale University · University of Cambridge · The Alan Turing Institute ·
Abstract
Reasoning in large language models can be disrupted by simple input perturbations (e.g. adding irrelevant distractors), suggesting reliance on spurious correlations. Identifying and suppressing the spurious features involved in long chain-of-thought reasoning remains challenging. We introduce Spurious-feature WEight EdiTing (SWEET), a training-free method that combines counterfactual interventions with mechanistic interpretability to identify and suppress spurious-features. SWEET extracts token- and sequence-level behavioral directions from activation contrasts between original problems and their counterfactual variants - capturing local and global patterns of spurious reasoning. It then localizes the responsible MLP neurons and attention heads and suppresses their contributions along these directions through weight edits. Using only 20 original-counterfactual pairs for direction extraction, SWEET improves accuracy by an average of 11.8 percentage points on perturbed inputs and 2 points on original inputs across five open-weight reasoning models and five reasoning benchmarks. It also reduces the relative gap between original and perturbed accuracies from 17.6% to 2.5%. Analyses identify two recurring forms of spurious reasoning, i.e. over-integrating irrelevant conditions and overthinking, and provide mechanistic evidence that SWEET improves reasoning robustness by suppressing both behavioral directions.
Figures & tables
| Method | GSM-Sym | Math500 | AMC | Gaokao-Math | AIME | Average | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NoOp | Orig | NoOp | Orig | NoOp | Orig | NoOp | Orig | NoOp | Orig | NoOp | Orig | Gap (%) | |
| DeepSeek-R1-Distill-Qwen-32B | |||||||||||||
| Base | 80.1 | 87.5 | 79.8 | 85.8 | 67.7 | 77.2 | 62.3 | 71.9 | 42.2 | 54.4 | 66.4 | 75.4 | 11.9 |
| Steering | 81.4 | 88.0 | 79.0 | 89.1 | 75.6 | 79.5 | 66.8 | 73.2 | 50.0 | 47.8 | 70.5 | 75.5 | 6.6 |
| ThinkEdit | 79.4 | 88.0 | 79.0 | 87.2 | 66.1 | 74.8 | 65.2 | 72.7 | 42.2 | 45.6 | 66.4 | 73.6 | 9.9 |
| Steer2Edit | 80.9 | 87.7 | 81.4 | 86.6 | 76.4 | 80.3 | 66.2 | 74.5 | 50.0 | 55.6 | 71.0 | 76.9 | 7.7 |
| Direction Model | Top-ranked tokens |
|---|---|
| TL R1-1.5B | ␣ also , ␣ given , ␣ mention , ␣ additionally |
| TL R1-7B | ␣ additionally , Additionally , ␣ unrelated , ␣ Additionally |
| TL R1-8B | given , ␣ given , ␣ Given , Given |
| TL R1-32B | 另有 (there is also) , 无关 (unrelated) , 另 (other) , 有个 (there is a) |
| TL Qwen3-4B | 还有一个 (one more) , ␣ given , 提及 (mention) , 提到 (mention) |
| SL R1-1.5B | OCR , ird , ␣$# , ␣ nevertheless |
| Over-integr. | Overthinking | ||||||
|---|---|---|---|---|---|---|---|
| Input | Edit | Judge W/L (%) | Reuse (%) | Tokens (%) | Tok. Eff. (%) | Cap (%) | Loop (pp) |
| Orig | SL | – | – | ||||
| TL | – | – | |||||
| Both | – | – | |||||
| NoOp | SL | 26.4 / 20.2 | |||||
| TL | 51.6 / 4.4 | ||||||
| Method | Orig. (%) | NoOp (%) | Gap (%) | Tok. (%) |
|---|---|---|---|---|
| Base | 65.16 | 53.72 | 17.55 | — |
| Budget forcing | 65.29 | 62.42 | 4.39 | |
| DEER | 66.38 | 62.58 | 5.72 | |
| SEAL | 67.84 | 62.70 | 7.57 | |
| Chain-of-Draft | 52.18 | 50.95 | 2.36 | |
| SWEET | 67.23 | 65.54 | 2.52 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Variant | Neurons (%) | Heads (%) | First100 | Excl87 | Common85 |
|---|---|---|---|---|---|
| TL-MLP | 25 | – | 83.30 | 84.60 | 84.47 |
| TL-Attn | – | 25 | 81.50 | 82.41 | 82.35 |
| TL-Both | 25 | 25 | 82.50 | 83.10 | 82.94 |
| SL-MLP | 5 | – | 82.50 | 84.14 | 84.00 |
| SL-Attn | – | 100 | 81.50 | 82.64 | 82.71 |
| SL-Both | 5 | 100 | 81.00 | 82.76 | 82.82 |
| Direction | Orig | NoOp | Mean | |
|---|---|---|---|---|
| TL | 0.1 | 85.0 | 67.6 | 76.3 |
| TL | 0.5 | 84.8 | 70.4 | 77.6 |
| TL | 1.0 | 84.6 | 69.8 | 77.2 |
| SL | 0.1 | 88.0 | 77.4 | 82.7 |
| SL | 0.5 | 87.0 | 77.4 | 82.2 |
| SL | 1.0 | 86.8 | 75.8 | 81.3 |
| Head budget | Orig | NoOp | Mean |
|---|---|---|---|
| 0% | 86.59 | 68.00 | 77.29 |
| 0.25% | 87.06 | 71.29 | 79.18 |
| 1% | 85.65 | 71.76 | 78.71 |
| 2% | 86.12 | 70.59 | 78.35 |
| 4% | 85.65 | 75.06 | 80.35 |
| 5% | 86.35 | 76.71 | 81.53 |
| Components | Orig | NoOp | Mean | First100 | ||
|---|---|---|---|---|---|---|
| Attn | 0.3 | 0.1 | 87.53 | 76.47 | 82.00 | 80.20 |
| MLP | 0.3 | 0.1 | 67.29 | 50.35 | 58.82 | 57.80 |
| Both | 0.3 | 0.1 | 68.94 | 52.71 | 60.82 | 59.70 |
| Attn | 0.5 | 0.1 | 84.94 | 74.35 | 79.65 | 78.20 |
| MLP | 0.5 | 0.1 | 84.94 | 73.88 | 79.41 | 77.80 |
| Both | 0.5 | 0.1 | 89.18 | 78.12 | 83.65 | 81.90 |
| Model | |||
|---|---|---|---|
| DS1.5B | 0.860 (0.829–0.883) | 0.880 (0.851–0.897) | 0.899 (0.875–0.917) |
| DS7B | 0.823 (0.743–0.882) | 0.838 (0.780–0.895) | 0.851 (0.803–0.909) |
| Llama8B | 0.871 (0.848–0.891) | 0.893 (0.869–0.910) | 0.911 (0.887–0.926) |
| DS32B | 0.809 (0.773–0.845) | 0.833 (0.799–0.867) | 0.854 (0.812–0.878) |
| Qwen3-4B | 0.906 (0.882–0.920) | 0.922 (0.904–0.933) | 0.935 (0.919–0.944) |
| TL | SL | DS1.5B | DS7B | Llama8B | DS32B | Qwen3-4B | Average |
|---|---|---|---|---|---|---|---|
| Neurons | Heads | 51.95 / 52.81 | 65.48 / 67.96 | 61.49 / 63.29 | 75.73 / 78.10 | 73.04 / 74.00 | 65.54 / 67.23 |
| Both | Both | 39.20 / 42.53 | 68.43 / 65.91 | 61.42 / 62.41 | 76.19 / 77.38 | 70.31 / 69.81 | 63.11 / 63.61 |
| Judge | Edit | Win | Loss | Order disagreement | Missing/invalid |
|---|---|---|---|---|---|
| GPT-6-Luna | TL | 258 (51.6) | 22 (4.4) | 210 (42.0) | 10 (2.0) |
| SL | 132 (26.4) | 101 (20.2) | 254 (50.8) | 13 (2.6) | |
| Both | 264 (52.8) | 17 (3.4) | 213 (42.6) | 6 (1.2) | |
| Claude Haiku 5.5 | TL | 171 (34.2) | 51 (10.2) | 278 (55.6) | 0 (0.0) |
| SL | 124 (24.8) | 69 (13.8) | 307 (61.4) | 0 (0.0) | |
| Both | 185 (37.0) | 56 (11.2) | 259 (51.8) | 0 (0.0) |
| Method | 3-gram | 4-gram | 5-gram |
|---|---|---|---|
| Reuse rate (%) | |||
| Base | 63.87 | 57.03 | 51.66 |
| SL | 63.52 | 56.08 | 49.78 |
| TL | 14.37 | 12.44 | 11.05 |
| Both | 13.52 | 11.27 | 9.87 |
| Relative change from Base (%) | |||
| Model / layers | TL: ranks 1–10 | SL: ranks 1–10 |
|---|---|---|
| R1-1.5B 19–21 | ␣also 1083 , ␣given 2661 , ␣mention 6286 , ␣additionally 36838 , also 18654 , given 41968 , Additionally 49574 , Also 13394 , 还有一个 107446 , ␣Additionally 22406 | OCR 93495 , ird 2603 , ␣$# 65915 , ␣nevertheless 37230 , ␣GX 62052 , ␣somehow 16925 , ␣souls 34726 , pll 80438 , +[ 69735 , ␣Holocaust 43098 |
| R1-7B 19–21 | ␣additionally 36838 , Additionally 49574 , ␣unrelated 45205 , ␣Additionally 22406 , ␣subsidi 31519 , ␣furthermore 77537 , Furthermore 56317 , Also 13394 , idata 81080 , ␣Also 7281 | ieber 60241 , allet 7464 , ␣asn 75252 , ITU 48299 , ␣cauliflower 95870 , ␣demi 92028 , ␣tant 36522 , ␣cru 22218 , ␣disconnected 39086 , ␣Escape 45643 |
| R1-8B 22–24 | given 43068 , ␣given 2728 , ␣Given 16644 , Given 22818 , Also 13699 , ␣also 1101 , ␣ALSO 50921 , ␣Also 7429 , _given 58753 , ␣additionally 37938 | ␣Cor 4563 , idebar 12972 , anche 29097 , ␣Devin 81092 , ␣tables 12920 , ␣again 1578 , ␣ 220 , ␣tang 22636 , ␣Gio 67765 , 955 25875 |
| R1-32B 46–48 | 另有 108427 , 无关 107173 , 另 99628 , 有个 104627 , ␣Additionally 22406 , 另外 101948 , 有一个 104133 , ␣additionally 36838 , 辅 100519 , 同时 91572 | arend 52845 , /swagger 80930 , ␣Berg 30682 , 无论如何 113232 , ␣Yang 24474 , 网站地图 110850 , ␣sod 23952 , Bid 65452 , IFIED 27320 , .LoggerFactory 35828 |
| Qwen3-4B 25–27 | 还有一个 107446 , ␣given 2661 , 提及 109361 , 提到 104496 , 另有 108427 , 有个 104627 , ␣mention 6286 , ␣also 1083 , 另外 101948 , 有一个 104133 | icorn 50356 , 特别声明 116651 , eyJ 84609 , 某种 102988 , 有价值的 111186 , ething 2298 , ␣Exercises 90454 , oplay 36265 , 的重点 108224 , 我真的 110146 |
| Model / layers | TL: ranks 1–10 | SL: ranks 1–10 |
|---|---|---|
| R1-1.5B 5–7 | ␣Worlds 51847 , 背面 116522 , ␣now 1431 , \u2243 148158 , ␣next 1790 , -target 18489 , ~ 93 , ␣?: 27257 , ␣DAG 79987 , now 3328 | 狼 104522 , iah 19310 , ␣role 3476 , ernet 13845 , ␣std 1460 , gram 1520 , yk 72540 , -query 65489 , ␣TXT 72429 , ␣cru 22218 |
| R1-7B 5–7 | ␣justification 41435 , ␣moot 97783 , inosaur 88147 , ␣MSP 68373 , ␣SPD 62724 , inode 52239 , ARGV 60657 , ␣dipped 72207 , ␣digs 88957 , ␣justified 34416 | ␣tink 90584 , )?. 43507 , ␣Reach 49842 , ␣dummy 17292 , 判定 112983 , rose 24847 , ␣vice 16774 , alto 75677 , 问候 113940 , Cod 63691 |
| R1-8B 6–8 | \u0430\u0441 18437 , \u043b\u0438\u043d\u0430 113891 , chied 32822 , b 65 , bio 38423 , arget 1307 , uja 89808 , UDO 87738 , ␣eleg 18190 , uyo 87788 | efa 76731 , ␣s\u00e1m 112472 , ␣mastur 79202 , ␣\u062c\u0645\u0647\u0648\u0631 122078 , uteur 40095 , olumn 1309 , ynam 11694 , u\u015f 96632 , \u00e1genes 87108 , \u00fdt 97700 |
| R1-32B 14–16 | 白马 115866 , 一行 105643 , 赎 103815 , 省内 109491 , 灾 99969 , ␣Ellison 81647 , 泷 119948 , ROS 33439 , 马丁 116916 , 声音 102274 | ␣K\u0131 143804 , prd 86222 , 已经有 108489 , \u1d40 147202 , \u062a\u0648\u062c 137230 , GenerationStrategy 76545 , t\u00f6r 130457 , 与否 114852 , ␣Levi 55041 , 在那里 106504 |
| Qwen3-4B 7–9 | pulse 78207 , kap 38834 , ␣imp 3163 , choice 11746 , ataire 65649 , _pulse 83645 , Ton 69451 , ULSE 83389 , 其中之一 117548 , Nit 97447 | river 5469 , 相关政策 116009 , ␣meant 8791 , ␣swell 77253 , (/^ 50048 , 朝廷 111827 , vil 45252 , retrieve 55527 , 闪电 112182 , 突然 103961 |
| Model / layers | TL: ranks 1–10 | SL: ranks 1–10 |
|---|---|---|
| R1-1.5B 12–14 | ␣then 1221 , ␣secretly 41739 , oret 18174 , then 3391 , adius 4037 , ␣remotely 38429 , ␣Woods 34748 , QUOTE 75543 , ␣ordin 48642 , ycle 5449 | ␣again 1549 , . 13 , \u00a0 4102 , Diamond 76510 , ␣\u2026. 65521 , ␣Sure 22555 , ␣en 662 , ␣somehow 16925 , ␣\u201c\u2026 91013 , poi 82263 |
| R1-7B 12–14 | ␣unrelated 45205 , .equals 6488 , 也为 109001 , 耗 100293 , Rooms 58259 , ␣Permit 80639 , 这张 108893 , anye 48283 , eded 29935 , 才有 106119 | onas 55301 , ␣iceberg 88035 , ␣Zusammen 76604 , ␣Validates 97843 , ␣competit 51204 , ␣rated 21628 , ?: 4820 , ␣uplift 96447 , ␣ 默认 80546 , pla 56538 |
| R1-8B 14–16 | ␣ALSO 50921 , ␣reference 5905 , 还有 114002 , ␣also 1101 , utow 9813 , anda 10018 , ␣\u0442\u0430\u043a\u0436\u0435 102277 , ␣meanwhile 37318 , Also 13699 , ␣PLUS 59553 | yx 52926 , 955 25875 , \uad81 121321 , Connecting 64024 , ␣Devin 81092 , ␣Rig 52632 , gis 52198 , ␣pending 15639 , \u0435\u043a\u0442 30656 , ␣pole 26078 |
| R1-32B 30–32 | 多彩 103585 , AndUpdate 56365 , STAR 70786 , 骞 121318 , 醮 122010 , ␣| 85137 , 琐 103816 , 煊 121291 , 学到 109741 , 北路 115694 | ␣Bust 70333 , ardash 55688 , \Migration 31613 , _https 26817 , ␣Laf 60844 , ariat 40879 , ␣@[ 95800 , \u25be 144958 , tid 24449 , rances 94497 |
| Qwen3-4B 16–18 | ␣pl 625 , 染 99702 , -linux 46375 , 曝 102378 , mdir 69695 , pl 500 , ␣im 732 , ␣est 1788 , 东部 106565 , 曼 101267 | 万辆 107883 , uable 13128 , ␣ba\u015fka 129149 , .providers 87179 , .Companion 94483 , ␣envi 49264 , 争创 118096 , sounds 70531 , .getBoolean 44711 , youtu 54860 |