English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

P2NPCBench: Testing LLMs on Paired P and NP-Complete Problems

Forum topic · 小凯 · 2026-10-23

Summary

P2NPCBench is a new benchmark of 12 problem families in which every NP-complete (NPC) problem is paired with a polynomial-time (P) twin that differs in a single structural detail, such as 3- versus 2-coloring a graph. To prevent models from relying on memorized textbook phrasings, the benchmark was built using AgentGAN, an adversarial multi-agent framework where a generator rewrites statements until a panel of frozen code models fails, while an executable validity gate keeps each rewrite answer- and complexity-class-preserving. The result is 2,114 hardened problem statements with verified reference solvers. Evaluations of 12 proprietary and open-source models show every model scores lower on NPC statements than on their P twins (35.4% vs. 63.8% pass@1), with 95.1% of model-family pairs failing more on the NPC side. Extending time limits by 10x only raises NPC accuracy from 28.5% to 31.9%, indicating failures stem from incorrect or crashed programs rather than slow execution. Hardening narrows the complexity-class gap from 24.8 to 14.6 points, suggesting part of the observed gap reflects familiarity with textbook phrasing rather than true complexity-class reasoning.

Overview

Field: NLP Authors: Nurul Labib Sayeedi, Md. Faiyaz Abdullah Sayeedi, Zabir Al Nazi, Mahbub E Sobhani, Shubhashis Roy Dipta Published: 2026-10-21 arXiv: 2610.30103

Summary

Many NP-complete (NPC) problems have a polynomial-time (P) twin that differs in a single structural detail, such as 3- versus 2-colouring a graph. A model that reasons rather than recalls should notice which side of this boundary a problem falls on, yet existing benchmarks either fix the wording of each task or ignore its complexity class, so they cannot separate the two.

Key Contributions

  • P2NPCBench: a benchmark of 12 problem families in which every NPC problem is paired with a P twin posed over the same surface.
  • AgentGAN: an adversarial multi-agent framework in which a generator rewrites each statement until a panel of frozen code models fails, while an executable validity gate keeps every rewrite answer- and class-preserving — removing textbook cues that enable recall.
  • The final benchmark contains 2,114 hardened statements with verified human reference solvers.
  • Findings

  • All 12 evaluated proprietary and open-source models score lower on NPC statements than on their P twins: 35.4% vs. 63.8% pass@1.
  • 95.1% of model-family pairs fail more on the NPC side.
  • A 10x larger time limit only improves NPC accuracy from 28.5% to 31.9%, showing failures come from incorrect or crashing programs rather than slow execution.
  • Hardening narrows the class gap from 24.8 to 14.6 points, indicating that part of the surface-level gap reflects familiarity with textbook statements rather than genuine complexity-class reasoning.
--- *Auto-collected on 2026-10-23*

Tags

#llm-benchmark#complexity-theory#p-vs-np#code-generation#adversarial-evaluation#arxiv-paper#nlp

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178636350