TL;DR Solving practical operations research (OR) problems requires translating ambiguous natural-language descriptions into exact mathematical formulations and executable solver code. We present SLAI T-Rex-V2, an OR modeling system built on DeepSeek-V4-Flash and Huawei Ascend SuperPOD. Guided by failure...
Authors: SLAI AI Training Platform Team, Xuhui Chen, Sihang Chen et al.
Published: 2026-12-01
Categories: cs.CL, cs.AI
arXiv: 2611.38571
License: nonexclusive-distrib-1.0
PDF: download · download markdown
:material-format-quote: Cite this paper
@misc{arxiv_2611_38571,
title = {SLAI T-Rex-V2: Full-Stack Post-Training, RL Infrastructure, and Agentic Modeling for Operations Research on Ascend SuperPOD},
author = {SLAI AI Training Platform Team and Xuhui Chen and Sihang Chen and Tianxiang Fang and Wenlong Jin and Weiyan Kong and Jiajun Liu and Zhengxuan Lu and Zhuohan Wang and Jinmin Xiang and Yucheng Xie and Mingzhe Yang and Zirong Zeng and Bingwei Zhang and Ziwei Zhu and Xin Chen and Yuntian Fan and Yingmeng Gao and Dongfang Li and Jing Li and Liangyou Li and Xiangyu Li and Yizhou Liang and Xiaodong Luo and Linyuan Qiu and Ruoyu Sun and Weijian Sun and Yiting Wang and Chenwei Wu and Zhengjun Yue and Baotian Hu and Min Zhang and Haizhou Li and Zhiquan Luo},
year = {2026},
eprint = {2611.38571},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.38571}
}

SLAI T-Rex-V2: Full-Stack Post-Training, RL Infrastructure, and Agentic Modeling for Operations Research on Ascend SuperPOD¶
AI Training Platform Team, Shenzhen Loop Area Institute
Abstract. Solving practical operations research (OR) problems requires translating ambiguous naturallanguage descriptions into exact mathematical formulations and executable solver code. We present SLAI T-Rex-V2, an OR modeling system built on DeepSeek-V4-Flash and Huawei Ascend SuperPOD. Guided by failure modes surfaced through repeated base-model sampling, we construct a solververified data synthesis pipeline and post-train SLAI T-Rex-V2 via cold-start SFT and multi-stage reinforcement learning. On our expert-curated SLAI-OR-BENCH and SLAI-OR-BENCH-HARD benchmarks, single-turn accuracy improves from 38.26% to 50.86% (+5.82 and +6.59 points over GPT-6.1-Sol and Claude Opus 5.5) and from 26.88% to 35.89%, slightly surpassing single-draw frontier baselines. Beyond single-turn generation, pairing the base model with a lightweight solver-in-the-loop agent harness lifts SLAI-OR-BENCH-HARD accuracy to 40.86%, reaching 49.46% with reusable general OR skills and 55.48% with benchmark-tailored priors. To sustain efficient and stable MoE reinforcement learning on Ascend, we further prevent training–inference numerical drift from triggering RL collapse, cut rollout token generation by 82.5% through calibrated trajectory reuse, accelerate low-concurrency OR serving with native multi-token prediction, and scale agentic RL for NPU kernel optimization.

Figure 1: Two-layer overview of SLAI T-Rex-V2: the upper layer covers solver-grounded post-training and base-model agentic execution with OR skills; the lower layer summarizes four infrastructure directions on Huawei Ascend SuperPOD.
Contents¶
| 1 | Introduction | 3 5 5 5 7 | |
|---|---|---|---|
| 2 | SLAI-OR-Bench: Benchmark Curation and Diagnostic Protocol 2.1 Saturation Analysis of Public AI4OR Benchmarks 2.2 Benchmark Construction, Taxonomy, and Hard-Subset Design 2.3 Solver-Verified Evaluation and Multi-Sample Metrics | ||
| 3 | Solver-Grounded Post-Training for Operations Research 3.1 Base-Model Reliability Regimes under Diagnostic Sampling 3.2 Taxonomy-Guided, Solver-Verified Data Synthesis 3.3 Cold-Start SFT and Failure-Tiered Multi-Stage GRPO 3.4 Empirical Gains and Scenario-Level Capability Transitions | 8 8 9 14 18 | |
| 4 | Systems and Algorithmic Infrastructure for Execution-in-the-Loop RL 4.1 Advantage Recalibration for Same-Batch Trajectory Reuse 4.2 Progressive Diagnosis and Alignment of Training–Inference Drift 4.3 Native Multi-Token Prediction and Decoupled OR–MTP Alignment 4.4 Solver-Guided Asynchronous Prefix RL for NPU Kernel Synthesis | 21 21 25 28 32 | |
| 5 | Test-Time Agentic Modeling with Modular Domain Skills 5.1 Decoupling Minimalist Execution from Domain Modeling Priors 5.2 Execution-Grounded ReAct Architecture and Solver Verification 5.3 Declarative Domain Skills and Runtime Validation Hooks 5.4 Multi-Rollout Empirical Evaluation and Skill Ablations 5.5 Toward Parameter Internalization of Skill-Guided Trajectories | 35 35 36 36 37 38 | |
| 6 | Conclusion and Future Directions | 38 | |
| A | Author List | 44 | |
| B | Provenance and Curation of Public AI4OR Benchmarks B.1 Evaluated Public Benchmark Suite B.2 Release Provenance and Instance Selection Criteria | 44 44 44 | |
| C | Qualitative Formulation Case Study on SLAI-OR-Bench-Hard | 45 | |
| D | Formulation and Diagnostics of Zero-Advantage GRPO Variants D.1 Budget Reallocation, Off-Policy Replay, and Virtual Rewards D.2 Training Dynamics and Process-Level Diagnostics | 46 46 48 | |
| E | Extended Ablations and Controls for OR–MTP Co-Adaptation E.1 Archived Endpoint Trajectory and Motivation E.2 Paired Quality Contrasts and Protocol Bridges E.3 Frozen-Trunk Private MTP Alignment Controls | 50 50 50 51 |
1 Introduction
Supervised fine-tuning (SFT) and reinforcement learning (RL) with verifiable rewards have substantially improved the mathematical reasoning and coding abilities of large language models Shao et al., 2024; DeepSeek-AI, 2025; Yu et al., 2025. Operations research (OR), however, demands more than isolated mathematical derivation or code synthesis Ahmaditeshnizi et al., 2024; Wang et al.,¶
2025. Given a problem description in business or engineering language, a model must identify the decision variables, formulate the objective and operational constraints as a linear or mixed-integer linear program (LP/MILP), implement executable solver code (e.g., in GurobiPy or Pyomo), and recover the optimal objective value. A program that compiles and returns an "optimal" solver status can still be wrong if it omits a coupling constraint, mishandles units, or confuses individual demand paths with shared resource usage.
In Part I of the SLAI T-Rex technical report Li et al., 2026, we established a full-parameter posttraining stack for the DeepSeek-V4 Mixture-of-Experts (MoE) family DeepSeek-AI, 2024 on Huawei CloudMatrix384 SuperPOD Zuo et al., 2025, covering hybrid parallelism, memory management, AscendC kernel execution, and an initial solver-grounded continued pre-training (CPT) and SFT pipeline. In this Part II report, we present SLAI T-Rex-V2, a full-stack OR reasoning and agentic platform centered on DeepSeek-V4-Flash. Rather than treating post-training, RL systems, and inference-time agency in isolation, we structure SLAI T-Rex-V2 around two complementary capability routes—(i) solver-grounded parameter specialization for single-turn OR modeling and (ii) verified test-time agentic execution with modular OR skills—supported by four controlled systems and algorithmic studies addressing key bottlenecks of execution-in-the-loop RL on Ascend NPUs (Figure 1). Each component is evaluated against matched baselines isolating its specific mechanism, establishing both strong standalone performance and a clear path toward joint agentic trajectory internalization.
Capability Diagnosis, Data Synthesis, and OR Post-Training. We organize single-turn OR posttraining around a closed loop from capability diagnosis to verified synthesis, sequential training, and paired transition analysis (Sections 2 and 3). To evaluate models beyond largely saturated public datasets, we first curate SLAI-OR-BENCH (131 tasks across 18 domains and 26 decision-task families) and its frontier-challenging subset SLAI-OR-BENCH-HARD (93 tasks). Eight-sample evaluation of the base model (DeepSeek-V4-Flash-0731) on SLAI-OR-BENCH-HARD distinguishes Stable, Partial, and Unsolved problems: 53.76% remain unsolved within eight draws, while the 19.36-point gap between pass@1 (26.88%) and pass@8 (46.24%) exposes substantial execution and formulation unreliability. We diagnose these gaps through a four-layer synthesis taxonomy—scenario, modeling technique, constraint families, and modeling pitfalls—and drive one-hop structural data synthesis verified via dual-interface (Pyomo and gurobipy) solver execution. Empirical base-model solve rates then route verified demonstrations and prompts across cold-start SFT, Chat GRPO, and Thinking GRPO, coupled with graded failure rewards and resource-limit outcome masking. On SLAI-OR-BENCH and SLAI-OR-BENCH-HARD, the resulting post-trained model raises single-turn accuracy from 38.26% to 50.86% (+5.82 percentage points over GPT-6.1-Sol and +6.59 points over Claude Opus 5.5) and from 26.88% to 35.89% (edging out GPT-6.1-Sol at 34.41% and Claude Opus 5.5 at 33.33%), while expanding Hard-set pass@8 coverage from 46.24% to 51.61%.
Infrastructure for Execution-in-the-Loop RL on Ascend. Scaling solver-verified and profilerverified RL for large MoE models on Ascend SuperPOD faces four recurring systems and optimization bottlenecks: expensive rollout generation and solver verification, numerical discrepancies between decoupled inference and training engines Qi et al., 2025; Zhong et al., 2026; Bai & Shen, 2026, autoregressive decoding latency, and multi-hour NPU kernel profiling tails Wu et al., 2026; Dai et al., 2026. Section 4 investigates targeted solutions to each bottleneck under controlled experimental protocols:
-
Advantage Recalibration for Trajectory Reuse (Section 4.1): Because each OR rollout requires long reasoning traces and external solver execution, discarding verified trajectories after a single gradient step underutilizes supervision. Within a bounded same-batch loop (max = 4), we re-estimate each prompt's current-policy reference reward using tempered, length-normalized log-likelihood shifts on the learner backend, paired with a matching weighted actor objective and group eligibility gates. At a matched budget of 80 optimizer updates on 128 Ascend NPUs, calibrated reuse reduces newly generated trajectories by 75.0% and response tokens by 82.5% while matching or slightly exceeding fresh-rollout accuracy on SLAI-OR-BENCH-HARD.
-
- Training–Inference Consistency Optimization (Section 4.2): Numerical discrepancies between rollout engines (vLLM-Ascend) and training backends (MindSpeed-LLM/Megatron) bias on-policy updates and can flip discrete MoE routing. We develop a progressive diagnostic workflow, packaged as a reusable agent skill, that combines layer-wise token cosine scanning with recursive same-input replay to separate operator implementation bugs from downstream mathematical amplification. Across eight nodes (64 Ascend 910C NPUs) evaluated on 16 diagnostic prompt–response sequences, the workflow pinpoints and repairs a SwiGLU clipping discrepancy and a router correction-bias precision mismatch on DeepSeek-V4-Flash, preventing numerical-drift-induced RL collapse.
-
- Speculative Decoding with Native MTP (Section 4.3): Evaluating native multi-token prediction (MTP) across workloads and decoding regimes reveals pronounced variation in draft acceptance, output-length sensitivity, and serving speedup. After joint RL–MTP training exposes trade-offs between OR accuracy and draft acceptance, refining the private MTP module with the selected OR target frozen raises mean three-token agreement on the OR development panel from 48.44% to 60.16%. In matched offline serving benchmarks, enabling saved native MTP modules delivers \(1.583\times-1.715\times\) OR token throughput relative to standard decoding at client concurrency one, while paired solver evaluation audits solution quality independently of raw token rate.
-
- Decoupled Exploration for Long-Horizon Kernel Optimization (Section 4.4): Iterative Ascend NPU kernel optimization suffers from heavy exploration costs and multi-hour episode tails caused by compilation, precision verification, and device profiling. Alongside benchmark diagnosis on ASCENDGYM and solver-guided tiling/buffering warm starts (WindMatmulV2), we convert each measured candidate along an ops-math optimization episode into a history-preserving training prefix fed into an asynchronous FIFO queue, augmented with an evidence-grounded shared lesson memory. Over 24 hours on Ascend, this increases completed parameter updates from 4 to 12 (3×), raises candidate correctness pass rates from 39.4% to 49.1%, and substantially accelerates the discovery of verified trajectories achieving ≥ 1.05× and ≥ 1.10× speedups.
Lightweight Agent Harness and Modular OR Skills. While post-training internalizes single-turn formulation ability into model weights, complex OR tasks also benefit at test time from multiturn data inspection, iterative execution, and semantic self-verification. General-purpose coding agents, however, do not uniformly improve OR performance: on SLAI-OR-BENCH-HARD, Claude Code (Anthropic, 2026a) lifts Claude Opus 5.5 from 33.33% to 38.71%, whereas Codex (OpenAI, 2026b) slightly reduces GPT-6.1-Sol from 34.41% to 33.33%. In Section 5, we pair the base model with a minimalist PI-style ReAct (Yao et al., 2023) harness and eight modular OR skills (scene_cards, technique_cards, numeric_probes, field_roles, code_checks, modeling_spec, gurobi_landing, and referee). Each skill couples declarative modeling guidance (SKILL.md) with deterministic Python runtime hooks that enforce formulation specifications before coding, probe numerical plausibility after solving, and audit constraint fidelity before submission. On SLAI-OR-BENCH-HARD, the lightweight harness alone lifts base-model accuracy from 26.88% to 40.86% (+13.98 points); enabling the six benchmark-independent workflow skills raises accuracy to 49.46% (+22.58 points, surpassing external coding-agent baselines and single-turn base pass@8 without oracle selection), and adding the two benchmark-tailored prior cards reaches 55.48% (+28.60 points) as an attainable upper-bound probe.
Report Organization. Section 2 reviews public AI4OR benchmarks and introduces SLAI-OR-BENCH and our evaluation protocol. Section 3 presents base-model reliability diagnosis, label-guided data synthesis, cold-start SFT and sequential Chat/Thinking GRPO, and paired scenario-level transition analysis. Section 4 details our four Ascend RL infrastructure studies across trajectory reuse (Section 4.1), training–inference consistency (Section 4.2), native MTP speculative decoding (Section 4.3), and NPU kernel optimization (Section 4.4). Section 5 describes the lightweight OR harness, modular skill ablations, and our roadmap for internalizing skill-assisted trajectories into model parameters. Section 6 concludes the report, while Appendices A–E list the project contributors and provide dataset provenance, a worked SLAI-OR-BENCH-HARD case study, detailed analyses of exploratory zero-advantage GRPO variants, and OR–MTP co-adaptation controls.

2 SLAI-OR-Bench: Benchmark Curation and Diagnostic Protocol¶
Evaluating AI for operations research (AI4OR) requires benchmarks that test whether a model can translate a problem description into a mathematical formulation and executable solver code. This section reviews existing benchmarks, examines their discriminative power for recent models, and introduces SLAI-OR-BENCH, an expert-curated collection designed to complement existing coverage with application-specific optimization tasks.
2.1 Saturation Analysis of Public AI4OR Benchmarks¶
Existing benchmarks evaluate optimization modeling through natural-language problem descriptions, numerical instance data, and reference formulations or solutions. Our diagnostic survey includes NL4OPT Ramamonjison et al., 2022, OptiBench Yang et al., 2025, Bench4Opt Wang et al., 2025, ComplexOR Xiao et al., 2024, IndustryOR Huang et al., 2025a, MAMO-ComplexLP and MAMO-EasyLP Huang et al., 2025b, and NLP4LP Ahmaditeshnizi et al., 2024. We additionally include problems from the ICML 2024 Automated Optimization competition, described by Nguyen and Ko Nguyen & Ko, 2024.
These benchmarks provide complementary views of modeling performance. However, high accuracy on a benchmark can reduce its ability to distinguish stronger models, while a benchmark that remains difficult may still cover only a limited selection of application-specific requirements. Evaluation therefore requires both sufficient difficulty and broad coverage of domain-specific modeling structures.
Diagnostic performance of frontier models. Table 1 reports solver-based accuracy for three external frontier models—GPT-6.1-Sol, Claude Opus 5.5, and Gemini-4-Argon—across nine public benchmarks to assess current ceiling effects. Because several original benchmark releases contain logically inconsistent or underspecified statements and erroneous ground-truth objectives, we adopt community-cleaned releases to minimize annotation noise; dataset versions and instance counts are documented in Appendix B.
Table 1: Solver-based accuracy (%) of external frontier models on cleaned public benchmark releases as a saturation diagnostic. NL4OPT results use the same 202 instances for all three models under each model's recorded single-turn evaluation configuration.
| Benchmark | 𝑵 | GPT-6.1-Sol | Claude Opus 5.5 | Gemini-4-Argon |
|---|---|---|---|---|
| NL4OPT | 202 | 83.66 | 88.61 | 83.17 |
| OptiBench | 403 | 85.36 | 91.07 | 87.10 |
| ComplexOR | 18 | 72.22 | 72.22 | 66.67 |
| ICML Competition | 410 | 78.05 | 83.66 | 80.00 |
| IndustryOR | 42 | 61.90 | 71.43 | 69.05 |
| MAMO-ComplexLP | 111 | 63.06 | 86.49 | 62.16 |
| MAMO-EasyLP | 545 | 98.53 | 99.45 | 98.90 |
| NLP4LP | 178 | 93.82 | 94.38 | 92.70 |
| Bench4Opt | 344 | 59.88 | 60.76 | 61.05 |
Several widely used datasets (e.g., MAMO-EasyLP, NLP4LP, OptiBench, and NL4OPT) exceed 83%–99% accuracy on frontier models, leaving limited headroom, while smaller unsaturated sets (such as ComplexOR with = 18 or IndustryOR with = 42) offer narrow structural diversity, and public collections frequently overlap with seed or regression pools in open-source AI4OR pipelines. To enable contamination-controlled evaluation on complex operational formulations, we construct SLAI-OR-BENCH as an expert-curated test collection strictly held out from all training, synthesis, and development data in this work.
2.2 Benchmark Construction, Taxonomy, and Hard-Subset Design¶
Construction and provenance. We engaged domain and operations research experts to develop a dedicated internal test collection. SLAI-OR-BENCH contains 131 optimization problems: 106

