Repository navigation
π§© Constraint Solving POTD:Problem of the Day: Constraint Programming and Large Language Models β Learning Solver Strategies #74505
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Constraint Solving β Problem of the Day. A newer discussion is available at Discussion #74638. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem Statement
The Challenge: Given a combinatorial optimization problem instance (e.g., TSP, graph coloring, scheduling), train a machine-learning model to predict which solver strategies (variable-ordering heuristics, propagation techniques, search restarts) will solve it efficiently.
Concrete Instance:
Imagine you have 100 instances of the job-shop scheduling problem with varying numbers of jobs and machines. For each instance, you have:
n, number of machinesm, average processing time, variance of operation durationsGoal: Train a model to predict which strategy (or ensemble of strategies) will minimize solve time for a new, unseen instance.
Input/Output:
{n, m, density, time_variance, ...}+ strategy identifierWhy It Matters
Algorithm selection and portfolio approaches:
In competitive optimization, no single algorithm beats all others on every instance. Practitioners use algorithm selection (ASLIB framework) or per-instance solver portfolios to route each problem to its best-suited solver strategy. CP systems like Gurobi, CPLEX, and Choco now integrate ML-guided heuristics to accelerate search.
Practical impact:
Modeling Approaches
1. Supervised Classification (ML-native approach)
Paradigm: Feature extraction + classifier (random forest, gradient boosting, neural networks)
Decision variables: None in the CP sense; the model directly predicts from features to a strategy label.
Process:
y = argmin_s(time_s)(best strategy)f: features β strategyTrade-offs:
2. Constraint-based Strategy Selection (Hybrid approach)
Paradigm: CP or SAT encoding that selects the best strategy subject to performance guarantees
Decision variables:
select_s β {0, 1}for each strategys(which strategy(ies) to use)time_s β R+(predicted solve time for strategys, computed by ML model)cost β R+(total cost: time + memory + overhead)Constraints:
Post-processing: For each candidate strategy, run an ML regression to predict solve time; CP picks the strategy that minimizes cost.
Trade-offs:
3. Reinforcement Learning with Reward Shaping (Learning approach)
Paradigm: RL agent learns a policy
Ο: (state, features) β action (strategy/heuristic)State representation: Current search tree size, remaining unbound variables, constraint propagation strength, etc.
Actions: Switch solver strategy, adjust restart frequency, change variable ordering
Reward:
r(t) = -solve_time - λ·memory - λ'·overheadTrade-offs:
Example: Supervised Classification with Features
Key Techniques
1. Footprint Features & Problem Structure Extraction
Feature engineering matters: static features (problem size, density) + dynamic features (constraint propagation speed, search tree profile) improve predictions. The Algorithm Selection for Combinatorial Optimization (ASLIB) framework standardizes this process.
2. Model Ensembles and Warm-Starting
Rather than picking one strategy, solver portfolios (e.g., SAT-RACE, ASlib) run multiple solvers in parallel with different strategies and return the first successful result. ML can predict which subset of strategies is most likely to succeed, reducing overhead.
3. Ranking and Regression Over Classification
Instead of predicting "which is best," use regression to predict solve time for each strategy independently, then select the minimum. This captures uncertainty and allows tie-breaking by secondary criteria (e.g., memory usage).
4. Active Learning and Curriculum Training
Don't train uniformly on all instances. Active learning identifies uncertain instances where the model is confused (e.g., multiple strategies have similar predicted times) and acquires labels for those instances first, prioritizing learning where it matters.
Challenge Corner
Q1: Transfer Learning Across Problem Classes
A model trained on TSP instances may struggle with graph-coloring problems due to different structure. How would you design a feature representation that generalizes across problem families? What meta-features capture solvability across diverse constraint types?
Q2: Explainability Under Time Pressure
In practice, users want to know why a strategy was selected (especially if it fails). How would you design an interpretable model or extract decision rules that explain strategy selection in human-readable terms? Can you use SHAP values or rule-based learning to approximate an opaque neural network predictor?
Q3: Fairness in Strategy Selection
If you train your model on instances from one domain (e.g., industrial scheduling), it may overfit to that domain's characteristics. How would you detect and mitigate domain bias? Should you explicitly regularize for robustness across unseen problem structures?
References
Leite et al. (2012) β "Algorithm Selection for Combinatorial Search Problems: A Survey" (Data Mining and Knowledge Discovery). Foundational paper on algorithm selection; defines feature extraction and meta-learning.
Xu et al. (2008) β "SATzilla: Portfolio-based Algorithm Selection for SAT" (JAIR). Classic SAT solver portfolio that uses ML to predict solver performance; pioneered per-instance algorithm selection.
Bengio et al. (2021) β "Machine Learning for Combinatorial Optimization: A Methodological Survey" (EJOR). Modern survey covering supervised learning, RL, and hybrid CP/ML approaches for optimization.
Hutter & Leite (2017) β "Learning Curve Prediction with Bayesian Neural Networks" (ICML). Techniques for predicting solution quality and solve time curves; useful for strategy selection under partial information.
AutoML/Hyperband Literature β Successive halving and bandit-based algorithm selection (Li et al., 2018) provide efficient portfolio management when you have limited budget for strategy exploration.
All reactions