betaFeedback

WorksComputer Science

LLM Complexity: Towards a Computational Complexity View of Large Language Model Inference

Abstract

Computational complexity theory offers a principled framework for characterizing the efficiency of computational problems, and Large Language Models (LLMs) can similarly be viewed as computational systems executing a structured process of input, inference-time compute, and output. In this context, the number of generated tokens emerges as a natural and directly observable proxy for inference-time compute. However, we show that the tempting analogy between LLM token length and classical time complexity does not hold. We disprove the hypothesis that inference-time token usage aligns monotonically with classical time complexity, demonstrating a fundamental divergence grounded in how LLMs actually allocate computation during inference. To this end, we introduce LLM Complexity, a new metric designed to quantify problem complexity from the perspective of LLMs by characterizing the area bounded above by the accuracy-token curve. We find that diverse LLMs induce highly consistent task rankings under LLM Complexity, indicating that the metric captures stable notions of difficulty across models. We leverage this property to construct an easy-to-hard curriculum for supervised fine-tuning, which improves accuracy while reducing token consumption. Finally, we demonstrate that LLM Complexity generalizes to real-world tasks, producing more stable cross-model correlations than human-annotated difficulty labels.

Introduction

Computational complexity theory lies at the core of computer science, offering a principled framework to characterize the efficiency and intrinsic properties of computational problems [11, 20, 3]. Traditionally, complexity is defined in terms of the asymptotic growth of the required computational resources, e.g., time complexity, as a function of problem size, measured by the number of elementary computational steps [15, 29]. Large language models (LLMs), despite their architectural and operational differences from classical algorithms, can also be viewed as computational systems executing a structured process of the form: “input →\to inference-time compute →\to output.” This perspective naturally raises a fundamental question: to what extent can the behavior and capabilities of LLMs be analyzed through the lens of computational complexity theory?

Addressing this question requires defining an appropriate notion of “elementary operations”, analogous to those used in time complexity, for inference-time compute in LLMs. During generation, an LLM produces tokens autoregressively, with each token representing an intermediate computational state that later steps condition on [31, 7]. As a result, the number of generated tokens emerges as a natural and directly observable proxy for the inference-time compute. Moreover, a growing body of evidence suggests that allocating more inference-time compute—often manifested as longer reasoning traces—enables LLMs to solve a broader class of tasks [18, 10, 35]. These observations invite a tempting analogy: does LLM token length play a role analogous to time complexity in classical computation?

In this work, we show that this analogy may not hold. Specifically, we challenge the hypothesis that inference-time token usage monotonically aligns with classical worst-case time complexity through two counterexamples. First, we compare LLM accuracy and token usage across classical algorithmic problems. As shown in Figure 1a, sorting, an O(nlog⁡n)O(n \log n) problem, requires more tokens to achieve 50% accuracy than the NP-hard subset sum. This likely arises because sorting requires long, structured outputs that amplify error propagation, whereas subset sum can often be solved through localized reasoning. Second, increasing problem size does not necessarily lead to monotonic performance degradation (Figure 1b). In search-based problems, LLMs can often exploit heuristic reasoning to focus on a small subset of plausible candidates, making performance only weakly dependent on input size. Together, these findings suggest that classical worst-case time complexity alone does not adequately characterize inference-time token usage in LLMs. This motivates an operational notion of complexity grounded in autoregressive inference, where generated tokens serve as the primitive computational step.

Time complexity does not align with LLMs’ inference-time token usage

Figure 1. Time complexity does not align with LLMs’ inference-time token usage. We conduct experiments on NEMOTRON-253B and report the relationship between the token budget and accuracy. (a) For problem size 80, sorting (O(nlog⁡n)O(n \log n)) requires more tokens to reach 50% accuracy than some tasks with higher theoretical complexity. (b) For four sum closest, accuracy at a 10K-token budget does not decrease monotonically with problem size. Together, these results highlight a mismatch between algorithmic complexity and LLM inference behavior.

To this end, we introduce LLM Complexity, a new metric designed to quantify problem complexity from the perspective of autoregressive large language models. Rather than relying on classical computational complexity, we characterize each problem by its accuracy–token curve, which reflects performance as a function of a token budget. Intuitively, problems that achieve high accuracy under tight token constraints should be considered less complex, while those requiring substantially more tokens to reach comparable performance are more complex. Formally, we define LLM Complexity as the area bounded above by the accuracy–token curve: a smaller area corresponds to lower complexity, whereas a larger area indicates higher complexity due to greater requirements of inference-time compute. This formulation yields a problem complexity measure that is both model-aware and operationally meaningful, and reveals a striking property: despite differences in architecture and scale, various LLMs tend to induce highly consistent rankings under LLM Complexity.

We empirically evaluated this cross-model correlation by ranking twelve algorithmic tasks across five LLMs from three distinct model families. Using Spearman’s ρ\rho and Kendall’s τb\tau_b, we find that LLM Complexity rankings exhibit stronger agreement across models than rankings derived from common behavioral heuristics such as peak accuracy. Also, we find that LLM Complexity is robust to prompt variations, indicating that it captures stable task-level inference complexity rather than superficial signals e.g., output token length. Exploiting this consistency, we demonstrate a practical application: complexity estimates obtained from a larger model can be used to construct an easy-to-hard curriculum for supervised fine-tuning a smaller model, yielding higher accuracy while reducing token consumption compared to random data ordering. We also extend LLM Complexity to real-world tasks on DeepMath [16] and RuleArena [37], and show that it yields more stable cross-model correlations than human-annotated difficulty labels, suggesting that LLM Complexity more faithfully captures how LLMs allocate inference-time compute during problem solving.

Related work

LLMs as computational systems. Strobl et al. [30] models Transformers and LLMs as computational systems and analyzes their expressivity using tools from computation and formal language theory. [27, 6, 19] further establishes computational universality. Unlike these studies, we focus on an operational notion of inference-time cost of LLMs and analyze it through the lens of computational complexity theory.

LLM reasoning and inference-time compute. LLM reasoning methods show that allocating more inference-time compute can substantially improve LLM performance. Chain-of-thought ([33]) prompting elicits explicit intermediate steps, and self-consistency scales inference-time compute by sampling multiple reasoning paths and aggregating to the most consistent answer ([32]). Recent work further explores search/refinement-based scaling of inference-time compute, e.g., Mind Evolution ([24]), alongside studies of redundant “overthinking” and budget-aware allocation ([9, 8, 12]). In contrast, we quantify how accuracy scales under a bounded token budget and distill this relationship into a task-level complexity score for cross-task comparison and curriculum design.

On problem difficulty for LLMs. Prior work defines difficulty either externally, from observed success across a population of solvers ([13, 36]), or internally, as model-perceived hardness inferred from a target LLM’s hidden representations ([38]). This treats the LLM as a computational system and characterizes difficulty through a complexity-based lens, using inference-time token consumption as an operational resource measure to derive a cross-model-consistent notion of task difficulty.

Token usage vs. time complexity

When LLMs are viewed as computational systems, tokens provide a directly observable proxy for inference-time compute. This raises the hypothesis that token usage should increase monotonically with the computational time complexity of a problem. To test this, we evaluate five LLMs on twelve algorithmic tasks spanning diverse complexity classes and show that token usage does not correlate with worst-case time complexity across tasks.

Experimental setup

Data construction. To enable controlled and comparable scaling analysis, we consider a suite of classic algorithmic problems, ranging from O(nlog⁡n)O(n \log n) sorting to NP-hard subset sum. Each problem takes a list of length nn as input, where nn is the problem size. For evaluation, we generate 32 instances per size using task-specific generators with standardized formats, varying n∈10,20,…,100n \in10, 20, \ldots, 100. The full task list and prompts are provided in Section A.

Models. We evaluate five open-weight LLMs: LLAMA-3.3-NEMOTRON-SUPER-49B-V1 and LLAMA-3.1-NEMOTRON-ULTRA-253B-v1 from the Nemotron family Bercovich et al. [5], GPT-OSS-20B and GPT-OSS-120B from the gpt-oss family Agarwal et al. [1], and QWEN-235B from the Qwen3 family Yang et al. [34]. We focus on open-weight models as our evaluation requires access to the full generated reasoning trace, where most closed-source APIs, e.g., GPT, Claude, Gemini, expose only partial or summarized reasoning traces.

Note that all the experiments are conducted in a text-only setting. Models are not permitted to use external tools, programs, or execution environments; this is enforced via prompt design and, when available, model-specific configurations.

Correlation between token usage & time complexity