problems curated and annotated by these experts and 25 problems adapted from Bench4Opt Wang et al., 2025 with newly randomized numerical parameters.
All instances, their variants, and reference solver code are excluded from this project's SFT and RL training data, validation sets, and prompt examples. In response to the OR-Bench community call for contributions Zhu, 2026, we submitted the collection to the organizing committee and subsequently revised it in response to their review feedback.
Instance representation. Each instance includes a problem statement, a reference mathematical formulation, executable reference solver code, and a reference optimal objective value and solution. The 106 expert-curated instances are self-contained, with numerical parameters embedded in their statements. The 25 Bench4Opt-derived instances include separate JSON data files. For these instances, the evaluated LLM receives only the problem statement and a description of the data schema, without access to the numerical data. The LLM must generate solver code that loads the associated JSON file at execution time. Reference formulations, reference code, objective values, and solutions are withheld from the evaluated LLM.
Problem-family coverage. The collection spans 18 application-domain categories, including production planning, transportation, healthcare, energy, workforce scheduling, telecommunications, and finance. It contains 24 LP and 107 MILP instances. Beyond its 18 application-domain labels, we organize the 131 instances into 26 decision-task families according to their principal decision variables, objectives, and operational constraints. Each instance is assigned to one primary family, while application-specific variants are documented separately. This classification distinguishes decision-task families from both application domains and mathematical model classes (LP and MILP). The 93-instance hard subset retains instances from all 26 families.
The collection includes shared-channel network routing, arc-service routing with replenishment, multi-agent collision-free path planning, batching and reclassification, dynamic intervention, safetystock optimization, dynamic pricing, and equilibrium-constrained strategic decisions, in addition to production planning, assignment, and scheduling. Table 2 reports the distribution.
The application-specific variants introduce distinct modeling requirements within these families. For example, laboratory sample assignment requires determining whether mixed racks trigger re-batching; emergency transfers require tracking when incoming resources become available for onward dispatch; and dynamic pricing couples current prices with subsequent demand and perishable inventory. These requirements provide a more detailed characterization of benchmark coverage than domain names or LP/MILP labels alone. While Table 2 characterizes benchmark diversity at fine-grained OR problem-class resolution (26 decision-task families), Section 3.2.1 consolidates related decision structures into a coarser 21-scenario synthesis taxonomy (19 of which occur in the 93-instance Hard subset) paired with 31 explicit mathematical formulation techniques to drive combinatorial training-data generation. Correct formulation also requires commonsense and domain knowledge to interpret requirements expressed in business language. Relevant distinctions include which quantities represent indivisible units, how initial resource states affect the first planning period, and whether an operational metric counts individual tasks or shared resources. Such distinctions can change the objective or feasible set even when the underlying problem family is correctly recognized. Appendix C presents an original problem description, its reference formulation, and actual model outputs illustrating the interpretation of shared-resource costs.
Hard-subset construction. We construct a 93-instance diagnostic subset, denoted SLAI-OR-BENCH-HARD, using DeepSeek-V4-Flash-0731, Claude Opus 5 Anthropic, 2026b, and GPT-5.6-Sol (evaluated at the time of benchmark freeze, prior to our final evaluations against Claude Opus 5.5 and GPT-6.1-Sol). An instance is retained if at least one of these screening models is scored incorrect, removing the 38 instances solved by all three while retaining 93 instances across all 18 application domains and all 26 decision-task families. Because filtering conditions on this initial screening pass, all primary single-turn comparisons report both the unconditioned 131-instance full collection and the 93-instance hard subset.

Table 2: Decision-task families in the 131-instance SLAI-OR-BENCH collection and its 93-instance hard diagnostic subset (SLAI-OR-BENCH-HARD). Each instance is counted once.
| Decision-task family | ||
|---|---|---|
| Network routing and shared-channel allocation | 3 | 3 |
| Network design and resilience | 2 | 1 |
| Facility location and coverage | 3 | 1 |
| Facility layout and interaction-cost assignment | 2 | 2 |
| Equipment operation and energy dispatch | 11 | 10 |
| Budgeted selection and resource allocation | 8 | 2 |
| Dynamic intervention and state control | 3 | 1 |
| Task and multistage workflow scheduling | 14 | 10 |
| Project and maintenance scheduling | 4 | 3 |
| Service-facility assignment and scheduling | 14 | 10 |
| Workforce scheduling and crew itineraries | 8 | 4 |
| Arc-service routing and replenishment | 5 | 2 |
| Pickup-and-delivery routing | 1 | 1 |
| Multi-agent collision-free path planning | 1 | 1 |
| Train timetabling and track-conflict scheduling | 3 | 3 |
| Tournament and event timetabling | 4 | 4 |
| Batching, sortation, and reclassification | 3 | 2 |
| Blending and mixture optimization | 11 | 7 |
| Production, extraction, and phased allocation | 9 | 7 |
| Inventory, replenishment, and safety stock | 3 | 3 |
| Transportation and time-dependent network flow | 7 | 6 |
| Multidimensional packing and spatial allocation | 7 | 5 |
| Discrete allocation under probabilistic risk | 1 | 1 |
| Game equilibrium and strategic decisions | 1 | 1 |
| Cutting and material utilization | 2 | 2 |
| Dynamic pricing with perishable inventory | 1 | 1 |
| Total | 131 | 93 |
2.3 Solver-Verified Evaluation and Multi-Sample Metrics¶
Solver-based accuracy. The model generates solver code from the problem statement and any associated numerical data. We execute the code and compare the resulting objective value with the reference value. For the curated collection, a numerical match satisfies
where \(\hat{z}\) is the generated model's objective value and \(z^*\) is the reference value. Applied after solver execution (distinct from the numerical solver's internal optimality-gap settings), this end-to-end metric penalizes formulation mismatches, code errors, and unfinished solves alike while evaluating objective agreement on each numerical instance.
Repeated evaluation and multi-sample coverage. For Base and SLAI T-Rex-V2 (SFT+RL), we perform eight independent evaluation runs on each benchmark and report mean solve accuracy across runs in aggregate comparisons. On SLAI-OR-BENCH-HARD, we further analyze the n=8 responses per problem: for a problem with c correct responses, we estimate
where \(\binom{n-c}{k} = 0\) when n-c < k, and average over the 93 problems so that pass@1 measures single-attempt accuracy and pass@8 measures eight-sample solve coverage. We also partition problems by observed eight-sample reliability into Stable (8/8 correct), Partial (1–7/8 correct), and Unsolved (0/8 correct). Building on this benchmark and multi-sample protocol, Section 3 diagnoses base-model failure modes and develops our solver-verified synthesis and post-training pipeline.

3 Solver-Grounded Post-Training for Operations Research¶
The training recipe in this section is Base → cold-start SFT → GRPO, where Base denotes DeepSeek-V4-Flash-0731 (initialized directly without the Part I CPT checkpoint) and GRPO runs sequentially in Chat and Thinking modes. We first sample the Base model repeatedly and examine unsuccessful formulations to identify missing or unreliable OR modeling requirements. Training data are then constructed to broaden coverage across decision scenarios and formulation requirements, and post-training evaluation revisits which requirements become solvable or more reliable.
We characterize problem requirements through four label layers—scenario, modeling technique, constraint families, and modeling pitfalls (Section 3.2.1)—while tracking empirical solution reliability through Stable, Partial, and Unsolved sampling regimes. This section connects capability diagnosis to verified synthesis and sequential post-training, evaluates the resulting model via pass@ and paired per-question transitions, and audits training–test non-overlap in Section 3.2.4.
3.1 Base-Model Reliability Regimes under Diagnostic Sampling¶
To illustrate the reliability gap that post-training must address, we first examine the Base model under repeated sampling on the 93-instance SLAI-OR-BENCH-HARD subset (Section 2.2), independently sampling eight solutions per question to analyze both aggregate coverage and per-question reliability.
We measure aggregate performance using pass@ across ∈ {1, 2, 4, 6, 8}. Figure 2a) shows pass@1 of 26.88% and pass@8 of 46.24%, a gain of 19.36 percentage points, indicating that the base model already possesses latent modeling knowledge on a substantial subset of problems where singleattempt generation fails.
To capture per-question reliability, we partition problems into three empirical eight-sample regimes, as shown in Figure 2b):
- Stable (8/8 solved): 11.83% of questions (11/93).
- Partial (1–7/8 solved): 34.41% of questions (32/93).
- Unsolved (0/8 solved): 53.76% of questions (50/93).
Pairing these empirical reliability regimes with our four-layer structural labels pinpoints which constraint families and semantic pitfalls remain unexpressed or brittle. We apply the same empirical solve-rate principle to candidate training problems in Section 3.2.3: verified corrections and low-pass demonstrations seed SFT, partially solved prompts drive GRPO, and selected high-reliability records preserve mastered patterns.

Figure 2: Base-model empirical solution reliability on SLAI-OR-BENCH-HARD across 8 independent samples per question. (a) pass@ for ∈ {1, 2, 4, 6, 8}. (b) Distribution of questions across Stable (8/8 solved), Partial (1–7/8 solved), and Unsolved (0/8 solved) regimes.

3.2 Taxonomy-Guided, Solver-Verified Data Synthesis¶
Repeated sampling and error analysis reveal formulation requirements that the base model handles unreliably. Unlike prior AI4OR synthesis pipelines that rely primarily on forward or bidirectional SFT data expansion Huang et al., 2025a; Yang et al., 2025; Lu et al., 2025 or process-reward preference learning Zhou et al., 2025; Zhao et al., 2026, our pipeline couples a structured four-layer OR taxonomy with one-hop operator-controlled generation, intermediate FlatMILP alignment checks, dual-interface solver execution, and empirical base-model solve-rate routing across SFT and sequential GRPO. The design objective is broad coverage of scenario–technique combinations across the OR taxonomy, using benchmark coverage for descriptive comparison rather than as the synthesis target.
3.2.1 Capability Gaps and Four-Layer Label Taxonomy¶
We characterize OR problems using four label layers: scenario, modeling technique, constraint families, and modeling pitfalls. Whereas Section 2.2 catalogs benchmark coverage across 26 finegrained decision-task families, here we consolidate related problem structures into 21 synthesis scenarios (19 of which appear in SLAI-OR-BENCH-HARD) paired with 31 modeling techniques specifying their mathematical representations; constraint families identify rules that the model must express; and modeling pitfalls capture operational semantics that are frequently misformulated. The original public-pool annotation assigns each problem one primary scenario and one primary modeling technique, with multiple constraint families and pitfalls allowed; for final training exports, all explicitly supported scenario–technique pairs in multi-requirement statements are recorded to track data coverage. Table 3 summarizes the taxonomy and its role in synthesis.
| Layer | Per problem | Inventory | Design role |
|---|---|---|---|
| Scenario | One primary | 21 | Decision task |
| Modeling technique | One primary | 31 | Mathematical formulation |
| Constraint families | Multiple | 50 | Required modeling rules |
| Modeling pitfalls | Multiple | 195 distinct phrasings; 7 recurring | Error-prone semantics |
Table 3: Label taxonomy linking capability gaps to synthesis design.
For example, a berth-assignment problem may use an interval non-overlap formulation with time windows, resource eligibility, and a buffer after departure. The scenario and modeling technique define its decision structure, while constraint families and modeling pitfalls specify what the model must express. This turns capability gaps into concrete modeling requirements that guide subsequent problem modification and verification.
3.2.2 Four-Stage Synthesis and Dual-Solver Verification¶
The synthesis pipeline comprises four blocks: A, the parent pool; B, sampling; C, generation; and D, gating. Figure 4, shown after the final training-data summary, summarizes the complete process. Candidates that pass the gates enter the accepted-record pool and proceed to base-model sampling and training-data routing in Section 3.2.3.
A. Parent Pool. A parent is a curated seed problem (drawn from labeled public optimization collections and internal reference templates, strictly excluding all SLAI-OR-BENCH instances and their source variants) paired with its statement, provenance, and structural labels. Scenario and technique labels characterize the decision structure, while constraint families and pitfalls specify rules that can be modified or combined. The pool remains fixed during each run: accepted synthetic records are stored separately and are not fed back as new parents. This one-hop design limits the risk of recursive formulation drift and keeps similarity checks and per-parent quotas anchored to a traceable reference set. Sampling weights account for structural sparsity, parent use and remaining quotas, and opportunities to introduce new constraint families. Training–test checking is reported separately in Section 3.2.4.
9

B. Sampling. The program first selects a parent problem, then samples variation dimensions and structural operators to form a candidate plan. The domain, entities, numerical values, and narrative are resampled each time. Structural, pitfall, and scale variations are selected according to prior probabilities, with at least one enabled. Sampling preserves the parent problem's decision structure and specifies what the new problem must change.
A structural operator specifies a concrete modification, such as introducing multiple periods, shared capacity, or fixed activation costs. Each operator declares the required constraint families and a minimum number of constraints. When structural variation is enabled, the constraint-family list must differ from that of the parent problem. Table 4 groups the operators into five categories by the object of change. Generation and gating check compliance with these requirements.
| Group | Example changes | Required model changes |
|---|---|---|
| Time | Multiple periods; time windows | Links between states or resources across periods; time bounds |
| Capacity | Shared capacity; bounded overflow | Aggregate resource constraints; overflow variables and upper bounds |
| Cost | Fixed costs; conditional penalties | Activation–usage links; corresponding objective terms |
| Logic | If–then rules; mutually exclusive choices | Conditional constraints; selection and cardinality limits |
| Coupling | Shared resources; carryover across periods | Balance and linking constraints across decisions or periods |
Table 4: Structural operators and the modeling changes they require.
C. Generation. The candidate plan is submitted to an LLM inference endpoint to generate, in sequence, a structured semantic plan, a new problem statement, and a FlatMILP representation. The semantic plan specifies variable meanings, the objective, and constraint requirements; the problem statement supplies all data needed to solve the problem; and FlatMILP expresses these requirements as variables, an objective, and linear constraints. Each stage is checked against the candidate plan. Failure reasons are returned to the corresponding stage for a bounded number of revisions; candidates that still fail are rejected. Executable code is converted from FlatMILP, and the solver provides the reference objective.
D. Gating. Table 5 lists eight admission checks. Failures in the plan, problem, or model checks are returned to the corresponding LLM generation stage for bounded revision; candidates are rejected when the revision limit is reached. Failures in the remaining checks do not trigger model revision. The code and solve checks share execution evidence.
Across four principal synthesis runs, deduplication by candidate ID yields 7,008 terminal candidates: 2,807 were accepted (40.05%) and 4,201 were not retained (59.95%). Table 6 reports terminal rejection attribution across these runs (earlier production batches used Gurobi as the numerical backend before standardizing on the COPT dual-interface configuration below; finalized records retain the verified reference objectives from their respective solver runs). Because Code and Solve share execution logs, their rejections are combined as shares of terminal candidates.
Code and solver execution. The two code formats converted from FlatMILP use the following execution paths:
- Pyomo: Call COPT through copt_direct.
- gurobipy: Export LP/MPS and pass it to COPT. gurobipy provides the modeling and export interface; COPT performs numerical optimization.
COPT serves as the common numerical backend for both interfaces and supplies each newly generated instance's reference objective (GT). Combining stage-level plan–statement–FlatMILP gates with dual-interface execution and subsequent independent statement-to-code reconstruction cross-validates both statement semantics and reference objective values.

Table 5: Gating criteria for accepting a synthesized candidate.
| Gate | Acceptance criterion |
|---|---|
| Plan | Preserve the decision structure specified by the candidate plan and change the domain as planned. The semantic plan must incorporate the specified constraint families, structural changes, and modeling pitfalls. If structural variation is enabled, the constraint-family list must differ from the parent problem's. |
| Problem | The statement is self-contained and excludes excessively short text, placeholders, external files, attachments, URLs, implicit road networks, and ambiguous quantities. Data must be provided within the statement as prose or tables, as planned. |
| Model | The objective direction and constraint families in FlatMILP correspond to the semantic plan. Added constraint families must be declared and present in the model; additions must stay within the declared scope. Each operator's minimum constraint count must be met. |
| Scale | Only when scale variation is enabled, check that variable and constraint counts and the scale tier meet the configured requirements of the selected tier. |
| Code | Convert the same FlatMILP into two code formats, check syntax, and record execution results for each. Retain code that passes the checks, together with its interface information. |
| Solve | Obtain an objective value returned by COPT through the corresponding code path, record successful solving for that path, and save the reference objective as GT. |
| Neighbors | Filter near neighbors by statement and structural similarity, using the thresholds below. Structural comparison is performed only when structural variation is enabled and excludes the parent problem itself. |
| Quota | Once the number of accepted records from a parent problem reaches the configured limit, accept no further candidates from that parent. |
Table 6: Terminal candidate rejection counts and shares across the four principal synthesis runs.
| Final rejection attribution | Count | All candidates | Not retained | |
|---|---|---|---|---|
| Plan | 243 | 3.47% | 5.78% | |
| Problem | 153 | 2.18% | 3.64% | |
| Model | 155 | 2.21% | 3.69% | |
| Scale | 126 | 1.80% | 3.00% | |
| Code + Solve | 3,131 | 44.68% | 74.53% | |
| Neighbors | 35 | 0.50% | 0.83% | |
| Quota | 49 | 0.70% | 1.17% | |
| Worker exception | 309 | 4.41% | 7.36% | |
| Not retained | 4,201 | 59.95% | 100.00% |
Denominators are 7,008 terminal candidates and 4,201 non-retained candidates. Accepted-pool counts track candidate problems, whereas final training exports count problem–interface records after supplementary curation.
Near-neighbor filtering. For a candidate and problems in the seed pool, statement and structural similarities are computed as:
\(s_{\text{struct}} = 0.72J_F + 0.28\cos(\mathbf{v}_x, \mathbf{v}_y).\)
Here, ,2 is word-bigram Jaccard similarity, is word-set Jaccard similarity, and ,5 is character-5 gram Jaccard similarity. is constraint-family Jaccard similarity, and v is a vector of scale features. A candidate is rejected if statement similarity reaches 0.72 or structural similarity reaches 0.94. Statement comparison uses the entire pool. Structural comparison excludes the parent problem and is performed only when structural variation is enabled.
Scope of checks. Whether every constant is explicitly included in the statement, and whether all constraint families retained from the parent but not named by an operator are labeled, are recorded as warnings and do not independently cause rejection. Review, infeasibility-conflict repair, dualreference checks, and weak-relaxation checks are optional and are not mandatory gates. Subsequent independent base-model sampling provides further verification.

