PyEPO: A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programming

Bo Tang, Elias B. Khalil
6/28/2022
math.OCcs.LG

Official code: khalil-research/PyEPO (701 stars, Jupyter Notebook, MIT, last commit 2026-02-24).

Abstract

In deterministic optimization, it is typically assumed that all problem parameters are fixed and known. In practice, however, some parameters may be a priori unknown but can be estimated from contextual information.

Show full abstract

A typical predict-then-optimize approach separates predictions and optimization into two distinct stages. Recently, end-to-end predict-then-optimize has emerged as an attractive alternative. This work introduces the PyEPO package, a PyTorch-based end-to-end predict-then-optimize library in Python. To the best of our knowledge, PyEPO (pronounced like \textit{pineapple} with a silent ``n") is the first such generic tool for linear and integer programming with predicted objective function coefficients. It includes various algorithms such as surrogate decision losses, black-box solvers, and perturbed methods. PyEPO offers a user-friendly interface for defining new optimization problems, applying state-of-the-art algorithms, and using custom neural network architectures. We conducted experiments comparing various methods on problems such as Shortest Path, Multiple Knapsack, and Traveling Salesperson Problem, and discussed empirical insights that may guide future research. PyEPO and its documentation are available at https://github.com/khalil-research/PyEPO.

View on arXivView PDF

Code Implementations(1)

MIT

A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programming

70192Jupyter Notebook, PythonFeb 12, 20219 months agoMIT

Similar Papers

Cite this paper

@article{tang2022pyepo,
  title  = {PyEPO: A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programming},
  author = {Bo Tang and Elias B. Khalil},
  year   = {2022},
  eprint = {2206.14234},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.14234}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.14234.svg)](https://codeofpaper.com/paper/2206.14234)

Discussion