To test whether token usage reflects worst-case time complexity, we prompt each LLM to solve each task instance step by step and record the generated tokens. For each problem, we average output length across sizes, rank tasks by this statistic, and compare it to rankings induced by worst-case time complexity using Spearman’s ρ\rho and Kendall’s τb\tau_b.

The Results in Table 1 show uniformly low correlations across all five models, indicating that token usage is weakly aligned with worst-case time complexity. To further analyze this, we report average output length per task in Section C.1. We make two observations. First, four sum, four sum in range, and three sum in range show low token usage, as these search-style tasks enable heuristic reasoning without exhaustive exploration. Second, sorting, despite its O(nlog⁡n)O(n \log n) complexity, incurs high token usage due to long structured outputs that increase generation length and error propagation.

ModelSpearman’s ρ\rho / Kendall’s τb\tau_b
Nemotron-49B0.102 / 0.103
Nemotron-253B0.008 / 0.098
GPT-OSS-20B0.213 / 0.165
GPT-OSS-120B0.213 / 0.165
Qwen-235B0.188 / 0.132

Table 1. Weak alignment between worst-case algorithmic time complexity and LLM token usage. We conduct the experiment with 12 algorithmic problems, each evaluated across 10 problem sizes. For each model, we compute the correlation between the average output length and a task-level time-complexity ranking derived from tight, widely accepted worst-case bounds (e.g., sorting with O(nlog⁡n)O(n \log n)). Across all five models, both Spearman’s ρ\rho and Kendall’s τb\tau_b remain small, indicating weak alignment between inference-time token usage and worst-case algorithmic time complexity.

Overall, the results suggest that token usage reflects LLM-specific inference behaviors rather than algorithmic worst-case time complexity, highlighting the need for a complexity notion grounded in how LLMs allocate computation during inference.

Approach

Since time complexity does not directly characterize LLM reasoning behavior, we seek an effective metric to quantify task complexity under generation constraints with the following desiderata:

  1. Cross-model agreement. The metric should induce consistent complexity rankings across various models and across algorithmic and real-world tasks, rather than model-dependent behaviors.

  2. Prompt robustness. The metric should remain stable under different prompt variations, rather than being driven by prompt-dependent behaviors, e.g., verbosity or reasoning style.

  3. Learning utility. The metric should provide practical value for downstream applications, such as constructing more effective and efficient curriculum learning strategies.

To this end, we describe our protocol for measuring performance across varying token budgets (§ 4.1), and then formalize LLM Complexity, our proposed metric, as a scalar measure of the computational cost required to achieve high accuracy (§ 4.2).

Calculating accuracy across token budgets

To consistently measure performance across budgets, we adopt a prefix-truncation procedure Lee et al. [22]; Ghosal et al. [14]; Muennighoff et al. [26], ensuring that differences reflect marginal compute rather than sampling variance. We define token budgets B=1,000,…,16,000\mathcal{B} = 1{,}000, \ldots, 16{,}000 and generate a single long reasoning trace per instance with bmax⁡=16,000b_{\max} = 16{,}000, using continuation prompts if needed (Section B.2). Following “budget forcing” (Muennighoff et al., [26]), we truncate the trace at each b∈Bb \in\mathcal{B} and prompt the model to answer from the partial trace.

We evaluate different truncations of the same reasoning process across budgets, using task accuracy at each budget bb. Per-instance correctness is defined as 1[y^=y]\mathbb{1}[\hat{y}=y], where yy is the ground truth and y^=y^(x;c,n,b)\hat{y} = \hat{y}(x;c,n,b) is the final answer under budget bb. For each problem cc and size nn, instances x∼Dc,nx \sim\mathcal{D}_{c,n}, and accuracy at budget bb is the expected correctness: Acc⁡(c,n,b)=Ex∼Dc,n[1[y^(x;c,n,b)=y(x;c,n)]]\operatorname{Acc}(c,n,b) = \mathbb{E}_{x\sim\mathcal{D}_{c,n}}[\mathbb{1}[\hat{y}(x;c,n,b)=y(x;c,n)]]. Evaluating Acc⁡(c,n,b)\operatorname{Acc}(c,n,b) over the budget set {b1,…,bK}\{b_1,\ldots,b_K\} yields the performance measurements used in the following section.

Defining LLM Complexity

A robust characterization of task complexity should reflect how accuracy changes as the available token budget varies. Therefore, we evaluate each task under multiple token budgets (§ 4.1) and define LLM Complexity by aggregating the resulting budget–accuracy measurements.

As illustrated in Figure 2, we summarize each task’s budget–accuracy scaling behavior using the inference utility, defined as the area under the accuracy–budget curve over B\mathcal{B}. We compute this area using the trapezoidal rule in log-budget space: U(c,n)=∑i=1N−1Acc⁡(c,n,log⁡bi)+Acc⁡(c,n,log⁡bi+1)2(log⁡bi+1−log⁡bi)U(c,n) = \sum_{i=1}^{N-1} \frac{\operatorname{Acc}(c,n,\log b_i)+\operatorname{Acc}(c,n,\log b_{i+1})}{2}(\log b_{i+1}-\log b_i). Using log-budget space prevents a large token budget from disproportionately dominating the aggregate.

Illustration of inference utility

Figure 2. Illustration of inference utility. We plot accuracy as a function of token budget. The shaded area under the curve represents aggregate accuracy across the budget.

To facilitate comparison across tasks and problem sizes, we normalize by the log-budget interval length: Uˉ(c,n)=U(c,n)log⁡bmax⁡−log⁡bmin⁡\bar{U}(c,n) = \frac{U(c,n)}{\log b_{\max}-\log b_{\min}}, Uˉ(c,n)∈[0,1]\bar{U}(c,n) \in[0,1], where bmin⁡=b1b_{\min}=b_1 and bmax⁡=bNb_{\max}=b_N.

Finally, we define the LLM Complexity of task cc at problem size nn as C(c,n)=1−Uˉ(c,n)C(c,n)=1-\bar{U}(c,n), so larger values of C(c,n)C(c,n) indicate that achieving high accuracy requires a greater inference-time token budget. LLM Complexity provides a cross-task comparable notion of complexity under bounded generation. It is based on inference utility, which aggregates accuracy across multiple token budgets in log-budget space. We examine its key properties in the following sections. Moreover, LLM Complexity is insensitive to tokenizer choice: small variations typically induce near-uniform rescaling of token counts, which does not materially affect the resulting rankings.

Experimental results

To determine whether LLM Complexity captures an effective complexity signal, we first map the topology of complexity across tasks and problem sizes (§ 5.1). Then, we evaluate its cross-model agreement through correlations across different models and tasks (§ 5.2). Finally, we assess its prompt robustness, examining whether the metric remains stable under prompt variations rather than being driven by superficial prompt-dependent behaviors such as verbosity or reasoning style (§ 5.3).

Note that we focus on open-weight models as our evaluation requires access to the full generated reasoning trace, where most closed-source APIs, e.g., GPT, Claude, Gemini, expose only partial or summarized reasoning traces.

LLM Complexity across tasks

To characterize the topology of task complexity, Figure 3 shows the average LLM Complexity across tasks and problem sizes. Tasks with lower complexity exhibit stable scores across input lengths, whereas higher-complexity tasks show increasing complexity as problem size grows. This suggests that harder tasks require tracking and updating more intermediate states, leading to higher inference-time compute.

LLM Complexity heatmap across algorithmic tasks and problem sizes

Figure 3. LLM Complexity heatmap across algorithmic tasks and problem sizes. The heatmap shows the averaged LLM Complexity (CC) of different algorithmic problems and corresponding problem size over 5 models (NEMOTRON-49B, NEMOTRON-253B, GPT-OSS-20B, GPT-OSS-120B, QWEN-235B). The results show that tasks with lower average complexity have stable scores across problem sizes, whereas tasks with higher average complexity tend to show increasing complexity as problem size increases.

To quantify agreement across models, we next study cross-model consistency by correlating the task rankings induced by LLM Complexity across LLMs.

Cross-model agreement

A robust complexity metric should capture task-level inference difficulty that is consistent across different models, rather than behaviors specific to a particular model.

If LLM Complexity is valid, different LLMs should agree on the relative complexity ranking of tasks, even if their absolute performance differs. We benchmark our metric against three baselines to isolate this signal: Length: The raw number of reasoning tokens generated (proxy for consumption). Peak: The maximum performance achievable regardless of budget (proxy for capability). Budget: The normalized token budget required to reach 90% of peak performance (proxy for efficiency). We quantify cross-model agreement using rank correlations: Spearman’s ρ\rho and Kendall’s τb\tau_b, computed over the global ordering of all problem–size pair instances.

