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 historical data. A typical predict-then-optimize approach separates predictions and optimization into two stages. Recently, end-to-end predict-then-optimize has become an attractive alternative. In this work, we present the PyEPO package, a PyTorchbased end-to-end predict-then-optimize library in Python. To the best of our knowledge, PyEPO (pronounced like pineapple with a silent "n") is the first such generic tool for linear and integer programming with predicted objective function coefficients. It provides four base algorithms: a convex surrogate loss function from the seminal work of Elmachtoub and Grigas [16], a differentiable black-box solver approach of Pogancic et al. [35], and two differentiable perturbation-based methods from Berthet et al. [6]. PyEPO provides a simple interface for the definition of new optimization problems, the implementation of state-of-the-art predict-then-optimize training algorithms, the use of custom neural network architectures, and the comparison of end-to-end approaches with the two-stage approach. PyEPO enables us to conduct a comprehensive set of experiments comparing a number of end-to-end and two-stage approaches along axes such as prediction accuracy, decision quality, and running time on problems such as Shortest Path, Multiple Knapsack, and the Traveling Salesperson Problem. We discuss some empirical insights from these experiments, which could guide future research. PyEPO and its documentation are available at https://github.com/khalil-research/PyEPO.
翻译:在确定性优化中,通常假定所有问题参数都是固定且已知的。然而,在实践中,一些参数可能是事先未知的,但可以通过历史数据进行估计。典型的预测-然后优化方法将预测和优化分成两个阶段。最近,端到端预测-优化已成为一种有吸引力的替代方案。在本文中,我们提出了PyEPO软件包,这是一个基于PyTorch的Python端到端预测-优化库。据我们所知,PyEPO是第一个支持预测目标函数系数的线性和整数规划的通用工具。它提供了四种基本算法:来自Elmachtoub和Grigas [16]经典论文中的凸逼近损失函数、Pogancic等人[35]提出的可微黑盒求解器方法以及Berthet等人[6]提出的两种可微扰动方法。PyEPO提供了简单的接口,用于定义新的优化问题、实现最新的预测-优化训练算法、使用自定义神经网络架构以及比较端到端方法和两阶段方法。PyEPO使我们能够进行一系列综合实验,比较许多端到端和两阶段方法,在最短路径、多背包和旅行商问题等问题上比较预测精度、决策质量和运行时间等多个维度。我们讨论了一些这些实验的经验性见解,这些观点可以指导未来的研究。PyEPO及其文档可在https://github.com/khalil-research/PyEPO上获得。