TL;DR
Translating messy business rules into exact mathematical optimization code is uniquely unforgiving: a single misunderstood constraint yields a program that runs cleanly, reports "Optimal," and gives a completely wrong answer. SLAI T-Rex-V2 tackles Operations Research (OR) from top to bottom—combining solver-verified post-training, a domain-savvy test-time agent harness, and deep systems engineering on Huawei Ascend NPUs to outperform frontier models while slashing reinforcement learning costs.
What Problem Does This Paper Address?
Operations Research is the science of optimal decision-making—routing delivery fleets, scheduling hospital shifts, or balancing power grids. For an LLM, OR is a triple threat: it requires reading ambiguous prose, formulating an exact linear or mixed-integer linear program (LP/MILP), and writing bug-free solver code (like GurobiPy or Pyomo). Unlike standard coding tasks, syntax checks aren't enough; omitting a subtle shared-resource constraint silently alters the mathematical feasible set.
Furthermore, scaling reinforcement learning (RL) with external solvers in the loop hits brutal systems bottlenecks on Mixture-of-Experts (MoE) hardware: multi-thousand-token rollouts are expensive to generate and verify, tiny floating-point discrepancies between inference and training engines can flip MoE expert routing and collapse training, and optimizing low-level NPU kernels takes hours of profiling per episode.
Methods
Built on DeepSeek-V4-Flash and Huawei Ascend SuperPOD, SLAI T-Rex-V2 attacks the problem along three fronts:
- Solver-Grounded Post-Training: Using a four-layer OR taxonomy (scenarios, modeling techniques, constraint families, and pitfalls), the authors synthesize new optimization problems verified through dual solver interfaces (Pyomo and gurobipy backed by COPT). Models undergo cold-start Supervised Fine-Tuning (SFT) followed by two-stage Group Relative Policy Optimization (GRPO)—first in concise Chat mode, then in extended Thinking mode. Crucially, they introduce Failure Reward Tiers (giving partial credit for executable code over syntax errors in all-wrong groups) and Outcome Masking (ignoring timeouts or license limits rather than penalizing valid large-scale formulations).
- RL Systems Infrastructure: Four standalone optimizations tackle execution-in-the-loop bottlenecks:
- Calibrated Trajectory Reuse: Re-scores stored rollouts up to 4 times on the learner backend using tempered log-likelihood shifts, extracting remaining signal without re-running the solver.
- Training–Inference Alignment: Uses layer-wise cosine scanning and same-input module replay to isolate and fix precision/clipping bugs between vLLM-Ascend and Megatron.
- Decoupled Native Multi-Token Prediction (MTP): Detaches shared trunk features during RL, then refines private draft heads on a frozen OR policy for faster speculative decoding.
- Asynchronous Prefix RL: Turns intermediate NPU kernel profiling steps into immediate training prefixes paired with a shared lesson memory, avoiding multi-hour episode stalls.
- Minimalist Agentic Execution: At test time, the base model is paired with a lightweight ReAct loop and modular OR Skills—pairing markdown manuals with deterministic Python hooks that enforce written math specs before coding and probe numerical plausibility before submission.
Datasets
Because public AI4OR benchmarks like MAMO-EasyLP and NLP4LP are largely saturated (>90% accuracy on frontier models), the authors introduce two contamination-controlled evaluation sets:
- SLAI-OR-BENCH (131 tasks) and SLAI-OR-BENCH-HARD (93 tasks): Expert-curated LP/MILP problems spanning 18 domains and 26 decision-task families, strictly held out from training.
- ASCENDGYM (48 tasks): Real-world LLM operator optimization tasks on Ascend NPUs with standardized compilation and hardware timing.
- Synthetic, solver-verified parent/child pools (1,410 SFT, 2,324 Chat-RL, and 1,274 Thinking-RL records) alongside a 1,627-case public OR regression suite and 710 ops-math kernel cases.
Key Insights and Ideas
- The SFT "Dip-then-Lift": Cold-start SFT alone temporarily drops Hard-set pass@1 (26.88% to 18.82%) by narrowing raw sampling diversity, yet seeds the exact structural templates needed for subsequent RL to surpass RL-only training in pass@8 coverage (51.61% vs. 44.09%).
- Generic Coding Agents Aren't Enough for OR: Wrapping frontier models in general CLI coding harnesses (like Codex) can actually slightly hurt OR accuracy because shell iteration fixes syntax errors while leaving silent mathematical misformulations intact. Deterministic semantic hooks make the difference.
- Tiny Precision Bugs Flip MoE Routers: In a 43-layer sparse MoE model, a minor SwiGLU clipping mismatch and router-bias dtype difference near Top-6 boundaries compound across depth and trigger sudden RL collapse around step 130.
Key Results
- Single-Turn Post-Training: Raises accuracy from 38.26% to 50.86% on SLAI-OR-BENCH (+5.82 and +6.59 points over GPT-6.1-Sol and Claude Opus 5.5) and from 26.88% to 35.89% on SLAI-OR-BENCH-HARD (edging out GPT-6.1-Sol at 34.41% and Claude Opus 5.5 at 33.33%).
- Test-Time Agentic Scaling: Equipping the untrained Base model with the minimalist harness lifts Hard accuracy from 26.88% to 40.86%, reaching 49.46% with six general-purpose workflow skills (beating single-turn Base pass@8 without an oracle) and 55.48% with two benchmark-tailored prior cards.
- Infrastructure Gains: Calibrated trajectory reuse cuts newly generated response tokens by 82.5% over 80 updates without losing accuracy; native MTP speeds up concurrency-1 OR serving by 1.583×–1.715×; and asynchronous prefix RL triples NPU kernel updates in 24 hours (4 to 12) while lifting correctness pass rates from 39.4% to 49.1%.
Limitations and Future Work
The paper's two main capability tracks—single-turn parameter specialization and multi-turn agentic execution—currently remain separate (the post-trained checkpoint targets single-turn generation rather than multi-turn tool schemas), and the four systems studies were validated against controlled baselines rather than folded into one unified run. Next, the authors plan to extend trajectory reuse to multi-hundred-step horizons, integrate native MTP directly into high-concurrency online RL rollout workers, and distill verified skill-guided agent trajectories back into the model's weights.
Summary updated