Results in Table 2 yield two insights. First, LLM Complexity captures the most stable complexity signal, achieving the highest average Kendall’s τb\tau_b and competitive Spearman’s ρ\rho, suggesting it filters out model-specific artifacts present in length-based metrics. Second, we observe a family clustering effect: within-family pairs (e.g., Nemotron) show higher correlations than cross-family ones, indicating that while neural hardness is largely universal, pre-training induces subtle “dialects” of complexity that LLM Complexity can capture.

Model AModel BLengthBudgetPeakLLM Complexity
NEMOTRON-49BNEMOTRON-253B0.926 / <u>0.777</u>0.881 / 0.7460.860 / 0.743<u>0.919</u> / 0.768
NEMOTRON-49BGPT-OSS-20B0.711 / 0.5180.778 / 0.6090.661 / <u>0.568</u><u>0.761</u> / 0.549
NEMOTRON-49BGPT-OSS-120B0.850 / <u>0.657</u>0.807 / 0.6480.716 / <u>0.655</u><u>0.800</u> / 0.614
NEMOTRON-49BQWEN-235B0.720 / 0.5070.650 / 0.511<u>0.792</u> / 0.6860.809 / <u>0.630</u>
NEMOTRON-253BGPT-OSS-20B0.738 / 0.538<u>0.782</u> / 0.6140.693 / <u>0.622</u>0.837 / 0.649
NEMOTRON-253BGPT-OSS-120B0.864 / <u>0.668</u>0.818 / <u>0.673</u>0.766 / 0.6260.840 / 0.687
NEMOTRON-253BQWEN-235B0.838 / 0.6210.711 / 0.5780.804 / 0.723<u>0.810</u> / <u>0.634</u>
GPT-OSS-20BGPT-OSS-120B0.872 / 0.6940.867 / <u>0.768</u>0.858 / 0.7440.913 / 0.782
GPT-OSS-20BQWEN-235B0.894 / 0.7210.708 / 0.5820.684 / <u>0.610</u>0.780 / 0.606
GPT-OSS-120BQWEN-235B0.948 / 0.8000.722 / 0.6130.691 / 0.645<u>0.874</u> / <u>0.720</u>
Average0.836 / 0.6500.772 / 0.6340.752 / <u>0.662</u><u>0.834</u> / 0.664

Table 2. Cross-model correlation of task-level complexity rankings. We report Spearman’s ρ\rho / Kendall’s τb\tau_b between the per-task complexity ranks induced by Model A and Model B (higher is better) on 12 algorithmic problems. Length: The number of tokens in the model’s first phase CoT trace. Budget: the token budget required to reach 90% of the model’s peak accuracy, normalized by the peak accuracy. Peak: the model’s peak accuracy. The results show that LLM Complexity yields the best cross-model correlation among all the other heuristic complexity definitions.

Prompt robustness

A good metric should not only remain stable across models but also capture stable task-level differences in inference difficulty rather than superficial verbosity. If the metric were driven primarily by verbosity, its rankings would fluctuate under different prompting strategies. Therefore, it should remain stable under prompt variations. To examine this, we evaluate five prompt variants (full prompts are provided in Section B.3):

  • no_step: Remove the “step-by-step” reasoning instruction [21].

  • be_concise: Instruct the LLM to be concise during reasoning [28].

  • short_continue: Replace the default continuation prompt with a shorter version that does not explicitly encourage self-verification.

  • long_continue: Replace the default continuation prompt with a longer version that encourages deeper reflection and rethinking.

  • answer_format: Modify the instruction to require list outputs with one item per line [25].

First, we evaluate whether the rankings induced by different prompt variants remain consistent with one another. For each prompt setting, we report its average Spearman’s ρ\rho and Kendall’s τb\tau_b with all other settings over 12 tasks at input length 100, averaged across five models, as shown in Table 3; the full pairwise results are provided in Section C.2.1. The correlations remain consistently high across variants, indicating that LLM Complexity is robust to prompt variations and captures stable, model-consistent differences in task complexity rather than prompt-dependent artifacts. In contrast, other baselines—particularly the Length baseline—exhibit noticeably weaker and less reliable correlations, reflecting their greater sensitivity to prompt-induced verbosity effects. The table in Section C.2.2 further shows that LLM Complexity achieves the strongest cross-model agreement across prompt settings compared with the baselines in Table 3.

Prompt VariantsLengthBudgetPeakLLM Complexity
default_setting0.873 / 0.7480.895 / 0.8020.863 / 0.8020.931 / 0.849
no_step0.762 / 0.6340.866 / 0.7870.867 / 0.8070.928 / 0.854
be_concise0.896 / 0.7910.900 / 0.8210.848 / 0.7960.933 / 0.871
short_continue0.910 / 0.8080.903 / 0.8280.863 / 0.8090.937 / 0.880
long_continue0.916 / 0.8080.883 / 0.8020.883 / 0.8330.937 / 0.876
answer_format0.892 / 0.7740.774 / 0.6920.751 / 0.7030.811 / 0.754
Average0.875 / 0.7610.870 / 0.7890.846 / 0.7920.913 / 0.847

Table 3. Prompt robustness of task-level complexity rankings. We report the average Spearman’s ρ\rho / Kendall’s τb\tau_b between the rankings induced by each prompt variant and all other prompt settings across five models (higher is better). LLM Complexity achieves the highest correlations in 5 out of 6 settings and also attains the highest average correlation, indicating strong robustness to prompt variations. In particular, the Length baseline drops substantially under the no_step setting, suggesting greater sensitivity to verbosity-related prompting effects.

In summary, our empirical results establish LLM Complexity as a reliable “thermometer” for neural reasoning complexity. It captures a signal that is both grounded in task structure and consistently recognized across models and prompt settings. Having validated the fidelity of this signal, we next investigate its learning utility for optimizing the learning process.

Curriculum learning

As cross-model agreement and prompt robustness of LLM Complexity are shown in § 5, a natural question arises: can this signal provide learning utility? Prior work suggests that easy-to-hard curricula can improve learning efficiency Bengio et al. [4]; Lee et al. [23], but their effectiveness heavily depends on the quality of the difficulty metric. We therefore construct a curriculum based on LLM Complexity and evaluate its effect on fine-tuning performance.

Complexity-based curriculum sampling

Given a training instance from problem cc at size nn with normalized complexity C(c,n)∈[0,1]\mathcal{C}(c,n) \in[0,1], we assign it a Boltzmann-style score s(c,n)=exp⁡(−C(c,n)/τ)s(c,n) = \exp(-\mathcal{C}(c,n)/\tau), where τ>0\tau> 0 controls the sampling preference over difficulty levels. Smaller τ\tau concentrates sampling on low-complexity (easy) instances, while larger τ\tau produces a flatter distribution and increases coverage of higher-complexity (hard) instances. To avoid vanishing probabilities, we smooth the score as s~(c,n)=(1−ϵ)s(c,n)+ϵN\tilde{s}(c,n) = (1-\epsilon)s(c,n) + \frac{\epsilon}{N}, where ϵ≥0\epsilon\ge0 is a smoothing constant and NN is the number of problem–size pairs. We then normalize over all problem–size pairs: P(c,n)=s~(c,n)∑(c′,n′)s~(c′,n′)P(c,n) = \frac{\tilde{s}(c,n)}{\sum_{(c',n')} \tilde{s}(c',n')} . Smaller τ\tau concentrates sampling on low-complexity (easy) instances, while larger τ\tau produces a flatter distribution and increases coverage of higher-complexity (hard) instances.

Table 4: Accuracy usage under different curricula. We fine-tune QWEN3-1.7B with teacher-generated supervision from Nemotron-253B using 3 different seeds. All curriculum variants use the same sampling form P∝exp⁡(−C/τ)P \propto\exp(-\mathcal{C}/\tau) with an annealed temperature to induce an easy-to-hard schedule, differing only in the choice of complexity score C\mathcal{C}: Time (wall-clock execution time), Length, Budget (defined in Table 2), and LLM Complexity; Random uses uniform sampling, and Pre-trained denotes the base model without SFT. LLM Complexity achieves the highest average accuracy and lowest average token usage, supporting its effectiveness for curriculum design.

