Seedlabs
Source research

NP-Engine: Empowering Optimization Reasoning in Large Language Models with Verifiable Synthetic NP Problems

Xiaozhe Li, Xinyu Fang, Ding, Shengyuan, Linyang Li, Haodong Duan, Liu, Qingwen et al. · 2025 · 19 citationsRead the paper

All 7 authors

Kai Chen

Large Language Models (LLMs) have shown strong reasoning capabilities, with models like OpenAI's O-series and DeepSeek R1 excelling at tasks such as mathematics, coding, logic, and puzzles through Reinforcement Learning with Verifiable Rewards (RLVR). However, their ability to solve more complex optimization problems - particularly NP-hard tasks - remains underexplored. To bridge this gap, we propose NP-ENGINE, the first comprehensive framework for training and evaluating LLMs on NP-hard problems. NP-ENGINE covers 10 tasks across five domains, each equipped with (i) a controllable instance generator, (ii) a rule-based verifier, and (iii) a heuristic solver that provides approximate optimal solutions as ground truth. This generator-verifier-heuristic pipeline enables scalable and verifiable RLVR training under hierarchical difficulties. We also introduce NP-BENCH, a benchmark derived from NP-ENGINE-DATA, specifically designed to evaluate LLMs' ability to tackle NP-hard level reasoning problems, focusing not only on feasibility but also on solution quality. Additionally, we present QWEN2.5-7B-NP, a model trained via zero-RLVR with curriculum learning on Qwen2.5-7B-Instruct, which significantly outperforms GPT-4o on NP-BENCH and achieves SOTA performance with the same model size. Beyond in-domain tasks, we demonstrate that RLVR training on NP-ENGINE-DATA enables strong out-of-domain (OOD) generalization to reasoning tasks (logic, puzzles, math, and knowledge), as well as non-reasoning tasks such as instruction following. We also observe a scaling trend: increasing task diversity improves OOD generalization. These findings suggest that task-rich RLVR training is a promising direction for advancing LLM's reasoning ability, revealing new insights into the scaling laws of RLVR.

What the full text shows

Working prototype
  • QWEN2.5-7B-NP significantly improved in-domain optimization performance on NP-BENCH. — Success Rate (SR) increased from 29.6 to 93.1; Average Ratio (AR) increased from 14.6 to 46.6 (Compared to the Qwen2.5-7B-Instruct baseline on NP-BENCH)
  • RLVR training on NP-hard problems improved out-of-domain (OOD) reasoning and non-reasoning tasks. — Average OOD score increased from 50.4 to 53.6; GPQA diamond improved by >12%; IFEval improved by >8% (QWEN2.5-7B-NP evaluated on KORBench, Math500, OlympiadBench, GPQA Diamond, and IFEval)
  • Increasing task diversity in RLVR training correlates with improved OOD generalization. (Observed scaling trend during RLVR training on NP-ENGINE-DATA)
Setup
NP-BENCH consists of 10 tasks across 5 domains (100 problems per category); OOD evaluation used KORBench, Math500, OlympiadBench, GPQA Diamond, and IFEval.
How
The authors developed NP-ENGINE, a framework using a generator-verifier-heuristic pipeline to create synthetic NP-hard problems with verifiable rewards. They trained QWEN2.5-7B-NP using zero-RLVR with curriculum learning on Qwen2.5-7B-Instruct.

Summarized by Gemma 4 from the open-access full text · 22 Nov 2026. Read it