# Exact Combinatorial Optimization with Graph Convolutional Neural Networks

Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, Andrea Lodi · arXiv · 2019-6-4

- **Problem** Choosing which fractional variable to branch on sets the size of a branch-and-bound tree, but the most accurate rule, strong branching, is too expensive to run at every node.
- **Method** Imitates strong branching with a graph convolutional network that runs on the bipartite variable-constraint graph of each LP, trained by cross-entropy on expert decisions.
- **Results** Reached 65.5±0.1 acc@1 on the set covering test set, against 57.6±0.2 for the best learned baseline there (SVMRANK).

![Table 3: Ablation study of our GCNN model on the set covering problem. Sum convolutions generalize better to larger instances, especially when combined with a…](https://refivu.com/papers/8df34e94-f13d-47fe-92a7-0d3d6b6d4386/figures/figure-f1f07c08a5d03aeaf5400b8f33765882.png?thumb=512)

**Table 3** : Ablation study of our GCNN model on the set covering problem. Sum convolutions generalize better to larger instances, especially when combined with a prenorm layer.

[Original paper](https://arxiv.org/abs/1906.01629v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, Andrea Lodi · Exact Combinatorial Optimization with Graph Convolutional Neural Networks · Original paper figure · Extracted the figure area from page 9 of the original PDF.

## Why branching decisions are costly

Branch-and-bound is the exact method of choice for mixed-integer linear programs. It splits the feasible region on a fractional variable and prunes branches whose LP bounds show they cannot contain an optimum. The variable picked at each split changes the size of the resulting search tree a great deal, so the choice is a central lever for solver performance.

Node selection is the other sequential decision a solver makes, but this study concentrates on variable selection, also called the branching problem.

Strong branching evaluates each candidate by solving two LPs and measuring the bound gain it yields, so it gives the smallest trees but costs far too much to run at every node. Modern solvers therefore run strong branching only early in the solve and then switch to cheaper rules such as pseudo-costs, a conflict score, or a hand-tuned mix of these.

A learned rule could be tuned for a family of instances that a user solves repeatedly, but two obstacles remain: the solver state has a size that varies from one decision to the next, and the model has to keep working on instances larger than those seen in training.

The authors cast the branching sequence as a Markov decision process, with the solver as environment and the brancher as agent. A state holds the tree built so far, the incumbent, the LP solutions and solver statistics, and an action selects one fractional variable among those available at the focused node. Each episode is a single MILP instance, so a policy is judged over a complete solve.

Reinforcement learning was considered for this process, but the authors avoid it because episodes are long and a randomly initialized policy learns slowly at the start, which makes training take too long.

## How the solver state becomes a graph

The full solver state covers far more than the policy receives, since the whole tree, the incumbent and all LP solutions belong to it. The policy sees only a bipartite graph built from the current LP, so the decision process is only partly observed, as the authors acknowledge.

The graph has one constraint node per row of the current LP relaxation and one variable node per LP column. An edge joins a constraint and a variable wherever their coefficient in the constraint matrix is nonzero. Constraint features form the matrix C, variable features form V, and edge features form a sparse tensor E.

Constraint features include the cosine similarity with the objective, the bias, a tightness flag and the dual value, and variable features include the variable type as a one-hot encoding, bounds, solution value, basis status and reduced cost.

## Graph convolution over the bipartite graph

A graph convolutional network extends convolution from grids to arbitrary graphs by passing messages between neighbouring nodes. The authors chose this family for three properties: it is well defined for any graph size, its cost follows the graph density, which suits sparse MILPs, and its output does not depend on the order of the nodes.

Because the graph is bipartite, a single convolution is split into two half-passes. The first pass moves information from variables to constraints, and the second moves information from the updated constraints back to variables. The two passes are written as follows, with the sums taken over the edges touching each node. \\\[ c\_i \\leftarrow f\_C\\Big(c\_i,\\ \\sum\_{(i,j)\\in E} g\_C(c\_i, v\_j, e\_{i,j})\\Big) \\\] \\\[ v\_j \\leftarrow f\_V\\Big(v\_j,\\ \\sum\_{(i,j)\\in E} g\_V(c\_i, v\_j, e\_{i,j})\\Big) \\\] Here f\_C, f\_V, g\_C and g\_V are two-layer perceptrons with ReLU activations, c\_i is the feature vector of constraint i, v\_j that of variable j, and e\_{i,j} the edge feature.

After the convolution, the constraint nodes are discarded and a final two-layer perceptron scores each variable node. A masked softmax turns these scores into a distribution over the candidate variables, which are the non-fixed LP variables.

## Why fix the normalization before training?

Common practice divides each convolution by the number of neighbours, but the authors leave the sums un-normalized. Dividing by the neighbour count would remove information such as how many constraints a variable appears in, which a counting-sensitive model should keep, following Xu et al.

Un-normalized sums create an initialization problem. Standard initialization scales weights by the number of inputs, but in a GCNN that number depends on the dataset and is not known in advance. The fix is an affine transformation, which the authors call a prenorm layer, applied immediately after the summation in the convolution.

The prenorm layer maps each summed value by subtracting a shift and dividing by a scale. \\\[ x \\leftarrow \\frac{x-\\beta}{\\sigma} \\\] The shift beta and the scale sigma are set to the empirical mean and standard deviation of the summed values on the training data, and they are fixed before training starts, so training does not update them. The authors credit the combination of un-normalized sums and this pre-training step with better generalization to larger problems.

## Training by imitating full strong branching

The expert data come from SCIP. The authors re-implemented full strong branching as a plain rule that serves only as an oracle, because the stock rule changes solver state as a side effect. Instances are sampled with replacement and solved with new random seeds until 100,000 training samples and 20,000 validation samples are recorded.

The expert state-action pairs form a dataset D, and the policy minimizes a cross-entropy loss over them, so training is a classification problem. \\\[ L(\\theta) = -\\frac{1}{N}\\sum\_{(s,a^\*)\\in D}\\log \\pi\_\\theta(a^\*\\mid s) \\\] The minus sign turns the average log-probability of the expert's chosen variable into a loss that is minimized, with N the size of the dataset.

Earlier imitation approaches regressed strong branching scores or learned rankings. A classification target needs only the expert's chosen variable, so the method also works with experts that produce neither scores nor orderings.

The GCNN is trained with Adam, minibatches of 32 and an initial learning rate of 1e-3, after the prenorm layers are pretrained. The learning rate is divided by 5 after 10 epochs without validation improvement, and training stops after 20 such epochs. The same procedure is used throughout all experiments.

## Benchmarks and comparison protocol

Four NP-hard benchmarks are used: set covering instances generated after Balas and Ho with 1,000 columns, combinatorial auctions, capacitated facility location with 100 facilities, and maximum independent set on Erdős-Rényi graphs. Training uses 500 rows for set covering, 100 items and 500 bids for auctions, 100 customers for facility location, and 500 nodes for independent set.

Evaluation uses larger instances: 1,000 and 2,000 rows for set covering, 200 items with 1,000 bids and 300 items with 1,500 bids for auctions, 200 and 400 customers for facility location, and 1,000 and 1,500 nodes for independent set.

The main human-designed baseline is reliability pseudocost branching, the default rule in SCIP. The authors also report full strong branching as their slow expert. Three learned baselines are included: TREES, based on an ExtraTrees model of strong branching scores, SVMRANK and LMART, which are learning-to-rank models using the features proposed by Khalil et al.

For the learned models, 100,000 branching samples come from 10,000 random training instances, and 20,000 samples come from 2,000 validation instances, with a test set built the same way. Accuracy is averaged over five seeds.

Solving results are measured on 20 new instances per difficulty level, with five seeds, giving 100 solving attempts per method. The models behind the solving results were trained on easy instances only.

## Imitation accuracy against baselines

At acc@1 the GCNN reached 65.5±0.1 on set covering, 61.6±0.1 on combinatorial auction, 71.2±0.2 on capacitated facility location and 56.5±0.2 on maximum independent set. The best of the three learned baselines at acc@1 was 57.6±0.2 (SVMRANK) on set covering, 57.3±0.3 (LMART) on combinatorial auction, 68.0±0.2 (LMART) on facility location and 48.9±0.3 (LMART) on maximum independent set.

acc@k counts how often the k highest-ranked variables of a model include the variable with the highest strong branching score, so the metric measures imitation of a single expert decision per state. The authors describe the GCNN as clearly ahead of the baselines on all four problems, with SVMRANK and LMART close to each other and TREES lowest.

Imitation accuracy does not measure solving speed, so the solving results in the next section are needed to judge the policy.

## Solving time and node counts

Table 2 reports the 1-shifted geometric mean of solving time, the number of wins among solved instances and the node count for each method, problem and difficulty. Node count and time do not always rank methods alike, because total time also includes the feature extraction and inference cost of each branching policy.

The GCNN was faster than RPB in running time in almost every configuration tested, and on medium and hard set covering and combinatorial auction instances it required fewer nodes than RPB. Full strong branching builds very small trees but is not competitive in running time.

The authors note the exceptions: on easy combinatorial auction instances LMART was faster, and on medium maximum independent set instances RPB was faster.

On maximum independent set, every learned approach solved fewer instances than RPB. The GCNN was the fastest learned approach overall there, but it varied widely in both time and node count.

The authors regard this as a first comparison of a learned branching rule against an essentially full-featured MILP solver, and see the GCNN as a candidate to be built into such solvers.

## Sum convolutions and the prenorm layer

The ablation varies the convolution on set covering only. MEAN replaces sum convolutions with mean convolutions, SUM removes the prenorm layer, and GCNN keeps sum convolutions with prenorm layers.

On easy and medium instances the three variants are close: acc@1 is 65.4±0.1 for MEAN, 65.5±0.2 for SUM and 65.5±0.1 for GCNN, and medium time is 134±6%, 134±6% and 134±8% respectively. On hard instances the differences grow. Time is 1593.0±4% for MEAN, 1511.7±3% for SUM and 1489.9±3% for GCNN, and nodes are 62 227±6%, 57 864±4% and 56 348±5%, with GCNN winning 42 of 70 hard instances.

The authors read this as support for sum convolutions as a better architectural prior for learning to branch, and for the prenorm layer as a help in stabilizing training and improving generalization. Because the ablation covers only set covering, the conclusion about these two components rests on a single problem class.

## Matching the training data of the baselines

The learning-to-rank and ExtraTrees baselines were trained on 250,000 candidate variables and validated on 100,000, because training on the full dataset was prohibitive in memory and time.

To check whether data volume explains the gap, the authors trained GCNN-SMALL on the same number of candidate variables as the baselines. Table 4 lists its accuracy next to the baselines and the full GCNN.

At acc@10 GCNN-SMALL reached 95.5±0.3 on set covering, 96.2±0.1 on combinatorial auction and 82.8±0.6 on maximum independent set, above the best baseline on each, and tied at 99.9±0.0 on capacitated facility location. At acc@1, GCNN-SMALL reached 57.9±1.0 on set covering, slightly above SVMRANK's 57.6±0.2, but 55.0±1.6 on combinatorial auction, below SVMRANK's 57.2±0.2 and LMART's 57.3±0.3.

The authors conclude that more data helps but cannot fully explain the gain, since GCNN-SMALL still does well against the baselines. The full GCNN, trained on the larger dataset, remains well ahead at acc@1 on set covering with 65.5±0.1.

## Limitations

The authors expect the gain over existing rules to shrink as the evaluated problems grow beyond the training sizes. In early experiments on even larger (huge) instances, the model trained on small instances showed a performance drop, which a model trained on medium instances did not show on those huge instances.

Generalization to maximum independent set is harder, and the GCNN shows high variability in time and node count there.

The bipartite state covers only part of the solver state, so the policy works from a partial view, as strong branching does too.

In early experiments, larger embeddings or more layers lowered node counts slightly, but raised inference costs and solving times, so the architecture is a compromise.

The results rest on one solver, SCIP 6.0.1, with a 1-hour limit and root-only cuts, and the learned baselines were trained on subsets capped at 250,000 candidate variables. Reinforcement learning for improving the imitation policies, and a broader set of combinatorial problems, are left to future work.

## Paper info

- **Authors**: Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, Andrea Lodi
- **Venue**: arXiv · Preprint
- **First published**: 2019-6-4
- **Added**: 2026-11-5
- **Updated**: 2019-10-30
- **Version**: v3
- **arXiv**: 1906.01629
- **Category**: cs.LG · math.OC · stat.ML
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/1906.01629v3) · [PDF ↗](https://arxiv.org/pdf/1906.01629v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Combinatorial optimization problems are typically tackled by the branch-and-bound paradigm. We propose a new graph convolutional neural network model for learning branch-and-bound variable selection policies, which leverages the natural variable-constraint bipartite graph representation of mixed-integer linear programs. We train our model via imitation learning from the strong branching expert rule, and demonstrate on a series of hard problems that our approach produces policies that improve upon state-of-the-art machine-learning methods for branching and generalize to instances significantly larger than seen during training. Moreover, we improve for the first time over expert-designed branching rules implemented in a state-of-the-art solver on large problems. Code for reproducing all the experiments can be found at https://github.com/ds4dm/learn2branch.

## Quote from the paper

Maxime Gasse, Didier Chételat, Nicola Ferroni, Laurent Charlin, Andrea Lodi (2019). Exact Combinatorial Optimization with Graph Convolutional Neural Networks. arXiv:1906.01629v3. https://arxiv.org/abs/1906.01629v3

**BibTeX**

```
@misc{gasse2019exact,
  title = {{Exact Combinatorial Optimization with Graph Convolutional Neural Networks}},
  author = {Maxime Gasse and Didier Chételat and Nicola Ferroni and Laurent Charlin and Andrea Lodi},
  year = {2019},
  eprint = {1906.01629},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.01629v3}
}
```

## Other paper commentary

- [Graph Attention Networks](https://refivu.com/en/papers/9453459f-8cee-4a2b-bdcf-07c59d5154f7-graph-attention-networks.md)
- [Semi-Supervised Classification with Graph Convolutional Networks](https://refivu.com/en/papers/89f4a475-b549-4284-b0c0-d55b805b7f3b-semi-supervised-classification-with-graph-convolutional.md)
- [Heterogeneous Graph Transformer](https://refivu.com/en/papers/f71bb06f-968c-4006-81b4-63b69f07a087-heterogeneous-graph-transformer.md)
- [Deep Learning on Graphs: A Survey](https://refivu.com/en/papers/2184aed4-7bc8-45a4-81a9-0ad60f8dc1c1-deep-learning-on-graphs-a-survey.md)
- [Graph Embedding Techniques, Applications, and Performance: A Survey](https://refivu.com/en/papers/eeed1384-bf87-452c-b3b1-9ecc6ce7d43b-graph-embedding-techniques-applications-and-performance-a.md)
- [Session-based Recommendation with Graph Neural Networks](https://refivu.com/en/papers/62d7225d-cbaa-40dd-937a-e1fda19d331d-session-based-recommendation-with-graph-neural-networks.md)
- [MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model](https://refivu.com/en/papers/d7e4c79d-ac46-4e0f-aef6-34e570d43e2f-magicanimate-temporally-consistent-human-image-animation.md)
- [Self-supervised 6D Object Pose Estimation for Robot Manipulation](https://refivu.com/en/papers/d923d9fd-647d-4656-905f-defb6f68182a-self-supervised-6d-object-pose-estimation-for-robot.md)
- [Learning Problem-agnostic Speech Representations from Multiple Self-supervised Tasks](https://refivu.com/en/papers/a1a919cd-efff-487c-86c6-982c7afc65eb-learning-problem-agnostic-speech-representations-from.md)
- [Multi-task Self-Supervised Learning for Human Activity Detection](https://refivu.com/en/papers/ae7c537d-33fb-4fec-8014-37dab4536341-multi-task-self-supervised-learning-for-human-activity.md)
- [Perceiver-Actor: A Multi-Task Transformer for Robotic Manipulation](https://refivu.com/en/papers/36489f39-2d0a-49d5-8c29-68447645c8d7-perceiver-actor-a-multi-task-transformer-for-robotic.md)
- [Train for the Worst, Plan for the Best: Understanding Token Ordering in Masked Diffusions](https://refivu.com/en/papers/64d5ed83-79ac-4425-8629-7aff772bd0c4-train-for-the-worst-plan-for-the-best.md)

## Terms in this paper

- [reinforcement learning](https://refivu.com/en/terms/6c51042515d2-reinforcement-learning)
- [cross-entropy loss](https://refivu.com/en/terms/14067bdf8b9f-cross-entropy-loss)
- [imitation learning](https://refivu.com/en/terms/921d574cc5af-imitation-learning)
- [Markov Decision Process](https://refivu.com/en/terms/5d622f56f22a-markov-decision-process)
- [branch-and-bound](https://refivu.com/en/terms/daf509b44190-branch-and-bound)
- [SCIP](https://refivu.com/en/terms/0fcd48cacff9-scip)
- [strong branching](https://refivu.com/en/terms/8ccd3dd66d60-strong-branching)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/8df34e94-f13d-47fe-92a7-0d3d6b6d4386-exact-combinatorial-optimization-with-graph-convolutional)