MethodSeenUnseen
Pre-train42.75 ± 0.00%46.25 ± 0.00%
Time38.92 ± 0.80%41.25 ± 2.17%
Length44.17 ± 1.01%45.42 ± 4.02%
Budget43.33 ± 0.52%43.75 ± 3.31%
Random41.75 ± 2.63%41.67 ± 1.44%
LLM Complexity44.42 ± 0.76%48.33 ± 5.05%

Table 4. Accuracy usage under different curricula.

Curriculum scheduler

To form an easy-to-hard curriculum, we bias training toward low-complexity instances early on and gradually increase the probability of sampling more challenging instances as training progresses. Under the previous sampling scheme, this behavior can be achieved by annealing the temperature τ\tau during the TT training steps, where we linearly increase τ\tau as τ(t)=τ0+t−1T−1(τ1−τ0)\tau(t) = \tau_0 + \frac{t-1}{T-1}(\tau_1 - \tau_0), t∈{1,…,T}t \in\{1,\ldots,T\}, where τ0=τ(1)\tau_0 = \tau(1) denotes the initial temperature at the start of training and τ1=τ(T)\tau_1 = \tau(T) denotes the final temperature at the end of training.

Curriculum learning results

We evaluate whether LLM Complexity can provide a reliable curriculum signal for SFT. Concretely, we fine-tune QWEN3-1.7B on a mixture of problem–size instances (c,n)(c,n) sampled from the complexity-based distribution in the previous paragraph.

Training data and supervision. For each training instance, we use a reasoning trace generated by NEMOTRON-253B as the supervision signal (i.e., a teacher-produced chain-of-thought / “thinking” trace paired with the final answer). We then perform SFT on QWEN3-1.7B to learn to reproduce the teacher-style reasoning and answers.

Curriculum vs. baselines. We compare data-ordering strategies under identical SFT settings (Section E). All curricula share the same weighted sampling form Pτ(t)(⋅)P_{\tau(t)}(\cdot) (§ 6.1) and temperature annealing schedule τ(t)\tau(t), differing only in the per-instance difficulty score used in the weights:

  • Pre-trained uses QWEN3-1.7B pre-trained weight.

  • Random SFT uniformly samples instances from the training pool.

  • LLM Complexity curriculum uses C(c,n)\mathcal{C}(c,n), i.e., our LLM Complexity score.

  • Length curriculum uses the number of tokens in the supervision signal as difficulty.

  • Time curriculum measures the task execution time in a Linux environment as difficulty.

  • Budget curriculum: difficulty is the compute-budget proxy defined in § 5.2.

Results and analysis.

Table 4 summarizes accuracy under different curricula using 3 different seeds. The SFT training set contains ten seen algorithm families: sorting, max subarray, coin change, two sum closest, subset sum, four sum, four sum in range, LCS, knapsack, and four sum closest. We hold out two unseen algorithms (LIS and three sum in range) to evaluate generalization beyond the training distribution. We also verify that SFT exhibits the expected seen–unseen gap and meaningful adaptation; see Section E.5 for details. Overall, the LLM Complexity curriculum outperforms all other curricula on the seen algorithms, indicating that complexity provides an effective signal for organizing SFT. It also improves accuracy on the unseen algorithms, suggesting that the learned reasoning patterns transfer beyond the training set.

Fitting LLM Complexity to computational complexity

We investigate how LLM Complexity relates to traditional complexity metrics by predicting its ranking from three measures: output length, space complexity, and time complexity. Output length captures the expected answer length; for example, sorting outputs all nn elements, whereas four sum outputs only four. For each model, we fit non-negative weights (α,β,γ)(\alpha,\beta,\gamma) summing to one over the three induced rankings. We compute sc=αrcout+βrcspace+γrctimes_c = \alpha r_c^{\mathrm{out}} + \beta r_c^{\mathrm{space}} + \gamma r_c^{\mathrm{time}} and select the weights that maximize Spearman’s ρ\rho between the ranking induced by scs_c and the LLM Complexity ranking.

Table 5 reports the resulting mixture weights. Overall, output length consistently receives substantial weight, suggesting that it is informative for algorithmic task complexity. While weights vary across models, models within the same family exhibit similar patterns, possibly reflecting shared reasoning strategies, such as similar reliance on intermediate states. Beyond this linear decomposition, we further analyze pairwise correlations in Section D.

Table 5: Fitted problem-level mixture weights over computational complexity measures. Let rcoutr^{\mathrm{out}}_c, rcspacer^{\mathrm{space}}_c, and rctimer^{\mathrm{time}}_c denote rankings induced by output length, auxiliary-space complexity, and time complexity, respectively, and rcmodelr^{\mathrm{model}}_c the LLM Complexity ranking. Output length refers to the task-implied output length rather than the model’s actual response length. We grid-search nonnegative weights (α,β,γ)(\alpha, \beta, \gamma) summing to one and compute sc=αrcout+βrcspace+γrctimes_c = \alpha r^{\mathrm{out}}_c + \beta r^{\mathrm{space}}_c + \gamma r^{\mathrm{time}}_c, selecting the weights that maximize Spearman’s ρ\rho between the induced ranking and rcmodelr^{\mathrm{model}}_c. This provides a simple decomposition of LLM Complexity across the three proxies.

Modelα\alpha (Output)β\beta (Space)γ\gamma (Time)
NEMOTRON-49B0.490.510.00
NEMOTRON-253B0.480.510.01
GPT-OSS-20B0.550.250.20
GPT-OSS-120B0.580.230.19
QWEN-235B0.560.250.19

Table 5.

Generalizing to real-world problems

To examine if our LLM Complexity goes beyond synthetic algorithmic problems and generalizes to real-world tasks, we conduct experiments on DeepMath He et al. [16] and RuleArena Zhou et al., [37], which were released after the knowledge cutoff of all evaluated models (i.e., no data contamination issue).

DeepMath. DeepMath He et al. [16] contains math problems with difficulty labels assigned by GPT-4o Hurst et al., [17] using Art of Problem Solving guidelines AoPSOnline, [2] to approximate human-perceived difficulty. We evaluate 200 problems, comparing LLM Complexity rankings across models and against these difficulty labels. As shown in Table 6, LLM Complexity rankings exhibit substantial cross-model agreement, consistent with § 5, but near-zero correlation with DeepMath’s labels. This suggests that human-oriented mathematical difficulty and LLM inference-time complexity capture different aspects of problem difficulty.

Table 6: Task-level complexity correlation on DeepMath. We report cross-model correlation (averaged per model over pairwise comparisons) and correlation with DeepMath difficulty annotations using Spearman’s ρ\rho and Kendall’s τb\tau_b. LLM Complexity shows substantial cross-model consistency but near-zero correlation with human-annotated difficulty, suggesting that it captures a complementary dimension of LLM-specific problem complexity. Full pairwise correlations are provided in Section C.3.

ModelCross-modelvs. DeepMath
NEMOTRON-49B0.544 / 0.482-0.063 / -0.051
NEMOTRON-253B0.500 / 0.451-0.071 / -0.059
GPT-OSS-20B0.460 / 0.4230.001 / 0.001
GPT-OSS-120B0.478 / 0.441-0.002 / -0.002
QWEN-235B0.546 / 0.491-0.111 / -0.093

Table 6.

RuleArena. RuleArena Zhou et al., [37] contains real-world reasoning tasks across three categories—airline baggage fees, NBA transactions, and tax regulations—with three difficulty levels each. We treat each category–difficulty pair as a task and evaluate cross-model agreement over the resulting nine tasks. As shown in Table 7, LLM Complexity achieves the highest average rank correlation across model pairs and ranks within the top two in most comparisons, demonstrating strong cross-model consistency on real-world reasoning tasks.

Table 7: Cross-model consistency of task-level complexity rankings on RuleArena. We report Spearman’s ρ\rho / Kendall’s τb\tau_b between the rankings of the nine RuleArena tasks induced by Model A and Model B (higher is better). LLM Complexity achieves the strongest cross-model agreement.

