Table of Contents
Fetching ...

CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints

Anselm Paulus, Michal Rolínek, Vít Musil, Brandon Amos, Georg Martius

TL;DR

CombOptNet introduces a differentiable ILP layer that backpropagates through the solver to learn both cost terms and constraints, enabling end-to-end training for discrete optimization problems. The method constructs informative gradients for constraint updates via a descent-direction framework, a generalized active-set proxy, and a basis of integer neighbor directions, while representing constraints with learnable hyperplane parameters to preserve geometric meaning. It demonstrates strong performance across synthetic tasks (random constraints, weighted set covering, knapsack described by sentences) and a real-world deep keypoint matching task, often outperforming LP-relaxation baselines and approaching state-of-the-art dedicated solvers. The results highlight the potential of embedding universal combinatorial reasoning into neural architectures, enabling problem-specific learning of NP-hard formulations from raw data with practical implications for vision and language tasks.

Abstract

Bridging logical and algorithmic reasoning with modern machine learning techniques is a fundamental challenge with potentially transformative impact. On the algorithmic side, many NP-hard problems can be expressed as integer programs, in which the constraints play the role of their "combinatorial specification." In this work, we aim to integrate integer programming solvers into neural network architectures as layers capable of learning both the cost terms and the constraints. The resulting end-to-end trainable architectures jointly extract features from raw data and solve a suitable (learned) combinatorial problem with state-of-the-art integer programming solvers. We demonstrate the potential of such layers with an extensive performance analysis on synthetic data and with a demonstration on a competitive computer vision keypoint matching benchmark.

CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints

TL;DR

CombOptNet introduces a differentiable ILP layer that backpropagates through the solver to learn both cost terms and constraints, enabling end-to-end training for discrete optimization problems. The method constructs informative gradients for constraint updates via a descent-direction framework, a generalized active-set proxy, and a basis of integer neighbor directions, while representing constraints with learnable hyperplane parameters to preserve geometric meaning. It demonstrates strong performance across synthetic tasks (random constraints, weighted set covering, knapsack described by sentences) and a real-world deep keypoint matching task, often outperforming LP-relaxation baselines and approaching state-of-the-art dedicated solvers. The results highlight the potential of embedding universal combinatorial reasoning into neural architectures, enabling problem-specific learning of NP-hard formulations from raw data with practical implications for vision and language tasks.

Abstract

Bridging logical and algorithmic reasoning with modern machine learning techniques is a fundamental challenge with potentially transformative impact. On the algorithmic side, many NP-hard problems can be expressed as integer programs, in which the constraints play the role of their "combinatorial specification." In this work, we aim to integrate integer programming solvers into neural network architectures as layers capable of learning both the cost terms and the constraints. The resulting end-to-end trainable architectures jointly extract features from raw data and solve a suitable (learned) combinatorial problem with state-of-the-art integer programming solvers. We demonstrate the potential of such layers with an extensive performance analysis on synthetic data and with a demonstration on a competitive computer vision keypoint matching benchmark.

Paper Structure

This paper contains 53 sections, 2 theorems, 19 equations, 15 figures, 9 tables, 1 algorithm.

Key Result

Proposition 1

If $\lambda_j=|\mathrm{d}{\bm{y}}_{k_j}|-|\mathrm{d}{\bm{y}}_{k_{j+1}}|$ for $j=1,\ldots,n-1$ and $\lambda_n=|\mathrm{d}{\bm{y}}_{k_n}|$, then representation E:decomposition holds with $\Delta_k$'s as in E:basis.

Figures (15)

  • Figure 1: CombOptNet as a module in a deep architecture.
  • Figure 2: Geometric interpretation of the suggested constraint update. (a) All constraints are satisfied for ${\bm{y}}'_k$. The proxy minimizes the distance to the nearest ("most active") constraint to make ${\bm{y}}$ "less feasible". A possible updated feasible region is shown in green. (b) The suggested ${\bm{y}}'_k$ satisfies one of three constraints. The proxy minimizes the distance to violated constraints to make ${\bm{y}}'_k$ "more feasible".
  • Figure 3: All basis vectors $\Delta_k$ (green) point more "towards the $\mathrm{d}{\bm{y}}$ direction" compared to the canonical ones (orange).
  • Figure 4: (a) Each constraint $({\bm{a}}_k,b_k)$ is parametrized by its normal vector ${\bm{a}}_k$ and a distance $r_k$ to its own origin $o_k$. (b) Such a representation allows for easy rotations around the learnable offset $o_k$ instead of rotating around the static global origin.
  • Figure 5: Dataset generation for the RC demonstration.
  • ...and 10 more figures

Theorems & Definitions (5)

  • Example
  • Proposition 1
  • Proposition 2
  • proof
  • proof : Proof of Proposition \ref{['P:basis']}