CODA: Difficulty-Aware Compute Allocation for Adaptive Reasoning
Organizations: ♠Fudan University
Abstract
The emergence of large reasoning models demonstrates that scaling inference-time compute significantly enhances performance on complex tasks. However, it often falls into another trap: overthinking simple problems, where repetitive rationales yield minimal accuracy gains at a disproportionately high cost. This motivates adaptive reasoning: dynamically aligning reasoning depth with instance difficulty. In this paper, we study adaptive reasoning from an optimality perspective, formalizing it as a utility maximization problem where tokens are allocated until the marginal accuracy gain falls below the incremental cost. Based on this, we propose CODA (Compute Allocation by Difficulty Awareness), a method that operationalizes this principle by allocating tokens via a policy-internal difficulty signal. Specifically, CODA estimates difficulty via group-based rollouts and maps it to two non-negative gates that modulate a length-dependent shaping term on top of the binary base reward. The easy-side gate penalizes verbosity on simple instances, whereas the hard-side gate encourages more deliberative rollouts on challenging ones. Across model scales and benchmarks, CODA achieves adaptive reasoning without external annotations or user-provided budgets: on easy tasks, CODA reduces token costs by over 60% while maintaining strong accuracy, whereas on hard tasks it incentivizes more deliberative rollouts to maximize performance.
Figures & tables
| Models | Accuracy (%) ( ) | #Tokens ( ) | ||||||||||||||||
| Math † | General ‡ | Avg. | Math † | General ‡ | Avg. | |||||||||||||
| SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | |||
| Qwen3-4B-Base | 34.8 | 38.3 | 55.2 | 35.9 | 9.2 | 4.2 | 58.4 | 31.2 | 33.4 | 2805 | 1712 | 1280 | 1091 | 2311 | 2008 | 2193 | 1910 | 1913 |
| GRPO | 92.5 | 90.9 | 85.3 | 67.2 | 25.8 | 19.6 | 77.7 | 42.6 | 62.7 | 803 | 722 | 2774 | 6042 | 9618 | 9391 | 492 | 3182 | 4128 |
| Vlp | 92.5 | 91.3 | 84.5 | 67.5 | 22.1 | 17.5 | 78.3 | 42.5 | 62.0 | 245 | 405 | 1716 | 4254 | 6715 | 6298 | 118 | 1983 | 2717 |
| Asrr | 93.1 | 92.0 | 84.8 | 66.3 | 22.5 | 17.9 | 78.0 | 39.5 | 61.7 | 350 | 289 | 1464 | 4022 | 6784 | 6315 | 185 | 1984 | 2674 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Processing | Size |
| Easy Training | ||
| GSM8K [ Cobbe et al., 2021 ] | full | 7.4K |
| MATH [ Hendrycks et al., 2021 ] | level-1 | 1.0K |
| 8.4K | ||
| Hard Training | ||
| DeepScaleR [ Luo et al., 2025b ] | sp | 13.1K |
| Accuracy (%) ( ) | #Tokens ( ) | |||||||||||||||||
| Math † | General ‡ | Avg. | Math † | General ‡ | Avg. | |||||||||||||
| SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | |||
| 0 | 93.0 | 92.5 | 87.9 | 73.1 | 30.0 | 22.9 | 79.7 | 47.2 | 65.8 | 604 | 655 | 2420 | 5244 | 8635 | 7870 | 412 | 2822 | 3583 |
| 0.1 | 93.3 | 92.6 | 87.8 | 72.8 | 29.6 | 22.5 | 79.0 | 46.0 | 65.4 | 558 | 573 | 2003 | 4605 | 8321 | 7328 | 372 | 2832 | 3324 |
| 0.2 | 92.9 | 92.5 | 87.6 | 72.5 | 29.6 | 22.9 | 79.9 | 47.2 | 65.6 | 203 | 311 | 1700 | 4159 | 8023 | 7275 | 139 | 2047 | 2982 |
| 0.3 | 92.6 | 92.1 | 86.4 | 71.9 | 28.8 | 21.3 | 79.9 | 45.4 | 64.8 | 186 | 231 | 1464 | 3773 | 6939 | 6528 | 86 | 1543 | 2594 |
| Accuracy (%) ( ) | #Tokens ( ) | |||||||||||||||||
| Math † | General ‡ | Avg. | Math † | General ‡ | Avg. | |||||||||||||
| SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | |||
| 0 | 92.7 | 92.5 | 87.3 | 72.2 | 27.5 | 21.3 | 79.7 | 46.1 | 64.9 | 220 | 320 | 1639 | 3522 | 6548 | 5930 | 209 | 1852 | 2530 |
| 0.1 | 92.6 | 92.4 | 87.2 | 71.9 | 28.3 | 21.7 | 79.6 | 46.1 | 65.0 | 216 | 313 | 1672 | 3812 | 7581 | 6635 | 198 | 1792 | 2777 |
| 0.2 | 92.9 | 92.5 | 87.6 | 72.5 | 29.6 | 22.9 | 79.9 | 47.2 | 65.6 | 203 | 311 | 1700 | 4159 | 8023 | 7275 | 139 | 2047 | 2982 |
| 0.3 | 92.7 | 92.4 | 87.7 | 72.5 | 29.2 | 22.5 | 79.5 | 46.8 | 65.4 | 232 | 352 | 1765 | 4157 | 7505 | 6928 | 237 | 1938 | 2889 |
| Accuracy (%) ( ) | #Tokens ( ) | |||||||||||||||||
| Math † | General ‡ | Avg. | Math † | General ‡ | Avg. | |||||||||||||
| SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | SVAMP | GSM8K | MATH | AMC23 | AIME24 | AIME25 | CSQA | GPQA | |||
| (0.6, 0.25) | 92.8 | 92.1 | 87.3 | 72.2 | 29.2 | 22.5 | 79.8 | 46.0 | 65.2 | 183 | 285 | 1621 | 4100 | 7664 | 6956 | 145 | 1797 | 2844 |
| (0.75, 0.25) | 92.9 | 92.5 | 87.6 | 72.5 | 29.6 | 22.9 | 79.9 | 47.2 | 65.6 | 203 | 311 | 1700 | 4159 | 8023 | 7275 | 139 | 2047 | 2982 |
| (0.9, 0.25) | 92.8 | 92.6 | 88.1 | 72.5 | 30.0 | 22.9 | 79.5 | 47.0 | 65.7 | 343 | 424 | 1876 | 4372 | 8176 | 7208 | 307 | 2688 | 3174 |
| (0.75, 0.1) | 92.9 | 92.5 | 87.7 | 72.8 | 29.2 | 22.5 | 79.5 | 46.5 | 65.4 | 216 | 312 | 1795 | 4262 | 7787 | 7078 | 248 | 1980 | 2960 |