Introduction
In fields like Boolean Satisfiability (SAT) and Constraint Programming (CSP), there is rarely a "one size fits all" solver. Different algorithms excel at different types of problem structures. To handle this, researchers use algorithm portfolios, which employ "algorithm selection" to predict which solver in a toolbox will be fastest for a new, unseen problem.
Traditionally, this selection relies on manual feature engineering. Experts spend years identifying structural characteristics (like variable-to-clause ratios) to describe a problem. This process is labor-intensive, often brittle across different domains, and potentially incomplete, as human-designed features might miss subtle latent patterns. This paper introduces a novel way to automate algorithm selection by treating problem files as images. By converting raw text representations into grayscale images and processing them with a Convolutional Neural Network (CNN), the authors eliminate the need for manual feature engineering while achieving performance that beats the best single solvers.
Methods
The authors propose a pipeline that treats algorithm selection as a computer vision task. The process begins with Text-to-Image Conversion: combinatorial problems stored as text files (e.g., DIMACS format for SAT) are read character-by-character. Each character is converted to its ASCII code (0-255) and arranged into a square matrix.
Because problem files vary wildly in size, the resulting images are rescaled to a fixed 128x128 grayscale image. While lossy, this preserves the "texture" and structural patterns of the problem. These images are fed into a deep CNN with three convolutional layers (using 3x3 and 2x2 filters), max-pooling, and dropout to prevent overfitting. The final layers are fully connected, leading to an output layer where each node represents a solver. The model is trained on a binary regression task: predicting whether a specific solver can solve the instance within a given time limit.
Datasets and Evaluation
The approach was evaluated on several well-known benchmarks from the SAT and CSP communities:
- SAT Competition Data: Divided into Industrial (real-world), Random, and Crafted (hard) sub-domains.
- CSP Competition (2009): A diverse set of constraint satisfaction problems including Timetabling and Job-Shop scheduling.
- Solvers: The portfolio included 29 solvers for SAT and 22 for CSP.
Key Results
The core insight of this work is that combinatorial problems have a visual "texture." Different problem generators or domains produce distinct patterns when converted to images. Crucially, the model proved robust to shuffling the order of clauses in SAT files, suggesting the CNN captures global structural properties rather than just local text patterns.
As shown in the results table, the CNN-based approach significantly outperformed the Best Single Solver (BSS) across all categories. For example, in the CSP domain, the BSS solved 65.4% of instances, while the CNN solved 82.1%. While the CNN did not quite beat the state-of-the-art CSHC—which utilizes over a decade of human-refined features—it came remarkably close, particularly in the "Industrial" SAT category (93.0% vs 95.6%). Furthermore, the average running time for the CNN portfolio was much lower than the BSS, proving that the overhead of image conversion and inference is negligible compared to the time saved by selecting a superior solver.
Limitations and Future Work
Despite its success, the method faces challenges regarding information loss during the rescaling of large files. Future work may explore more sophisticated encoding methods, such as LSTMs or better compression, to retain more vital information. Additionally, integrating minimal domain knowledge to filter irrelevant text (like comments) could further boost accuracy. Ultimately, this research paves the way for moving beyond solver selection toward using deep learning to solve combinatorial problems directly.
Summary updated