Polynomial-Time Reasoning at the Edge of NP
Haoyu Wang, Tao Li, Zhiwei Deng, Yaqing Wang, Xinyi Wu, Deepak Ramachandran, Dan Roth
ICLR 2026 submission
Abstract. Large language models (LLMs) are fundamentally P-time machines, yet they display a surprising ability to solve small instances of NP-hard problems. This capability, however, collapses as complexity grows, raising a fundamental question: can a P-time machine meaningfully engage with problems presumed to lie outside P? We address this challenge by reframing the role of the LLM. Rather than treating it as a monolithic reasoner tasked with producing a complete solution in a single pass, we employ it as a P-time heuristic function. In this framework, inference scales by increasing the number of search calls, with each call using the LLM as a P-time machine to make local, heuristic decisions. We instantiate this paradigm with scalable algorithms such as Reflective Search and Monte Carlo Tree Search (MCTS), which systematically explore the solution space. Experiments on several NP tasks show that this LLM-guided search approach preserves robust polynomial scalability and delivers strong approximate solutions where direct generation would fail. Further analysis reveals key properties of this framework, including significant performance gains from high-quality initial solutions, highlighting the synergy between heuristic guidance and structured exploration. These findings suggest that the most viable path for P-time computation to navigate intractable NP landscapes lies in the structured integration of LLMs as heuristic guides within classical, scalable search algorithms.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperadd · history
Loading the discussion…