Solving NP-Complete Problems via Language Models: A Case Study with BERT

2025

Full text Open access: Gold Metadata (CSL-JSON)
DOI 10.1016/j.procs.2025.10.229
Data confidence 70 medium
How this score is calculated

It is built from checkable properties of the record itself: whether the article has a DOI, how many independent sources confirmed its data, whether the required fields are filled in, and how recent the latest confirmation is. Disagreement between sources and a missing identifier lower it. A value of 80 or above means the record was published without further checking; 60 to 79 means it is published at reduced confidence, with a manual check advisable. A record verified by an editor by hand is never pushed below 90 by a recalculation. This scores our data about the article, not the article itself.

Abstract

NP-complete issues provide a considerable challenge in computational complexity owing to their extensive solution spaces and the absence of fast strategies for obtaining precise solutions. Concurrently, extensive language models like as BERT have exhibited robust proficiency in pattern recognition, sequence modeling, and reasoning with structured data. This work examines the viability of utilizing BERT to approximate solutions for NP-Complete problems by recontextualizing them as sequence prediction tasks. Encoding techniques are devised to encode instances of the Boolean Satisfiability Problem (SAT) and the Traveling Salesman Problem (TSP) as token sequences compatible with BERT processing. Experiments performed on benchmark datasets entail fine-tuning BERT to forecast variable assignments for the SAT and city tours for the TSP. Results demonstrate that BERT can provide viable, and frequently near-optimal, solutions for small to moderate problem sizes, providing considerable time benefits over traditional solvers. Nonetheless, challenges persist concerning scalability due to restrictions on sequence length and computational resources, with issues related to the interpretability of model outputs and the lack of theoretical assurances for solution quality. This research enhances the emerging convergence of machine learning and computational complexity, demonstrating how natural language processing techniques may provide innovative solutions to challenges traditionally deemed intractable within conventional computing frameworks.