How to Scientifically Evaluate Large Language Models' Mathematical Reasoning

    A practical, methodology-first guide to evaluating the mathematical reasoning ability of large language models (LLMs). It breaks down the core challenges of math evaluation, defines a four-tier capability framework spanning basic computation to formal verification, and explains how to build contamination-resistant task sets. It then presents a three-level scoring system that combines objective checks, model-as-judge review, and expert adjudication, together with cost and efficiency metrics such as cost per valid output and token efficiency. Finally, it covers inference performance and deployment economics and outlines how to turn evaluation into a reproducible, regression-capable pipeline.

    Introduction: Why Mathematical Ability Can’t Be Judged by “Feel”

    Recently, a long-context large model’s performance on mathematical tasks sparked community discussion. Some users reported that with a single prompt—roughly, “prove a proposition from a public mathematics reference and output it in lecture-note form”—they could obtain a set of lecture notes of fairly high quality, while consuming only about 2% of their monthly subscription quota. Other discussions pointed out that some high-performance inference clusters can already push single-rack throughput to the order of hundreds of tokens/s.

    These discussions show that a model’s mathematical ability is no longer just about whether the calculations are accurate. It simultaneously involves proof quality, reasoning stability, the cost of a single task, and service performance under large-scale deployment. Many teams share the same feeling: an expensive model is expensive for a reason, yet it is hard to prove that it is necessarily the more suitable choice. At the root of this is the lack of a reproducible, quantifiable evaluation method.

    This article does not rank any specific model. Starting from evaluation methodology, it breaks down the dimensions for assessing mathematical reasoning ability and provides an evaluation process that can be put into practice directly.

    The Core Challenges of Mathematical Reasoning Evaluation

    Mathematical tasks are naturally “black and white” when it comes to correctness, which paradoxically makes them more complex to evaluate than open-ended writing.

    1. Results are verifiable, but processes are hard to verify: Numerical answers and equation solutions can usually be compared automatically. But a proof can run to thousands of words, and a single invalid inference is enough to undermine a conclusion that otherwise looks complete.
    2. The difficulty range is wide: Arithmetic and word problems, competition problems, research-level open propositions, and formalized proof code belong to entirely different capability tiers. Leading at one tier does not mean performing equally well at another.
    3. Susceptible to “memorization”: If the training data contains a problem together with its solution, the model may simply reproduce it rather than genuinely reason, which inflates scores.
    4. Cost and quality are entangled: Reasoning models often trade longer thinking for higher accuracy, and long chains of thought bring significant token consumption and latency.

    For these reasons, evaluation should not stop at “did it get the right answer.” It should systematically address four layers: task design, scoring criteria, cost constraints, and performance.

    Tiered View: Four Levels of Mathematical Reasoning Ability

    • (L1) Basic computation and algebraic solving: Equations, inequalities, limits, matrix operations, and the like, testing the accuracy of symbolic and numerical computation.
    • (L2) Competition and applied problems: Multi-step problems that test the selection of solution strategies, the chaining of intermediate steps, and the application of common techniques.
    • (L3) Research-level mathematics and proof writing: Requires integrating knowledge across multiple domains, constructing new arguments, and organizing output according to academic-paper or lecture-note conventions, testing the depth and breadth of knowledge.
    • (L4) Formalization and engineering verification: Translating natural-language proofs into formal languages verified by proof checkers, or generating and verifying mathematics-related code, testing the rigor of logical reasoning.

    Generally speaking, most mainstream models perform stably at L1 and L2, begin to diverge noticeably at L3, and are concentratedly tested on logical rigor at L4. Clarifying the target level before evaluation helps avoid mismatches such as “measuring research ability with competition problems.”

    Task Set Design: Making Evaluation Resistant to “Memorization”

    A high-quality task set is the prerequisite for trustworthy evaluation. It can be approached from the following six angles.

    • Resist training contamination: Prefer problems published after the model’s training cutoff date. Apply equivalent transformations to existing problems—changing parameters, adjusting the strength of conditions, rewriting the narrative order—and observe whether the model can transfer rather than reproduce. Also record the score gap between original and variant versions; this gap roughly reflects the degree of “memory dependence.”
    • Introduce propositions with “no ready-made solution”: Many public mathematics references state only the proposition without providing a complete proof. Such problems cannot be answered by simply retrieving an existing solution, making them a natural testing ground for distinguishing “reasoning-type” from “reproduction-type” models. The lecture-note example in the community discussion used exactly this kind of proposition as the task.
    • Use uniform, minimalist prompts: In the community example, the prompt only asked to prove the proposition and output it in lecture-note form, with no step-by-step guidance and no reference approach. This is close to real-world usage and effectively tests the model’s autonomous reasoning ability. If you switch to a carefully designed step-by-step prompt, you are mainly testing instruction-following and collaboration, and the two should be tracked separately.
    • Cover multiple domains with a difficulty gradient: Include problems in algebra, analysis, combinatorics, number theory, geometry, and other fields, with enough samples at each difficulty level to ensure statistical significance.
    • Add error-correction and adversarial samples: Deliberately provide propositions or steps that contain errors, and observe whether the model can identify the problem and refuse or correct it rather than deriving along the flawed premise. This is a key indicator of a model’s “critical” ability.
    • Fix the output format: Specify formula formatting and proof structure in the prompt. For example, each lemma is stated first, then proved, followed by the overall proof approach, which makes subsequent automated or manual scoring easier.

    Scoring Methods: From “Right or Wrong” to “Does the Proof Hold”

    A three-level scoring system of “objective checks + model-as-judge + expert spot checks” is recommended, consisting of four steps.

    1. Objective judgment at the answer level: For items with standard answers, compare the final result symbolically or numerically. When multiple valid solutions exist, the acceptable solution set should be declared in advance in the task set.
    2. Item-by-item review at the process level: A reviewer model reviews step by step against a unified scorecard. Core checkpoints include:
      • Whether there is circular reasoning (using the conclusion to be proved to prove itself);
      • Whether the preconditions of a theorem are misused or relaxed;
      • Whether special and boundary cases are omitted;
      • Whether key lemmas have a reliable source or a complete proof.
    3. Cross-validation at the consistency level: Have the reviewer model independently give a “holds / does not hold / uncertain” judgment with reasoning, then compare the conclusions of multiple reviewers. Samples with disagreement all enter a queue for expert review.
    4. Multiple sampling at the stability level: Generate the same item independently multiple times and measure the following three metrics:
      • First-pass accuracy (the proportion correct on a single generation);
      • Pass@k (the proportion correct in at least one of k attempts, reflecting the capability ceiling);
      • Consistency across multiple results (reflecting stability).

    Mathematics experts only need to make final decisions on a small number of disagreement samples and spot-check samples, which keeps review costs under control.

    1. Evaluation target: A mathematical reasoning model
    2. Task description: L3 research-level mathematics, 10 problems, each generated independently 5 times
    3. Scorecard:
    4. C1 Conclusion correct: Whether the final answer or main theorem statement matches the reference answer (0/1)
    5. C2 Reasoning valid: Whether every derivation step is justified, with no circular reasoning (0~2)
    6. C3 Complete coverage: Whether all cases, boundary conditions, and exceptions are discussed (0~2)
    7. C4 Clear presentation: Clear proof structure and readable formula formatting (0~1)
    8. Review method: 2 reviewer models score independently and cross-review;
    9. disagreement samples go to a mathematics expert for final adjudication
    10. Summary metrics:
    11. First-pass accuracy = number of problems passing all checks on the first generation / total problems
    12. Pass@5 = number of problems passing at least once in 5 attempts / total problems
    13. Stability = proportion of problems with consistent conclusions across multiple generations
    14. Composite score = mean over problems of (C1×0.5 + C2×0.25 + C3×0.15 + C4×0.1)

    If some propositions can be translated into a formal language, a proof checker can automatically give a deterministic “pass / fail” verdict, reducing the uncertainty of reviewer models.

    One point deserves special attention: when the same model acts as both generator and reviewer, it tends to favor its own reasoning habits. Therefore, the reviewer model should differ clearly from the model under test in architecture or training data. Highly disputed conclusions cannot rely on model review alone and must be backed by domain experts.

    Cost and Efficiency: Turning “Expensive for a Reason” into Quantifiable Metrics

    Many users are willing to pay a premium for high-quality models, on the premise that costs are predictable and returns are measurable. The following metrics are worth tracking closely:

    • Cost per valid output: Total cost divided by the number of samples that pass all checks. It measures “how much it costs to obtain one usable proof,” rather than the price per million tokens.
    • Quota consumption rate: Following the community’s quantitative idea that “one set of lecture notes consumes about 2% of the monthly quota,” estimate the share of different task types within a monthly subscription quota to inform budget allocation.
    • Token efficiency: The proportion of effective reasoning content in the actual output. A chain of thought is not better the longer it is; repeated derivations and futile attempts consume compute as well.
    • End-to-end latency: Time to first token and total generation time. Long chains of thought significantly lengthen the wait and hurt the interactive experience.
    • Correction rate: The proportion of cases that require additional user follow-up or manual correction to pass. This metric directly corresponds to the hidden cost in real usage.

    In practice, a “tiered routing” strategy can be adopted:

    • Route basic computation and routine problems to lightweight models;
    • Route research-level proofs and formalization tasks to models with stronger reasoning ability.

    By estimating problem difficulty or judging from first-round confidence, you can decide when to escalate to a stronger model, balancing quality and cost.

    Inference Performance and Deployment Economics

    Another focus of the community discussion is inference performance on the deployment side. Some have noted that on certain high-performance inference clusters, a single rack can push the generation throughput of such models to hundreds of tokens/s. This figure alone shows that beyond capability, there is also a choice of deployment approach.

    • Impact of architectural differences: A large total parameter count does not mean every token activates all parameters. Take the mixture-of-experts (MoE) architecture as an example: each token activates only part of the expert networks, so the compute per token can be significantly lower than that of a dense model of the same scale. But expert weights still need to stay resident in GPU memory, and memory capacity is often the real bottleneck for deployment scale.
    • Key factors affecting throughput: Batch size, context length, parallelism strategy, and interconnect bandwidth all affect tokens/s. Mathematical reasoning tasks commonly require long contexts, and multiple samples of the same task can be merged into a batch; using continuous batching can markedly improve overall throughput.
    • The tradeoff between quantization and precision: Low-bit quantization can reduce memory usage and boost throughput, but may weaken the stability of multi-step reasoning. The evaluation set should be re-run both before and after quantization to confirm that capability has not degraded noticeably.

    When choosing a deployment model, weigh the following factors:

    • Self-built clusters: When concurrency is high and utilization is high, the cost per token is more favorable, but you must bear hardware procurement, elastic scaling, and operations costs.
    • Cloud-based API calls: When concurrency fluctuates or you are in a validation phase, using cloud services on demand is more flexible.

    Whichever approach you choose, you can round out the engineering system with general cloud capabilities:

    • Use object storage to centrally manage evaluation datasets, model artifacts, and evaluation reports, keeping versions traceable;
    • Use a container platform to spin up inference services on demand and handle traffic fluctuations;
    • Use a logging service to retain inference traces, making it easy to review failed cases;
    • Use monitoring and alerting to track changes in throughput, latency, and cost in real time.

    For example, Baidu AI Cloud can combine the above capabilities into a complete toolchain spanning data management, inference deployment, and runtime monitoring. Specific choices and capacity planning should be assessed against your actual workload.

    Engineering Practice: Turning Evaluation into a Reproducible Pipeline

    A one-off evaluation can only answer “how does it perform now,” while continuous evaluation can answer “is it better after the upgrade.” A pipeline is recommended, built around the following six stages:

    1. Dataset management: Put tasks, reference answers, and scorecards all under version control, and record the dataset version for each evaluation, so results can be traced and reproduced.
    2. Configurable runs: Parameterize everything about the subject under test (model version, inference parameters, prompt templates, deployment approach) to avoid “changing the prompt but assuming the model improved.”
    3. Tiered sampling: For new tasks, first draw a small sample for quick validation, then run the full set after it passes, reducing wasted overhead.
    4. Result archiving: Fully preserve inputs, outputs, reasoning traces, scoring details, and cost data, making it easier to locate problems and optimize prompts.
    5. Regression baseline: Set admission thresholds for each task type (e.g., first-pass accuracy and stability floors). Automatically re-run after a new version is released or inference parameters are adjusted, and alert promptly when metrics regress.
    6. Continuous iteration: Periodically add new problems and adversarial samples to prevent the task set from being “gamed” or gradually becoming outdated.

    Common Pitfalls and How to Avoid Them

    • Judging by a single leaderboard: Public leaderboard problems may already be in the training data, and different evaluations use inconsistent prompts and sampling strategies, so scores should not be compared directly across the board. Validate on tasks close to your own business.
    • Looking only at the final answer: The probability of “guessing” the right answer in math problems is not zero, and an invalid process is more concerning than a wrong answer.
    • Ignoring context and prompts: Small changes in how a prompt is written can cause large swings in results. When comparing different models, you must fix the same set of prompts and inference parameters.
    • Using models to evaluate models: Reviews without domain-expert involvement tend to amplify systematic bias, and disputed samples must receive human final review.
    • Chasing “longer is better”: Overly long chains of thought can bring repetition, off-topic drift, or even internal contradictions, so they should be judged in combination with cost per valid output.

    Conclusion

    Evaluating a large model’s mathematical reasoning ability essentially comes down to answering three questions:

    • Can it solve the problems correctly?
    • Can it keep solving them correctly at an affordable cost and acceptable level of stability?
    • Under real deployment conditions, can it carry the business load with suitable performance?

    The tiered framework, tiered task sets, multi-level scoring, cost metrics, and regression pipeline presented in this article are all meant to turn these three questions into measurable, reproducible engineering metrics. Whether you are assessing the cost-effectiveness of a subscription service or planning the capacity of a self-built inference cluster, adhering to the principles of “small closed loops, reproducibility, and regression” is what enables data-backed technical decisions in an environment where models iterate rapidly.