Model AModel BLengthBudgetPeakLLM Complexity
NEMOTRON-49BNEMOTRON-253B0.983 / 0.9440.983 / 0.9390.897 / 0.8181.000 / 1.000
NEMOTRON-49BGPT-OSS-20B0.817 / 0.7220.868 / 0.7650.945 / 0.8830.881 / 0.783
NEMOTRON-49BGPT-OSS-120B0.633 / 0.5560.966 / 0.8990.573 / 0.4180.966 / 0.899
NEMOTRON-49BQWEN-235B0.800 / 0.6110.828 / 0.7580.879 / 0.7581.000 / 1.000
NEMOTRON-253BGPT-OSS-20B0.833 / 0.7780.928 / 0.8240.843 / 0.7060.881 / 0.783
NEMOTRON-253BGPT-OSS-120B0.617 / 0.5000.932 / 0.8410.735 / 0.5970.966 / 0.899
NEMOTRON-253BQWEN-235B0.750 / 0.5560.897 / 0.8180.983 / 0.9391.000 / 1.000
GPT-OSS-20BGPT-OSS-120B0.683 / 0.5000.862 / 0.7610.498 / 0.3770.867 / 0.722
GPT-OSS-20BQWEN-235B0.383 / 0.3330.894 / 0.7650.826 / 0.6470.881 / 0.783
GPT-OSS-120BQWEN-235B0.467 / 0.3890.729 / 0.6670.684 / 0.5370.966 / 0.899
Average0.697 / 0.5890.889 / 0.8040.786 / 0.6680.941 / 0.877

Table 7.

Conclusion

We propose LLM Complexity, a metric that quantifies problem complexity for LLMs via the area over the accuracy–token curve. We show that LLM Complexity captures stable task-level differences in inference difficulty, yielding rankings that are highly consistent across diverse model families. We further demonstrate its practical utility by constructing easy-to-hard curricula for supervised fine-tuning that improve accuracy while reducing token consumption. Finally, we show that LLM Complexity generalizes to real-world tasks, producing more stable cross-model correlations than human-annotated difficulty labels. Overall, our findings highlight the importance of defining complexity in terms of how LLMs allocate inference-time compute, rather than relying solely on classical algorithmic hierarchies.

Problem table

Table 8 provides a complete specification of the evaluation suite. For each problem, we list the problem name and include a representative instance prompt drawn from the same template used during evaluation, illustrating the exact input format (e.g., list-structured inputs or paired strings) and the required output type (e.g., an ordered list, a subset, a subsequence, or a scalar objective value). All problems are classical algorithmic problems with verifiable outputs, enabling consistent automatic checking across instances. As described in our data construction procedure, we instantiate each problem at multiple problem sizes (from 10 to 100 in increments of 10), so Table 8 serves as a concrete reference for how each problem is presented to the model while the evaluation varies the underlying problem scale. Table 9 reports the annotated worst-case time and auxiliary-space complexity of the 12 tasks. We use these annotations to form the task-level time and space complexity rankings used in our experiments.

Prompt details

Prompt used for inference

Our inference pipeline consists of two stages: (1) long-chain generation and (2) answer generation from a truncated prefix.

Long-chain generation. To ask the LLM generate the long chain, we use the following prompt:

{Problem Specific Prompt} Provide your reasoning step by step
without using external programming functions.  Lastly, present
the final answer in the exact format:  Answer: [...]

Answer generation from a truncated prefix. To ask the LLM to generate an answer based on the truncated prefix, we use the following prompt:

{Problem Specific Prompt} Compute the result manually without
using external programming functions.  Present the final
answer in the exact format:  Answer: [...]

The {Problem Specific Prompt} varies across problems. For example, for sorting, one instance is:

Given the list [36, 23, 34, 73, 98], sort the list in
ascending order.

We provide a sample prompt for each task in Appendix A.

Continuation prompt

If the LLM terminates generation before reaching the maximum token budget, we append the following prompt to encourage it to continue reasoning until the budget is exhausted.

Please review your previous reasoning step by step and
check for any errors, incorrect assumptions, or logical
inconsistencies.  If issues are found, revise the reasoning
accordingly.

Detailed prompts for prompt sensitivity experiments

In Section 5.3, we show that LLM Complexity is robust to prompt variations. Here, we detail the prompt variants used in our experiments.

  • no_step: For long-chain generation, we replace the default prompt with:

Compute the result manually without using external
programming functions. Do not provide any reasoning
or explanation. Lastly, present the final answer in the
exact format:  Answer: ...
  • be_concise: For long-chain generation, we use the following prompt:

Provide your reasoning step by step without using
external programming functions.  Lastly, present the
final answer in the exact format:  Answer: [...]  Be
concise.
  • short_continue: We replace the default continuation prompt with:

Please continue thinking.
  • long_continue: We replace the default continuation prompt with:

You have previously generated a detailed reasoning
process for this problem.  Now, carefully review your
entire reasoning step by step.  For each step, check
whether the logic is valid, whether any assumptions are
incorrect, and whether any intermediate calculations or
conclusions are flawed.  If you identify any mistakes,
inconsistencies, or gaps in reasoning, revise the
reasoning accordingly and ensure that the corrected
version is logically coherent and consistent with the
problem statement.  After completing this verification
and correction process, provide the final answer.
Ensure that the final answer is correct and consistent
with your revised reasoning.
  • answer_format: For answer generation, we replace the default prompt with:

Compute the result manually without using external
programming functions.  generate your list such that
each element is in a new line, and present the final
answer in the exact format:\n\nAnswer:\na\nb\nc\nd
TaskSample Prompt
Max SubarrayGiven the list nums = [-38, 41, 24, -42, 46], find the maximum possible sum of a contiguous subarray.
SortingGiven the list [36, 23, 34, 73, 98], sort the list in ascending order.
Two Sum ClosestGiven a list of integers of length 5: [25, 182, 149, 17, 193], find two numbers whose sum is closest to the target value 31. If multiple answers exist, return any one of them.
Longest Increasing Subsequence (LIS)Given the list [5, 4, 3, 1, 2], find the longest increasing subsequence.
Three Sum (In Range)Given a list of integers of length 5: [118, 46, 52, 110, 107], find any 3 numbers whose sum is in the range [268, 276] (inclusive).
Four SumGiven the list of integers of length 5: [96, 58, 60, 56, 50], find any four numbers that sum to 264.
Four Sum (In Range)Given the list of integers of length 5: [107, 20, 60, 99, 146], find any 4 numbers whose sum is in the range [282, 287] (inclusive).
Four Sum ClosestGiven the list of integers of length 5: [131, 19, 173, 12, 187], find four numbers whose sum is closest to the target value 449. There is no exact solution where the sum equals 449. If multiple answers achieve the same closest distance, return any one of them.
Coin ChangeGiven coin denominations coins = [1, 5, 9, 11, 14, 18, 25, 26, 27] (unlimited supply of each), find the minimum number of coins needed to make exactly amount = 11. Return the minimum number of coins as an integer.
Subset SumGiven the list [96, 11, 82, 59, 54] and the target sum 302, find a subset of the list that sums exactly to the target.
Longest Common Subsequence (LCS)Given two strings s1 and s2, find a longest common subsequence. s1 = ejbpc s2 = kefiq Return any one LCS string (if multiple exist, any is acceptable).
Knapsack (0/1)You are given n items. items = [(weight:18,value:3), (weight:11,value:7), (weight:4,value:17), (weight:18,value:8), (weight:15,value:17)] Capacity W = 26 Choose a subset of items (each item at most once) to maximize total value without exceeding capacity.

Table 8. Tasks used in our evaluation.

Table 9: Annotated time and auxiliary-space complexity for the 12 algorithmic tasks. Time bounds follow the tightest widely accepted worst-case complexity under the standard computation model. Space reports worst-case auxiliary memory, excluding input/output storage. Here nn is input list length; for Longest Common Subsequence, n,mn, m are the two sequence lengths; for Coin Change, AA is the target amount and kk is the number of coin types; for Knapsack, WW is capacity; for Subset Sum, TT is the target sum. †Assuming in-place sorting; recursion stack is O(log⁡n)O(\log n) if applicable. ‡Subset Sum is NP-complete in nn; we annotate the exponential worst-case in nn while noting its pseudo-polynomial DP dependence on TT.

TaskTimeAux. SpaceNotes / Parameters
Max SubarrayO(n)O(n)O(1)O(1)Kadane scan
SortingO(nlog⁡n)O(n \log n)O(1)O(1)†Comparison-based sorting
Two Sum ClosestO(nlog⁡n)O(n \log n)O(1)O(1)†Sort + two pointers
LISO(nlog⁡n)O(n \log n)O(n)O(n)Patience sorting
Three Sum (In Range)O(n2)O(n^{2})O(1)O(1)†Sort + two pointers
Four SumO(n3)O(n^{3})O(1)O(1)†Sort + 2 loops + two pointers
Four Sum (In Range)O(n3)O(n^{3})O(1)O(1)†Same as Four Sum
Four Sum ClosestO(n3)O(n^{3})O(1)O(1)†Same as Four Sum
Coin ChangeO(kA)O(kA)O(A)O(A)DP over amount AA; kk coin types
LCSO(nm)O(nm)O(min⁡(n,m))O(\min(n,m))DP time; Hirschberg space
Knapsack (0/1)O(nW)O(nW)O(W)O(W)DP over capacity WW
Subset SumO(2n)O(2^{n})‡O(T)O(T)‡NP-complete; pseudo-polynomial DP in target TT

