NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Solver-free Framework for Scalable Learning in Neural ILP Architectures

Yatin Nandwani, Rishabh Ranjan, Mausam ., Parag Singla

Introduction

Neural Integer Linear Programming (ILP) architectures combine the perceptual power of neural networks with the rigorous reasoning of ILP. They are highly effective for tasks requiring both perception (like processing an image) and complex combinatorial reasoning (like solving a puzzle). However, training these models typically requires calling a slow, discrete, and non-differentiable black-box ILP solver at every training step.

Recent state-of-the-art methods, such as CombOptNet, attempt to train these architectures end-to-end by explicitly computing gradients through the solver. Unfortunately, calling an NP-hard solver for every single training example in a minibatch creates a massive computational bottleneck, severely limiting scalability. This paper introduces a solver-free training framework that frames constraint learning as a geometric classification problem, achieving massive speedups and scalability without needing to solve the ILP during the forward or backward pass.

The Geometric Workaround: Bypassing the Solver

An ILP essentially searches for an optimal point within a feasible region defined by linear constraints. Geometrically, these constraints act as hyperplanes that form a polyhedron. Instead of solving the ILP to obtain gradients, the authors treat the problem as learning a margin-based classifier:

  1. Cost as a Constraint: The optimization problem is converted into a pure constraint satisfaction problem. By enforcing a rule that any valid solution must have a cost less than or equal to the ground-truth solution's cost, the learning of the cost function is rolled into the learning of the constraints.
  2. Polyhedron Classification: Ground-truth solutions from the training data act as "positive" examples that must sit inside the polyhedron (satisfying all constraints).
  3. Hard Negative Sampling: Because the dataset only provides positive examples, the authors must generate "negative" examples that sit outside the polyhedron. Randomly sampling points in high-dimensional space is ineffective, so they use novel techniques—such as taking integral $k$-hop neighbors of the ground truth or projecting the ground truth onto the hyperplanes—to generate hard negatives that hug the boundaries.
  4. ILP-Loss: The loss function pushes the hyperplanes so that positive points remain inside, while negative points violate at least one constraint. To handle the logical OR (a negative example is valid if it violates Constraint A or Constraint B), the authors use a temperature-annealed softmax. This softly assigns each negative sample to the hyperplane it is closest to violating, transitioning from exploration to exploitation during training.

Key Results and Scalability

The authors evaluated their framework on both symbolic (pure reasoning) and perceptual (reasoning + vision/language) tasks. By reframing ILP learning as a geometric classification task, the training loop becomes purely neural and matrix-based, entirely sidestepping the algorithmic complexity of combinatorial solvers.

Sudoku (Symbolic and Visual)

The solver-free approach absolutely crushes the solver-based baseline (CombOptNet) in scalability. On Sudoku tasks (4x4, 6x6, and 9x9 grids), CombOptNet timed out (12+ hours) and failed to solve any size. In contrast, the proposed ILP-Loss achieved 100% accuracy on 9x9 symbolic Sudoku in just 52 minutes, and 98.3% on 9x9 visual Sudoku (using MNIST digits) in 92 minutes.

Sudoku Results

Random Constraints and Knapsack

On a synthetic dataset designed to test learning random polyhedrons, ILP-Loss outperformed CombOptNet by 25 to 40 accuracy points on larger, denser problem settings.

Random Constraints Results

Similarly, on a Knapsack task where item weights and values must be inferred from text embeddings, CombOptNet failed to complete a single epoch on the 30-item version (yielding 0% accuracy). ILP-Loss successfully scaled to this size, achieving 28.4% accuracy in under two hours.

Limitations and Future Work

While the proposed framework drastically accelerates training, it is not without limitations:

  • Inference Still Requires a Solver: Training is solver-free, but making predictions (inference) still requires running an ILP solver over the learned constraints, which can be slow for massive problems.
  • Fixed Output Dimensions: The architecture currently requires a fixed output space size and cannot dynamically generate constraints for variable-sized inputs (e.g., a single model handling both 4x4 and 9x9 Sudoku).
  • Interpretability: The hyperplanes learned by the neural network can be entangled. Distilling these into human-readable rules remains an open challenge for future work.
  • Architectural Limits: The method assumes the ILP is the final layer. Extending this to "neural-ILP-neural" pipelines is an ongoing area of research.

Summary updated

BibTeX
@inproceedings{nandwani2022solver,
  author = {Yatin Nandwani and Rishabh Ranjan and Mausam . and Parag Singla},
  title = {{A Solver-free Framework for Scalable Learning in Neural ILP Architectures}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=EqZuN4V_FLF},
}
Figure