Abstract
Predicting the runtime of algorithms on previously unseen problem instances is a challenging yet crucial task for algorithm selection and automated configuration. This paper presents a comprehensive framework for building Empirical Performance Models (EPMs) for NP-complete problems like SAT, TSP, and MIP. By introducing novel modeling techniques—specifically optimized Random Forests and Projected Process Gaussian Processes—and a massive suite of problem-specific features, we demonstrate that runtimes can be predicted accurately across diverse instance distributions. Our empirical analysis, the largest of its kind, evaluates 11 algorithms across 35 distributions, showing that our models generalize effectively to new instances and algorithm configurations.
Introduction
Algorithms for NP-complete problems often exhibit extreme performance variance. A solver might process one instance in milliseconds while stalling for hours on another of similar size. This unpredictability complicates algorithm selection and parameter tuning. Empirical Performance Models (EPMs) address this by using machine learning to map problem features and algorithm parameters to predicted runtimes. This work extends the state-of-the-art in EPMs, providing a robust methodology for predicting performance on unseen instances and configurations.
Modeling Techniques
The study evaluates several regression architectures, focusing on their ability to handle the unique characteristics of runtime data.
Random Forests (RF)
Random Forests emerged as the most effective model. The authors adapted RFs to quantify predictive uncertainty by storing empirical variance in leaf nodes and applying the law of total variance to aggregate tree outputs. This allows the model to provide not just a point estimate, but a measure of confidence.
Projected Process (PP) Gaussian Processes
While standard Gaussian Processes (GPs) offer excellent Bayesian modeling, their $O(N^3)$ complexity is prohibitive for large datasets. The authors utilize a "projected process" approximation to maintain the benefits of GPs while scaling to thousands of training points. To handle categorical algorithm parameters, they implement a weighted Hamming distance kernel.
Handling Censored Data
A critical challenge in runtime modeling is "censored data"—runs that are terminated (timed out) before completion. Rather than discarding these or treating them as having finished at the time limit, the authors adapted the Schmee & Hahn procedure for Random Forests. This iterative approach allows the model to learn from the fact that a run took at least a certain amount of time, significantly reducing prediction bias.
Feature Engineering and Probing
The effectiveness of EPMs relies heavily on the quality of input features. This research introduces extensive feature sets for three major problem classes:
- SAT: 138 features.
- MIP: 121 features.
- TSP: 64 features.
A key innovation is the use of "probing features." By running an algorithm for a very short duration (e.g., a few seconds), the model gathers trajectory data—such as the rate of clause learning in SAT solvers. This "probe" provides high-fidelity information about the algorithm's likely long-term behavior on that specific instance.
Experimental Evaluation
The authors conducted a massive empirical study involving 11 algorithms (including solvers like Minisat, CPLEX, and Concorde) and 35 instance distributions. These distributions ranged from synthetic random instances to structured industrial benchmarks from software verification and wildlife conservation planning.
The evaluation focused on three generalization scenarios:
- Unseen Instances: Predicting performance on new problems for a fixed algorithm.
- Unseen Configurations: Predicting performance of new parameter settings on known instances.
- Joint Space: Predicting performance for new configurations on new instances simultaneously.
Key Results and Insights
- Accuracy: Random Forests consistently outperformed other models, including Neural Networks and Ridge Regression. In many cases, the Root Mean Squared Error (RMSE) in log10 space was below 0.5, meaning predictions were typically within a factor of three of the actual runtime.
- The Importance of Log-Transformation: Because runtimes span several orders of magnitude, modeling the logarithm of the runtime is essential for stabilizing variance and achieving high accuracy.
- Partitioning Heterogeneity: The success of tree-based models (RF) suggests that the feature space of NP-complete problems is highly heterogeneous. RFs excel by partitioning this space into more homogeneous regions, effectively modeling different "types" of instances independently.
- Efficiency: RFs proved to be computationally efficient, training in seconds on large datasets, which makes them suitable for integration into automated algorithm configurators.
Conclusion and Future Work
This work demonstrates that accurate runtime prediction is achievable even for complex, NP-complete problems. The combination of Random Forests, sophisticated feature engineering, and proper handling of censored data provides a powerful toolkit for algorithm analysis. While some high-quality features are computationally expensive, the overall framework significantly advances the field of automated algorithm configuration. Future research may explore deeper integration of survival analysis and the prediction of other performance metrics like memory consumption.
Summary updated