Table 9.

Additional Results

Task-level average output length

For each task, we measure the length of the model’s generated output in tokens and report the task-level average. Concretely, for every problem, we aggregate token counts across all evaluated instances and problem sizes under the same decoding configuration. We report the results in Table 10.

TaskAvg. output tokens
Four Sum1968
Four Sum In Range2851
Three Sum In Range2854
Coin Change3404
Subset Sum3508
Two Sum Closest4094
Max Subarray4411
Sorting5466
LIS7907
LCS10505
Four Sum Closest10926
Knapsack12421

Table 10. Average number of output tokens for each problem under step-by-step prompting, aggregated across all problem sizes and LLMs, sorted from low to high.

Additional prompt sensitivity results

Here, we provide additional results from the prompt sensitivity experiments in § 5.3, further demonstrating that LLM Complexity is robust to prompt variations. Specifically, Section C.2.1 presents the full pairwise correlations between different prompt settings, providing a more fine-grained view of prompt-level agreement. We then analyze cross-model consistency under each prompt variant in Section C.2.2, showing that LLM Complexity maintains strong agreement across diverse models even under substantial prompt changes.

Pairwise prompt sensitivity results

To complement the aggregate prompt-sensitivity results in Table 3, we provide the full pairwise correlations between all prompt settings in Table 11.

Table 11: Detailed pairwise prompt sensitivity results. For each prompt setting, we report its pairwise Spearman’s ρ\rho / Kendall’s τb\tau_b with every other setting over 12 tasks at input length 100, averaged across five models. The Average row within each block summarizes the mean agreement of that prompt setting with all others, while Overall Average averages across all prompt-setting pairs. Bold and underline denote the highest and second-highest values within each row, with Spearman’s ρ\rho and Kendall’s τb\tau_b ranked independently.

Prompt SettingCompared SettingLengthBudgetPeakLLM Complexity
default_settingno_step0.751 / 0.6120.887 / 0.7830.893 / 0.8280.940 / 0.848
be_concise0.885 / 0.7630.904 / 0.8050.853 / 0.7790.943 / 0.855
short_continue0.919 / 0.8060.934 / 0.8670.871 / 0.8000.956 / 0.884
long_continue0.929 / 0.8120.899 / 0.8030.943 / 0.8980.962 / 0.885
answer_format0.881 / 0.7450.850 / 0.7540.754 / 0.7040.854 / 0.775
Average0.873 / 0.7480.895 / 0.8020.863 / 0.8020.931 / 0.849
no_stepdefault_setting0.751 / 0.6120.887 / 0.7830.893 / 0.8280.940 / 0.848
be_concise0.747 / 0.6300.907 / 0.8380.899 / 0.8340.970 / 0.895
short_continue0.775 / 0.6480.921 / 0.8470.895 / 0.8400.967 / 0.901
long_continue0.787 / 0.6670.903 / 0.8320.917 / 0.8570.966 / 0.895
answer_format0.749 / 0.6120.712 / 0.6340.731 / 0.6770.796 / 0.728
Average0.762 / 0.6340.866 / 0.7870.867 / 0.8070.928 / 0.854
be_concisedefault_setting0.885 / 0.7630.904 / 0.8050.853 / 0.7790.943 / 0.855
no_step0.747 / 0.6300.907 / 0.8380.899 / 0.8340.970 / 0.895
short_continue0.945 / 0.8600.958 / 0.8860.863 / 0.8230.983 / 0.936
long_continue0.966 / 0.8790.944 / 0.8630.898 / 0.8610.972 / 0.918
answer_format0.937 / 0.8240.786 / 0.7120.727 / 0.6830.798 / 0.750
Average0.896 / 0.7910.900 / 0.8210.848 / 0.7960.933 / 0.871
short_continuedefault_setting0.919 / 0.8060.934 / 0.8670.871 / 0.8000.956 / 0.884
no_step0.775 / 0.6480.921 / 0.8470.895 / 0.8400.967 / 0.901
be_concise0.945 / 0.8600.958 / 0.8860.863 / 0.8230.983 / 0.936
long_continue0.958 / 0.8600.926 / 0.8450.898 / 0.8390.977 / 0.921
answer_format0.954 / 0.8670.775 / 0.6940.788 / 0.7410.799 / 0.759
Average0.910 / 0.8080.903 / 0.8280.863 / 0.8090.937 / 0.880
long_continuedefault_setting0.929 / 0.8120.899 / 0.8030.943 / 0.8980.962 / 0.885
no_step0.787 / 0.6670.903 / 0.8320.917 / 0.8570.966 / 0.895
be_concise0.966 / 0.8790.944 / 0.8630.898 / 0.8610.972 / 0.918
short_continue0.958 / 0.8600.926 / 0.8450.898 / 0.8390.977 / 0.921
answer_format0.938 / 0.8240.745 / 0.6650.758 / 0.7100.807 / 0.758
Average0.916 / 0.8080.883 / 0.8020.883 / 0.8330.937 / 0.876
answer_formatdefault_setting0.881 / 0.7450.850 / 0.7540.754 / 0.7040.854 / 0.775
no_step0.749 / 0.6120.712 / 0.6340.731 / 0.6770.796 / 0.728
be_concise0.937 / 0.8240.786 / 0.7120.727 / 0.6830.798 / 0.750
short_continue0.954 / 0.8670.775 / 0.6940.788 / 0.7410.799 / 0.759
long_continue0.938 / 0.8240.745 / 0.6650.758 / 0.7100.807 / 0.758
Average0.892 / 0.7740.774 / 0.6920.751 / 0.7030.811 / 0.754
Overall Average0.875 / 0.7610.870 / 0.7890.846 / 0.7920.913 / 0.847

Table 11. Detailed pairwise prompt sensitivity results.

For each prompt setting, we report its Spearman’s ρ\rho and Kendall’s τb\tau_b with every other setting over 12 tasks at input length 100, averaged across five models.

The Average row within each block corresponds to the aggregate value reported in Table 3, while the Overall Average row summarizes agreement across all prompt pairs.

Cross-model consistency under prompt settings

We further evaluate cross-model consistency under each prompt variant by averaging Spearman’s ρ\rho and Kendall’s τb\tau_b across all model pairs. As shown in Table 12, LLM Complexity achieves the highest overall agreement among all metrics, with an average correlation of 0.903 / 0.780. It ranks first in three out of five settings and second in the remaining two, while the Length baseline drops notably under no_step, indicating higher sensitivity to prompt-induced verbosity changes.

AblationLengthBudgetPeakLLM Complexity
no_step0.618 / 0.4910.814 / 0.6810.732 / 0.6510.905 / 0.785
be_concise0.888 / 0.7580.887 / 0.7630.725 / 0.6430.899 / 0.776
short_continue0.923 / 0.8060.868 / 0.7380.803 / 0.7380.891 / 0.765
long_continue0.917 / 0.8000.852 / 0.7280.752 / 0.6630.912 / 0.794
answer_format0.878 / 0.7320.896 / 0.7840.716 / 0.6470.906 / 0.780
Average0.845 / 0.7170.863 / 0.7390.746 / 0.6680.903 / 0.780

Table 12. The average Spearman’s ρ\rho / Kendall’s τb\tau_b of complexity rankings across all model pairs under each prompt variant (higher is better). LLM Complexity achieves the strongest overall cross-model agreement, with the highest average correlation across prompt variations and consistently high performance across settings.

Additional deepmath results

We report the full pairwise cross-model correlations of task-level complexity rankings on DeepMath in Table 13. For each pair of models, we compute Spearman’s ρ\rho and Kendall’s τb\tau_b over instance-level complexity scores induced by LLM Complexity. These results complement the aggregated statistics in the main text by providing a more fine-grained view of agreement across model families.

