Beyond the Black Box: A Diagnosis-Driven Agent for Interpretable MIP Solver Tuning
Organizations: School of Data Science, The Chinese University of Hong Kong, Shenzhen · Fudan University · SIMIS · Cardinal Operations ·
Abstract
Tuning a mixed-integer programming (MIP) solver is an instance-specific problem, where a poor configuration can increase solving time by orders of magnitude. Existing Bayesian optimization tuners treat solver tuning as a black-box optimization problem: each evaluation returns a single score, allowing the tuner to learn which configuration is faster, but not why. Inspired by the use of profilers in GPU-kernel optimization, we introduce APEC (Agent for Per-instance Explainable Configuration), a log-grounded tuning agent for MIP solvers. APEC has three layers: a deterministic layer that profiles each log, an interpretation layer that guides hypothesis-driven diagnosis, and a system layer that controls evaluation, enabling more reliable and interpretable solver tuning. On the full MIPLIB 2017 benchmark set, APEC achieves a 1.58X improvement over the default configuration with over 38% fewer parameter changes than the baselines, making the results easier to read.
Figures & tables
| Tuner | Auto. | Know. | Inst. | Log | Hyp. |
|---|---|---|---|---|---|
| BO (SMAC) | |||||
| LLM-BO (GRIMIP) | |||||
| Human expert | |||||
| APEC (ours) |
| Group | # | Question answered |
|---|---|---|
| Run | 18 | Can this log be trusted and compared? |
| Outcome | 8 | How did the run end? |
| Problem | 14 | What is the instance (same for all configurations)? |
| Presolve | 8 | How much did presolve remove? |
| Phases | 14 | Where did the time go (proxies)? |
| Root | 8 | How far did the root bound move? |
| Category | Evidence read at the leaf |
|---|---|
| Level 1: Where the time goes | |
| Presolve-bound | Time spent in presolve |
| Root-bound | Time spent at the root: root LP, root rounds, and the wait before the first tree row |
| Tree-bound | Time from the first tree row to the end |
| Level 2: What happens in the segment | |
| Presolve | Reductions achieved relative to presolve time |
| Dataset | Type | Vars | Cons |
|---|---|---|---|
| CORAL a | Medium | [62, 573K] | [6, 550K] |
| MIRP b | Hard | [2K, 194K] | [1K, 109K] |
| MIPLIB 2017 c | Hard | [30, 1.43M] | [4, 2.90M] |
| Item Placement d | Hard | 1,083 | 195 |
| Load Balancing d | Hard | 61,000 | 64,304 |
| Anonymous d | Hard | 37,881 | 49,603 |
| Item Placement ( Gasse et al., 2022 ) | Load Balancing ( Gasse et al., 2022 ) | |||||||||||||
| Method | Time | Imp. | Eff. | Solv. | Gap | Par. | Step | Time | Imp. | Eff. | Solv. | Gap | Par. | Step |
| Default | 1800.00 | 1.00 | – | 0.0 | 35.29 | – | – | 1616.91 | 1.00 | – | 29.8 | 0.32 | – | – |
| B. Obs. | 1776.50 | 1.02 | 90.0 | 2.0 | 17.24 | – | – | 1437.70 | 1.17 | 97.9 | 44.7 | 0.22 | – | – |
| Random | 1776.50 | 1.02 | 44.0 | 2.0 | 28.16 | 4.64 | 4.00 | 1572.77 | 1.03 | 23.4 | 34.0 | 0.30 | 5.64 | 4.14 |
| SMAC | 1800.00 | 1.00 | 28.0 | 0.0 | 30.35 | 4.57 | 3.90 | 1532.36 | 1.07 | 70.2 | 38.3 | 0.26 | 4.76 | 3.98 |
| GRIMIP | 1800.00 | 1.00 | 32.0 | 0.0 | 28.26 | 5.88 | 3.58 | 1543.24 | 1.07 | 70.2 | 38.3 | 0.26 | 5.48 | 3.39 |
| Variant | Imp. | Eff. | Par. | Step |
|---|---|---|---|---|
| Default | 1.00 | – | – | – |
| APEC | 1.80 | 84.5 | 2.96 | 1.51 |
| raw-log variant | 1.62 | 75.4 | 3.87 | 1.98 |
| w/o interpretation layer | 1.68 | 80.7 | 3.63 | 1.77 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Eval. | Base | Change | Hypothesis in the rationale (abridged) | Time (s) | Nodes | What the log shows |
|---|---|---|---|---|---|---|
| Default | – | – | – | 1800 | 727.5K | Tree-bound; 2.47 ms and 57 LP iterations per node |
| E1 | LpMethod =2 | Node cost is high; barrier makes nodes cheaper | 1475.9 | 1.02M | Confirmed: 1.44 ms per node; solved within the time limit | |
| E2 | E1 | CutLevel =3 | Node volume remains; stronger cuts prune more | 484.5 | 596.7K | Promoted; 0.81 ms per node |
| E3 | E2 | StrongBranching =3, ConflictAnalysis =1 | Stronger branching prunes more | 475.9 | 596.7K | Printed search path equals E2’s: a no-op change |
| E4 | E2 | root cuts 3, tree cuts off | Split E2: near 485 s if root cuts drove the gain | 568.0 | 688.9K | Root cuts are not the source |
| E5 | E2 | root cuts off, tree cuts 3 | The complementary half of the split | 60.5 | 143.5K | Promoted; 8 faster than E2 |
| Dataset | Sessions | Confirmed | Refuted | Unexplained | Other | Selection |
|---|---|---|---|---|---|---|
| IP | 39 | 85 | 219 | 15 | 12 | 7/36 |
| LB | 40 | 98 | 209 | 27 | 12 | 11/38 |
| Anonymous | 42 | 144 | 263 | 21 | 17 | 8/41 |
| CORAL | 77 | 105 | 204 | 18 | 38 | 3/48 |
| MIRP | 42 | 107 | 219 | 19 | 26 | 2/27 |
| MIPLIB | 118 | 211 | 468 | 73 | 74 | 25/84 |
| Reading error | What the pilot agent concluded | What the log shows |
|---|---|---|
| Column confusion | 1896 is the objective of the incumbent | 1896 is in the IntInf column; BestSolution is 0 |
| First incumbent | first feasible solution at 166 s (the first H row it found) | a finite incumbent already at 5.67 s |
| Row time as cost | heuristics cost 16.86 s | H rows span 1.34–18.20 s; heuristic time is never printed |
| Large gap as weak bound | bound is weak (gap 99.82%) | the bound reaches the optimal value at 1.00 s; an optimal incumbent arrives at 27.95 s |
| Printed zero gap as done | converged at 20.96 s (gap 0.000%) | the run ends at 90.22 s |
| Nodes without cost | fewer nodes, so faster (488 9 nodes) | 89.92 s 122.86 s; each node became far more expensive |
| Quantity | Availability | Source |
|---|---|---|
| Presolve reduction | exact | sizes before/after |
| Presolve time | proxy | first progress row |
| Root LP time | proxy | first rows at node 0 |
| Root LP iterations | unavailable | – |
| Number of cuts | unavailable | – |
| Cut effect | indirect | root bound movement |
| Dataset | Evaluated instances | Gap subset |
|---|---|---|
| Item Placement | 50 | 50 |
| Load Balancing | 47 | 33 |
| Anonymous | 50 | 25 |
| CORAL | 100 | 20 |
| MIRP | 50 | 49 |
| MIPLIB 2017 | 236 | 34 |
| Dataset | APEC | Random | SMAC | GRIMIP |
|---|---|---|---|---|
| Item Placement | 45 | 22 | 14 | 16 |
| Load Balancing | 45 | 11 | 33 | 31 |
| Anonymous | 49 | 31 | 47 | 43 |
| CORAL | 70 | 57 | 75 | 52 |
| MIRP | 34 | 10 | 32 | 33 |
| MIPLIB 2017 | 199 | 133 | 176 | 157 |
| Fields | Meaning | Prov. | Comp. |
| run (18): can this log be trusted and compared? | |||
| censored | the log does not end as solved, infeasible, or unbounded | printed | – |
| terminal_complete | the footer prints MIP status, solving time, and node count | printed | – |
| time_basis , observed_until | end of the observed run: footer time, or the last progress row if the footer is missing | printed | – |
| progress_rows , progress_monotone | number of parsed progress rows; whether time and node counts never decrease | printed | – |
| phase_timing_quality | whether the phases group can be used | proxy | – |
| Fields | Meaning | Prov. | Comp. |
| phases (14): where did the time go? | |||
| presolve_time | start to the first node-0 progress row | proxy | |
| root_lp_time | first row to the second non- H node-0 row | proxy | |
| root_rounds_time , root_rounds_lp_time , root_rounds_heur_time | remaining node-0 rows, split by whether a row is an H row; not cut time | proxy | |
| root_silent_time , root_time | last node-0 row to the first tree row; whole root | proxy | |
| tree_time | first tree row to the end | proxy | one-sided |
| Fields | Meaning | Prov. | Comp. |
| bound (8): how did the dual bound move? | |||
| bound_stall_frac , last_bound_change_frac | time since, and time of, the last bound change, as fractions | retro. | |
| gap_closure_dual_frac | share of the gap closed by the bound | retro. | |
| tree_bound_delta_pct , tree_bound_delta_steps | bound movement in the tree | retro. | |
| final_bound_jump_pct , final_bound_jump_steps , final_bound_jump_share | bound movement between the last two rows and its share of the tree movement | retro. | |
| tree (11): how large and costly was the tree? | |||
| Fields | Meaning | Provenance |
| size (3): how large is the instance? | ||
| rows , cols , nonzeros | size of the file | exact |
| variables (12): what types and domains do the variables have? | ||
| binary_cols , general_integer_cols , continuous_cols | variable types | exact |
| implied_integer_cols | continuous variables proven integral through equality rows | sufficient |
| fixed_cols , empty_cols | fixed variables; variables in no row | exact |
| Group | What it can suggest | Directions it bears on | What it cannot show |
|---|---|---|---|
| size | scale of the LP; with the presolve group of the log profile, how much presolve removed | LpMethod and barrier controls for large LPs; Presolve | difficulty; size is context, not evidence |
| variables | pure binary or mixed instance; general integers and their domain widths; implied integers, which let the objective step be proven; free and unbounded variables | directions that target general integers are ruled out when there are none; Presolve , LpMethod , Dualize | implied integers are found only through equality rows within five rounds; bounds may be tightened by presolve |
| objective | a zero objective makes the instance a feasibility problem; a proven objective step converts gaps into steps ( Appendix H ) | with a zero objective, only the primal side matters: heuristic levels; a dual segment with a few steps left points to cuts, branching, and conflict analysis rather than heuristics | objective_integral =false means “not proven”, not “not integral” |
| constraints | the dominant row class describes the formulation: set partitioning, packing, and covering rows give clique and conflict structure; knapsack rows admit cover cuts; mixed-binary and variable-bound rows suggest on–off structure; continuous rows put the cost in the LP | Presolve , cut levels, and StrongBranching for set rows; cut levels for knapsack rows; LP controls for continuous rows; LinearizeIndicators and LinearizeSos are ruled out when the counts are zero | covers linear rows only; the classes say how the formulation is written, not how COPT uses it |
| numerics | big-M rows suggest a weak LP relaxation and numerical risk; a large row dynamism suggests numerically difficult LPs | cut levels and Presolve , read together with the numerical-issue fields of the log profile; LpMethod , DualPerturb , DualPrice , BarHomogeneous | the big-M threshold is a convention; a root that already closes most of the gap contradicts a weak relaxation; the search space has no tolerance or scaling parameter |
| sparsity | dense rows and columns make each LP iteration and barrier factorisation costly; dense rows are the coupling rows removed in blocks | LpMethod , BarOrder , Dualize ; tree cut levels when cuts on dense rows are costly | the dense-row threshold is a convention |
| Parameter | Type | Def. | Domain |
|---|---|---|---|
| Presolve | |||
| Presolve | int | ||
| PresolveRestart † | int | ||
| Folding † | int | ||
| LP | |||
| LpMethod | int | ||
Mixed-Integer Linear Programming
Mixed-integer linear programming (MILP) optimizes linear objectives and constraints when some decisions must be integer-valued.
See all 55 papers