LLM Math Benchmarking: Evaluating the Capability Gap Between Open-Source Chinese Models and Top Closed-Source Models

    This article presents a practical framework for evaluating the mathematical capability gap between open-source models from China and leading closed-source LLMs. Instead of relying on a single aggregate score, it recommends a layered capability profile, a controlled benchmark protocol, robust metrics such as pass@1, pass@k and majority@k, and statistical methods such as paired bootstrap confidence intervals to determine whether a reported gap is real. It also covers common pitfalls including training-data contamination, prompt and language bias, fragile answer grading, inconsistent reporting, and single-run evaluation, and shows how to translate capability profiles into model-selection decisions and a three-layer evaluation pipeline.

    1. Why a Single Math Score Is Not Enough

    The question “How large is the math capability gap between open-source models from China and top closed-source models?” often does not have a useful answer if it is reduced to one number.

    Mathematical ability is not a single scalar. It includes several distinct components, such as arithmetic precision, multi-step reasoning, symbolic transformation, proof construction, and modeling. These components are not linearly correlated. A model that is 0.5 points ahead in an aggregate score may have a small advantage in only one sub-area, or the difference may fall within measurement noise.

    Some evaluation dashboards now split candidate models into dozens of fine-grained tasks and report wins and losses item by item. This is often more informative than a single total score, because the same group of models may perform very differently across task families. One model may lead slightly on some tasks, open a clear gap on others, and fall behind on a few. This is a typical sign of different capability profiles, not uniform dominance by one side.

    There are three common misreadings:

    • Ranking by aggregate score only: This ignores the fact that different tasks have different weights in the total score. The weight of general question-answering tasks and multi-step math reasoning tasks in the total score may not match your business needs.
    • Ranking by one single item: A small lead on one item may lack statistical significance.
    • Ignoring comparability assumptions: If model version, prompt template, sampling temperature, or grading rules differ, two scores cannot be compared directly.

    Therefore, the core idea of this article is:

    A capability gap is not one number. It is a capability profile plus a set of confidence intervals.

    The following sections explain how to construct this profile and how to compute these intervals.


    2. Layered Capability Model: Five Levels of Math Ability

    Before designing an evaluation, it is useful to break “math capability” into observable layers. The following table provides a general framework:

    Level Capability Typical tasks Common failure modes Recommended metrics
    L1: Computational precision Multi-digit arithmetic, fractions and percentages, unit conversion Long-chain calculations, complex word problems Mid-process calculation errors; correct reasoning but wrong final result Final answer accuracy, intermediate step accuracy
    L2: Multi-step reasoning Algebraic equations, geometry, combinatorics, probability Competition-style problems, multi-condition word problems Broken reasoning chains, missing implicit conditions pass@1, pass@k, per-question accuracy
    L3: Formalization and proof Symbolic transformation, inequalities, proof construction Proof tasks, identity derivations Logical jumps, circular reasoning, unverifiable conclusions Process scoring, formal verification pass rate
    L4: Tool-assisted reasoning Calling calculators or symbolic tools to complete solutions Equation solving, numerical optimization, complex integration Wrong tool selection, incorrect parameter construction End-to-end accuracy, tool-call accuracy
    L5: Modeling and implementation Converting real-world problems into mathematical models and coding solutions Operations research, statistical analysis, numerical simulation Poor model assumptions, mismatch between code and solution method Consistency with baseline solutions, code execution pass rate

    A layered evaluation helps answer an important question: where exactly does the gap come from?

    For example:

    • If an open-source model lags at L1, the issue may be numerical stability. This can often be mitigated by adding step-by-step verification or external calculation tools, at a manageable engineering cost.
    • If the gap is concentrated at L3, it may indicate insufficient ability to organize complex logic. This is usually harder to compensate through engineering alone.
    • If L4 and L5 perform well, the model may have strong tool-assisted problem-solving ability. This is valuable in real workflows but is not always measured by pure text-based math tasks.

    This table is a method framework, not a measurement conclusion. The actual performance of a specific model at each level must come from real evaluation results and cannot be inferred merely from the number of levels.


    3. Evaluation Protocol: Making Two Scores Comparable

    3.1 Dataset Design

    • Difficulty stratification: Sample questions across easy, medium, hard, and extremely hard levels. Avoid concentrating questions in one difficulty band. Otherwise, the evaluation may hit ceiling effects or lose discriminative power.
    • Question-type mix: Configure question types according to business needs. The main body should be questions with unique answers and automatic grading, supplemented by a small number of process-graded questions.
    • Grading rules: Clearly define whether equivalent forms are accepted, whether partial credit is given, and whether tool-call time is counted.
    • Private held-out set: Keep a portion of questions that are never made public and are rotated periodically. This helps detect training-data contamination, as discussed in Section 5.

    3.2 Sampling and Decoding Configuration

    • Fix random seeds where the API supports them, so experiments can be reproduced.
    • Use the same sampling parameters. If the evaluation has two goals, such as measuring capability ceiling and measuring stability, different temperatures may be used for those purposes, but the same round of comparison must keep them consistent.
    • Fix the maximum generation length to avoid “false errors” caused by truncation.

    3.3 Prompt and Multilingual Settings

    • All candidate models should use the same prompt template, with zero-shot, few-shot, or chain-of-thought settings clearly specified.
    • For open-source models from China and overseas models, run one round with Chinese prompts and one round with English prompts. Language preference differences may systematically affect results. If this is not measured separately, it can easily be misread as a capability difference.

    3.4 Core Metrics

    Metric Definition Applicable scenario
    pass@1 Proportion of cases that pass grading with a single generation Routine capability comparison
    pass@k Proportion of questions where at least one of n samples passes Evaluating potential upper bound
    majority@k Accuracy after majority voting over multiple samples Deployment scenarios close to majority voting
    Per-difficulty accuracy Accuracy calculated separately for each difficulty level Locating the source of the gap

    The unbiased estimator for pass@k is shown below. Suppose each question is sampled n times and passes c times. Under consistent sampling conditions:

    1. from math import comb
    2. def pass_at_k(n: int, c: int, k: int) -> float:
    3. """Unbiased estimate of pass@k: the probability that at least k of n samples pass."""
    4. if n - c < k:
    5. return 1.0
    6. return 1.0 - comb(n - c, k) / comb(n, k)
    7. # Illustrative only; these numbers do not represent any real evaluation result.
    8. samples = [[7, 10, 3, 10, 8, 2] for _ in range(100)] # 100 questions, 6 samples per question
    9. for k in (1, 5):
    10. per_question = [pass_at_k(len(s), sum(s), k) for s in samples]
    11. print(f"pass@{k} = {sum(per_question) / len(per_question):.3f}")

    3.5 Hypothetical Example: What a Capability Profile Looks Like

    A common observation is that in a comprehensive dashboard with dozens of tasks, two models, A and B, win and lose different items. For example, model A may lead on about 80% of tasks, with some leads narrow, some clear, and a few clear losses.

    The following is a hypothetical example. The numbers only demonstrate the calculation and presentation logic and do not represent any real model or real evaluation result:

    Metric Model A Model B Difference (A - B)
    Task 1: terminal operation 44.4 42.3 +2.1: close
    Task 2: 3D modeling 37.1 32.3 +4.8: clear gap
    Task 3: backend development 45.1 37.3 +7.8: clear gap
    Task 4: model knowledge 28.1 36.3 -8.2: clear lag
    Task 5: web browsing 78.9 78.8 +0.1: effectively tied
    Total across 34 tasks 27 wins 7 losses -

    This example illustrates three points:

    1. Mixed wins and losses are normal. Even when two models differ in overall strength, one may clearly dominate on some task families.
    2. Task-family characteristics determine weights. Task 3 reflects backend engineering ability, while Task 4 reflects knowledge breadth. Their business importance is different, and they should not simply be added together.
    3. A very small lead should be treated as a tie. A difference of 0.1 points is usually within the noise range.

    4. Interpreting the Gap: Use Statistics to Decide Whether It Is Real

    4.1 Fluctuation Range of a Single Score

    Many math evaluation tasks use 0/1 grading. Suppose a model has accuracy p on n questions. Its standard error is approximately sqrt(p*(1-p)/n).

    When n = 500 and p is approximately 0.75, the standard error is about 1.9 percentage points. This means that the same model evaluated on two similarly difficult sets of questions may naturally show a difference of 2 to 3 percentage points.

    For the difference between two model accuracies, the standard error can be approximated as:

    SE = sqrt(SE_A² + SE_B²)

    For n = 500, this gives SE of about 2.7 percentage points. The one-sided 97.5th percentile is approximately:

    1.96 × SE ≈ 5.3 percentage points

    Only when the observed gap clearly exceeds this threshold can we have strong confidence that the gap is real.

    4.2 Paired Bootstrap: Test Whether the Gap Is Statistically Significant

    When two models are evaluated on the same set of questions, paired analysis should be used. First, resample the per-question score differences with replacement. Then compute the empirical distribution of the mean difference and check whether the confidence interval crosses zero.

    1. import random
    2. def paired_bootstrap(diff: list[float], n_boot: int = 10000,
    3. alpha: float = 0.05, seed: int = 42) -> tuple[float, float, float]:
    4. """Paired bootstrap: diff[i] is the score difference of model A versus model B on question i.
    5. Returns the mean difference and its (1-alpha) confidence interval."""
    6. rng = random.Random(seed)
    7. n = len(diff)
    8. means = []
    9. for _ in range(n_boot):
    10. s = 0.0
    11. for _ in range(n):
    12. s += diff[rng.randrange(n)]
    13. means.append(s / n)
    14. means.sort()
    15. lo = means[int(n_boot * alpha / 2)]
    16. hi = means[int(n_boot * (1 - alpha / 2)) - 1]
    17. return sum(diff) / n, lo, hi
    18. # Illustrative only; these numbers do not represent any real evaluation result.
    19. print(paired_bootstrap([1, 1, 0, 0, 0])) # (0.4, -0.2, 1.0)

    In this example, the 95% confidence interval is [-0.2, 1.0]. Because it crosses zero, we cannot conclude that A is better than B with such a small sample. Larger sample sizes produce narrower intervals and more reliable conclusions.

    4.3 Multiple Comparisons: More Sub-Tasks Mean More Accidental Leads

    When a dashboard contains dozens of tasks, even two models with comparable overall ability may show random leads on some tasks.

    This is similar to tossing 30 coins. The probability of all heads is very low, but the probability of getting more than 20 heads is not that small, roughly 2%.

    Therefore, when interpreting a dashboard, follow three principles:

    • Treat single-item wins or losses as clues, and judge them together with the size of the difference and the sample size.
    • Valuable conclusions usually come from systematic trends across task families, such as “consistently leading on code tasks” or “consistently lagging on knowledge tasks.”
    • When making significance judgments, methods such as Benjamini-Hochberg can be used to control the false discovery rate.

    4.4 A Large Gap Does Not Always Mean a Large Business Impact

    Some comparisons may show large score differences, such as winning only a few out of more than 30 tasks. Even then, it is important to distinguish between statistical significance and business importance.

    A real one-point gap may be irrelevant in high-reliability business scenarios, but it may determine success or failure in scenarios that pursue extreme performance. When interpreting results, always evaluate statistical significance and business importance separately.


    5. Common Pitfalls and Mitigations

    5.1 Training-Data Contamination

    Public math problems and their solutions are widely available in training corpora. Models may memorize answers instead of learning reasoning.

    Common signals include:

    • Abnormally high accuracy on old questions, but clear drops on new questions with the same structure and different values.
    • Highly consistent answers across multiple samples, yet the solution process fails step-by-step verification.

    Mitigations:

    1. Keep a private held-out set that is never disclosed to model providers and rotate it regularly.
    2. Use parameterized question templates that randomize values and contexts during generation.
    3. Verify model outputs at the step level, not just by checking final answers.

    5.2 Prompt and Language Bias

    The same question may produce noticeably different results under Chinese and English prompts. Few-shot example selection, whether chain-of-thought is encouraged, and format requirements can all affect outcomes. If one model receives a tuned prompt while another receives a default prompt, the comparison loses validity.

    Recommended practice:

    Use the same prompt set for all candidate models, and also run one tuned round for each model to compare “best-configuration performance.” This is closer to real deployment scenarios.

    5.3 Fragile Graders

    Mathematical answers have many equivalent forms: fractions versus decimals, different simplification levels, unit formats, and multiple valid solutions in different orders. Naive string matching can cause many false failures.

    Recommended practices:

    • Use symbolic equivalence logic instead of string matching.
    • Define comparison rules for answer sets when multiple solutions are allowed.
    • Manually review a sample of grading results to estimate the grader’s own error rate.

    5.4 Inconsistent Reporting

    Different reports may use different temperatures, sampling counts, tool-use settings, or chain-of-thought settings. Before comparing scores across reports, check the evaluation protocol. Results that cannot be verified should not be included in comparison.

    5.5 Single-Run Evaluation

    One evaluation run produces only one sample point. When conditions allow, repeat the evaluation 2 to 3 times with different random seeds and report both the mean and the fluctuation range.


    6. From Math Capability to Engineering Capability: Capability Profiles and Selection Decisions

    One important value of math evaluation is that it reflects how well a model performs on tasks requiring multi-step reasoning. However, math scores have only moderate correlation with capabilities such as code generation, intelligent-agent retrieval, and document generation.

    Returning to the example dashboard: model A clearly leads on code and 3D modeling tasks, but lags by almost ten points on model-knowledge tasks. If the business scenario is mainly knowledge question answering, selecting a model based only on math or code scores could lead to the wrong decision.

    Therefore, model selection should build a matrix matched to business needs:

    Business scenario Key task families Recommended weight Evaluation focus
    Intelligent coding assistant Backend development, terminal operation, defect repair High Engineering task accuracy, runnability
    Knowledge question-answering assistant Knowledge Q&A, long-document retrieval High Factual accuracy, traceability of citations
    Content production Document and presentation generation High Structural completeness, format compliance
    Data analysis Mathematical reasoning, modeling and implementation Medium-high Step accuracy, reproducibility of results

    At the cost and deployment level:

    • Open-source models: Can be deployed privately, fine-tuned, and kept within the organization’s environment. They are suitable for data-sensitive scenarios or scenarios with high requirements for cost control.
    • Closed-source models: Usually more mature in complex reasoning, but there are considerations around API cost, data compliance, and version stability.

    Many enterprises eventually use hierarchical routing: simple requests go to their own or open-source models, while complex requests are escalated to higher-capability models. Setting routing thresholds also depends on the layered evaluation results described earlier.


    7. Practical Implementation: A Three-Layer Evaluation Plan

    7.1 Layer 1: Public Benchmark Regression

    Purpose: quickly eliminate clearly unsuitable candidates during early selection.

    Practice: fix the evaluation script and prompts, run all candidate models on the same public benchmark, store the results, and record them with version control.

    7.2 Layer 2: Private Task Set

    Purpose: obtain judgments aligned with your own business and less affected by contamination.

    Construction steps:

    1. Collection: Extract real math and reasoning questions from historical conversations.
    2. Desensitization: Remove personal information, sensitive business data, and internal identifiers.
    3. Annotation: Have business experts provide standard answers and, when necessary, step-by-step explanations.
    4. Expansion: Use parameterized templates to generate similar new questions and increase scale.
    5. Rotation: Regularly add new questions and retire questions that have already become public.

    Suggested grading priority: automatic grading first, with spot checks and manual review as fallback.

    7.3 Layer 3: End-to-End Scenario Evaluation

    Purpose: verify the real value of a model in a complete workflow.

    Practice: construct tasks that are close to real processes. For example: “Given a requirements document, generate a calculation script with formulas and run it to obtain results.”

    The metrics should include not only whether the final answer is correct, but also:

    • First-pass success rate;
    • Number of human interventions;
    • End-to-end latency;
    • Cost per task.

    7.4 Example Pipeline Configuration

    The following pseudo-configuration describes the core elements of an evaluation pipeline. Field names can be adjusted according to the actual platform:

    1. eval_run:
    2. name: math_reasoning_v1 # experiment name for archiving and comparison
    3. suite: [public_bench, private_math, e2e_scenarios]
    4. prompts:
    5. language: [zh, en] # one round for Chinese prompts and one for English prompts
    6. template: cot_default # the same template for all candidate models
    7. sampling:
    8. temperature: 0.0
    9. top_p: 1.0
    10. max_tokens: 4096
    11. seeds: [1, 2, 3] # repeated runs to assess fluctuation
    12. candidates:
    13. - name: open_source_a # use aliases to avoid subjective priors
    14. endpoint: <inference-service-endpoint>
    15. - name: open_source_b
    16. endpoint: <inference-service-endpoint>
    17. grading:
    18. mode: symbolic_equivalent # grade by equivalence rather than exact string match
    19. allow_tools: false # disable tools in the first round to measure pure reasoning
    20. report:
    21. metrics: [pass@1, pass@k, majority@k]
    22. confidence: bootstrap_paired

    7.5 Organizing Cloud Resources

    Model evaluation often involves large-scale batch inference. Cloud resources can provide several general-purpose capabilities:

    • Object storage: Store desensitized task sets, prompt templates, and evaluation results, managed by version.
    • Message queue: Distribute evaluation tasks and buffer concurrency during peak periods.
    • Container platform: Host evaluation executors and grading services, scaling on demand.
    • Logging service: Fully record requests, responses, and grading details for review.
    • Monitoring and alerting: Track throughput, latency, and failure rates, and notify in time when anomalies occur.

    On cloud platforms such as Baidu AI Cloud, common cloud products can be used to build a reproducible and scalable evaluation pipeline. Model-service management can also be used to handle inference endpoints for candidate models in a unified way. Evaluation data remains under the user’s own account and is used only for evaluation and model-selection decisions.


    8. Conclusion

    It is difficult to summarize the math capability gap between open-source models from China and top closed-source models with a single number.

    The “local wins, local losses, and partial ties” structure reflected in comprehensive dashboards more likely indicates that the two groups have different capability profiles, rather than one side completely dominating the other.

    To make the conclusions reliable, three levels of rigor are needed:

    1. Layered evaluation design: Break math capability into observable layers and unify the evaluation protocol.
    2. Cautious interpretation: Use methods such as paired bootstrap to judge whether a gap is statistically significant, and be alert to accidental leads caused by multiple comparisons.
    3. Business-aligned selection: Base decisions on task-family weights rather than aggregate scores, and continuously validate through a three-layer approach of public benchmarks, private task sets, and end-to-end scenarios.

    The purpose of evaluation is not to announce who ranks first, but to answer a more practical question:

    In your business, which model is more suitable, and is the gap worth the additional cost?

    Answering this question clearly is what gives the discussion of math capability gaps real engineering value.