Model AModel BSpearman ρ\rhoKendall τb\tau_b
NEMOTRON-49BNEMOTRON-253B0.6790.604
NEMOTRON-49BGPT-OSS-20B0.4190.375
NEMOTRON-49BGPT-OSS-120B0.4210.376
NEMOTRON-49BQWEN-235B0.6550.574
NEMOTRON-253BGPT-OSS-20B0.3570.324
NEMOTRON-253BGPT-OSS-120B0.3460.315
NEMOTRON-253BQWEN-235B0.6170.560
GPT-OSS-20BGPT-OSS-120B0.6480.619
GPT-OSS-20BQWEN-235B0.4140.376
GPT-OSS-120BQWEN-235B0.4980.454

Table 13. Full pairwise cross-model correlation on DeepMath. We report Spearman’s ρ\rho and Kendall’s τb\tau_b between task-level complexity rankings induced by LLM Complexity for all model pairs. Each entry is computed over instance-level complexity scores and reflects the agreement in relative task difficulty between two models. Higher values indicate stronger alignment. Consistent with the main results, correlations are generally moderate to strong, with higher agreement observed within model families and slightly lower (but still positive) correlations across different families.

Overall, we observe moderate to strong positive correlations across most model pairs, indicating that LLM Complexity induces relatively consistent complexity rankings even across models with different architectures and scales.

Notably, models within the same family (e.g., NEMOTRON or GPT-OSS) tend to exhibit higher agreement, while cross-family correlations are slightly lower but remain positive. This pattern suggests that while some variation exists due to model-specific behaviors, the proposed metric captures a shared notion of inference-time difficulty.

The correlation of LLM Complexity and computational complexities

To better understand the characteristics of LLM Complexity, we compare LLM Complexity against two classical measures—space complexity and time complexity—and an additional proxy, output length, defined as the expected token length of the ground-truth answer.

For each problem, we construct problem-level rankings induced by these three measures and measure their rank consistency with each model’s problem-level LLM Complexity ranking using Spearman’s ρ\rho and Kendall’s τb\tau_b. For each model, we first aggregate complexity scores across input lengths to obtain a single problem-level LLM Complexity score per problem, and apply the same aggregation procedure to each classic measure to obtain problem-level rankings. We measure space complexity and time complexity using worst-case auxiliary memory usage and worst-case runtime, respectively.

Table 14 reports the results. Overall, output length shows the strongest alignment with LLM Complexity ranking on average. One plausible explanation is that, in our benchmark, longer gold answers typically require producing more symbols and maintaining more intermediate information. For example, in sorting, the gold answer is an ordered list of nn elements, so the output length grows with nn. Generating this list autoregressively is more than “printing” nn tokens: at each step, the model must maintain the partially sorted prefix and choose the next element to remain consistent with both the remaining inputs and the prefix, leading to more token usage. We also observe that the gpt-oss models correlate more strongly with space and time complexity than the Nemotron models, suggesting that gpt-oss complexity is more tightly coupled to problems that demand a larger maintained state or longer sequential computation.

ModelOutputSpaceTime
Nemotron-49B0.598 / 0.3880.271 / 0.2010.141 / 0.067
Nemotron-253B0.537 / 0.3560.166 / 0.1010.137 / 0.101
Gpt-oss-20B0.665 / 0.4820.518 / 0.4220.471 / 0.382
Gpt-oss-120B0.606 / 0.4400.356 / 0.2530.362 / 0.287
Average0.602 / 0.4170.328 / 0.2440.278 / 0.209

Table 14. Grounding LLM Complexity in computation complexity proxies. Each cell reports the correlation between the LLM Complexity ranking and a ranking induced by a classical measure (output length, space, or time), shown as Spearman’s ρ\rho / Kendall’s τb\tau_b.

Supervised fine-tuning and inference details

Supervised fine-tuning (SFT)

Teacher supervision. We fine-tune QWEN3-1.7B on NVIDIA RTX A6000 with 48 GB VRAM using supervised traces produced by NEMOTRON-253B. For each training instance, we use the teacher’s first-phase reasoning trace as the supervision target.

Chat formatting. Each example is serialized into a single text sequence using the model’s chat template:

[system]∥[user: prompt]∥[assistant: completion],\text{[system]} \parallel\text{[user: prompt]} \parallel\text{[assistant: completion]},

with a fixed system prompt: “Please solve the following algorithmic problem without using programming languages.”

Parameter-efficient tuning (LoRA). We fine-tune using LoRA adapters with r=16r = 16, α=32\alpha= 32, dropout =0.05= 0.05, bias=none, and target_modules=all-linear. The base model is loaded with torch_dtype=bfloat16 and device_map=auto, and we enable TF32 matmul for faster training.

Optimization hyperparameters. We train for 2 epochs with learning rate 2×10−42 \times10^{-4}, per-device batch size 1, and gradient accumulation 16 (effective batch size 16). We use a cosine learning-rate schedule with warmup ratio 0.03. The maximum sequence length is set to 4096 tokens.

Curriculum sampling used in SFT

Temperature-annealed weighted sampling. In curriculum mode, we sample training examples with replacement from a temperature-controlled distribution over examples:

Pt(i)∝(1−ϵ)exp⁡(−Ciτ(t))+ϵ⋅1N,P_t(i) \propto(1-\epsilon)\exp\left(-\frac{C_i}{\tau(t)}\right) + \epsilon\cdot\frac{1}{N},

where CiC_i is the example complexity (from difficulty.json), NN is dataset size, and ϵ\epsilon is an exploration coefficient. We linearly anneal the temperature from τ0=0.15\tau_0 = 0.15 to τ1=0.6\tau_1 = 0.6 across training steps, with ϵ=0.05\epsilon= 0.05.

Inference and evaluation (vLLM)

Decoding configuration. We use greedy decoding by default (temperature =0.0= 0.0, top-p=1.0p = 1.0) with repetition penalty 1.1. We set max_new_tokens=8192 and max_model_len=8192 to bound generation length and total context length.

Key hyperparameters (summary)

ComponentSetting
SFT base modelQWEN3-1.7B
SFT supervisionNEMOTRON-253B trace
SFT epochs / LR2 / 2×10−42 \times10^{-4}
SFT batch / accum1 / 16
SFT max seq len4096
SFT LR schedulecosine, warmup ratio 0.03
LoRAr=16r = 16, α=32\alpha= 32, dropout 0.05, all-linear
Curriculumτ0=0.15\tau_0 = 0.15, τ1=0.6\tau_1 = 0.6, ϵ=0.05\epsilon= 0.05
Inference enginevLLM (batched decoding)
Prompt modechat template, enable_thinking=True
Decodinggreedy (T=0T = 0), top-p = 1.0, rep. penalty 1.1
Max tokens / contextmax_new_tokens=8192, max_model_len=8192
vLLM runtimebf16, gpu_mem_util=0.90, batch size 32
Eval filterlen ∈[10,100]\in[10, 100], idx ∈[16,19]\in[16, 19], len mod 10 = 0

Table 15. SFT and inference configurations used in our experiments.

Effectiveness of SFT

Figure 4 validates that our SFT setup learns non-trivial signal from the teacher traces. Across almost all seen algorithms (left of the dashed line), the SFT model achieves substantially higher accuracy on seen instances (training split) than on unseen instances (held-out split), indicating that fine-tuning meaningfully adapts the base model to this problem family rather than producing random or degenerate outputs. Moreover, curriculum-based sampling consistently improves performance over random-order SFT on the held-out split for most algorithms, suggesting better generalization instead of merely overfitting to the training instances. Finally, on unseen algorithms (right of the dashed line), curriculum SFT yields noticeably stronger transfer than random-order SFT, supporting our claim that the curriculum improves robustness to distribution shift.

Accuracy comparison of random-order SFT and curriculum SFT on seen and unseen algorithms

Figure 4. SFT learns and curriculum improves generalization. Accuracy on seen (training-split) vs. unseen (held-out) instances for each algorithm. Bars compare random-order SFT and curriculum SFT (complexity-based weighted sampling) evaluated on both splits. The dashed line separates algorithms included in SFT training (seen algorithms) from algorithms excluded from training (unseen algorithms). SFT yields higher accuracy on seen instances than unseen instances for seen algorithms, confirming effective adaptation, while curriculum SFT improves held-out performance and transfers better to unseen algorithms.

