Benchmark tests whether language models distinguish P from NP-complete problems

Paper / preprint arXiv cs.CL · Reported findings, not independently verified by us.

A new benchmark finds that twelve tested language models fail substantially more often on NP-complete problems than on closely paired problems in P. The results also suggest that familiar textbook wording accounts for part of the performance gap.

P2NPCBench covers twelve problem families. Each NP-complete task is paired with a P variant that differs in one structural detail, such as 3- versus 2-colouring a graph. An adversarial multi-agent framework called AgentGAN rewrites statements until a panel of frozen code models fails. An executable validity check is intended to preserve each rewrite’s answer and complexity class. The benchmark contains 2,114 hardened statements with reference solutions verified by human solvers.

In evaluation, pass@1 was 35.4 percent for the NP-complete tasks, compared with 63.8 percent for their P twins. In 95.1 percent of the compared model-family pairs, performance was worse on the NP side. Giving models ten times more time raised NP accuracy only from 28.5 to 31.9 percent. The researchers therefore attribute failures more to incorrect or crashing programs than to solutions that simply take too long.

Hardening the wording narrowed the gap between the task types from 24.8 to 14.6 percentage points. This suggests that familiarity with textbook phrasing contributes to the difference, but the reported test does not show that it explains every performance gap. The paper details the benchmark design and evaluation: arXiv

🇬🇧 https://arxiv.org/abs/2610.30103v1

Leave a Comment

The weekly brief: selected developments, projects and videos