Outputs and Answer Verification. We use the same objective-matching rule for independent synthesis verification, trajectory admission, RL reward scoring, and benchmark evaluation:
$\(|\widehat{z} - z^{\star}| \le 10^{-4} + 10^{-6}|z^{\star}|,\tag{1}\)$
where \(\widehat{z}\) is the executed objective and \(z^*\) is the reference objective (distinct from the numerical solver's internal feasibility and optimality tolerances). Because Block B resamples domains, entities, numerical parameters, and structural constraints, each synthesized candidate defines a brandnew optimization instance rather than reusing the parent seed's numerical answer. Its reference objective (GT) is derived from the newly generated FlatMILP via dual-format code compilation (Pyomo and gurobipy) and COPT numerical optimization in Block D. To ensure that this solver-derived reference objective faithfully reflects the natural-language problem statement, stage-level gates first check plan–statement–FlatMILP alignment (Table 5), and Section 3.2.3 subsequently performs independent text-to-code verification: the base model (or a teacher/expert fallback) must independently reconstruct solver code from the problem statement alone and match the COPT reference objective before the instance is admitted to SFT or RL training. Verified compiled code from Block D can also be exported directly as code-answer SFT data when trajectory sampling is not required.
3.2.3 Empirical Solve-Rate Sampling and Data Routing¶
Base-Model Sampling For each accepted problem–modeling-interface pair from Section 3.2.2, the base model independently samples multiple solution responses. Each attempt receives only the natural-language problem statement (without access to the semantic plan, FlatMILP, or reference objective) and generates a reasoning trace and executable modeling code. The code is executed, its returned objective is compared against the COPT reference objective from Block D using Eq. (1), and responses that pass verification are retained. This step simultaneously measures the problem's empirical solve rate, acc (the fraction of sampled responses whose objectives match the reference), and cross-verifies that the problem statement and reference objective are mutually consistent.
SFT and RL Routing SFT uses problem statements paired with verified reasoning and modeling code; RL uses statements and reference objectives, with responses generated by the current policy. Table 7(a) gives the principal use of each empirical Base acc group (evaluated under its source-pool sampling budget), and part (b) reports the final training exports after supplementary revision and verification.
For problems with Base acc = 0, we apply Grok-4.6-assisted correction followed by human revision, admitting corrected problem statements and trajectories only after execution matches the reference objective under Eq. (1). This verified group (which retains its initial acc = 0 stratum label) contributes 405 SFT problem–interface records, of which 313 and 263 also enter Chat RL and Thinking RL, respectively.
Chat and Thinking RL Data Chat GRPO uses a broader pool of 2,324 records to consolidate accessible formulation patterns efficiently, after which Thinking GRPO focuses extended reasoning on a 1,274-record subset contained within the Chat pool (SFT shares 1,068 problem—interface pairs with Chat RL and 656 with Thinking RL), connecting data routing directly to our sequential training recipe in Section 3.3.
Coverage of the Final Training Data Figure 3 compares the original public-pool distribution with the modeling requirements represented in the final training exports. Synthesis broadens coverage across the shared OR taxonomy—spanning production and extraction, allocation, routing, facility location, inventory, transfers, computing-task placement, communication routing, and project maintenance, paired with fixed charges, network flows, inventory balances, time-indexed decisions, assignments, and resource-constrained scheduling. Multiple explicitly supported requirements may coexist in a statement, so a training record can occupy several cells.
Remaining blank cells reflect finite synthesis budgets and quality-gating exclusions across the \(21 \times 31\) matrix; Section 3.4.3 evaluates how this training distribution translates into post-training reliability gains across scenarios.


Figure 3: Scenario–technique coverage across data sources. (a) Original labeled public benchmark samples (primary labels); (b) final post-training records (including multi-pair statements, so cell shares overlap). Blue shading gives the proportion of each panel's records involving a cell on a common linear scale; light gray denotes zero observed records; red outlines indicate SLAI-OR-BENCH-HARD cells.

Figure 4: Overview of the label-guided data synthesis (Blocks A–D) and trajectory-routing pipeline. Candidate generation incorporates stage-level checks and bounded revisions, after which base-model sampling and solver verification route accepted problems to SFT and RL (Section 3.2.3.

Table 7: Training-data routing and final composition.
(a) Principal training use¶
| Base-model acc | Training use | Supervision / verification |
|---|---|---|
| acc = 0 | LLM / human correction | Admit corrected problems and trajectories only after execution and reference-objective verification. |
| \(0 < acc \le 0.20\) | SFT + RL | Correct sampled trajectories demonstrate solution methods; verified prompts also support online RL. |
| 0.20 < acc < 1 | Primarily RL | Statements and reference objectives support improved sampling reliability; selected correct demonstrations may enter SFT. |
| acc = 1 | Selectively retained | Retain selected verified records to preserve already reliable solution patterns. |
(b) Final problem-interface records¶
| Base acc / record group | SFT | Chat RL | Thinking RL |
|---|---|---|---|
| acc = 0 | 405 (28.72%) | 313 (13.47%) | 263 (20.64%) |
| \(0 < acc \le 0.20\) | 418 (29.65%) | 371 (15.96%) | 289 (22.68%) |
| 0.20 < acc < 1 | 149 (10.57%) | 1,343 (57.79%) | 690 (54.16%) |
| acc = 1 | 438 (31.06%) | 297 (12.78%) | 32 (2.51%) |
| Total | 1,410 | 2,324 | 1,274 |
Percentages use each export's total. The Base acc = 0 row contains the verified correction group. Exports overlap and are not disjoint counts of questions; rounded percentages may not sum exactly to 100%.
3.2.4 Lexical and Structural Non-Overlap Audit¶
The near-neighbor gate in Block D (Near-neighbor filtering) screens generated candidates against the seed pool. After supplementary correction and verification, we also audit every finalized training record against all 393 distinct text versions of the 131 SLAI-OR-BENCH instances. This final-export audit covers all 1,410 SFT, 2,324 Chat-RL, and 1,274 Thinking-RL records (5,008 records and 1,685 distinct statements after interface-template removal).
Normalized exact matching, number-masked template matching, and text-neighbor screening at similarity \(\geq 0.72\) each flag 0 records (0%) in every export, confirming zero direct duplicates or above-threshold lexical neighbors between the finalized training files and SLAI-OR-BENCH.
At the taxonomy level, 36 of the 45 distinct Hard scenario–technique pairs appear in training (with 786 SFT, 1,161 Chat-RL, and 705 Thinking-RL records sharing at least one scenario–technique pair with the test set), reflecting shared mathematical formulation families rather than instance overlap. A finer source-level check over retained constraint-family profiles for 60 historical candidates and 84 benchmark-matching sources (5,040 pairs) linked to 72 final records (27 SFT, 30 Chat-RL, and 15 Thinking-RL) bounds the Block D structural score via \(0.72J_F \leq s_{\rm struct} \leq 0.72J_F + 0.28\) (where archived scale vectors v were omitted). For 70 of the 72 records, even this conservative upper bound remains strictly below the 0.94 threshold against all 84 benchmark sources; for the remaining two SFT records, the interval straddles 0.94 solely due to missing scale vectors, while both pass all exact, number-masked template, and lexical near-neighbor (< 0.72) checks above.
3.3 Cold-Start SFT and Failure-Tiered Multi-Stage GRPO¶
Post-training follows Base \(\rightarrow\) cold-start SFT \(\rightarrow\) GRPO. SFT supplies verified formulation demonstrations, followed by Chat GRPO on the broader prompt pool and Thinking GRPO on its selected subset. Failure reward tiers distinguish usable execution outcomes, while outcome masking excludes responses whose correctness cannot be judged reliably.
3.3.1 Cold-Start Supervised Fine-Tuning¶
Cold-start SFT demonstrates constraint formulations and modeling structures, aiming to raise the probability of sampling useful trajectories during subsequent GRPO. It uses 1,410 verified problem—interface demonstrations, including 405 from the verified Base acc = 0 correction group. Training
14

initializes directly from Base and runs for 25 updates with learning rate 1.25 × 10−6 , global batch size 64, micro batch size 1, and maximum sequence length 65,536 tokens. We use two warmup updates and cosine decay to a minimum learning rate of 1.25 × 10−8 . The training schedule consumes 1,600 sample indices, covering all 1,410 records with 190 repeated indices. The checkpoint comparisons in Section 3.4.2 examine the resulting SFT-only and combined outcomes.
3.3.2 Failure-Tiered Rewards, Outcome Masking, and Sequential GRPO¶
GRPO estimates relative advantages across multiple sampled responses to the same prompt. Rather than training a separate neural reward model, we execute the generated solver code and compare its returned objective value against the reference objective using Eq. 1, the same absolute-plus-relative tolerance used in data verification and evaluation. As summarized in Table 8, responses that yield a definitive execution outcome receive tiered scores based on correctness and failure mode, whereas responses affected by external resource or interface limits are masked out of advantage estimation.
| Outcome | Score | Advantage | Purpose |
|---|---|---|---|
| Objective matches the reference under Eq. (1) | 1 | Included | Objective-level correctness |
| A numeric solution is returned, but the objective does not match | 0 | Included | Prefer executable errors to execution failures |
| Infeasible or empty model; no code can be extracted | −0.1 | Included | Rank comparable failures |
| Syntax error, unfinished code, JSON literals used as names, or overlong variable names | −0.15 | Included | Penalize avoidable code errors |
| More than 2,000 variables or constraints, or a license size limit; HiGHS retry also fails | ∗ 0 | Masked | Exclude resource-limited outcomes |
| Solver runtime exceeds 120 seconds | 0∗ | Masked | Do not infer correctness from a timeout |
| Response reaches the output length limit | 0∗ | Masked | Do not treat truncation as a modeling error |
| HiGHS does not support the nonlinear or higher-order expression | ∗ 0 | Masked | Avoid bias toward supported formulations |
Table 8: GRPO reward tiers and masking rules.
Failure Reward Tiers. When every valid response in a prompt group fails, binary rewards assign zero to all trajectories and yield no centered task-reward contrast. Failure tiers (0, −0.1, and −0.15) distinguish an executable but numerically incorrect formulation from infeasible or unextractable code and from basic syntax failures. Whenever multiple failure severities appear in an all-wrong group, subtracting the valid-response mean preserves positive and negative relative advantages toward executable formulations (groups whose valid responses all land in the same tier yield zero task-reward advantage, while the separate reference KL term remains active).
Outcome Masking. Assigning a fixed penalty to resource-limited or truncated rollouts would distort group statistics by penalizing valid large-scale formulations. Models that exceed the local Gurobi license size limit (2,000 variables or constraints) are automatically retried with HiGHS under a 60-second limit and a 20,000-size cap. If HiGHS returns a numeric solution, the response is scored under the first two tiers of Table 8; otherwise, the trajectory is masked. Solver timeouts (> 120 s), expressions unsupported by HiGHS, and responses truncated at the token limit are likewise excluded from group advantage computation.
Together, Failure Reward Tiers and Outcome Masking separate gradable modeling errors from ungradable resource or interface limits. Group-mean advantage centering is computed solely over valid unmasked responses (Eq. 2); if all responses in a group are masked ( = 0), the group contributes zero task-reward gradient.
∗ Zero is a placeholder only; masked responses are excluded from group statistics and advantage estimation. Data verification, reward scoring, and SLAI-OR-BENCH evaluation share the absolute-plus-relative tolerance in Eq. 1.

Ablation Evidence for the GRPO Reward and Masking Design Figure 6(b) provides empirical support for the reward and masking design above. Failure Tiers give below-mean failures negative relative advantages, supplying a task-reward update that suppresses those responses even in an all-wrong group when failure scores differ. Outcome Masking restricts this feedback to gradable outcomes by excluding resource-limited, timed-out, or truncated responses from the group statistics.
The ablation compares binary rewards (0/1), Failure Tiers without masking, and the complete design used by the main SFT+RL model. Failure Tiers raise pass@1 from 25.54% to 34.40% and pass@8 from 47.31% to 49.46%. Adding Outcome Masking further raises these scores to 35.89% and 51.61%, gains of 1.49 and 2.15 percentage points over tiers alone. The full design leads at all five evaluated sampling budgets, exceeding binary rewards by 10.35 points at pass@1 and 4.30 points at pass@8. These results support combining graded failure feedback with the exclusion of ungradable outcomes in the main GRPO recipe, improving both single-attempt reliability and sampled solve coverage.
Chat GRPO initializes from the 25-update cold-start SFT checkpoint, and Thinking GRPO initializes from Chat200. Thus both stages in Figure 5 belong to the SFT-initialized main run. Each stage runs for 200 updates, with 32 prompts per update and a nominal average of eight responses per prompt. They use learning rate \(10^{-6}\) , a separate reference-policy KL loss with coefficient 0.001, prompt and response limits of 16,384 tokens each, rollout temperature 1, and top-p 1. Validation uses 177 held-out seed problems from the curated parent pool (strictly disjoint from SLAI-OR-BENCH), represented through both Pyomo and gurobipy interfaces (354 records), with greedy generation and one response per record.

Figure 5: Sequential Chat and Thinking GRPO training dynamics. (a) Validation solve rate; (b) training and validation reward; (c) policy entropy; (d) response length. The horizontal axis counts cumulative GRPO updates. Faint lines show raw training values and solid lines show stage-specific seven-step moving averages; validation solve rates are unsmoothed. Both stages use the same validation records, but generation templates and scoring paths change at the boundary, so the boundary evaluations are shown separately. The star marks Thinking160 (cumulative update 360), used for final test evaluation.
Training Outcomes Chat GRPO increases validation solve rate from 34.46% at the SFT checkpoint to 46.61% at Chat200. Switching to the Thinking generation template and scoring path re-evaluates the inherited Chat200 weights at 33.05%. The solve rate rapidly recovers to 44.92% at Thinking20 and 49.44% at Thinking40, reaches 49.72% at both local steps 120 and 160, and ends at 46.33% at step 200.
Training-Process Interpretation The boundary dip reflects initial format and length adaptation upon switching to the Thinking template and scoring path. Among the 354 validation responses at Thinking0, 98 (27.68%) lack the closing thinking marker and 69 (19.49%) have an empty thinking body, causing rejection prior to solver-code scoring; re-encoding the 98 unclosed responses with the run's tokenizer places all of them at the 16,384-token output limit. By Thinking40, empty thinking bodies disappear, unclosed responses drop to 42 (11.86%), and solve rate rebounds to 49.44%; by Thinking160, unclosed responses fall further to 26 (7.34%).
Selection of Thinking160 Final test evaluation uses Thinking160 (cumulative update 360: 200 Chat updates plus 160 Thinking updates). Checkpoints 120 and 160 tie at the peak validation solve rate (49.72%, ahead of 46.33% at step 200), with step 160 exhibiting higher mean validation reward (0.4462 versus 0.4388) and a lower oversized-model failure rate (11.02% versus 12.15%).
Comparison with RL without Cold-Start SFT Figure 6a) compares Base, RL-only, and the main SFT+RL recipe on the Hard set at ∈ {1, 2, 4, 6, 8}. RL-only improves pass@1 from Base's 26.88% to 33.87%, whereas its pass@8 reaches 44.09%, below Base's 46.24%. SFT+RL leads at every plotted budget, reaching 35.89% at pass@1 and 51.61% at pass@8 (+2.02 and +7.52 percentage points over RL-only, albeit under distinct training schedules), improving both single-attempt precision and multi-sample solve coverage.

Figure 6: Sampling performance on SLAI-OR-BENCH-HARD at ∈ {1, 2, 4, 6, 8}. (a) Base, RL-only, and SFT+RL. (b) Ablation evidence for the GRPO reward and masking design: binary rewards (0/1), Failure Tiers without masking, and Failure Tiers with Outcome Masking. The rose curves in both panels use the same main SFT+RL measurements and lead at every plotted budget.
3.3.3 Zero-Advantage Interventions in Group-Relative RL¶
Under group-mean advantage centering,
$\(A_i = r_i - b_g, b_g = \bar{r}_g = \frac{1}{G_g} \sum_{j \in I_g} r_j,\)$ (2)
where denotes the = | | unmasked responses to prompt , both all-correct groups and uniform-score all-wrong groups yield zero centered task-reward advantages (though the separate reference KL penalty remains active). While Failure Reward Tiers (Table 8 recover relative gradients whenever failure severities differ within a group, uniform groups still either expend rollout budget on already reliable prompts or provide no positive target on persistently unsolved prompts.
To test whether explicit zero-advantage interventions improve generalization, we compare standard group-mean GRPO (Baseline) against three targeted mechanisms in a controlled 200-update Chat-GRPO study initialized directly from Base (without cold-start SFT; 32 prompts and 256 nominal

responses per update, evaluated every ten updates via greedy decoding on the 177-problem, 354-record seed validation set):
- Downsample reduces the nominal rollout allocation from 8 to 2 on prompts that were all-correct at their previous visit, redistributing saved slots round-robin across remaining prompts (up to 16 per prompt) (Yu et al., 2025; Zheng et al., 2025; Li et al., 2025).
- Replay maintains a library of verified same-prompt successes and replaces one failed trajectory in each all-wrong group with a stored correct trajectory (re-scored at PPO ratio 1 without off-policy importance correction) (Yan et al., 2025; Zhang et al., 2025; Zhan et al., 2026).
- Virtual Reward replaces the group-mean baseline \(b_g\) with a positive constant c = 0.1 whenever \(\max_{j \in I_g} r_j \le 0\) , rendering every failure advantage strictly negative while preserving relative failure-tier spacing (Zhu et al., 2025).
Table 9: Summary of Base-initialized Chat-GRPO variants for zero-advantage groups. Validation columns report greedy solve rates (%) on the 354-record seed panel; parentheses denote the best checkpoint's update. Training reward, entropy, and response length are means over updates 191–200.
| Validation (%) | Length | ||||||
|---|---|---|---|---|---|---|---|
| Experiment | Update 0 | Best (update) | Update 200 | reward | Entropy | (tokens) | |
| Baseline | 40.11 | 50.00 (150) | 48.02 | 0.783 | 0.044 | 2,729 | |
| Downsample | 34.46 | 49.15 (120) | 48.87 | 0.701 | 0.057 | 2,129 | |
| Replay | 37.29 | 49.72 (150) | 42.66 | 0.719 | 0.058 | 3,118 | |
| Virtual Reward | 33.90 | 47.18 (80) | 44.35 | 0.775 | 0.132 | 6,247 |
As summarized in Table 9, each intervention produces its intended training-side shift: Downsample directs 90.9% of active rollout slots to non-easy prompts and achieves the highest final-step accuracy (48.87%); Replay lifts autonomous rollout success on hard training prompts in the final quarter of training from 4.4% to 37.8%; and Virtual Reward accelerates early training reward and validation gains around updates 41–90 before inducing late-stage entropy and length inflation (2.3× Baseline length). Nevertheless, none of the three variants surpasses standard group-mean Baseline's peak validation solve rate (50.00%), as localized training-prompt gains, uncorrected off-policy replay ratios, and unannealed negative baselines do not translate cleanly into held-out greedy accuracy (note also that Update-0 greedy scores span 33.90%–40.11% across identical initial weights due to non-deterministic parallel reductions and discrete Top-6 MoE routing boundary flips in distributed rollout workers prior to the alignment repairs in Section 4.2). Moreover, while Base-initialized Chat-GRPO Baseline reaches a slightly higher greedy score on this in-distribution seed panel (50.00% peak, 48.02% final) than SFT-initialized Chat200 (46.61%) because it sharpens Base's native seed formatting without off-policy distribution shift, cold-start SFT proves critical for expanding multi-sample structural coverage on held-out SLAI-OR-BENCH-HARD once paired with sequential Chat/Thinking GRPO (Section 3.4.2). We therefore retain standard group-mean advantage centering paired with Failure Reward Tiers and Outcome Masking in our main SFT+RL recipe, and provide full mathematical formulations, mechanism diagrams, learning curves, and diagnostic analyses in Appendix D.
3.4 Empirical Gains and Scenario-Level Capability Transitions¶
3.4.1 Single-Turn Benchmark Accuracy¶
We compare DeepSeek-V4-Flash-0731 (Base), our post-trained SLAI T-Rex-V2 (SFT+RL) model, and two frontier closed-source baselines, Claude Opus 5.5 and GPT-6.1-Sol (Gemini-4-Argon was evaluated only in the initial public-benchmark saturation survey in Table 1). Table 10 reports single-turn solve accuracy on the full SLAI-OR-BENCH collection (131 tasks) and SLAI-OR-BENCH-HARD (93 tasks).
Post-training in SLAI T-Rex-V2 raises accuracy from 38.26% to 50.86% on the full 131-task benchmark (+12.60 percentage points over Base, and +5.82 and +6.59 points ahead of GPT-6.1-Sol and Claude Opus 5.5) and from 26.88% to 35.89% on the 93-task hard subset (+9.01 points over Base, slightly surpassing GPT-6.1-Sol at 34.41% and Claude Opus 5.5 at 33.33% under single-draw evaluation).

Table 10: Single-turn solver-based accuracy on SLAI-OR-BENCH (%). Base and SLAI T-Rex-V2 (SFT+RL) report mean accuracy across eight independent evaluation runs; closed-source baselines reflect recorded single-turn benchmark evaluations.
| Benchmark | Base | SLAI T-Rex-V2 (SFT+RL) | Claude Opus 5.5 | GPT-6.1-Sol |
|---|---|---|---|---|
| SLAI-OR-BENCH (131) | 38.26 | 50.86 | 44.27 | 45.04 |
| SLAI-OR-BENCH-HARD (93) | 26.88 | 35.89 | 33.33 | 34.41 |
3.4.2 Multi-Sample Coverage and Reliability Migration¶
Figure 7a) tracks multi-sample performance across the three checkpoints of the Base → cold-start SFT → GRPO recipe: Base, SFT-only, and the final SFT+RL model. Base and SFT+RL use eight per-question draws (supporting paired reliability transitions in Panel (b)), whereas SFT-only is summarized by aggregate pass@ statistics; Figure 6a) provides the companion comparison with RL-only.

Figure 7: Sampling performance along Base → cold-start SFT → GRPO on SLAI-OR-BENCH-HARD. (a) Base, SFT-only, and SFT+RL checkpoints; SFT+RL leads for every evaluated . (b) Paired Base-to-SFT+RL transitions among Stable (8/8), Partial (1–7/8), and Unsolved (0/8), using eight responses per problem.
The final SFT+RL checkpoint rises from 35.89% at pass@1 to 51.61% at pass@8, outperforming Base by 5.38–9.01 percentage points and SFT-only by 17.07–18.28 points across = 1, . . . , 8. Notably, 25 updates of standalone cold-start SFT temporarily lower Hard-set pass@1 from 26.88% to 18.82% and pass@8 from 46.24% to 33.33%, yet initializing two-stage GRPO from this SFT checkpoint achieves higher multi-sample coverage than our standalone RL-only run from Base (51.61% versus 44.09% at pass@8; Figure 6a)). While RL-only follows a separate single-run schedule rather than a step-matched two-stage ablation, this "dip-then-lift" trajectory along the main pipeline reflects complementary stage dynamics: brief off-policy SFT on dual-interface demonstrations—nearly 29% of which originate from corrected Base acc = 0 tasks—perturbs the base model's default output distribution and narrows raw sampling diversity prior to online adaptation, depressing immediate zero-shot pass@, while seeding explicit formulation structures that subsequent solver-verified Chat and Thinking GRPO recalibrate and amplify.
In the paired Base-to-SFT+RL analysis, all initially Stable problems remain Stable. Six problems move from Partial to Stable (6.45% of Hard), eight move from Unsolved to Partial (8.60%), and three regress from Partial to Unsolved (3.23%), with no direct Unsolved-to-Stable jump, yielding a net solve-coverage gain of +5.38 percentage points (Figure 7b)).