References

  1. [1]Sandhini Agarwal, Lama Ahmad, Jason Ai, Sam Altman, Andy Applebaum, Edwin Arbus, Rahul K Arora, Yu Bai, Bowen Baker, Haiming Bao, et al. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025.arxiv.org/abs/2508.10925
  2. [2]AoPSOnline. Aops wiki: Competition ratings. https://artofproblemsolving.com/wiki/index.php/AoPS_Wiki:Competition_ratings, 2009. Accessed: 2026-01-28.
  3. [3]Sanjeev Arora and Boaz Barak. Computational complexity: a modern approach. Cambridge University Press, 2009.
  4. [4]Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th International Conference on Machine Learning, 2009.DOI
  5. [5]Akhiad Bercovich, Itay Levy, Izik Golan, Mohammad Dabbah, Ran El-Yaniv, Omri Puny, Ido Galil, Zach Moshe, Tomer Ronen, Najeeb Nabwani, et al. Llama-metron: Efficient reasoning models. arXiv preprint arXiv:2505.00949, 2025.arxiv.org/abs/2505.00949
  6. [6]Satwik Bhattamishra, Arkil Patel, and Navin Goyal. On the computational power of transformers and its implications in sequence modeling. In Conference on Computational Natural Language Learning, 2020.arxiv.org/abs/2006.09286
  7. [7]Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Advances in Neural Information Processing Systems, 2020.arxiv.org/abs/2005.14165
  8. [8]Xingyu Chen, Jiahao Xu, Tian Liang, Zhiwei He, Jianhui Pang, Dian Yu, Linfeng Song, Qiuzhi Liu, Mengfei Zhou, Zhuosheng Zhang, Rui Wang, Zhaopeng Tu, Haitao Mi, and Dong Yu. Do NOT think that much for 2+3=? on the overthinking of long reasoning models. In International Conference on Machine Learning, 2025.
  9. [9]Cheng-Han Chiang and Hung-Yi Lee. Over-reasoning and redundant calculation of large language models. In European Chapter of the Association for Computational Linguistics, 2024.arxiv.org/abs/2401.11467
  10. [10]Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, et al. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261, 2025.arxiv.org/abs/2507.06261
  11. [11]Stephen A. Cook. The complexity of theorem-proving procedures. In Proceedings of the Third Annual ACM Symposium on Theory of Computing, 1971.DOI
  12. [12]Mehul Damani, Idan Shenfeld, Andi Peng, Andreea Bobu, and Jacob Andreas. Learning how hard to think: Input-adaptive allocation of LM computation. In International Conference on Learning Representations, 2025.arxiv.org/abs/2410.04707
  13. [13]Mucong Ding, Chenghao Deng, Jocelyn Choo, Zichu Wu, Aakriti Agrawal, Avi Schwarzschild, Tianyi Zhou, Tom Goldstein, John Langford, Animashree Anandkumar, et al. Easy2hard-bench: Standardized difficulty labels for profiling llm performance and generalization. Advances in Neural Information Processing Systems, 37, 2024.arxiv.org/abs/2409.18433
  14. [14]Soumya Suvra Ghosal, Souradip Chakraborty, Avinash Reddy, Yifu Lu, Mengdi Wang, Dinesh Manocha, Furong Huang, Mohammad Ghavamzadeh, and Amrit Singh Bedi. Does thinking more always help? mirage of test-time scaling in reasoning models. In Advances in Neural Information Processing Systems, 2025.arxiv.org/abs/2506.04210
  15. [15]Juris Hartmanis and Richard E Stearns. On the computational complexity of algorithms. Transactions of the American Mathematical Society, 117, 1965.DOI
  16. [16]Zhiwei He, Tian Liang, Jiahao Xu, Qiuzhi Liu, Xingyu Chen, Yue Wang, Linfeng Song, Dian Yu, Zhenwen Liang, Wenxuan Wang, Zhuosheng Zhang, Rui Wang, Zhaopeng Tu, Haitao Mi, and Dong Yu. Deepmath-103k: A large-scale, challenging, decontaminated, and verifiable mathematical dataset for advancing reasoning. In International Conference on Learning Representations, 2026.arxiv.org/abs/2504.11456
  17. [17]Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, et al. Gpt-4o system card. arXiv preprint arXiv:2410.21276, 2024.arxiv.org/abs/2410.21276
  18. [18]Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aidan Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024.arxiv.org/abs/2412.16720
  19. [19]Hongjian Jiang, Michael Hahn, Georg Zetzsche, and Anthony Widjaja Lin. Softmax transformers are turing-complete. In International Conference on Learning Representations, 2026.arxiv.org/abs/2511.20038
  20. [20]Richard M. Karp. Reducibility among Combinatorial Problems. Springer US, 1972.
  21. [21]Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. In Advances in Neural Information Processing Systems, 2022.arxiv.org/abs/2205.11916
  22. [22]Ayeong Lee, Ethan Che, and Tianyi Peng. How well do LLMs compress their own chain-of-thought? a token complexity approach. arXiv preprint arXiv:2503.01141, 2025a.arxiv.org/abs/2503.01141
  23. [23]Bruce W Lee, Hyunsoo Cho, and Kang Min Yoo. Instruction tuning with human curriculum. In Findings of the Association for Computational Linguistics: NAACL 2024, 2024.arxiv.org/abs/2310.09518
  24. [24]Kuang-Huei Lee, Ian Fischer, Yueh-Hua Wu, Dave Marwood, Shumeet Baluja, Dale Schuurmans, and Xinyun Chen. Evolving deeper LLM thinking. arXiv preprint arXiv:2501.09891, 2025b.arxiv.org/abs/2501.09891
  25. [25]Do Xuan Long, Ngoc-Hai Nguyen, Tiviatis Sim, Hieu Dao, Shafiq Joty, Kenji Kawaguchi, Nancy F. Chen, and Min-Yen Kan. LLMs are biased towards output formats! systematically evaluating and mitigating output format bias of LLMs. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), 2025.arxiv.org/abs/2408.08656
  26. [26]Niklas Muennighoff, Zitong Yang, Weijia Shi, Xiang Lisa Li, Li Fei-Fei, Hanneah Hajishirzi, Luke Zettlemoyer, Percy Liang, Emmanuel Candès, and Tatsunori Hashimoto. s1: Simple test-time scaling. In Empirical Methods in Natural Language Processing, 2025.arxiv.org/abs/2501.19393
  27. [27]Jorge Pérez, Pablo Barceló, and Javier Marinkovic. Attention is turing-complete. Journal of Machine Learning Research, 22, 2021.
  28. [28]Matthew Renze and Erhan Guven. The benefits of a concise chain of thought on problem-solving in large language models. In 2024 2nd International Conference on Foundation and Large Language Models (FLLM), 2024.
  29. [29]Michael Sipser. Introduction to the Theory of Computation. International Thomson Publishing, 1996.DOI
  30. [30]Lena Strobl, William Merrill, Gail Weiss, David Chiang, and Dana Angluin. What formal languages can transformers express? a survey. Transactions of the Association for Computational Linguistics, 12, 2024.
  31. [31]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, 2017.arxiv.org/abs/1706.03762
  32. [32]Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations, 2023.arxiv.org/abs/2203.11171
  33. [33]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems, 2022.arxiv.org/abs/2201.11903
  34. [34]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Cheng-en Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.arxiv.org/abs/2505.09388
  35. [35]Duzhen Zhang, Zhong-Zhi Li, Ming-Liang Zhang, Jiaxin Zhang, Zengyan Liu, Yuxuan Yao, Haotian Xu, Junhao Zheng, Xiuyi Chen, Yingying Zhang, Fei Yin, Jiahua Dong, Zhijiang Guo, Le Song, and Cheng-Lin Liu. From system 1 to system 2: A survey of reasoning large language models. IEEE Transactions on Pattern Analysis & Machine Intelligence, 48, 2026.arxiv.org/abs/2502.17419
  36. [36]Hongli Zhou, Hui Huang, Ziqing Zhao, Lyuyuan Han, Huicheng Wang, Kehai Chen, Muyun Yang, Wei Bao, Jian Dong, Bing Xu, et al. Lost in benchmarks? rethinking large language model benchmarking with item response theory. In Proceedings of the AAAI Conference on Artificial Intelligence, 2026.
  37. [37]Ruiwen Zhou, Wenyu Hua, Liangming Pan, Sitao Cheng, Xiaobao Wu, En Yu, and William Yang Wang. Rulearena: A benchmark for rule-guided reasoning with llms in real-world scenarios. In Association for Computational Linguistics, 2025.
  38. [38]Yubo Zhu, Dongrui Liu, Zecheng Lin, Wei Tong, Sheng Zhong, and Jing Shao. The LLM already knows: Estimating LLM-perceived question difficulty via hidden representations. In Christos Christodoulopoulos, Tanmoy Chakraborty, Carolyn Rose, and Violet Peng (eds.), Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, 2025.arxiv.org/abs/2509.12886

Paper details

vlnc:W_5y44wzvt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents