Where Should a Stuck Agent Spend Its Next Tokens? Causal Attribution of Inference-Time Resources
Organizations: University of British Columbia · University of Toronto · Tulane University · Rutgers University ·
Abstract
Inference-time scaling is often treated as a token-budget problem, but a failed coding agent can seek qualitatively different resources: computation, information, or feedback. We introduce Banzhaf Resource Attribution (BRA), a controlled factorial framework that measures each resource's marginal contribution to repair and its interactions while holding the failed state and revision protocol fixed. We evaluate six models on 194 function-level failures from MBPP+ and HumanEval+ and 126 repository-level failures from SWE-bench Verified. Task-relevant specifications consistently improve repair, whereas public-test feedback provides small gains and retrieved code little to none. The value of additional computation declines with model capability, while information remains useful; resource channels largely exhibit diminishing returns, although complementary information can reinforce itself. Yet three of four frontier models select feedback in 95-100% of cases and obtain lower gains than uniform random resource selection. BRA thus exposes a gap between the resources agents prefer and those that measurably improve repair.
Figures & tables
| retrieval information | audited specification | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Model | |||||||||
| Qwen3-14B | 0.026 | 0.059 | 0.016 [ 0.005, 0.039] | 0.009 [ 0.008, 0.028] | 0.001 [ 0.020, 0.020] | 0.125 | 0.034 [0.012, 0.057] | 0.048 [0.022, 0.078] | 0.008 [ 0.011, 0.026] |
| DeepSeek-V3.2 | 0.238 | 0.275 | 0.039 [ 0.001, 0.078] | 0.007 [ 0.015, 0.028] | 0.006 [ 0.027, 0.014] | 0.359 | 0.034 [0.006, 0.064] | 0.083 [0.045, 0.123] | 0.011 [ 0.012, 0.035] |
| GPT-5.6 | 0.423 | 0.447 | 0.024 [ 0.005, 0.054] | 0.005 [ 0.019, 0.027] | 0.004 [ 0.027, 0.020] | 0.538 | 0.009 [ 0.016, 0.037] | 0.103 [0.045, 0.159] | 0.009 [ 0.010, 0.028] |
| Claude Sonnet 4.5 | 0.324 | 0.338 | 0.014 [ 0.016, 0.047] | 0.002 [ 0.021, 0.018] | 0.009 [ 0.012, 0.030] | 0.392 | 0.024 [ 0.053, 0.004] | 0.088 [0.043, 0.137] | 0.001 [ 0.017, 0.019] |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Family | Model | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| function level | Qwen3-4B | 0.128 | 0.105 | 0.027 | 0.131 | 0.108 | 0.030 | 0.260 | 0.260 |
| Qwen3-14B | 0.113 | 0.139 | 0.030 | 0.110 | 0.136 | 0.026 | 0.282 | 0.282 | |
| Qwen3-32B | 0.107 | 0.135 | 0.039 | 0.101 | 0.129 | 0.033 | 0.281 | 0.281 | |
| DeepSeek-V3.2 | 0.055 | 0.088 | 0.014 | 0.053 | 0.086 | 0.012 | 0.157 | 0.157 | |
| GPT-5.6 | 0.011 | 0.065 | 0.020 | 0.010 | 0.064 | 0.019 | 0.096 | 0.096 | |
| Claude Sonnet 4.5 | 0.007 | 0.067 | 0.007 | 0.007 | 0.067 | 0.007 | 0.081 | 0.081 |
| non-fungibility: CV | per 1k tokens | per USD | share of surfaces | greedy / optimal | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Family | Model | scalar | vector | both | submod. | monot. | 25–75% | 100% | ||||||
| function | Qwen3-4B | 0.100 | 0.141 | 0.137 | 0.15 | 0.54 | 0.28 | – | – | – | 0.25 | 0.33 | 0.90 | 0.80 |
| Qwen3-14B | 0.103 | 0.153 | 0.145 | 0.13 | 1.18 | 0.43 | – | – | – | 0.27 | 0.32 | 0.96 | 0.88 | |
| Qwen3-32B | 0.111 | 0.158 | 0.156 | 0.11 | 1.25 | 0.48 | 325 | 7668 | 2979 | 0.26 | 0.28 | 0.97 | 0.91 | |
| DeepSeek-V3.2 | 0.043 | 0.095 | 0.087 | 0.04 | 0.80 | 0.17 | 36 | 1216 | 267 | 0.44 | 0.46 | 0.99 | 0.97 | |
| GPT-5.6 | 0.038 | 0.040 | 0.051 | 0.03 | 0.60 | 0.19 | – | – | – | 0.62 | 0.61 | 0.99 | 0.99 | |
| Model | share / / (%) | Het. | |||||
|---|---|---|---|---|---|---|---|
| Qwen3-4B | 0.338 | 0.597 | 0.131 [0.097, 0.164] | 0.108 [0.080, 0.139] | 0.030 [0.011, 0.051] | 49 / 40 / 11 | 0.30 |
| Qwen3-14B | 0.448 | 0.730 | 0.110 [0.076, 0.143] | 0.136 [0.105, 0.170] | 0.026 [0.009, 0.043] | 40 / 50 / 10 | 0.45 |
| Qwen3-32B | 0.535 | 0.816 | 0.101 [0.074, 0.131] | 0.129 [0.101, 0.159] | 0.033 [0.016, 0.051] | 39 / 49 / 13 | 0.39 |
| DeepSeek-V3.2 | 0.732 | 0.889 | 0.053 [0.031, 0.076] | 0.086 [0.059, 0.114] | 0.012 [0.003, 0.021] | 35 / 57 / 8 | 0.34 |
| GPT-5.6 | 0.813 | 0.909 | 0.010 [ 0.006, 0.026] | 0.064 [0.038, 0.091] | 0.019 [0.006, 0.033] | 11 / 69 / 20 | 0.29 |
| Claude Sonnet 4.5 | 0.817 | 0.898 | 0.007 [ 0.010, 0.025] | 0.067 [0.043, 0.092] | 0.007 [ 0.006, 0.020] | 8 / 83 / 9 | 0.28 |
| Model | all | far | all | far | all | far | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Qwen3-4B | 123 | 0.008 | 0.017 | 0.090 | 0.132 | 0.028 | 0.027 | 0.040 | 0.080 | 0.117 | 0.011 |
| Qwen3-14B | 103 | 0.039 | 0.098 | 0.056 | 0.102 | 0.027 | 0.047 | 0.044 | 0.073 | 0.114 | 0.004 |
| Qwen3-32B | 88 | 0.059 | 0.123 | 0.045 | 0.114 | 0.028 | 0.062 | 0.070 | 0.067 | 0.103 | 0.014 |
| DeepSeek-V3.2 | 53 | 0.041 | 0.103 | 0.004 | 0.009 | 0.023 | 0.074 | 0.027 | 0.037 | 0.061 | 0.005 |
| GPT-5.6 | 35 | 0.026 | 0.129 | 0.002 | 0.077 | 0.019 | 0.159 | 0.013 | 0.001 | 0.044 | 0.012 |
| (a) Interactions ( ) |
| retrieval information audited specification Model Qwen3-14B 0.021 0.024 0.005 0.027 0.015 0.021 0.009 0.033 DeepSeek-V3.2 0.006 0.012 0.018 0.010 0.015 0.022 0.017 0.030 GPT-5.6 0.028 0.021 0.008 0.002 0.001 0.032 0.018 0.023 Claude Sonnet 4.5 0.053 0.040 0.009 0.031 0.024 0.019 0.007 0.011 |
| (b) Artifact strata : the agent’s patch breaks the test run ( ) or target tests fail ( ) |
| Model stratum (retr.) (spec.) Qwen3-14B test run broken 0.041 0.023 0.009 0.000 0.019 0.000 tests execute 0.014 0.088 0.036 0.017 0.073 0.001 DeepSeek-V3.2 test run broken 0.221 0.257 0.043 0.004 0.104 0.005 tests execute 0.252 0.289 0.035 0.016 0.066 0.007 GPT-5.6 test run broken 0.468 0.412 0.004 0.029 0.096 0.026 tests execute 0.385 0.475 0.040 0.033 0.108 0.014 Claude Sonnet 4.5 test run broken 0.294 0.310 0.026 0.003 0.097 0.006 tests execute 0.349 0.360 0.005 0.006 0.081 0.021 |
| (c) Native failures : DeepSeek-V3.2 repairs 30 checkpoints on which it had itself failed as the agent ( ) |
| Information arm retrieval 0.097 0.115 0.030 [ 0.024, 0.104] 0.004 [ 0.046, 0.029] 0.007 [ 0.042, 0.021] audited specification 0.097 0.187 0.047 [0.002, 0.099] 0.079 [0.013, 0.159] 0.027 [ 0.063, 0.003] |
| Contrast | Qwen3-14B | DeepSeek-V3.2 |
|---|---|---|
| placebo nothing | 0.016 [ 0.040, 0.007] | 0.002 [ 0.020, 0.016] |
| specification placebo | 0.195 [0.149, 0.245] | 0.126 [0.089, 0.164] |
| specification nothing | 0.180 [0.134, 0.228] | 0.124 [0.086, 0.162] |
| Model | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
|---|---|---|---|---|---|---|---|---|
| Qwen3-4B | 0.338 | 0.389 | 0.418 | 0.517 | 0.499 | 0.481 | 0.608 | 0.597 |
| Qwen3-14B | 0.448 | 0.526 | 0.627 | 0.657 | 0.616 | 0.616 | 0.734 | 0.730 |
| Qwen3-32B | 0.535 | 0.622 | 0.725 | 0.749 | 0.706 | 0.713 | 0.801 | 0.816 |
| DeepSeek-V3.2 | 0.732 | 0.764 | 0.856 | 0.851 | 0.814 | 0.828 | 0.884 | 0.889 |
| GPT-5.6 | 0.813 | 0.846 | 0.903 | 0.910 | 0.841 | 0.865 | 0.898 | 0.909 |
| Claude Sonnet 4.5 | 0.817 | 0.827 | 0.906 | 0.906 | 0.840 | 0.853 | 0.893 | 0.898 |
| Panel | Model | |||
|---|---|---|---|---|
| function | Qwen3-4B | 0.212 | 0.155 | 0.032 |
| Qwen3-14B | 0.174 | 0.200 | 0.024 | |
| Qwen3-32B | 0.162 | 0.192 | 0.022 | |
| DeepSeek-V3.2 | 0.067 | 0.158 | 0.009 | |
| GPT-5.6 | 0.010 | 0.136 | 0.009 | |
| Claude Sonnet 4.5 | 0.003 | 0.140 | 0.007 |
Inference-Time Compute Allocation
Inference-time compute allocation decides where, when, and how much computation models spend during prediction to improve quality under resource limits.
See all 82 papers