Home

Awesome

Learning to Branch with Tree-aware Branching Transformers

This repository is the official implementation of Learning to Branch with Tree-aware Branching Transformers.

Requirements

Dataset

The T-BranT dataset can be downloaded here.

Our dataset consists of the following files:

Data collection

$ bash scripts/run_collect_train.sh
$ bash scripts/run_collect_val.sh
$ bash scripts/run_collect_test.sh

HDF5 creation

Once we collect all train/val/test expert samples, we convert all the collected pickle files into a single H5 file. Run the following script:

$ bash scripts/generate_hdf5.sh

Training

$ bash scripts/train_TBranT.sh
$ bash scripts/train_LTBranT.sh
$ bash scripts/train_BranT.sh
$ bash scripts/train_TreeGate.sh

Evaluation

$ bash scripts/eval_scip.sh
$ bash scripts/eval_neural.sh

Results

See more experimental details in our paper. For instance-specific results, refer to folder results/.

48 easier instances

The performance on 48 easier instances are shown as follows. Bold numbers denote the best results of the neural policies.

NodesFair Nodes
T-BranT1886.081944.02
TreeGate2371.812442.86
pscost2857.162857.16
relpscost930.461617.82
random12844.9916205.81

18 harder instances

The performance on 18 harder instances are shown as follows. Bold numbers denote the best results of the neural policies.

IntegralGap
T-BranT9606.060.0684
TreeGate10929.070.1139
pscost16445.600.4490
relpscost7254.430.0679
random21695.670.4711

Acknowledgement

Contact

Please feel free to submit a Github issue if you have any questions or find any bugs. We do not guarantee any support, but will do our best if we can help.