3.4.3 Scenario and Pitfall Analysis of Reliability Transitions¶
Figure 8 decomposes these paired transitions across the 19 synthesis scenarios represented in SLAI-OR-BENCH-HARD. Open and filled points denote Base and SFT+RL within-scenario pass rates, while right-hand columns report transition shares normalized over all 93 Hard instances.

Figure 8: Paired scenario-level performance and reliability transitions from Base to SFT+RL across the 19 synthesis scenarios represented in SLAI-OR-BENCH-HARD.
Blending contributes 3.23% of all Hard problems to Unsolved-to-Partial migration, projects and maintenance contribute 2.15%, and vehicle routing, channel routing, and production and extraction each contribute 1.08%. Their associated pitfalls involve aggregate product-quality constraints; resource eligibility, concurrency, precedence, and per-period budgets; waiting actions and space– time conflicts; route-wide channel consistency and shared capacity; and aggregate energy and environmental limits. These transitions connect our synthesis taxonomy directly to formulation requirements that post-training unlocks, while the absence of direct Unsolved-to-Stable jumps underscores the difficulty of mastering newly acquired structures in a single training cycle.
Partial-to-Stable consolidation occurs in blending, production and extraction, transport allocation, job scheduling, paired assignment, and channel routing; in transport allocation and job scheduling, higher pass@1 at unchanged pass@8 reflects sharpened single-attempt reliability within existing coverage. Localized regressions remain in berth and gate assignment, quota selection/coverage,
and one production-and-extraction instance, indicating that capability gains across coupled combinatorial constraints remain uneven. Scaling this solver-in-the-loop GRPO pipeline reliably and cost-effectively across large MoE models motivates the Ascend systems and algorithmic optimizations examined next in Section 4.
4 Systems and Algorithmic Infrastructure for Execution-in-the-Loop RL¶
Training SLAI T-Rex-V2 with reinforcement learning (RL) requires coupling long-horizon reasoning and external solver or profiler execution with full-parameter updates of a large Mixture-of-Experts (MoE) model DeepSeek-AI, 2025; Ahmaditeshnizi et al., 2024; DeepSeek-AI, 2024. Building on our foundational training stack for the DeepSeek-V4 family on Huawei CloudMatrix384 SuperPOD Zuo et al., 2025; Li et al., 2026—whose compute nodes equip Huawei Ascend 910C / Ascend A3 (ascend910_93) dual-die packages, so an eight-card node exposes either 8 physical cards or 16 logical NPU dies depending on the parallelism layout—this section presents four controlled systems and algorithmic studies across the execution-in-the-loop RL pipeline. Rather than retroactively modifying the frozen post-training run of Section 3, each subsection isolates a specific bottleneck against a matched baseline under its corresponding workload and checkpoint lineage to establish validated components for next-generation unified training:
-
- High Rollout and Verification Cost (Section 4.1: Solving difficult OR problems requires generating multi-thousand-token reasoning traces and executing external solvers, while uniformoutcome groups under GRPO Shao et al., 2024; Yu et al., 2025 yield zero task-reward gradients. Discarding verified trajectories after a single gradient step leaves substantial supervision unused, motivating bounded same-batch trajectory reuse with recalibrated advantages.
-
- Training–Inference Numerical Mismatch (Section 4.2: Decoupled RL pipelines Sheng et al., 2025 generate rollouts in an inference engine (vLLM-Ascend) and compute gradients in a training engine (MindSpeed-LLM/Megatron). Differences in parallel reduction orders, precision formats, and NPU kernel implementations cause the two engines to assign different token probabilities under identical weights Qi et al., 2025; Zhong et al., 2026, flipping discrete MoE routing decisions and destabilizing optimization.
-
- Autoregressive Decoding Latency (Section 4.3: Long OR reasoning and code traces make decoding throughput a central deployment and rollout concern. We characterize workloaddependent draft acceptance in native multi-token prediction (MTP), study auxiliary-gradient routing during joint OR–MTP RL, and refine the private MTP module with the selected OR target frozen, auditing both offline serving throughput and solver-verified accuracy.
-
- Long-Tail Latency in NPU Kernel Optimization (Section 4.4: Optimizing underlying Ascend NPU operators Dao et al., 2022 via agentic RL requires repeated code edits, compilation, correctness verification, and hardware profiling Wu et al., 2026; Dai et al., 2026. Waiting for multi-hour episodes to finish causes severe learner starvation, motivating solver-guided parameter warm starts and asynchronous candidate-prefix RL with shared experimental memory.
4.1 Advantage Recalibration for Same-Batch Trajectory Reuse¶
Improving the throughput of rollout generation addresses only one part of the cost of reinforcement learning (RL). In operations research (OR), each new response can require a long reasoning trace, solver-facing code, and execution to obtain a correctness signal. Discarding this response after a single update may leave useful supervision unexploited. Prior work such as ReMix and ExGRPO has explored off-policy data reuse and experience management for language-model RL Liang et al., 2025; Zhan et al., 2026. We focus on extracting the remaining learning value of already generated and verified trajectories, while avoiding repeated optimization against an outdated advantage. Our design couples current-reference advantage recalibration, a matching weighted actor objective, and group-level reuse gates. It is implemented as a bounded same-batch loop in DeepSeek-V4-Flash training (Figure 9, without a persistent replay buffer or additional rollout-based calibration stage.
4.1.1 Reinterpreting Historical Outcomes under the Current Policy¶
Let be a prompt, a stored response, and ∈ {0, 1} its solver-based correctness reward. Although a response and its verified outcome are fixed, its advantage depends on the policy used as the
21


Cap reached or no active signal: discard batch, synchronize policy, generate again
Figure 9: Workflow of bounded same-batch trajectory reuse ( \(R_{\text{max}} = 4\) ). Stored responses and their birth-policy log-probabilities are retained across up to four updates; before each reuse step, the current learner re-scores active groups to recalibrate advantages and evaluate group eligibility gates without re-running generation or the solver.
comparison reference. For a sampling policy \(\pi_u^s\) after u optimizer updates, the conceptual reference and unstandardized advantage are
$\(V_{u}(x_{g}) = \mathbb{E}_{Y \sim \pi_{u}^{s}(\cdot | x_{g})}[r(x_{g}, Y)], \qquad A_{i,u}^{*} = r_{i} - V_{u}(x_{g}).\)$ (3)
Consequently, \(A_{i,u}^* - A_{i,v}^* = -[V_u(x_g) - V_v(x_g)]\) . A successful answer becomes less exceptional as the policy improves on its prompt. An unsuccessful answer can instead acquire a more negative advantage. Thus, neither reuse count nor a universal decay factor describes the evolution of every training signal. The reference must be allowed to move in either direction.
We estimate a current-relative reference using the responses already available for each prompt. Let \(I_g\) contain the responses with valid training masks, \(G_g = |I_g|\) , \(m_{i,t}\) be the fixed birth token mask, and \(L_i = \sum_t m_{i,t}\) . At the beginning of each reuse update, a frozen snapshot \(\bar{\pi}_u\) of the current learner scores the stored responses. Relative to the learner snapshot \(\pi_b\) taken when the batch was generated, define
$\(q_{i,u} = \frac{\exp(z_{i,u}/\tau)}{\sum_{j \in I_g} \exp(z_{j,u}/\tau)}, \qquad \widehat{p}_{g,u} = \sum_{i \in I_g} q_{i,u} r_i.\)$ (4)
Here \(h_{i,t} = (x_g, y_{i,< t})\) is the token context and \(\tau = 0.03\) controls the sensitivity of relative weights. Because both \(\bar{\pi}_u\) and \(\pi_b\) are evaluated on the learner backend, any numerical discrepancy between the rollout and training engines is cancelled out of \(z_{i,u}\) . The tempered, length-normalized weights \(q_{i,u}\) capture relative likelihood shifts over the observed candidate set \(I_g\) rather than full-trajectory importance sampling ratios (Owen, 2013, Chapter 9), and \(\hat{p}_{g,u}\) serves as a finite-support proxy for the current expected reward on prompt \(x_g\) .
We retain the birth-group sample standard deviation \(\sigma_{g,0} = [\sum_{i \in I_g} (r_i - \bar{r}_g)^2/(G_g - 1)]^{1/2}\) , where \(\bar{r}_g = G_g^{-1} \sum_{i \in I_g} r_i\) , and form
$\(\widehat{A}_{i,u} = \frac{r_i - \widehat{p}_{g,u}}{\sigma_{g,0} + \epsilon'}, \qquad B_{i,u} = G_g q_{i,u} \widehat{A}_{i,u}, \qquad \epsilon = 10^{-6}.\)$ (5)
Using the same weights \(q_{i,u}\) for both reference estimation and the actor coefficient ensures zero-sum group weights, \(\sum_{i \in I_g} B_{i,u} = 0\) . At the initial update (u = 0), \(z_{i,0} = 0\) and \(B_{i,0}\) reduces to the standard GRPO group-normalized advantage (Shao et al., 2024). Freezing the denominator at the birth scale \(\sigma_{g,0}\) prevents residual noise from being amplified as within-group reward variance shrinks across reuse steps (Liu et al., 2025). For binary rewards \(r_i \in \{0,1\}\) , the mean absolute actor coefficient satisfies
which smoothly diminishes as the candidate probability mass concentrates on either all-pass ( \(\widehat{p}_{g,u} \to 1\) ) or all-fail ( \(\widehat{p}_{g,u} \to 0\) ) outcomes.

4.1.2 A Matching Actor Objective and Bounded Reuse¶
Let \(a_{g,u} \in \{0,1\}\) indicate whether group g is eligible for the next update, and let N be the nominal number of response slots in the batch. We optimize the sequence-mean, token-mean objective
$\(\mathcal{L}_{\text{reuse}}(\theta; u) = -\frac{1}{N} \sum_{g} \sum_{i \in I_g} a_{g,u} \operatorname{sg}(B_{i,u}) \frac{1}{L_i} \sum_{t} m_{i,t} \log \pi_{\theta}(y_{i,t} \mid h_{i,t}) + \beta \mathcal{K}_{\text{ref}}(\theta; u), \tag{7}\)$
where sg stops gradients through the estimated coefficients and \(\beta = 10^{-3}\) . The reference-policy penalty uses the same group and token masks and the same nominal denominator. Specifically,
$\(\mathcal{K}_{\text{ref}} = \frac{1}{N} \sum_{g} \sum_{i \in I_g} \frac{a_{g,u}}{L_i} \sum_{t} m_{i,t} \kappa(d_{i,t}), \qquad d_{i,t} = \log \pi_{\text{ref}}(y_{i,t} \mid h_{i,t}) - \log \pi_{\theta}(y_{i,t} \mid h_{i,t}),\)$ (8)
with \(\pi_{\rm ref}\) denoting the frozen initial reference policy. We use the clamped Schulman low-variance KL estimator (Schulman, 2020; Shao et al., 2024), \(\kappa(d) = {\rm clip}(e^{\tilde{d}} - \tilde{d} - 1, -10, 10)\) with \(\tilde{d} = {\rm clip}(d, -20, 20)\) , evaluated over retained responses.
The reward term in Equation (7) directly optimizes weighted log-probabilities without a token-level PPO clipping ratio (Schulman et al., 2017). With the batch and gates fixed, its gradient evaluated at \(\theta = \bar{\theta}_u\) equals \(-\tau N^{-1} \sum_g a_{g,u} G_g (\sigma_{g,0} + \epsilon)^{-1} \nabla_\theta \widehat{p}_{g,u}\) , connecting the detached coefficient \(B_{i,u}\) to local ascent on the candidate-weighted reward proxy \(\widehat{p}_{g,u}\) while retaining gradient-norm clipping at 1.0 and the reference KL penalty.
Group eligibility gates decouple advantage estimation from the decision to continue updating on stored responses. Alongside \(\widehat{p}_{g,u}\) , the gate monitors common likelihood drift \(\delta_{g,u} = |G_g^{-1} \sum_{i \in I_g} z_{i,u}|\) and the normalized effective sample size (ESS) diagnostic (Martino et al., 2017) computed from untempered weights \(\widetilde{q}_{i,u}\) :
$\(\widetilde{q}_{i,u} = \frac{e^{z_{i,u}}}{\sum_{j \in I_g} e^{z_{j,u}}}, \qquad e_{g,u} = \frac{1}{G_g \sum_{i \in I_g} \widetilde{q}_{i,u}^2}.\)$ (9)
Here \(e_{g,u} \in [1/G_g, 1]\) measures weight concentration across the group, while \(\delta_{g,u}\) detects uniform likelihood shifts that within-group softmax normalization would otherwise cancel out. Table 11 lists the gating rules.
Table 11: Group eligibility rules, evaluated in the listed order. Any Remove, Suspend, or Retire action sets \(a_{g,u} = 0\) for the remainder of the current four-step batch without blacklisting future generations of the same prompt (labels distinguish structural filtering, drift/low-yield suspension, and high-yield saturation).
| Condition | Action and interpretation |
|---|---|
| \(G_g < 2\) All valid rewards are identical \(\delta_{g,u} > 0.03\) or \(e_{g,u} < 0.5\) \(\widehat{p}_{g,u} \ge 0.95\) on two consecutive checks \(\widehat{p}_{g,u} \le 0.05\) on two consecutive checks Otherwise | Remove: insufficient valid responses for a comparison. Remove: no within-group reward contrast. Suspend: the historical support is unreliable. Retire: predicted high-success saturation in the candidate set. Suspend: predicted low-success saturation, not mastery. Train using the recalibrated coefficients. |
Each generated batch supports at most \(R_{\rm max} = 4\) optimizer updates. Before each additional update, the learner re-scores the original responses, recomputes the coefficients, and applies the gate. Removed groups contribute neither reward loss nor reference penalty; their slots are not refilled and the denominator N does not shrink. If every reward coefficient is zero, the loop stops without an optimizer step. After termination, the batch is discarded, the rollout policy is synchronized, and a new batch is generated. No repeated solver calls, targeted refresh queue, or online calibration rollouts are required within this loop. Re-scoring and additional optimization still incur compute costs.
4.1.3 DeepSeek-V4-Flash OR Training Setup¶
To evaluate generation efficiency under a shared initialization and correctness-only rewards, we compare a fresh-only baseline with calibrated dynamic reuse starting directly from the same DeepSeek-V4-Flash-0731 BF16 initialization on a veRL-based full-parameter training stack (Sheng et al., 2025)

across \(8 \times 16 = 128\) Ascend NPUs. The OR training file contains 557 prompts, and the fixed or_bench_hard93 (SLAI-OR-BENCH-HARD) evaluation file contains 93 problems. There are no exact duplicate prompt records across these two files. Each rollout round samples 32 prompts and generates eight responses per prompt, giving N = 256 trajectories. Training sampling uses temperature 1.0 and top-p 1.0; evaluation uses one greedy response per problem. Prompt and response limits are 4,096 and 12,288 tokens. Both runs use seed 42, learning rate \(10^{-6}\) , Adam with (0.9,0.999) momentum parameters, weight decay 0.01, and the reference penalty above.
The fresh-only baseline uses GRPO-style group-standardized correctness advantages (Shao et al., 2024) and a PPO-style clipped actor (Schulman et al., 2017), configured with ratio range [0.8, 1.2] and dual-clip factor 3; each batch supports at most one optimizer update. Whereas naive multi-epoch PPO reuses static birth-group advantages against shifting policy likelihoods, our method jointly introduces learner-side reference recalibration ( \(q_{i,u}\) ), the matching weighted log-probability objective, and ESS/drift group eligibility gates across up to \(R_{\rm max}=4\) updates per batch. This controlled comparison evaluates the integrated reuse design against standard single-update fresh-rollout GRPO under identical binary solver rewards (without length shaping); responses lacking a usable verifier outcome are masked from gradient updates while remaining counted in generation cost.
4.1.4 Generation Efficiency under Matched Training Updates¶
We compare the fresh-only baseline and calibrated reuse at a matched budget of 80 actual optimizer updates, corresponding to 80 fresh rollout rounds ( \(80 \times 1\) ) for the baseline and 20 rollout rounds ( \(20 \times 4\) ) for calibrated reuse, evaluated on the 93-problem SLAI-OR-BENCH-HARD set.

Figure 10: Training quality and generation cost under a matched budget of 80 actual optimizer updates. (a) Unsmoothed correctness on fresh training rollouts, located at the number of updates completed before generation (80 observed batches for fresh-only training and 20 for calibrated reuse). (b) Cumulative new training-response tokens, counted at completed batch-update boundaries. Lines connect recorded observations; fixed-set evaluation is reported separately in Table 12.
Table 12: Generation cost and fixed-set evaluation at 80 actual optimizer updates.
| Metric | Fresh-only | Calibrated reuse |
|---|---|---|
| Actual optimizer updates | 80 | 80 |
| Fresh rollout rounds | 80 | 20 |
| New trajectories | 20,480 | 5,120 |
| New response tokens (million) | 57.55 | 10.08 |
| Solved evaluation problems | 21/93 | 24/93 |
| Evaluation accuracy (%) | 22.58 | 25.81 |
Both runs initialize from Base (seed 42) and use single-draw greedy evaluation on SLAI-OR-BENCH-HARD (retaining unscored attempts in the 93-problem denominator). Generation cost counts all sampled training responses, excluding prompt prefill, learner re-scoring forward passes, and backward updates.

As shown in Figure 10 and Table 12, under the same 80-update budget, calibrated reuse cuts newly generated trajectories (and external solver verification calls) by 75.0%, from 20,480 to 5,120, and reduces newly generated response tokens by 82.5%, from 57.55 M to 10.08 M. On SLAI-OR-BENCH-HARD, single-draw greedy evaluation solves 24/93 problems (25.81%) versus 21/93 (22.58%) for fresh-only training, confirming that aggressive rollout reduction preserves early-stage learning progress at matched update counts (note that this standalone Chat-mode protocol uses a stricter 12,288-token cap and single greedy draw, so scores compare the two matched 80-update runs rather than the eight-run 16K/64K evaluation in Section 3).
All 20 reuse batches complete four updates, yielding 9,838 nonzero-coefficient trajectory uses after group eligibility gating and zero-contrast filtering (versus 10,520 for fresh-only). The 82.5% token saving reflects both the 4× reduction in sampled trajectories and a shorter observed mean response length (1,968 versus 2,810 tokens). Although each reuse step incurs an extra forward scoring pass on the learner backend, learner prefill over stored tokens is parallelizable across sequence positions and avoids both sequential autoregressive decoding and external MIP solver execution—the two dominant latency contributors in OR RL rollouts; benchmarking end-to-end wall-clock step times and uncalibrated multi-epoch PPO baselines over longer horizons is left to future systems evaluation.
4.2 Progressive Diagnosis and Alignment of Training–Inference Drift¶
Large language model reinforcement learning remains difficult to stabilize in practice: policies can deteriorate rapidly, leading to declining rewards or training collapse. Diagnosing these failures is challenging because optimization settings, reward design, and numerical differences in the underlying system can interact. In particular, differences in operator implementations, numerical precision, and floating-point reduction order can cause training and inference engines to assign different token probabilities even under identical model weights and inputs, a phenomenon known as training– inference mismatch (TIM) He & Thinking Machines Lab, 2025; Bai & Shen, 2026. Controlled experiments have shown that such numerical discrepancies can independently trigger training collapse, making their effects important to identify when investigating training stability Zhong et al., 2026.
In our system, vLLM-Ascend generates rollouts, while MindSpeed-LLM/Megatron performs policy updates. Debugging, rollbacks, and reruns following training failures increase the overall cost of effective training Bai & Shen, 2026. For operations research tasks that require extended reasoning and solver verification, these additional costs can further constrain the efficiency of capability exploration. However, final outputs and training curves alone are insufficient to identify the computational source of a discrepancy or determine an appropriate fix. A diagnostic workflow is therefore needed to trace where discrepancies originate, analyze how they propagate and amplify, and verify the effects of corrective measures, supporting stable training on Ascend SuperPOD.
To address this need, we conducted a series of training–inference consistency analyses and repairs, and distilled the resulting experience into a diagnostic workflow based on progressive localization and controlled validation. The workflow first compares intermediate states across model layers to identify where discrepancies increase substantially. It then uses same-input replay to progressively inspect internal modules and operators, tracing the sources of these differences. Confirmed implementation errors and precision-configuration issues are repaired, followed by renewed full-model comparisons. For amplified numerical perturbations, controlled experiments test the proposed explanations. By connecting discrepancy detection, causal investigation, and result verification, this workflow provides a repeatable procedure for diagnosing training–inference inconsistency in complex MoE models. To facilitate reuse, we further package the workflow as a Skill that guides coding agents through the diagnostic steps.
4.2.1 Layer-Wise Cosine Scanning and Recursive Module Replay¶
The core idea is to trace training–inference differences from model layers down to their internal computations. Both engines first run with the same model weights and saved token sequences, with hidden states recorded at each layer. Comparing these hidden states identifies the layer where the discrepancy grows most. That layer is then examined in greater detail, progressively narrowing the search until a kernel-level inconsistency is located or the mathematical mechanism behind the amplification is explained. Figure 11 summarizes the process.


Figure 11: Progressive diagnosis and alignment of training–inference computations. Layer-wise hidden-state comparisons identify the layer with the largest increase in discrepancy and guide finer inspection down to kernel-level computations. Same-input replay directs the analysis toward local alignment or a mathematical explanation of difference amplification. Full-model comparisons validate alignment changes and guide further analysis.
Cosine similarity is the main metric for selecting where to inspect the two engines. Let \(x_T\) and \(x_I\) be their activation matrices at the same point in the model. Rows \(x_{T,i}\) and \(x_{I,i}\) are the full output vectors for the same valid token i. The metric is the mean token cosine \(Cos(x_T, x_I) = \frac{1}{|V|} \sum_{i \in V} (x_{T,i}^T x_{I,i}) / (\|x_{T,i}\|_2 \|x_{I,i}\|_2)\) , where V is the set of valid tokens. The output difference is defined as \(Diff(x_T, x_I) = 1 - Cos(x_T, x_I)\) . This measure captures differences in output direction and provides a practical basis for locating layers that amplify discrepancies. Layers are ranked by the increase in Diff from input to output. A cosine close to one does not establish agreement in magnitude, so the largest absolute element difference, \(\|x_T - x_I\|_{\infty} := \max_{i,j} |x_{T,i,j} - x_{I,i,j}|\) , provides an additional check when needed.
Same-input replay tests whether the training-inference difference originates within the target layer. The replay feeds the exact layer input captured from the training engine (and, symmetrically, from the inference engine) into both engines' implementations of that target layer, saving intermediate hidden states within the layer. A large output difference under identical layer inputs directs the search toward finer-level inconsistencies within the target layer. The search then drills down recursively inside the target layer: hidden-state differences from the same-input forward passes are computed, the internal component with the largest discrepancy increase is selected, and the inspection checks whether a kernel has been reached. If the selected component is still a composite sub-module, it becomes the new target for finer-grained same-input forward passes and internal hidden-state comparison. Once a kernel is reached, its computational rules, configuration, and precision are checked across the engines to confirm the source of the discrepancy and then targeted alignment changes are applied. Full-model forward passes are then rerun in both engines to recompute layer-wise and final-output differences.
A small difference under identical inputs shifts the analysis toward mathematical sensitivity to upstream differences. Candidate mechanisms include changes in MoE expert selection and amplification associated with the multi-head latent attention (MLA) output projection matrices \(W_{oa}\) and \(W_{ob}\) (DeepSeek-AI, 2024). Finer-grained comparisons locate the amplification. Controlled replay across higher-level modules then tests whether the proposed mechanism explains the observed

amplification. After an alignment change is verified or an explanation is validated, the workflow checks whether any layer discrepancy still requires explanation. If so, the remaining layer with the largest discrepancy increase becomes the next target. Otherwise, the workflow ends with a report of the alignment changes, validation results, and mathematical explanations.
The complete workflow is packaged as a reusable Skill that enables coding agents to automate the diagnostic process. The Skill is publicly available at https://github.com/SLAI-AITP/rl-train-infer-diagnosis-tool.
4.2.2 Operator Defect Isolation and Alignment on Ascend¶
We evaluate both forward-pass numerical agreement and end-to-end RL training stability using DeepSeek-V4-Flash-BF16 across eight nodes, each equipped with eight Huawei Ascend 910C NPUs (64 NPUs in total). The training backend uses MindSpeed-LLM/Megatron with TP4/EP64/PP2 and sequence parallelism, while the rollout backend uses vLLM-Ascend with TP8/EP8/PP1 and full-context prefill. Forward-pass diagnostics run on a fixed panel of 16 prompt–response sequences drawn from 16 distinct prompts.
Applying the progressive localization workflow pinpoints two concrete implementation discrepancies between the engines: (i) inconsistent application of the configured SwiGLU activation clipping limit along the MoE expert feed-forward path, and (ii) a precision mismatch in the data type used to load the MoE router correction bias. In a 43-layer sparse MoE architecture, even slight pre-router numerical perturbations near Top-6 expert selection boundaries flip discrete expert assignments and compound across depth. Aligning both computations substantially improves forward agreement across all decoder layers (L0–L42). Figure 12 compares layer-wise agreement before and after alignment on the 400 token positions exhibiting the largest baseline training–inference log-probability discrepancies: at the final decoder layer (L42), mean token cosine rises from 0.980049 to 0.991762, mean Top-6 expert-set overlap rises from 93.13% to 94.42%, and mean absolute log-probability discrepancy drops by 34.1% (from 0.604612 to 0.398707), with residual differences attributable to distinct tensor/expert parallel reduction orders.

Figure 12: Layer-wise training-inference cosine similarity (left) and MoE routing agreement (right) on the fixed baseline Top-400 high-discrepancy token positions before and after alignment. Routing agreement measures the mean intersection size of the two Top-6 expert sets divided by six.
End-to-end RL training over 150 updates confirms the downstream stability impact of these repairs (Figure 13). In the unaligned baseline, rising token-probability discrepancies and rollout-to-learner KL spikes precede abrupt gradient-norm explosion and reward collapse around step 130. After aligning the SwiGLU clipping and router-bias precision paths, token-probability differences and KL divergence remain bounded, gradient norms stay flat, and reward improves steadily, preventing numerical-drift-induced RL collapse across the 150-update horizon.


Figure 13: Reward, gradient norm, mean absolute token-probability difference, and the rollout-to-training KL estimate for the baseline and candidate aligned runs, from left to right. Thin lines show raw values; thick lines show trailing five-step means. Gradient norm and KL use logarithmic axes.
4.3 Native Multi-Token Prediction and Decoupled OR-MTP Alignment¶
Operations-research (OR) solutions contain mathematical formulations and executable solver code, making generation efficiency a practical concern. Speculative decoding reduces sequential target-model evaluations by verifying several draft tokens in one pass (Leviathan et al., 2023). Multi-token prediction (MTP) extends next-token training to several future tokens (Gloeckle et al., 2024). Native MTP generates drafts from target features, shared embeddings and the output head, together with parameters specific to the MTP module. Its serving benefit depends on draft acceptance and the computational cost of drafting and verification.
OR reinforcement learning (RL) updates the target policy to improve formulation correctness, whereas auxiliary MTP cross-entropy trains multi-step continuation prediction through shared representations and weights. Related work studies speculative decoding for RL rollouts (Iso et al., 2026), joint MTP–RL coefficient calibration (Wang et al., 2026), and confidence-scheduled drafting (Cheng et al., 2026). Here we examine OR–MTP co-adaptation within the SLAI T-Rex stack (Li et al., 2026) across three stages: workload-dependent draft acceptance, auxiliary-gradient routing during joint RL, and private MTP refinement on a frozen OR target.
4.3.1 Workload-Dependent Draft Acceptance¶
We evaluate native MTP across SPEED-Bench, NPU-Bench, OR, and long-context document question answering (DocQA) under controlled configurations within each benchmark panel (Figure 14). On the historical CPT reference checkpoint, greedy decoding with seven draft proposals at concurrency one yields pooled acceptance rates of 21.60% on SPEED-Bench (896 requests), 30.36% on DocQA (192 requests), and 31.26% on OR (256 requests). On the base checkpoint at temperature 0.6, concurrency 32, and seven proposals (80 prompts per category), acceptance across the eleven SPEED-Bench categories spans more than a two-fold range, from 26.30% on summarization to 54.13% on coding.
Substantial cross-workload variation motivates evaluating speculative decoding directly on target OR workloads rather than extrapolating from generic coding benchmarks. Moreover, draft acceptance alone does not determine end-to-end serving efficiency: under stochastic sampling on open-ended SPEED-Bench categories, trajectory divergence and stopping-condition sensitivity cause MTP runs to emit 4.21×–11.36× as many completion tokens as standard decoding. Because longer completions can inflate raw token-per-second (TPS) rates without shortening user-perceived latency, we jointly evaluate solver-verified OR accuracy, token throughput, and end-to-end request latency below.
4.3.2 Joint Optimization of the OR Policy and Native MTP¶
To study representation sharing during RL, we run controlled 200-update joint-training experiments initialized from our native-MTP CPT lineage (Li et al., 2026) (distinct from the 0731 SFT–RL lineage in Section 3). Each update samples eight responses across 64 prompts from a 4,322-record self-contained OR code dataset with binary solver rewards, group-relative clipped policy optimization, and a \(10^{-3}\) reference KL penalty (rollouts use standard target decoding so training dynamics isolate gradient-routing effects).
28


Protocols differ across panels; comparisons are within each panel.
Figure 14: Native-MTP acceptance across workloads. Panel (a) pools accepted and proposed token counts on the historical CPT reference with greedy decoding and concurrency one. Panel (b) compares SPEED-Bench categories on the base checkpoint at temperature 0.6 and concurrency 32. Both panels use seven proposals under panel-specific checkpoints and decoding protocols.
Let \(\ell_i^{\text{MTP}}\) denote the native one-step MTP cross-entropy averaged over valid shifted positions of response i. We control auxiliary gradients into target features and input embeddings (E), the shared output head (H), and private MTP parameters (P):
where B is the batch response count and \(a_{b,i}\) gates auxiliary supervision into parameter block b (Figure 15). Target-only RL uses (0,0,0); Joint CE uses (1,1,1); Feature Detachment uses (0,1,1); and the positive-advantage gated variants Feature Gating (denoted G2) and Shared Gating (denoted G4) use \((m_i,1,1)\) and \((m_i,m_i,1)\) with \(m_i=\mathbf{1}[A_i>0]\) , retaining private MTP supervision on all valid responses. Because all-correct binary groups yield \(A_i=0\) (accounting for \(\approx 97.1\%\) of the \(\approx 90\%\) uniform groups in G2/G4), positive-advantage gating leaves shared auxiliary supervision sparse (6.98%/6.63%) of responses).
4.3.3 OR Quality and Draft Acceptance after Joint Training¶
Archived joint-training endpoints suggest an empirical tension between OR task accuracy and draft acceptance (Figure 16a): full Joint CE slightly raises pooled greedy acceptance relative to target-only RL (24.44% versus 23.03%) alongside lower raw OR accuracy (60.79% versus 65.89%), whereas Feature Detachment reaches 68.29% OR accuracy with 22.36% acceptance; because these archived runs also differ in recipe and seed provenance (Appendix E), we treat them as motivating context and conduct a controlled four-target comparison next.
To audit decoding quality systematically, we evaluate the four step-200 checkpoints (target-only RL, Feature Detachment, G2, and G4) on a 1,627-case OR regression suite (289 NL4Opt, 600 OptiBench, 344 Bench4Opt-Feasible, and 394 structural LP cases) at temperature 0.6, top-p=1, seed 42, and a 9,600-token cap. Denoting the Feature Detachment target as Trunk and its saved MTP module as \(\phi_0\) , we also include a frozen-target post-RL private-MTP refinement condition (denoted H3; Section 4.3.5) and report both raw code extraction and a format-cleaned code extraction pass (denoted H1). Table 13 and Figure 16b summarize all nine conditions.
Feature Detachment (Trunk) achieves the strongest raw accuracy among the four targets (69.08%–69.15% STD), while G2 and G4 exhibit higher sensitivity to output formatting (partially recovered under H1 cleanup). Enabling the saved native MTP module shifts raw confirmed counts by +6, +6, +13, +6 across the four targets, with all paired 95% cluster confidence intervals spanning zero (Table 19), indicating no statistically detectable degradation from speculative verification.


(b) Auxiliary CE routes¶
| E | H | P | |
|---|---|---|---|
| Target-only RL | 0 | 0 | 0 |
| Joint CE | 1 | 1 | 1 |
| Feature detach | 0 | 1 | 1 |
| Feature gate (G2) | m | 1 | 1 |
| Shared gate (G4) | m | m | 1 |
m = 1[A > 0]; backward gates only. Private CE stays active for G2 / G4.
E: features / input embeddings H: shared output head
Figure 15: Joint OR–MTP optimization and auxiliary-gradient routing. Solver rewards update the target through the RL objective, while backward gates (, , ) selectively route teacher-forced MTP cross-entropy gradients through shared and private parameter blocks.
Table 13: OR correctness on the 1,627-case regression pool under primary raw extraction and format-cleaned extraction (H1). Each condition has one unresolved license case retained in the denominator. H3 refines only the private MTP module on the frozen Feature Detachment (Trunk) target.
| Target | Decoding | Confirmed / 1,627 | Score bounds (%) | H1 confirmed |
|---|---|---|---|---|
| Target-only RL | STD | 1094 | 67.24–67.30 | 1120 |
| Target-only RL | MTP | 1100 | 67.61–67.67 | 1127 |
| Feature detachment | STD | 1124 | 69.08–69.15 | 1124 |
| Feature detachment | MTP | 1130 | 69.45–69.51 | 1130 |
| Feature gating (G2) | STD | 937 | 57.59–57.65 | 1027 |
| Feature gating (G2) | MTP | 950 | 58.39–58.45 | 1052 |
| Shared gating (G4) | STD | 1003 | 61.65–61.71 | 1046 |
| Shared gating (G4) | MTP | 1009 | 62.02–62.08 | 1054 |
| Feature detach + H3 | MTP | 1138 | 69.94–70.01 | 1138 |

Figure 16: OR quality and draft acceptance. Panel (a) plots raw OR accuracy against pooled greedy acceptance across archived endpoints. Panel (b) compares standard (STD) and native-MTP decoding across the four step-200 targets on the 1,627-case regression suite.

4.3.4 Serving Performance of the Trained Checkpoints
We benchmark offline serving performance by comparing standard decoding against each checkpoint's saved native MTP module on 224 requests (128 OR and 96 DocQA) at client concurrencies \(N_{\text{conc}} \in \{1,32\}\) across three paired host blocks per checkpoint. Target weights, KV-cache budgets, and hardware topology are matched within each pair (BF16 across 16 logical Ascend NPUs with TP4/DP4/EP16, 131,072-token context, 8,192-token batching budget, decode graphs for the target, and seven eager draft proposals per round at temperature 1, seed 42, and thinking disabled).
At \(N_{\rm conc}=1\) , enabling native MTP delivers \(1.583\times-1.715\times\) standard token throughput on OR across all twelve checkpoint—host pairs (versus \(0.937\times-1.066\times\) on DocQA and \(1.420\times-1.504\times\) overall) and reduces OR end-to-end request latency by \(1.659\times-1.748\times\) , despite a modest prefill overhead reflected in standard/MTP time-to-first-token (TTFT) ratios of 0.821-0.830. At \(N_{\rm conc}=32\) , OR throughput ratios remain positive across all twelve pairs ( \(1.082\times-1.717\times\) ), whereas DocQA spans \(0.661\times-1.316\times\) as batching contention increases (timing counts retain 201 isolated BOS tokens observed in \(N_{\rm conc}=32\) MTP streams). Because target-only RL also realizes comparable speedups from its inherited MTP weights, these gains reflect enabling native MTP on structured OR code/formulation workloads rather than joint auxiliary training.
4.3.5 Private-MTP Refinement with a Fixed OR Target¶
To improve draft alignment without perturbing the best OR policy, H3 freezes the Feature Detachment (Trunk) target—including shared embeddings and the output head—and updates only the private MTP parameters from \(\phi_0\) for 20 steps using three-step recursive cross-entropy (Appendix E). Teacher-forced three-token prefix agreement on the OR development panel rises from 48.44% to 60.16%, while 1,627-case solver correctness remains intact (1,138 versus 1,130 confirmed solves; paired difference +0.49 percentage points, 95% CI [-0.86, +1.85]).

Figure 17: Paired token throughput before ( \(\phi_0\) , hollow circles normalized to 1.0) and after private-MTP refinement (H3, filled circles) on the frozen Trunk target across three host blocks ( \(B_1\) – \(B_3\) ) at client concurrencies 1 and 32.
Figure 17 evaluates the incremental serving impact of H3 relative to \(\phi_0\) on matched hosts: OR token throughput shifts by -3.3%, +6.6%, and +1.3% across blocks \(B_1\) – \(B_3\) at \(N_{\rm conc}=1\) , and by +3.4%, +0.7%, and +8.2% at \(N_{\rm conc}=32\) , while overall paired \(\phi_0\) /H3 request-latency ratios improve modestly to 1.028 [1.012, 1.044] at \(N_{\rm conc}=1\) and 1.019 [1.004, 1.035] at \(N_{\rm conc}=32\) .
Scope and Takeaways. Taken together, our experiments show that (i) detaching trunk features during RL followed by frozen-target private MTP refinement avoids the accuracy–acceptance tradeoffs observed in archived shared-gradient joint runs while lifting multi-token agreement; and (ii) native MTP substantially accelerates low-concurrency OR decoding (1.583×–1.715× TPS), though high-concurrency contention and stochastic length variation narrow gains. Integrating lossless MTP verification directly into high-concurrency online RL rollout workers to measure end-to-end training wall-clock savings remains an important next step.

4.4 Solver-Guided Asynchronous Prefix RL for NPU Kernel Synthesis¶
4.4.1 Problem Formulation and Cost-Aware Evaluation Criteria¶
Low-level hardware kernels form the computational foundation of large-scale LLM training and inference, directly governing device utilization and throughput (Dao et al., 2022; Li et al., 2026). Automated kernel optimization seeks to transform runnable baseline operators into faster, numerically equivalent implementations tailored to target accelerators (Ouyang et al., 2025). While KernelBench (Ouyang et al., 2025) and CANN Bench (Gao et al., 2026) evaluate kernel synthesis on GPUs and Ascend NPUs, practical deployment poses a sharper two-part question: can LLM agents reliably improve production-grade NPU kernels, and at what exploration cost?
To study this trade-off systematically, we introduce ASCENDGYM for cost-aware iterative kernel optimization, examine solver-guided parameter warm-starting via OR modeling, and develop asynchronous candidate-prefix agentic RL to overcome multi-hour profiling bottlenecks.
4.4.2 AscendGYM: Cost-Aware Kernel Optimization Evaluation over Real Workloads¶
ASCENDGYM comprises 48 operator tasks extracted from real LLM training and serving workloads across three difficulty tiers. Each task supplies a runnable baseline kernel, host binding code, workload-derived input shapes, golden reference outputs, data types, and datatype-specific precision checks. Its execution environment, ASCENDFORGE, standardizes native compilation, CPU-reference verification, and msprof device timing while logging full multi-turn agent trajectories across external coding harnesses or our built-in AURAKERNEL harness.
Because iterative optimization often consumes dozens of hardware evaluations, final speedup alone obscures search efficiency. In our empirical diagnosis below, we evaluate both optimization quality—via geometric mean (GM) speedup over baseline latencies and task coverage (fast \(_p\) ) (Ouyang et al., 2025), the fraction of tasks strictly exceeding speedup threshold p—and exploration cost, tracked through candidate correctness pass rates, tool invocations, hardware evaluations, token consumption, and wall-clock search duration. (ASCENDGYM also defines budget-penalized summary extensions such as Speedup–Token Score and Cost-to-Gain for fixed-token leaderboard comparisons.)
4.4.3 Empirical Diagnosis of Coverage and Exploration Bottlenecks¶
We evaluate representative frontier and open-weight models across three agent harnesses (Claude Code (Anthropic, 2026a), Codex (OpenAI, 2026b), and OpenCode) on the 17 production operators of ASCENDGYM Batch 1 (up to 80 candidate evaluations per task on Ascend 910C). Two capability bottlenecks emerge clearly.
Substantial speedups remain narrow in task coverage. Retaining the fastest correctness-verified implementation discovered during search (or 1.0× when no valid improvement is found), roughly 70% of evaluated model—harness pairs achieve a GM speedup below 1.2× (Figure 18). Even the strongest configurations—Claude Code with Claude Opus 5 (Anthropic, 2026b) (1.93× GM speedup) and Codex with GPT-5.6 Terra (OpenAI, 2026a) (1.69× GM speedup)—exceed a 2× speedup on only 7 and 3 of the 17 kernels, respectively (Figure 19).



Figure 18: Geometric mean (GM) speedup across the 17 operators of ASCENDGYM Batch 1 for evaluated model–harness combinations, using the best correctness-verified candidate per task (or 1.0× baseline when no improvement is found).

Figure 19: Task coverage (fast \(_p\) ) across speedup thresholds p on ASCENDGYM Batch 1. Coverage drops sharply as the target speedup threshold increases.
High exploration cost and long episode tails. Reaching these gains requires an average of 81.75M and 140.4M tokens per task for Claude Code/Opus 5 and Codex/GPT-5.6 Terra, respectively. Trajectory breakdown for Claude Code/Opus 5 (Figure 20) shows that individual tasks routinely span hundreds to over a thousand tool invocations, 40–75 hardware candidate evaluations, and 6–15 hours of wall-clock search—with a large share of profiler runs spent on valid candidates that yield no further speedup or candidates that fail verification.

Figure 20: Per-operator exploration cost of Claude Code/Opus 5 across ASCENDGYM Batch 1: total tool invocations (left), candidate evaluation outcomes distinguishing new bests, non-improving valid kernels, and verification failures (middle), and total wall-clock search time in hours (right).
Mitigating this bottleneck requires both stronger structural priors for coupled hardware parameters and more sample-efficient RL updates that do not stall behind multi-hour episodes. We address these two needs via OR-guided parameter warm-starting and asynchronous candidate-prefix agentic RL.
4.4.4 Analytical Parameter Warm-Starting via OR Modeling¶
Before free-form code rewriting, key AscendC scheduling decisions—tile dimensions, inter-core partitioning, and on-chip L1 buffering—interact through analytical memory and compute constraints and can be formulated directly as an OR problem (Li et al., 2026). Solving this formulation supplies a hardware-validated warm start for subsequent agent refinement.
We illustrate this approach on WindMatmulV2, a BF16 matrix multiplication kernel computing C = AB for (M, K, N) = (16, 4096, 62080). Because M = 16 severely restricts reuse of the 485 MiB weight matrix B, device profiling identifies HBM-to-on-chip data movement (MTE2 utilization 99.4%) as the primary bottleneck. Our OR model jointly selects matrix tile sizes, partitions work
33
深圳河奎学院 Shenzhen Loop Area Institute
across cores along the long N dimension, and configures multi-stage L1 buffering to overlap data prefetching with cube computation under on-chip memory limits. On Ascend hardware, this solver-selected configuration reduces mean kernel latency from 369.13 \(\mu\) s to 348.68 \(\mu\) s (–5.54%), providing a verified analytical starting point without brute-force trial-and-error.
4.4.5 Asynchronous Candidate-Prefix RL with Shared Lesson Memory¶
Beyond parameter selection, general operator optimization requires iterative code synthesis, compiler/profiler diagnosis, and hypothesis revision via agentic RL (Dai et al., 2026). Because full multi-turn episodes take hours to terminate, synchronous episode-level RL leaves learner NPUs idle for most of a training run.
Notice, however, that every completed candidate profiling step within an episode already yields exact correctness and device-latency feedback. As illustrated in Figure 21, we convert each completed candidate evaluation boundary into a self-contained trajectory prefix preserving the full preceding interaction history and its baseline-relative speedup reward. Eligible prefixes from concurrent tasks enter an asynchronous FIFO queue to assemble mixed training batches immediately, complemented by an evidence-grounded shared lesson memory that publishes and retrieves verified optimization findings across trajectories. The training study uses 710 cases across 142 ops-math kernels.

Figure 21: Asynchronous candidate-prefix agentic RL for Ascend kernel optimization. Each completed candidate profiling step emits a history-preserving trajectory prefix scored against the unmodified baseline, feeding a bounded FIFO queue for immediate learner updates without waiting for full episodes to terminate.
Figure 22 compares four 24-hour DeepSeek-V4-Flash training runs on Ascend: synchronous full-trajectory training (A), asynchronous candidate-prefix training (B), prefix training with reduced failure penalties (C), and prefix training augmented with shared lesson memory (D). Decoupling updates at candidate boundaries triples completed optimizer steps over 24 hours—from 4 updates in A to 12 updates in D—while combining prefix learning with reduced failure penalties and shared memory steadily lifts candidate correctness pass rates from 39.4% (A) to 49.1% (D).
Figure 23 tracks cumulative source trajectories discovering verified speedups across three thresholds during online ops-math search (evaluated via online trajectory discovery; held-out re-testing on ASCENDGYM is left to future work). On any positive speedup (> \(1.00\times\) , Panel a), prefix methods B and D track closely and outpace A and C throughout the 24-hour window. On substantive gains ( \(\geq 1.05\times\) and \(\geq 1.10\times\) , Panels b-c), pure prefix updates alone (B=8, C=6 at \(\geq 1.10\times\) ) lag synchronous full-trajectory A (11) because nested prefixes repeatedly weight early exploratory steps without cross-episode transfer; pairing prefix updates with the evidence-grounded shared lesson memory in D (seeded with historical ops-math optimization findings and updated online) overcomes this local myopia, leading at \(\geq 1.05\times\) (25 trajectories) and reaching 11 verified source trajectories at \(\geq 1.10\times\) around hour 17.5 ( \(\approx 6.5\) hours ahead of A).


Figure 22: Optimization throughput and candidate validity over 24 hours for methods A–D: (a) cumulative completed parameter updates, (b) learner timelines distinguishing queue waiting (gray) from active gradient steps (colored ticks), and (c) overall candidate correctness pass rate.

Figure 23: Cumulative discovery of optimized candidates over 24 hours across methods A–D, counting distinct source trajectories that yield a correctness-verified kernel with speedup (a) > 1.00×, (b) ≥ 1.05×, and (c) ≥ 1.10×.
4.4.6 System-Level Impact and Outlook¶
Efficient NPU kernels are essential for high-throughput MoE post-training. In our SuperPOD stack Li et al., 2026, hybrid parallelism, NPU–CPU overlap, and targeted operator fusion and kernel rewriting jointly increased MFU for DeepSeek-V4-Pro from 27.00% to 34.22%, a gain of 7.22 percentage points. Building on this foundation, this work advances automated NPU kernel optimization to support more efficient large-scale training. Complementing single-turn post-training and RL infrastructure optimization, Section 5 turns next to test-time agentic OR execution, pairing the base model with a lightweight harness and modular verification skills.
5 Test-Time Agentic Modeling with Modular Domain Skills¶
5.1 Decoupling Minimalist Execution from Domain Modeling Priors¶
Whereas Section 3 specializes model weights for single-turn formulation and Section 4 optimizes the underlying execution-in-the-loop RL stack, complex OR problems also benefit at deployment from iterative data inspection, solver execution, and semantic self-verification Ahmaditeshnizi et al., 2024. We therefore design a lightweight agent harness for OR, inspired by the minimalist philosophy of PI-style coding agents, comprising a compact execution core and a modular OR skill layer. The core manages tool calls, workspace isolation, and program execution; the skills contribute structured domain manuals and deterministic runtime checks.
This separation matches the structure of OR modeling. Because the agent primarily inspects instance data, formulates a mathematical program, writes and executes solver code, and audits the returned solution, a minimal set of file and shell primitives suffices. The central bottleneck is semantic rather than operational: mapping input fields to exact indices and units, encoding every coupling constraint, and distinguishing a faithful formulation from a misspecified program that still terminates with an "optimal" solver status. Event-driven skills enforce discipline across these stages without bloating the core action space.
35

5.2 Execution-Grounded ReAct Architecture and Solver Verification¶
The execution core implements a free-form ReAct loop Yao et al., 2023. At each step, the model reasons about the current state, invokes one or more tools, observes their outputs, and chooses its next action. Reasoning and tool results remain interleaved, preserving the link between execution feedback and subsequent revisions.
Table 14: Tool interface of the OR harness.
| Category | Tools | Purpose |
|---|---|---|
| File operations Execution Workflow Extensions | read, write, edit, glob, grep bash todo_write, finish skill, subagent | Inspect inputs and construct solver artifacts. Run code and solver-backed checks. Track progress and submit the final artifact. Load a skill manual or delegate a bounded |
| Interaction | ask_question | subtask. Request clarification in production; disabled during training. |
There is no dedicated solver tool. The agent writes src/solve.py with GurobiPy or Pyomo and executes it through bash. A valid program prints ANSWER:
Each rollout receives an independent, path-confined workspace, and the shell blocks selected unsafe operations. These controls improve isolation and reproducibility but do not constitute a complete operating-system sandbox.
5.3 Declarative Domain Skills and Runtime Validation Hooks¶
Frontier models are strong at coding and pure mathematics, yet OR requires the two abilities to be combined with precise semantic modeling. Reliable OR reasoning therefore requires a disciplined workflow that connects data interpretation, mathematical formulation, solver implementation, and solution validation.
Skills are self-contained modules within the harness. Each pairs a declarative SKILL.md domain manual with deterministic Python runtime hooks that attach structured diagnostics to tool outputs or block invalid actions and premature submissions before final artifact handoff.
Table 15: The eight modular OR skills evaluated in this section: two benchmark-oriented prior cards (top) and six benchmark-independent workflow verification skills (bottom).
| Skill | Domain guidance and deterministic runtime checks |
|---|---|
| scene_cards | Supplies benchmark-tailored scenario patterns, domain conventions, and recurring semantic pitfalls. |
| technique_cards | Provides benchmark-oriented mathematical formulation templates and associated failure diagnostics. |
| numeric_probes | Runs solver-independent feasibility, bound, unit-scale, and conservation probes on candidate solutions beyond solver termination status. |
| field_roles | Audits data-to-model schema mapping from raw input fields to sets, indices, parameters, units, and aggregation rules. |
| code_checks | Applies static and runtime structural checks on solver code (e.g., variable domains, unreferenced constraints, and objective sense). |
| modeling_spec | Enforces a written specification of index sets, decision variables, objective, and constraints before src/solve.py is created. |
| gurobi_landing | Checks fidelity across the formulation-to-GurobiPy boundary, including indexing alignment, big-𝑀 scaling, and output formatting. |
| referee | Performs pre-submission cross-verification across the problem statement, mathe matical specification, solver script, and numerical output. |
36

The six skills other than scene_cards and technique_cards implement reusable stages of a solver-backed OR workflow: formulation and data semantics, solver implementation and code validation, and numerical and end-to-end verification. They encode procedures that recur whenever a problem description is converted into an executable mathematical program, rather than templates tied to a particular benchmark.
Skills are activated by execution events rather than a rigid workflow. For example, modeling_spec requires a formulation before solve.py is written; numeric_probes and code_checks run after solver execution; and referee participates in final submission checks. The harness thus combines a small action space with stage-specific OR guidance and verification.
5.4 Multi-Rollout Empirical Evaluation and Skill Ablations¶
We evaluate the Base model (DeepSeek-V4-Flash-0731) on SLAI-OR-BENCH-HARD by drawing five independent agent rollouts for each of the 93 problems and reporting solve accuracy across all 465 rollouts (note that our Section 3 post-trained checkpoint targets single-turn formulation generation rather than multi-turn tool-use schemas; bridging the two routes is addressed in Section 5.5). Each rollout is bounded by 30 agent steps, 7,200 seconds of wall-clock execution/reasoning time, and a 64K-token context window, with timeouts counted as failures. External CLI coding harnesses (Claude Code and Codex) execute in their native tool loops under single-run evaluation on the 93 Hard tasks within the same time and context caps, without our internal Gurobi-to-HiGHS export fallback or OR skill hooks.
5.4.1 End-to-End Impact of Harness Execution and Domain Skills¶
As shown in Figure 24, equipping the Base model (26.88% single-turn accuracy) with the lightweight execution harness alone raises accuracy to 40.86% (+13.98 percentage points); enabling the six benchmark-independent workflow skills reaches 49.46% (+22.58 points; Figure 25), and adding the two benchmark-tailored prior cards reaches 55.48% (+28.60 points). Keeping the core action space minimal while encapsulating domain discipline in event-driven skills thus converts multi-turn interaction directly into modeling reliability.
By contrast, general-purpose coding harnesses yield mixed results: Claude Code (Anthropic, 2026a) lifts Claude Opus 5.5 from 33.33% to 38.71% (+5.38 points), whereas Codex (OpenAI, 2026b) slightly lowers GPT-6.1-Sol from 34.41% to 33.33% (-1.08 points). Without OR-specific semantic checks, generic shell iteration can fix syntax errors while leaving silent formulation mismatches intact—and additional generic scaffolding can introduce context overhead when misaligned with the underlying model.

Figure 24: Effects of harness configuration on accuracy across the 93 tasks of SLAI-OR-BENCH-HARD (five rollouts per task). Upper bars compare single-turn Base inference, the lightweight harness alone, and the harness with all eight evaluated OR skills; lower bars compare two external coding harnesses on their respective frontier models.
5.4.2 Individual Skills, Generalizable Priors, and Test-Time Scaling¶
Figure 25 ablates individual and combined skills over the 40.86% harness-only baseline. Every evaluated skill maintains or improves accuracy over harness-only—from referee at 41.51% (+0.65
深圳河金学院 Shenzhen Loop Area Institute
points, neutral-to-slightly positive within rollout variance) up to numeric_probes at 45.59% (+4.73 points) among standalone workflow checks, and 49.46% (technique_cards) and 53.76% (scene_cards) with benchmark-oriented priors—confirming that gains accumulate across complementary verification stages rather than hinging on a single rule.
Crucially, because scene_cards and technique_cards encode scenario and formulation priors tailored to patterns represented in this benchmark to probe attainable upper-bound performance, cross-benchmark generalization is best measured by removing both cards. Enabling only the six benchmark-independent workflow skills achieves 49.46% accuracy (+22.58 points over single-turn Base and +8.60 points over harness-only), outperforming Claude Opus 5.5 with Claude Code (38.71%) by +10.75 points. Viewed through the lens of test-time scaling, single-submission multi-turn verification with these six general-purpose skills (49.46%) surpasses eight-sample single-turn Base coverage (pass@8 = 46.24%) and approaches post-trained SFT+RL pass@8 (51.61%) without requiring an external ground-truth oracle to select among candidate solutions.

Figure 25: Single-skill and combined-skill ablations across the 93 tasks of SLAI-OR-BENCH-HARD (five rollouts per task). "Without scene/technique cards" enables the six reusable benchmark-independent workflow skills (49.46%), whereas "All evaluated skills" enables all eight skills (55.48%).
5.5 Toward Parameter Internalization of Skill-Guided Trajectories¶
While Section 3 demonstrates parameter specialization for single-turn solving and this section establishes verified multi-turn execution on the Base model, our next milestone unifies both tracks. Specifically, we plan to distill verified, skill-assisted multi-turn trajectories back into model parameters via agentic SFT followed by execution-in-the-loop RL—leveraging the trajectory-reuse, numerical-alignment, and speculative-decoding infrastructure of Section 4—so that SLAI T-Rex-V2 internalizes disciplined formulation and self-verification habits while retaining lightweight deterministic runtime checks at deployment.
6 Conclusion and Future Directions¶
This report presented SLAI T-Rex-V2, a full-stack operations research post-training and agentic reasoning platform built on DeepSeek-V4-Flash and Huawei Ascend SuperPOD. Starting from an eight-sample diagnosis showing that 53.76% of SLAI-OR-BENCH-HARD tasks remain unsolved by the base model, we connected a four-layer OR taxonomy to one-hop solver-verified data synthesis, solve-rate routing, cold-start SFT, and sequential Chat/Thinking GRPO with graded failure rewards and resource-limit outcome masking. On our expert-curated SLAI-OR-BENCH (131 tasks) and SLAI-OR-BENCH-HARD (93 tasks) benchmarks, post-training raised single-turn accuracy from 38.26% to 50.86% (+5.82 and +6.59 points over GPT-6.1-Sol and Claude Opus 5.5) and from 26.88%

to 35.89% (slightly surpassing both single-draw frontier baselines), while expanding eight-sample solve coverage from 46.24% to 51.61%. Along our complementary test-time agentic route, pairing the base model with a minimalist ReAct harness raised SLAI-OR-BENCH-HARD accuracy to 40.86%, reaching 49.46% with six benchmark-independent general-purpose OR skills (+22.58 percentage points over single-turn base inference) and 55.48% (+28.60 points) when adding two benchmark-tailored prior cards.
On the systems side, four controlled investigations on Ascend NPUs establish practical design principles for execution-in-the-loop MoE reinforcement learning. First, expensive solver-verified rollouts and profiler-measured kernel episodes can be exploited far more efficiently without stalling behind fresh full-episode generation: bounded same-batch trajectory reuse with recalibrated advantages ( \(R_{\text{max}} = 4\) ) cuts newly generated response tokens by 82.5% over 80 updates while preserving task accuracy, and asynchronous candidate-prefix RL with shared lesson memory triples completed parameter updates (12 versus 4 in 24 hours), lifts candidate pass rates from 39.4% to 49.1%, and accelerates the discovery of \(\geq 1.05 \times\) and \(\geq 1.10 \times\) NPU kernel speedups. Second, progressive layer-wise cosine scanning and recursive same-input replay across 64 Ascend 910C NPUs isolate operator-level discrepancies (SwiGLU clipping and MoE router-bias precision mismatches) from downstream routing amplification, preventing RL training collapse. Third, our OR–MTP co-adaptation studies show that detaching shared trunk features during RL followed by frozen-target private MTP refinement raises three-token OR development agreement from 48.44% to 60.16% without degrading solver accuracy, while enabling saved native MTP modules delivers \(1.583 \times -1.715 \times\) offline OR token throughput at client concurrency one.
Three directions define our immediate roadmap: (i) extending recalibrated trajectory reuse over multi-hundred-step horizons with adaptive distribution-drift controls; (ii) integrating lossless native MTP verification directly into high-concurrency online RL rollout workers to translate decoding speedups into end-to-end training wall-clock reductions; and (iii) closing the loop between our two capability routes by distilling verified, skill-assisted multi-turn trajectories into SLAI T-Rex-V2 via agentic SFT and RL while retaining lightweight deterministic verification hooks at inference time.
References¶
Ali Ahmaditeshnizi, Wenzhi Gao, and Madeleine Udell. OptiMUS: Scalable optimization modeling with (MI)LP solvers and large language models. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 577–596. PMLR, 2024. URL https://proceedings.mlr.press/v235/ahmaditeshnizi24a.html.
Anthropic. Claude Code: Overview, 2026a. URL https://code.claude.com/docs/en/overview. Documentation. Accessed: 2026-10-26.
Anthropic. Introducing Claude Opus 5, July 2026b. URL https://www.anthropic.com/news/claude-opus-5. Published July 24, 2026.
Yan Bai and Ao Shen. Finish RL training faster: Bitwise-consistent, high-performance, agent-driven. vLLM Blog, October 2026. URL https://vllm.ai/blog/2026-10-14-train-inference-consistency.
Xin Cheng, Xingkai Yu, Chenze Shao, Jiashi Li, Yunfan Xiong, Yi Qian, Jiaqi Zhu, Shirong Ma, Xiaokang Zhang, Jiasheng Ye, Qinyu Chen, Chengqi Deng, Jiping Yu, Damai Dai, Zhengyan Zhang, Yixuan Wei, Yixuan Tan, Wenkai Yang, Runxin Xu, Yu Wu, Zhean Xu, Xuanyu Wang, Muyang Chen, Rui Tian, Xiao Bi, Zhewen Hao, Shaoyuan Chen, Huanqi Cao, Wentao Zhang, Anyi Xu, Huishuai Zhang, Dongyan Zhao, and Wenfeng Liang. DSpark: Confidence-scheduled speculative decoding with semi-autoregressive generation. arXiv preprint arXiv:2607.05147, 2026. URL https://arxiv.org/abs/2607.05147.
Weinan Dai, Hanlin Wu, Qiying Yu, Huan-ang Gao, Jiahao Li, Chengquan Jiang, Weiqiang Lou, Yufan Song, Hongli Yu, Jiaze Chen, Wei-Ying Ma, Ya-Qin Zhang, Jingjing Liu, Mingxuan Wang, Xin Liu, and Hao Zhou. CUDA Agent: Large-scale agentic RL for high-performance CUDA kernel generation. arXiv preprint arXiv:2602.24286, 2026. doi: 10.48550/arXiv.2602.24286. URL https://arxiv.org/abs/2602.24286.

Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, volume 35, pp. 16344–16359, 2022. URL https://proceedings.neurips.cc/paper/ 2022/hash/67d57c32e20fd0a7a302cb81d36e40d5-Abstract-Conference.html.
- DeepSeek-AI. DeepSeek-V3 technical report. arXiv preprint arXiv:2412.19437, 2024. URL https: //arxiv.org/abs/2412.19437.
- DeepSeek-AI. DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025. URL https://arxiv.org/abs/2501.12948.
- Xue-Jian Gao, Deng Pan, Yueming Su, Jiasheng Li, Bin Du, Fengming Zhu, Chengdi Ma, Junyi Fan, Qichen Liao, Chengqiu Hu, Xinxian Chen, Lingchao Zheng, Jun Li, Jiwei Yang, and Yuwei Fan. CANN Bench: Benchmarking agent generated kernels against real NPU and algorithmic limits. arXiv preprint arXiv:2607.20518, 2026. URL https://arxiv.org/abs/2607.20518.
- Fabian Gloeckle, Badr Youbi Idrissi, Baptiste Rozière, David Lopez-Paz, and Gabriel Synnaeve. Better & faster large language models via Multi-Token prediction. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 15706– 15734. PMLR, 2024. URL https://proceedings.mlr.press/v235/gloeckle24a.html.
- Horace He and Thinking Machines Lab. Defeating nondeterminism in LLM inference. Thinking Machines Lab Technical Essay, 2025. URL https://thinkingmachines.ai/blog/defeatingnondeterminism-in-llm-inference/.
- Chenyu Huang, Zhengyang Tang, Shixi Hu, Ruoqing Jiang, Xin Zheng, Dongdong Ge, Benyou Wang, and Zizhuo Wang. ORLM: A customizable framework in training large models for automated optimization modeling. Operations Research, 2025a. doi: 10.1287/opre.2024.1233. URL https: //doi.org/10.1287/opre.2024.1233.
- Xuhan Huang, Qingning Shen, Yan Hu, Anningzhe Gao, and Benyou Wang. LLMs for mathematical modeling: Towards bridging the gap between natural and mathematical languages. In Luis Chiruzzo, Alan Ritter, and Lu Wang (eds.), Findings of the Association for Computational Linguistics: NAACL 2025, pp. 2678–2710. Association for Computational Linguistics, April 2025b. doi: 10.18653/v1/2025.findings-naacl.146. URL https://aclanthology.org/2025.findingsnaacl.146/.
- Hayate Iso, Tiyasa Mitra, Sudipta Mondal, Rasoul Shafipour, Venmugil Elango, Terry Kong, Yuki Huang, Seonjin Na, Izzy Putterman, Benjamin Chislett, Maor Ashkenazi, Joseph Guman, Gerald Shen, Tugrul Konuk, Ashwath Aithal, Ritika Borkar, Ran Zilberstein, and Bita Rouhani. Accelerating RL post-training rollouts via system-integrated speculative decoding. arXiv preprint arXiv:2604.26779, 2026. URL https://arxiv.org/abs/2604.26779.
- Yaniv Leviathan, Matan Kalman, and Yossi Matias. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 19274–19286. PMLR, 2023. URL https://proceedings.mlr.press/v202/leviathan23a.html.
- Dongfang Li, Xiaodong Luo, Ruoyu Sun, Xuhui Chen, Linyuan Qiu, Jian Meng, Zhengxuan Lu, Yiting Wang, Yucheng Xie, Tao Guo, Tianxiang Fang, Jing Li, Sihang Chen, Shihao Hong, Chang Liu, Weihua Dai, Zirong Zeng, Ziwei Zhu, Zhuohan Wang, Zhengjun Yue, Igor Vasilyev, Min Liu, Weijian Sun, Xin Chen, Yingmeng Gao, Jinhua Zhou, Taolue Chen, Chenwei Wu, Dong Zhang, Wenlong Jin, Jinmin Xiang, Maria Barkova, Anton Ushakov, Xianfei Jin, Tian Ding, Zhihang Lin, Qian Chen, Linxin Yang, Mingzhe Yang, Bingwei Zhang, Hongzhang Yang, Fangxue Zhang, Shijun Qin, Jie Yu, Cuihua Hu, Vasiliy Tolstykh, Ivan Nosov, Amir Abdullin, Zhicheng Zhou, Xin Zhang, Zhixiong Ning, Xutong Zhao, Junjie Huang, Jiajun Liu, Weiyan Kong, Zheng Zhang, Wenhan Luo, Lin Hu, Yangbo Guo, Li Zeng, Shihao Zhang, Baotian Hu, Min Zhang, Haizhou Li, and Zhiquan Luo. SLAI T-Rex: Full-parameter post-training of the DeepSeek-V4 family on Ascend SuperPOD. arXiv preprint arXiv:2607.20145, 2026. doi: 10.48550/arXiv.2607.20145. URL https://arxiv.org/abs/2607.20145.

- Ziniu Li, Congliang Chen, Tianyun Yang, Tian Ding, Ruoyu Sun, Ge Zhang, Wenhao Huang, and Zhi-Quan Luo. Knapsack RL: Unlocking exploration of LLMs via optimizing budget allocation. arXiv preprint arXiv:2509.25849, 2025. URL https://arxiv.org/abs/2509.25849.
- Jing Liang, Hongyao Tang, Yi Ma, Jinyi Liu, Yan Zheng, Shuyue Hu, Lei Bai, and Jianye Hao. Squeeze the soaked sponge: Efficient off-policy reinforcement finetuning for large language model. arXiv preprint arXiv:2507.06892, 2025. URL https://arxiv.org/abs/2507.06892.
- Zichen Liu, Changyu Chen, Wenjun Li, Penghui Qi, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. Understanding R1-Zero-Like training: A critical perspective. arXiv preprint arXiv:2503.20783, 2025. URL https://arxiv.org/abs/2503.20783.
- Hongliang Lu, Zhonglin Xie, Yaoyu Wu, Can Ren, Yuxuan Chen, and Zaiwen Wen. OptMATH: A scalable bidirectional data synthesis framework for optimization modeling. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 40769–40802. PMLR, 2025. URL https://proceedings.mlr.press/ v267/lu25h.html.
- Luca Martino, Víctor Elvira, and Francisco Louzada. Effective sample size for importance sampling based on discrepancy measures. Signal Processing, 131:386–401, 2017. doi: 10.1016/ j.sigpro.2016.08.025. URL https://arxiv.org/abs/1602.03572.
- Duc M. Nguyen and Sungahn Ko. Technical report for ICML 2024 automated math reasoning challenge: Solving optimization problems with open source large language model. In The First AI for Math Workshop at ICML 2024, 2024. URL https://openreview.net/pdf?id=4XzGkm1jK0.
- OpenAI. GPT-5.6 Terra model. Official model documentation, 2026a. URL https:// developers.openai.com/api/docs/models/gpt-5.6-terra. Accessed: 2026-10-26.
- OpenAI. Codex CLI. Official documentation, 2026b. URL https://developers.openai.com/ codex/cli/. Accessed: 2026-10-26.
- Anne Ouyang, Simon Guo, Simran Arora, Alex L. Zhang, William Hu, Christopher Ré, and Azalia Mirhoseini. KernelBench: Can LLMs write efficient GPU kernels? In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 47356–47415. PMLR, 2025. URL https://proceedings.mlr.press/v267/ouyang25a.html.
- Art B. Owen. Monte Carlo Theory, Methods and Examples. Author-published online book, 2013. URL https://artowen.su.domains/mc/. Chapter 9: Importance sampling.
- Penghui Qi, Zichen Liu, Xiangxin Zhou, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. Defeating the training-inference mismatch via FP16. arXiv preprint arXiv:2510.26788, 2025. URL https://arxiv.org/abs/2510.26788.
- Rindranirina Ramamonjison, Timothy Yu, Raymond Li, Haley Li, Giuseppe Carenini, Bissan Ghaddar, Shiqi He, Mahdi Mostajabdaveh, Amin Banitalebi-Dehkordi, Zirui Zhou, and Yong Zhang. NL4Opt competition: Formulating optimization problems based on their natural language descriptions. In Marco Ciccone, Gustavo Stolovitzky, and Jacob Albrecht (eds.), Proceedings of the NeurIPS 2022 Competitions Track, volume 220 of Proceedings of Machine Learning Research, pp. 189–203. PMLR, 2022. URL https://proceedings.mlr.press/v220/ramamonjison23a.html.
- John Schulman. Approximating KL divergence. Technical blog post, 2020. URL http:// joschu.net/blog/kl-approx.html.
- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. URL https://arxiv.org/abs/ 1707.06347.
-
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024. doi: 10.48550/arXiv.2402.03300. URL https://arxiv.org/abs/2402.03300.
-
Guangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu, Wang Zhang, Ru Zhang, Yanghua Peng, Haibin Lin, and Chuan Wu. HybridFlow: A flexible and efficient RLHF framework. In Proceedings of the Twentieth European Conference on Computer Systems, EuroSys '25. ACM, 2025. doi: 10.1145/ 3689031.3696075. URL https://doi.org/10.1145/3689031.3696075.
- Zhuohan Wang, Ziwei Zhu, Ziniu Li, Congliang Chen, Yizhou Han, Yufeng Lin, Zhihang Lin, Angyang Gu, Xinglin Hu, Ruoyu Sun, and Tian Ding. ORGEval: Graph-theoretic evaluation of LLMs in optimization modeling. arXiv preprint arXiv:2510.27610, 2025. URL https: //arxiv.org/abs/2510.27610.
- Zili Wang, Jiajun Chai, Lin Chen, Xiaohan Wang, Shiming Xiang, and Guojun Yin. Joint training of Multi-Token prediction in reinforcement learning via optimal coefficient calibration. arXiv preprint arXiv:2605.28184, 2026. URL https://arxiv.org/abs/2605.28184.
- Jiehao Wu, Zixiao Huang, Wenhao Li, Chuyun Shen, Junjie Sheng, and Xiangfeng Wang. AscendOptimizer: Episodic agent for Ascend NPU operator optimization. arXiv preprint arXiv:2603.23566, 2026. doi: 10.48550/arXiv.2603.23566. URL https://arxiv.org/abs/2603.23566.
- Ziyang Xiao, Dongxiang Zhang, Yangjun Wu, Lilin Xu, Yuan Wang, Xiongwei Han, Xiaojin Fu, Tao Zhong, Jia Zeng, Mingli Song, and Gang Chen. Chain-of-Experts: When LLMs meet complex operations research problems. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=HobyL1B9CZ.
- Ziyang Xiao, Jingrong Xie, Lilin Xu, Shisi Guan, Jingyan Zhu, Xiongwei Han, Xiaojin Fu, WingYin Yu, Han Wu, Wei Shi, Qingcan Kang, Jiahui Duan, Tao Zhong, Mingxuan Yuan, Jia Zeng, Yuan Wang, Gang Chen, and Dongxiang Zhang. A survey of optimization modeling meets LLMs: Progress and future directions. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, pp. 10742–10750, 2025. doi: 10.24963/ijcai.2025/1192. URL https: //ijcai.org/proceedings/2025/1192.
- Jianhao Yan, Yafu Li, Zican Hu, Zhi Wang, Ganqu Cui, Xiaoye Qu, Yu Cheng, and Yue Zhang. Learning to reason under off-policy guidance. arXiv preprint arXiv:2504.14945, 2025. URL https: //arxiv.org/abs/2504.14945.
- Zhicheng Yang, Yiwei Wang, Yinya Huang, Zhijiang Guo, Wei Shi, Xiongwei Han, Liang Feng, Linqi Song, Xiaodan Liang, and Jing Tang. OptiBench meets ReSocratic: Measure and improve LLMs for optimization modeling. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=fsDZwS49uY.
- Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. ReAct: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=WE_ vluYUL-X.
- Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, Gaohong Liu, Lingjun Liu, Xin Liu, Haibin Lin, Zhiqi Lin, Bole Ma, Guangming Sheng, Yuxuan Tong, Chi Zhang, Mofan Zhang, Wang Zhang, Hang Zhu, Jinhua Zhu, Jiaze Chen, Jiangjie Chen, Chengyi Wang, Hongli Yu, Yuxuan Song, Xiangpeng Wei, Hao Zhou, Jingjing Liu, Wei-Ying Ma, Ya-Qin Zhang, Lin Yan, Mu Qiao, Yonghui Wu, and Mingxuan Wang. DAPO: An opensource LLM reinforcement learning system at scale. arXiv preprint arXiv:2503.14476, 2025. URL https://arxiv.org/abs/2503.14476.
- Runzhe Zhan, Yafu Li, Zhi Wang, Xiaoye Qu, Dongrui Liu, Jing Shao, Derek F. Wong, and Yu Cheng. ExGRPO: Learning to reason from experience. In The Fourteenth International Conference on Learning Representations, 2026. URL https://arxiv.org/abs/2510.02245.
- Hongzhi Zhang, Jia Fu, Jingyuan Zhang, Kai Fu, Qi Wang, Fuzheng Zhang, and Guorui Zhou. RLEP: Reinforcement learning with experience replay for LLM reasoning. arXiv preprint arXiv:2507.07451, 2025. URL https://arxiv.org/abs/2507.07451.
- Ruiqing Zhao, Fengzhi Li, Yuan Zuo, Rui Liu, Yansong Liu, Yunfei Ma, Fanyu Meng, and Junlan Feng. Strategy-aware optimization modeling with reasoning LLMs. arXiv preprint arXiv:2605.02545, 2026. doi: 10.48550/arXiv.2605.02545. URL https://arxiv.org/abs/2605.02545.

Haizhong Zheng, Yang Zhou, Brian R. Bartoldson, Bhavya Kailkhura, Fan Lai, Jiawei Zhao, and Beidi Chen. Act only when it pays: Efficient reinforcement learning for LLM reasoning via selective rollouts. arXiv preprint arXiv:2506.02177, 2025. URL https://arxiv.org/abs/2506.02177.
- Tianle Zhong, Neiwen Ling, Yifan Pi, Zijun Wei, Tianshu Yu, Geoffrey Fox, Peng Wu, and Xiao Yu. Diagnosing training–inference mismatch in LLM reinforcement learning via a zero-mismatch reference. arXiv preprint arXiv:2605.14220, 2026. URL https://arxiv.org/abs/2605.14220.
- Chenyu Zhou, Tianyi Xu, Jianghao Lin, and Dongdong Ge. StepORLM: A self-evolving framework with generative process supervision for operations research language models. arXiv preprint arXiv:2509.22558, 2025. URL https://arxiv.org/abs/2509.22558.
- Ruihao Zhu. Call for contributions—a community benchmark for LLMs on optimization modeling. INFORMS Open Forum, June 2026. URL https://connect.informs.org/discussion/call-for-contributions-a-community-benchmark-for-llms-on-optimization-modeling. Posted June 11, 2026; accessed October 23, 2026.
- Xinyu Zhu, Mengzhou Xia, Zhepei Wei, Wei-Lin Chen, Danqi Chen, and Yu Meng. The surprising effectiveness of negative reinforcement in LLM reasoning. arXiv preprint arXiv:2506.01347, 2025. URL https://arxiv.org/abs/2506.01347.
- Pengfei Zuo, Huimin Lin, Junbo Deng, Nan Zou, Xingkun Yang, Yingyu Diao, Weifeng Gao, Ke Xu, Zhangyu Chen, Shirui Lu, Zhao Qiu, Peiyang Li, Xianyu Chang, Zhengzhong Yu, Fangzheng Miao, Jia Zheng, Ying Li, Yuan Feng, Bei Wang, Zaijian Zong, Mosong Zhou, Wenli Zhou, Houjiang Chen, Xingyu Liao, Yipeng Li, Wenxiao Zhang, Ping Zhu, Yinggang Wang, Chuanjie Xiao, Depeng Liang, Dong Cao, Juncheng Liu, Yongqiang Yang, Xiaolong Bai, Yi Li, Huaguo Xie, Huatao Wu, Zhibin Yu, Lv Chen, Hu Liu, Yujun Ding, Haipei Zhu, Jing Xia, Yi Xiong, Zhou Yu, and Heng Liao. Serving large language models on Huawei CloudMatrix384. arXiv preprint arXiv:2506.12708, 2025. doi: 10.48550/arXiv.2506.12708. URL https://arxiv.org/abs/2506.12708.

A Author List¶
Authors are grouped by contribution role into Core Contributors, Contributors, and Project Leaders, and ordered alphabetically by surname within Core Contributors and Contributors.
Core Contributors¶
Xuhui Chen, Sihang Chen, Tianxiang Fang, Wenlong Jin, Weiyan Kong, Jiajun Liu, Zhengxuan Lu, Zhuohan Wang, Jinmin Xiang, Yucheng Xie, Mingzhe Yang, Zirong Zeng, Bingwei Zhang, Ziwei Zhu
Contributors¶
Xin Chen, Yuntian Fan, Yingmeng Gao, Dongfang Li, Jing Li, Liangyou Li, Xiangyu Li, Yizhou Liang, Xiaodong Luo, Linyuan Qiu, Ruoyu Sun, Weijian Sun, Yiting Wang, Chenwei Wu, Zhengjun Yue
Project Leaders¶
Baotian Hu, Min Zhang, Haizhou Li, Zhiquan Luo
B Provenance and Curation of Public AI4OR Benchmarks¶
B.1 Evaluated Public Benchmark Suite¶
Our evaluation includes NL4OPT Ramamonjison et al., 2022, OptiBench Yang et al., 2025, Bench4Opt Wang et al., 2025, ComplexOR Xiao et al., 2024, IndustryOR Huang et al., 2025a, MAMO-ComplexLP and MAMO-EasyLP Huang et al., 2025b, and NLP4LP Ahmaditeshnizi et al., 2024. We additionally include problems from the ICML 2024 Automated Optimization competition, described by Nguyen and Ko Nguyen & Ko, 2024.
B.2 Release Provenance and Instance Selection Criteria¶
We use curated releases associated with SAGE Zhao et al., 2026 for NL4OPT, OptiBench, MAMO-EasyLP, and MAMO-ComplexLP. Table 16 distinguishes the original dataset sizes from the numbers of instances used in our evaluation.
Within our source collection, we select the parseable candidate release with the most stringent community cleaning (and fewest retained records when versions differ), preferring explicitly audited splits on ties. Following the cleaning taxonomy of Xiao et al. 2025—which manually inspected benchmark statements with 11 domain experts and cross-validated every flagged logical inconsistency, missing parameter, or erroneous ground-truth objective across at least three experts—and subsequent refinements in StepORLM Zhou et al., 2025, we adopt these upstream curated evaluation splits directly (recording exact file checksums in our evaluation harness; direct cross-paper comparisons should match both the evaluated split and solver tolerance).
Table 16: Original and evaluated dataset sizes. Original sizes follow Ramamonjison et al. 2022, Yang et al. 2025, and Huang et al. 2025b. For NL4OPT, the evaluated set excludes 11 instances from the 213-instance curated release.
| Dataset | Original | Evaluated |
|---|---|---|
| NL4OPT | 289 | 202 |
| OptiBench | 605 | 403 |
| MAMO-EasyLP | 652 | 545 |
| MAMO-ComplexLP | 211 | 111 |

C Qualitative Formulation Case Study on SLAI-OR-Bench-Hard¶
We present the optical-network routing and resource optimization problem (SLAI-OR-BENCH-HARD #17). The following blocks reproduce the problem description supplied to the LLM and the reference mathematical formulation.
Original problem description¶
The wording and numerical data below are unchanged; table markup is converted to plain text for readability.
A telecom carrier operates an optical fiber network with 6 nodes and 9 bidirectional links. Each fiber supports 4 wavelength channels (W1--W4), each with 100 Gbps capacity. 8 traffic demands must each be routed on a single (path, wavelength) lightpath. Multiple demands may share a wavelength on a link if total used bandwidth \(\leq\) 100 Gbps (traffic grooming). The lightpath uses the same wavelength on all its hops (wavelength continuity, no regeneration).
Network links (distance in km):
| Link | Endpoints | Distance |
|---|---|---|
| L1 | 12 | 200 |
| L2 | 13 | 350 |
| L3 | 23 | 180 |
| L4 | 24 | 250 |
| L5 | 34 | 300 |
| L6 | 35 | 220 |
| L7 | 45 | 160 |
| L8 | 46 | 290 |
| L9 | 56 | 210 |
Demands and pre-computed candidate paths (up to 3 paths per demand, max 4 hops):
| Demand | s -> t | Gbps | Path 1 (km) | Path 2 (km) | Path 3 (km) |
|---|---|---|---|---|---|
| d1 | 1 -> 6 | 40 | 1-3-5-6 (780) | 1-2-4-6 (740) | 1-3-4-6 (940) |
| d2 | 1 -> 5 | 80 | 1-3-5 (570) | 1-2-3-5 (600) | 1-2-4-5 (610) |
| d3 | 2 -> 6 | 60 | 2-4-6 (540) | 2-3-5-6 (610) | 2-3-4-6 (770) |
| d4 | 2 -> 5 | 30 | 2-3-5 (400) | 2-4-5 (410) | 2-3-4-5 (640) |
| d5 | 3 -> 6 | 50 | 3-5-6 (430) | 3-4-6 (590) | 3-4-5-6 (670) |
| d6 | 1 -> 4 | 90 | 1-2-4 (450) | 1-3-4 (650) | 1-2-3-4 (680) |
| d7 | 3 -> 4 | 70 | 3-4 (300) | 3-5-4 (380) | 3-2-4 (430) |
| d8 | 2 -> 4 | 40 | 2-4 (250) | 2-3-4 (480) | 2-3-5-4 (560) |
Each demand is routed on exactly one (path, wavelength) combination. For each link 1 and wavelength w, the sum of bandwidth requirements of all demands whose chosen path uses link 1 and whose chosen wavelength is w must not exceed 100 Gbps. The objective is to minimise total wavelength-kilometres consumed.
Reference mathematical formulation¶
Let D be the set of demands, \(P_d\) the set of pre-computed candidate paths for demand \(d \in D\) , W the set of wavelengths, and L the set of network links. Let \(b_d\) denote the bandwidth requirement of demand d, \(c_l\) the length of link l, and let \(\delta_{dpl} = 1\) if candidate path \(p \in P_d\) uses link l, and 0 otherwise. Decision variables are defined as follows:
$\(x_{dpw} \in \{0,1\}\)$ \(\forall d \in D, p \in P_d, w \in W,\)
where \(x_{dpw} = 1\) if demand d is assigned to candidate path \(p \in P_d\) and wavelength w, and
$\(u_{lw} \in \{0,1\}\)$ \(\forall l \in L, w \in W\)
where \(u_{lw} = 1\) if wavelength w is used on link l by at least one selected demand path.
Objective: Minimize total wavelength-kilometres consumed across all activated link–wavelength pairs:
Constraints: Each demand must select exactly one candidate path and one wavelength:

The aggregate bandwidth assigned to each link–wavelength pair cannot exceed the 100 Gbps channel capacity:
A link–wavelength pair is activated whenever any selected demand path using that link is assigned the wavelength:
Modeling challenge¶
The task requires distinguishing the routes assigned to individual demands from the shared network resources those routes occupy. Choosing one path–wavelength combination per demand ensures wavelength continuity, while bandwidth constraints determine whether multiple demands can share a resource. The objective requires a further distinction: occupied wavelength-kilometres measure the link–wavelength resources used, rather than the sum of individual demand path lengths.
For example, demands d1 and d3 require 40 and 60 Gbps, respectively. If their selected routes both traverse the 290-km link L8 using the same wavelength, their combined bandwidth fits within its 100-Gbps capacity. That shared link–wavelength resource contributes 290 wavelength-km to the reference objective, irrespective of the two demands using it. Summing the distance separately for each demand would instead contribute 580. The activation variable captures this distinction.
Observed model results¶
DeepSeek-V4-Flash-0731 and Claude Opus 5 both introduced resource activation variables and matched the reference optimum of 2,820 wavelength-km. GPT-5.6-Sol encoded demand assignment, wavelength continuity, and bandwidth capacity, but minimized the sum of individual demand path lengths. Its actual objective implementation was:
model.setObjective(
gp.quicksum(
path_length[d, p] * x[d, p, w]
for d in demands
for p in paths[d]
for w in wavelengths
),
GRB.MINIMIZE,
)
The program solved to optimality and returned 3,680 under this different objective, counting shared resources separately for each demand. This was an objective-formulation mismatch, rather than a code execution error or an unfinished solve. The two objective values correspond to different metrics and therefore should not be interpreted as an optimality gap under the reference objective. The example illustrates the domain interpretation required to translate "wavelength-kilometres consumed" into shared-resource accounting.
D Formulation and Diagnostics of Zero-Advantage GRPO Variants¶
This appendix provides the detailed formulations, mechanism diagrams, training dynamics, and diagnostic analyses for the Base-initialized Chat-GRPO zero-advantage interventions summarized in Section 3.3.3.
D.1 Budget Reallocation, Off-Policy Replay, and Virtual Rewards¶
All four runs in this study initialize directly from DeepSeek-V4-Flash-0731 (Base), without cold-start SFT, and run Chat generation for 200 updates on the same training prompt pool. Each rollout batch

contains 32 prompts and a nominal budget of eight responses per prompt (256 responses in total). The runs share solver-based Failure Reward Tiers and Outcome Masking (Table 8), learning rate \(10^{-6}\) , one optimizer update per rollout batch, PPO clipping at 0.2, and a separate reference-policy KL loss with coefficient 0.001; advantages are not divided by the within-group standard deviation (Liu et al., 2025). Greedy validation is evaluated every ten updates on the 177 seed problems represented through two modeling interfaces (354 records). Figure 26 illustrates the three mechanisms relative to Equation (2), and Table 17 positions them alongside related off-policy and budget-allocation approaches.

Figure 26: Mechanisms for handling zero-advantage response groups. (a) Downsample reduces the nominal allocation for prompts that were all correct at the previous visit. (b) Mixed correct/failed groups retain ordinary mean-centered advantages. (c) Replay introduces a verified success, whereas Virtual Reward changes the all-wrong-group baseline. Each illustration contains eight valid responses; Replay values assume one reward-1 response and seven reward-0 failures.
Table 17: Exploratory GRPO interventions and their relation to nearby approaches.
| Variant | Target and intervention | Relation to nearby approaches |
|---|---|---|
| Downsample | Previously all-correct prompts: reduce the nominal allocation from eight responses to two and redistribute the saved budget, with a per-prompt cap of 16. | DAPO and GRESO filter or skip uninformative groups (Yu et al., 2025; Zheng et al., 2025); Knapsack RL optimizes rollout allocation (Li et al., 2025). This heuristic uses the previous visit, preserves the batch budget, and does not estimate variance. |
| Replay | All-wrong groups: replace one failed response with a verified successful trajectory for the same prompt. | LUFFY uses off-policy guidance (Yan et al., 2025); RLEP and ExGRPO mix stored experience (Zhang et al., 2025; Zhan et al., 2026). This variant injects one stored success specifically into an all-wrong group, without a behavior-policy importance correction. |
| Virtual Reward | All-wrong groups: replace the group-mean baseline with \(c = 0.1\) , making every failure advantage negative. | GRPO and Dr. GRPO retain a group-mean baseline (Shao et al., 2024; Liu et al., 2025). Unlike negative reinforcement applied to failed samples generally (Zhu et al., 2025), this intervention acts only on all-wrong groups and preserves graded failure severity. |
Downsample. For a 32-prompt batch \(P_t\) with previously all-correct prompts \(E_t\) , Downsample nominally retains two verification draws per prompt in \(E_t\) and distributes saved slots round-robin
深圳河奎學院 Shenzhen Loop Area Institute
across remaining prompts up to a cap of 16:
adjusting \(n_p\) when non-easy prompts hit the cap so the batch total remains 256.
Replay. A trajectory library C stores one verified correct trajectory per training prompt, updating the entry whenever a newly sampled correct trajectory achieves higher length-normalized log-likelihood under the current policy. When a group produces no correct response, Replay identifies the most frequent failure tier and replaces its longest trajectory \(y_{i^*}\) with the stored success \(y_g^C\) (assigned score 1), yielding
$\(A_{i^{\star}} = 1 - \bar{r}'_{g'}, \qquad A_j = r_j - \bar{r}'_g \quad (j \neq i^{\star}).\)$ (12)
Because the injected sequence's reference log-probability is recomputed under the current policy, its initial PPO ratio is 1 without behavior-policy importance correction, distinguishing Replay from regularized off-policy guidance (Yan et al., 2025) and from the same-batch recalibration in Section 4.1.
Virtual Reward. Virtual Reward shifts the baseline exclusively on groups without a correct response:
so failure tiers 0, -0.1, and -0.15 receive strictly negative advantages -0.1, -0.2, and -0.25. In the idealized special case of fixed group size G, independent on-policy draws, and binary rewards with success probability \(p = p_{\theta}\) , the extra all-wrong-group policy-gradient term satisfies
$\(= -c \,\nabla_{\theta}(1-p)^{G} = cG(1-p)^{G-1} \nabla_{\theta} p = c \,\nabla_{\theta} \text{pass@}G,\)$ (14)
which encourages early sampling coverage when p is small, though variable masks, PPO clipping, token averaging, and a non-decaying constant c break exact equivalence to pass@G maximization.
D.2 Training Dynamics and Process-Level Diagnostics¶
Figure 27 plots validation solve rates, training rewards, entropy, and response lengths across the 200 updates, while Figure 28 verifies that each mechanism alters training dynamics as designed:
- Budget reallocation under Downsample: Easy-prompt labels emerge at update 69 as prompts are revisited, averaging 11.5 prompts per batch over updates 69–200 (14.5 in the last ten updates). Non-easy prompts receive 90.9% of active rollout slots versus 64.2% under uniform allocation, with a mean per-batch maximum of 12.1 draws.
- Autonomous hard-prompt gains under Replay: Replay injects a stored trajectory into 450 of 453 encountered all-wrong groups (2.25 per update). Excluding injected responses, the policy's own rollout success rate on a preselected subset of hard training prompts reaches 37.8% in the final quarter (versus 4.4% for Baseline), solving 50.7% at least once during training (versus 29.9%).
- Early process lift under Virtual Reward: Mean training reward over updates 41–100 reaches 0.739 versus 0.703 for Baseline, and validation reaches 47.18% at updates 80–90 (versus 45.48% for Baseline) before late-stage entropy triples and mean output length grows to 6,247 tokens.


Figure 27: Training dynamics of the Base-initialized Chat-GRPO variants. (a) Greedy validation solve rate at ten-update intervals. (b–d) Training reward, policy entropy, and response length (faint lines: raw values; solid lines: centered seven-update moving averages).

Figure 28: Process-level effects of the GRPO variants. (a) Non-easy-prompt budget share under Downsample versus uniform allocation. (b) Autonomous rollout success on hard training prompts under Replay versus Baseline (excluding injected trajectories). (c) Virtual Reward minus Baseline training reward (×100, left axis) and entropy ratio (right axis).

Why process gains do not yield superior held-out validation. Five factors account for the gap between training-process shifts and peak greedy validation accuracy (Table 9): (1) Evaluation granularity and distributed runtime variance: the 354 validation records span 177 distinct problems (≈ 0.28 percentage points per record), and independent distributed launches exhibit Update-0 greedy evaluation variance across runs (33.90%–40.11% on the same initial checkpoint due to non-deterministic parallel reductions and discrete MoE Top-6 routing boundary flips prior to the Section 4.2 consistency repairs), limiting sensitivity to sub-point peak differences; (2) Bounded intervention scope: Replay acts on an average of 2.25 of 32 prompts per update, while Downsample activates only after prompt revisits begin at update 69 (and its lower mean training reward of 0.701 reflects fewer draws on easy prompts rather than policy degradation); (3) Limited out-of-prompt transfer in Replay: boosting likelihood on uncorrected historical trajectories improves same-prompt autonomous success during training but risks late-stage overfitting (dropping from 49.72% at update 150 to 42.66% at update 200); (4) Unannealed negative drift and token-averaged length bias in Virtual Reward: keeping = 0.1 active without a positive target pushes probability mass away from sampled failures indiscriminately once early gains saturate, while dividing sequence-level negative advantages by response length dilutes per-token penalties on longer completions Liu et al., 2025, driving entropy and 2.3× output-length inflation (6,247 versus 2,729 tokens); and (5) Sampling-versus-greedy divergence: Virtual Reward's late training reward (0.775 at temperature 1) rises even as greedy validation declines, reflecting shifts across failure tiers and multi-sample coverage rather than greedy single-attempt precision.
E Extended Ablations and Controls for OR–MTP Co-Adaptation¶
E.1 Archived Endpoint Trajectory and Motivation¶
Table 18: Archived endpoint comparison supporting the training motivation. OR raw/H1 counts report the earlier audited public1627 scores, with one unresolved license case per trained endpoint. Acceptance is pooled over the separate historical 1,344-request concurrency-1 greedy panel. Table 13 reports a separate response batch for four trained targets and excludes Full Joint CE.
| Historical endpoint | Raw / 1,627 | H1 / 1,627 | Pooled AR (%) |
|---|---|---|---|
| CPT ref. | 969 | 978 | 24.27 |
| RL only | 1072 | 1114 | 23.03 |
| Joint CE | 989 | 1012 | 24.44 |
| Feature detach | 1111 | 1111 | 22.36 |
| G2 | 966 | 1059 | 23.03 |
| G4 | 1023 | 1061 | 23.61 |
The historical CPT reference serves as the initialization for this earlier training series rather than the 0731 base model studied in Section 3, and training recipes as well as recorded seed provenance differ across the archived endpoints. The small gains of Full Joint CE over the CPT reference in raw score and acceptance do not establish a stable joint-training advantage over target-only RL, nor do either the archived endpoints or the fresh four-target comparison isolate the causal effect of the gating variants.
In these joint runs, the auxiliary cross-entropy (CE) coefficient is 0.3: policy-gradient and KL terms use valid-token means, whereas auxiliary CE uses a per-response mean followed by a batch mean. Because global gradient clipping and Adam moment updates operate across parameters, training dynamics can remain coupled even when an auxiliary activation path is detached; preliminary partial-parameter gradient diagnostics do not reflect full data-parallel-averaged optimizer updates and are therefore omitted from causal attribution.
E.2 Paired Quality Contrasts and Protocol Bridges¶
On the complete Trunk temperature-1 bridge, standard decoding, original MTP, and H3 yield 1,122, 1,115, and 1,118 raw confirmed successes out of 1,627, respectively (with 2, 1, and 1 unknown cases). Because both the 8,192-token generation budget and sampling temperature differ jointly from the

Table 19: Raw paired contrasts on the 1,627-case regression evaluation. Each row comprises 1,626 known pairs; gains and losses count cases solved exclusively by the first and second listed conditions, respectively, and differences report first minus second. Cluster intervals and point estimates are computed over known pairs.
| Gains / losses | Δ (pp) | 95% cluster CI (pp) |
|---|---|---|
| 74 / 68 | +0.37 | [-1.16, +1.85] |
| 68 / 62 | +0.37 | [-1.04, +1.79] |
| 128 / 115 | +0.80 | [-1.11, +2.66] |
| 126 / 120 | +0.37 | [-1.55, +2.31] |
| 69 / 61 | +0.49 | [-0.86, +1.85] |
| 74 / 68 68 / 62 128 / 115 126 / 120 | 74 / 68 +0.37 68 / 62 +0.37 128 / 115 +0.80 126 / 120 +0.37 |
main quality protocol, this bridge evaluates combined serving-configuration sensitivity rather than isolating temperature alone.
A separate historical evaluation on the 93-problem COPT Q93 regression set yields standard/MTP success counts of 17/16, 13/15, 11/9, and 11/10 out of 93 for target-only RL, Feature Detachment, G2, and G4, respectively (all 744 scores known), under temperature 1.0, seed 42, concurrency 8, COPT 8.0.6, and objective tolerance \(10^{-4} + 10^{-6}|z^*|\) (including 14 instances with prior public exposure). This historical regression protocol differs in both answer batch and scoring setup from public1627 and from the eight-run 0731 evaluation in Section 2. A subsequent native-interface sensitivity bridge generates an additional 93 responses per interface from the fixed Trunk standard target, yielding 13 confirmed successes (0 unknown) under COPT and 20 confirmed successes (15 unknown) under Gurobi; because both modeling interface and solver backend change simultaneously, this comparison reflects combined interface/backend sensitivity rather than a pure API effect.
E.3 Frozen-Trunk Private MTP Alignment Controls¶
The private-only alignment control freezes the Feature Detachment target together with its input embeddings and output head, training on 640 prefixes (491 OR and 149 document prefixes; batch size 32, 20 updates) and evaluating on a reused 256-prefix development panel (128 examples per domain, disjoint problem/document hashes from training). Three-step recursive CE reuses MTP hidden states under teacher-token inputs with position weights (1,0.6,0.36)/1.96. At the higher tested learning rate \((3\times10^{-6})\) , OR three-token agreement rises from 62/128 (48.44%) to 75/77/79 across three data-order seeds (mean 60.16%), while document agreement moves from 50/128 (39.06%) to 52/52/51 (mean 40.36%).
Across the four tested configurations—initial module, single-position CE at \(10^{-6}\) , recursive CE at \(10^{-6}\) , and recursive CE at \(3\times10^{-6}\) —overall three-token matches out of 256 are 112, 113, 112/112/112, and 127/129/130, respectively (triplets denote data-order seeds 42–44 on the same development set; the teacher implementation matches the saved serving first token on 252/256 prefixes). Note that teacher-token prefix agreement on this 256-prefix development panel, verifier acceptance, serving token throughput, and end-to-end OR solve accuracy measure distinct quantities. Finally, in an export screen comparing the higher-rate versus lower-rate recursive modules across three physical node pairs, median TPOT drops by 4.97% and 4.41% on two pairs while showing negligible median change and a 6% p95 regression on the third; whereas that screen compares two adapted modules, Figure 17 compares the original module against H3 on the same fixed target.