How to Evaluate Mathematical Reasoning in Large Language Models: From Benchmark Design to Cost Trade-offs

    Mathematical reasoning is one of the most objective ways to measure LLM capability, but a credible evaluation requires more than a single accuracy score. This article explains how to build a benchmark that resists data contamination, how to verify results and reasoning chains, how to handle open problems and proof tasks, and how to measure token cost and latency so that comparisons across models remain fair and reproducible.

    Why Use Mathematical Reasoning to Measure Model Capability

    Math problems usually have verifiable answers, and their reasoning steps can be checked one by one. This makes them a more objective signal than open-ended writing. For developers, mathematical reasoning also correlates closely with scenarios such as code generation, constraint solving, and data analysis. A complete evaluation must answer three questions: Can the model reach the correct conclusion? Is the derivation behind that conclusion trustworthy? And are the compute and time costs acceptable?

    Building the Benchmark

    The benchmark determines how far your conclusions generalize. Pay attention to the following points when constructing it.

    1. Coverage. Problems should span algebra, number theory, combinatorics, geometry, and analysis, and should be stratified by difficulty—from basic computation to problems requiring multi-step derivations. Testing only one domain biases the conclusions toward that domain.

    2. Recency and data contamination. A model’s training data may already contain problems and solutions from public problem sets. Using newly released problems published after the model’s training cutoff, or applying equivalent transformations to known problems (changing numerical values, renaming variables, rephrasing the problem statement), reduces the impact of contamination.

    3. Annotation quality. Every problem needs a reference answer and grading rules. When answers have multiple equivalent forms, the rules should be specified in advance—for example, which simplified forms are allowed and what approximation precision is acceptable.

    4. Sample size. Model outputs are stochastic, so a single run is unstable. Sampling the same problem multiple times and reporting the pass rate along with its variance is more reliable than reporting a single result. Below is a schematic sampling evaluation loop:

    1. for problem in benchmark:
    2. for run in range(K): # sample the same problem K times
    3. answer, trace = model.solve(problem.statement, temperature=t)
    4. verdict = judge(answer, problem.reference)
    5. record(problem.id, run, verdict, tokens_used, latency)
    6. report = aggregate(records) # output pass rate, mean, and std deviation

    Verifying the Results

    Automatic grading works well for numerical answers and formalizable multiple-choice questions. For proof problems, string matching cannot tell whether an argument holds; human review or formal verification is required.

    For human review, use two independent graders and compute inter-rater agreement (for example, the kappa coefficient). Samples with large disagreement go to a third reviewer for adjudication, and the adjudication rationale should be recorded for later auditing. A review checklist can include:

    • Is the final conclusion correct?
    • Are the key steps complete, with no skipped steps?
    • Is there any circular reasoning?
    • Do the cited theorems or propositions actually exist, and are their applicability conditions satisfied?

    Quality of the Reasoning Process

    A correct final answer does not imply reliable reasoning. Common problems include skipping key lemmas and jumping straight to a conclusion, citing unproven propositions as justification, and quietly altering the problem’s assumptions at a critical step. The length of a reasoning chain also does not directly indicate capability—an overly long derivation may simply take a detour.

    Check the reasoning process at three levels:

    • Step verifiability. Can each step be strictly derived from known theorems or the given conditions?
    • Premise consistency. Are the assumptions self-consistent throughout, without conditions being silently strengthened midway?
    • Self-correction. After detecting an intermediate error, can the model backtrack and fix it, rather than forcing a conclusion?

    Checking reasoning processes is expensive, so start with sampled inspection and expand the scope based on the types of errors found.

    Open Problems and Proof Tasks

    For problems without known solutions, the evaluation focus shifts from “produce the correct answer” to “produce a checkable argument.” Keep the following in mind:

    • Have domain experts confirm that the problem is genuinely unsolved, to avoid misclassifying an existing result in the literature as a new contribution.
    • Verify each argument in the output one by one, and try to locate corresponding sources in authoritative references.
    • Record the degree of human intervention honestly. If the output only holds after substantial expert completion, it should be labeled as assisted work, not independent accomplishment.

    Cost and Latency

    Beyond capability, you also need to measure the investment. Common metrics include:

    • Average tokens per problem: reflects compute overhead and is the main cost driver in pay-per-use scenarios.
    • Time to first token and total latency: directly affects the interactive experience, especially for long reasoning tasks.
    • Output tokens per second (throughput): heavily influenced by deployment hardware, batching strategy, and the inference framework, so it varies greatly across environments. Always state the hardware and software configuration when reporting it; otherwise the numbers are not comparable.
    • Cost per correct problem: divide total spend by the number of correct answers to compare cost-effectiveness between models of similar capability.

    An example: suppose an evaluation runs 100 problems, gets 60 correct, and consumes 12 million tokens in total. The cost per correct problem is then about 200,000 tokens. This figure only reflects that particular run—it may differ significantly with a different problem set or sampling parameters—so it should always be reported together with the accuracy rate rather than used alone as a selection criterion.

    Practical Recommendations

    1. Define the scenario first. Whether the evaluation serves model selection, regression testing, or exploratory research determines how each metric is weighted.
    2. Fix the benchmark and update it periodically. A fixed problem set makes results comparable over time, while regularly adding new problems guards against data contamination.
    3. Record the three metric categories separately. Accuracy, process quality, and cost should each be logged independently before making a combined judgment, so that no single metric masks problems in the others.
    4. Keep raw outputs and grading records. This makes it easy to re-examine disputed samples and to recompute results if the grading rules change later.
    5. Do not substitute a one-off experience for a systematic evaluation. Personal impressions can help surface issues, but they are not a valid basis for capability conclusions.