Verifying the reasoning of large language models is increasingly important as they are applied to complex mathematical and scientific problems. Existing work focuses on large decoder models and reports mixed results for generative and discriminative verifiers, leaving unclear which paradigm is more effective and whether large models are necessary. In this work, we cast stepwise verification as a natural language inference task: the problem and partial solution prefix form the premise, while the next reasoning step serves as the hypothesis to be classified as entailed or non-entailed. This formulation enables error localisation at individual reasoning steps and direct comparison of encoder classification, decoder classification, and decoder verdict generation across model scales and annotation budgets. Across five reasoning datasets, a 0.15B encoder classifier outperforms most generative verifiers with up to 4B parameters. On identical decoder backbones, classification outperforms generation from 0.5B to 4B parameters and matches it on the strongest 7B backbone---reaching comparable performance with roughly one tenth as many annotated problems. Our findings establish classification as a parameter- and data-efficient approach to stepwise verification and show that strong verification does not require large generative decoders.
Figures & tables
Figure 1: Classifiers lie on the performance–parameter Pareto frontier. Average AUC over five reasoning datasets versus parameter count for encoder classifiers, decoder classifiers, and generative verifiers. The black line marks the empirical Pareto frontier. On identical decoder backbones, classification achieves higher average AUC than verdict generation up to 4B parameters.
Figure 2: Stepwise reasoning verification as natural language inference. To verify reasoning step S3 , the premise P combines the problem statement Q with preceding steps S1 and S2 , while the hypothesis H is S3 . All three verifiers assign a non-entailment score to this premise–hypothesis pair.
Dataset
Domain
Labels
Train
Test
Err.
PRM800K
Math
Human
46.0k
70.5k
8.3
MS
Math
Rollout
37.0k
80.9k
17.5
Epic50K
Math
Contrib.
42.7k
37.8k
6.0
FoVer
Formal
Verifier
34.3k
10.8k
24.0
MMLU
Multi
Synthetic
38.0k
49.5k
9.6
Table 1: The five datasets differ in domain, annotation source, and class imbalance. Labels is the source of the step annotations: human judgement, rollout-based answer reachability, contribution-based automatic annotation, formal verification tools, or synthetic annotation. Train counts training problems, Test counts premise–hypothesis instances, and Err. is the percentage of non-entailment instances in the test split. Full statistics are in Table 6 .
Model
Paradigm
PRM
MS
Epic
FoVer
MMLU
Avg.
Δ
Decoders
Qwen2.5-0.5B
Gen.
.680 ± .011
.665 ± .010
.968 ± .001
.764 ± .016
.826 ± .004
.780 ± .008
+.064
Cls.
.745 ± .097
.769 ± .010
.974 ± .002
.894 ± .046
.838 ± .004
.844 ± .032
Qwen2.5-1.5B
Gen.
.707 ± .040
.589 ± .012
.969 ± .001
.701 ± .026
.858 ± .008
.765 ± .017
+.097
Cls.
.780 ± .070
.824 ± .003
.978 ± .002
.860 ± .158
.867 ± .004
.862 ± .047
Qwen2.5-Math-1.5B
Gen.
.767 ± .013
.617 ± .012
.973 ± .001
.792 ± .001
.864 ± .005
.803 ± .007
+.113
Table 2: Step-level verification across paradigms, architectures, and model scales. We report step-level AUC as mean ± standard deviation over three random seeds. Bold marks the best result in each column among trained models. Δ denotes the difference in average AUC, AUCCls−AUCGen . Avg. is the macro-average AUC over the five datasets. Encoder classifiers are reported in a separate block.
Figure 3: Classification’s advantage is largest at small scale and is gone or reversed at 7B. Δ AUC (classification − generation) per decoder backbone: small points are per-dataset deltas, large points are the mean. All five datasets favour classification at 0.5B–1.5B; classification matches or exceeds generation on average at seven of the eight backbones.
Dataset
Zero
Verbalizer
PRM800K
.722 ± .109
.858 ± .004
MathShepherd
.789 ± .118
.808 ± .097
Epic50K
.909 ± .125
.977 ± .008
FoVer
.857 ± .130
.977 ± .001
MMLU-Pro-CoT
.887 ± .010
.849 ± .085
Avg.
.833 ± .098
.894 ± .039
Table 3: Verbalizer initialisation makes decoder classification stronger and more consistent across seeds. Step-level AUC of Qwen2.5-3B classification, mean ± standard deviation over three seeds, with a zero-initialised head and with the head initialised from the verdict tokens, on the same data and seeds. Bold marks the higher mean and the lower standard deviation per row.
Figure 4: Classification is more data-efficient than verdict generation for stepwise verification. Step-level AUC averaged over the five datasets (faint lines: individual datasets) as the number of annotated training problems increases. On both Qwen2.5-0.5B and Qwen2.5-3B, classification reaches high AUC with far fewer problems than verdict generation; the dashed line marks generation trained on the full set, and ModernBERT-B (0.15B) is the encoder reference.
Figure 5: Classification SFT makes step-verification labels at least as linearly recoverable as generation SFT in later decoder layers on all five datasets. Layer-wise probe AUC for the pretrained Qwen2.5-3B backbone, verdict-generation SFT, and classification SFT.
Model
PRM
MS
Epic
FoVer
MMLU
Avg.
Qwen2.5-Instruct
0.5B
.491
.582
.424
.485
.453
.487
1.5B
.528
.639
.377
.575
.542
.532
3B
.594
.697
.494
.674
.577
.607
7B
.665
.708
.542
.704
.696
.663
DeepSeek-V4.1-Flash
.779
.715
.648
.773
.752
.733
Table 4: In-context verification improves with scale but stays below a fine-tuned 0.15B encoder on average. Step-level AUC of in-context verification with three demonstrations per query, retrieved from the training set, and deterministic scoring. Bold marks the best result per column. Avg. denotes the macro average AUC over five datasets. † The Gemini API does not expose token probabilities, so its AUC is computed from binary Yes / No verdicts rather than a continuous score.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Step
Cls. vs.
Same
Same
Gen. without
Encoder
Label budget
Work
level
Gen.
backbone
labels
rationale
classifiers
varied
GenRM ( Zhang et al., 2025a )
–
✓
✓
✓
✓
–
–
ThinkPRM ( Khalifa et al., 2026 )
✓
✓
✓
–
–
–
–
GenPRM ( Zhao et al., 2026 )
✓
✓
–
–
✓
–
–
StepWiser ( Xiong et al., 2025 )
✓
✓
✓
✓
( ✓ ) a
–
–
Lee et al. (2026)
✓
✓
✓
–
–
–
( ✓ ) b
Appendix
Table 5: Our comparison isolates the training objective for step-level verification. Each row is a prior study that compares classification with generation or uses encoder verifiers. Step level : verifies the validity of individual steps; Cls. vs. Gen. : compares a classifier with a generative verifier; Same backbone and Same labels : both are trained from the same pretrained model on the same labelled instances; Gen. without rationale : the generative verifier predicts its verdict directly; Label budget varied : the amount of annotated data is varied for both. ✓ : yes; ( ✓ ): partly; –: no. a Groups direct-verdict generation with classification as discriminative and contrasts both only with rationale-generating judges. b Single-domain versus multi-domain training. c Off-the-shelf NLI models, not trained on step labels.
Figure 6: Reformulating reasoning verification as first-error localisation. We cast verification as identifying the first step where reasoning ceases to be logically valid. This is naturally formulated as sequential natural language inference, where the validated reasoning prefix is treated as the premise and the current reasoning step as the hypothesis.
Dataset
Instances
Natural Error
Token Length Statistics (Test)
Overflow Ratio (%)
Train
Val
Test
Ratio (%)
Mean ± Std
Med.
P90
Max
>512
>2048
PRM800K
39,742
19,575
70,548
8.3%
231.8±152.5
191
438
1,262
6.1%
0.0%
MathShepherd
43,667
8,570
80,883
17.5%
185.3±131.9
146
341
1,580
3.0%
0.0%
Epic50K
58,151
15,982
37,763
6.0%
651.5±861.4
315
1,643
5,399
33.0%
7.8%
FoVer
44,399
5,464
10,806
24.0%
304.9±148.5
266
529
936
11.6%
0.0%
MMLU-Pro-CoT
42,612
8,727
49,494
9.6%
343.9±228.3
286
602
2,351
15.6%
0.1%
Appendix
Table 6: Dataset statistics and token lengths. Number of premise–hypothesis instances per split, the percentage of non-entailment instances in the test split, and token-length statistics of the test inputs. Training splits are balanced between entailment and non-entailment by local undersampling, whereas validation and test splits keep their natural distribution. PRM800K, MathShepherd, and MMLU-Pro-CoT are capped at 37k–46k training problems before instance construction; Epic50K and FoVer use all problems. Token length is measured with the bert-base-cased tokenizer on the premise–hypothesis pair.
Model
Params.
Max Length
Native
Used
Encoders
BERT-B
0.110B
512
512
RoBERTa-B
0.125B
512
512
ModernBERT-B
0.149B
8,192
2,048
DeBERTa-B
0.184B
512
512
Appendix
Table 7: Models evaluated in this work. Parameters denote the total parameter count, while model names retain their developers’ nominal size labels. DeBERTa denotes DeBERTa-v3, and Gemma-3-4B is its text-only language model. Native denotes the maximum sequence length supported by the original checkpoint, and Used denotes the maximum sequence length used during fine-tuning and evaluation.
Model
GPUs
GPU-hours
Encoders, base
1
0.2–0.5
Encoders, large
1
0.3–1.1
Decoders 0.5B
1
0.3–0.4
Decoders 1.5B
1
0.5–0.8
Decoders 3B–4B, Gen.
2
1.7–2.6
Decoders 3B–4B, Cls.
2
2.5–3.3
Appendix
Table 8: Training cost grows from around one GPU-hour for encoders to thirteen for 7B decoder classifiers. GPUs used per training run and GPU-hours per run on NVIDIA A100-PCIE-40GB, averaged over the five datasets; ranges span the models in each group.
Artifact
Licence
Datasets
PRM800K ( Lightman et al., 2024 )
MIT
MathShepherd ( Wang et al., 2024b )
None stated
Epic50K ( Sun et al., 2025 )
Apache-2.0
FoVer ( Kamoi et al., 2026 )
CC BY 4.0
MMLU-Pro-CoT ( Zeng et al., 2025 )
MIT
Appendix
Table 9: Every artifact we use is publicly released and used here for research. Licences are those stated by the original release, or by the model card for models. Qwen2.5 licences apply to both the base and the Instruct checkpoints; Llama-3.2 is under the Llama 3.2 Community License, Gemma under the Gemma Terms of Use, and Gemini-3.8-Flash and DeepSeek-V4.1-Flash are accessed through their providers’ APIs under the respective API terms of service. MathShepherd is distributed publicly by its authors without a stated licence.
Large language models (LLMs) are increasingly capable of mathematical problem solving and can even assist with research-level proofs, yet we still lack a scalable and reproducible way to measure step-level reasoning in long proofs across diverse sources. This evaluation gap limits trustworthy AI assistance in proof-certified scientific progress. Existing evaluations often emphasize final answers or rely on costly expert grading, while end-to-end proof generation remains open-ended and hard to verify automatically. We introduce Mask-Proof, a pipeline that turns real proofs into automatically checkable masked-step tasks. It masks key formula steps, provides the necessary surrounding context, and evaluates model reconstructions with an LLM-based equivalence judge using repeated votes for stability. The resulting Mask-ProofBench contains 292 curated problems across diverse research areas. Experiments with 17 models show that reasoning-enhanced models outperform standard models by 12% to 27%. Our evaluator achieves 96.8% agreement with expert annotators, enabling faithful, reproducible, and comparable measurement of step-level mathematical reasoning. Benchmark, annotations, and code are available at https://github.com/weating/Mask-Proof.
Jierui Zhang, Siyuan Tan, Xinhang Li +8
School of Computer Science Beijing University of Posts and Telecommunications Beijing, China · Graduate College for Engineers Beijing University of Posts and Telecommunications Beijing, China · School of Mathematical Sciences Fudan University Shanghai, China +6
Large Language Models (LLMs) struggle to rigorously verify complex mathematical proofs. Standard global evaluation approaches suffer from "context poisoning," in which superficially plausible statements mask subtle logical flaws, leading to hallucination or over-skepticism. To address this, we shift from global evaluation to strict step-level verification: our framework maintains detailed context for each deduction step and strictly constrains the sources of applied theorems. We evaluate on a carefully curated adversarial diagnostic suite of research-level proofs drawn from the FirstProof challenge. A systematic ablation study demonstrates that these deductive constraints are indispensable, as unconstrained global prompting consistently fails to localize subtle logical errors. Beyond outperforming global evaluation, our approach fundamentally alters the failure taxonomy. Error analysis reveals that, rather than exhibiting severe logical hallucinations, remaining rejections are primarily instances of "pedantic hyper-rigor" stemming from unstated domain conventions, effectively exposing implicit ambiguities within the expert benchmark itself. Our findings suggest that prompting agents to organize their verification notes in a cautious, human-mathematician-like manner can substantially improve their ability to distinguish rigorous proofs from flawed ones, with the potential to strengthen agentic reasoning on frontier mathematical concepts that the base model does not already know well, and to lay a theoretical foundation for future automated proof-review systems. Code and prompts are available at GitHub.
With the growing popularity of Large Reasoning Models and their results in solving mathematical problems, it becomes crucial to measure their capabilities. We introduce a pipeline for both automatic and interactive verification as a more accurate alternative to only checking the answer which is currently the most popular approach for benchmarks. The pipeline can also be used as a generator of correct solutions both in formal and informal languages. 3 AI agents, which can be chosen for the benchmark accordingly, are included in the structure. The key idea is the use of prompts to obtain the solution in the specific form which allows for easier verification using proof assistants and possible use of small models (≤8B). Experiments on several datasets suggest low probability of False Positives. The open-source implementation with instructions on setting up a server is available at https://github.com/LogicEnj/lean4_verification_pipeline.
Varvara Sazonova, Dmitri Shmelkin, Stanislav Kikot +1
Moscow State University · Huawei Technologies Co., Ltd