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

Teaching Networks to Solve Optimization Problems

Xinran Liu, Yuzhe Lu, Ali Abbasi, Meiyi Li, Javad Mohammadi, Soheil Kolouri · DOI

TL;DR

This paper introduces LOOP, a novel framework that replaces traditional iterative optimization solvers with a single, trainable neural network pass. By learning a direct mapping from problem inputs to optimal parameters, LOOP aims to achieve near real-time optimization, significantly outperforming classic solvers in speed while maintaining near-optimal solutions.

What Problem Does This Paper Address?

Many critical applications in science and engineering rely on solving optimization problems. Traditional methods, like gradient descent or simplex algorithms, are iterative, meaning they require many steps to converge to a solution. This iterative nature creates a computational bottleneck, especially in scenarios demanding near real-time responses, such as autonomous systems, financial markets, or energy grids. While some machine learning approaches (Learning to Optimize or L2O) aim to speed up these iterative solvers by learning better update rules or hyper-parameters, they still retain the iterative structure. This paper tackles the fundamental limitation of iteration itself by proposing to replace the iterative solver entirely with a single, feed-forward neural network.

Methods

The core contribution is the Learning to Optimize the Optimization Process (LOOP) framework. Instead of learning an iterative update rule, LOOP learns a trainable parametric (set) function that directly outputs the optimal parameters for a given optimization problem in a single forward pass. This function is designed to be permutation-invariant, as optimization problems often deal with sets of data.

Two training approaches are proposed:

  1. Solver in the Loop (Supervised): This method uses a classic iterative solver to generate the ground truth optimal parameters for training data. The neural network is then trained in a supervised manner to predict these ground truth solutions.
  2. Without Solver (Self-Supervised): To overcome the computational cost and potential limitations of using a solver during training (especially for non-convex problems), this approach directly optimizes the neural network's objective function. It aims to minimize the objective function value using the network's predicted parameters, effectively learning to solve the problem without explicit ground truth from a traditional solver.

The paper explores using permutation-invariant neural network architectures like Deep Sets (with Global Average Pooling and Sliced-Wasserstein Embedding) and Set Transformers to implement the parametric set function.

Datasets

The paper evaluates LOOP on several standard and custom-generated datasets for various optimization problems:

  • Linear/Nonlinear Regression: Synthetically generated data based on a generative model $y = w^T\phi(x) + \epsilon$, with varying input set cardinalities.
  • Principal Component Analysis (PCA): The MNIST dataset is used, where sets of images of two random digits are sampled to predict principal components.
  • Optimal Transport-based Coreset: Datasets are generated by drawing samples from random 2D Gaussian Mixture Models (GMMs).
  • Supply Management in Cyber-Physical Systems: The IEEE 2000-bus system data is used to generate hourly energy demand profiles.

No new benchmarks were introduced; instead, existing datasets and problem formulations were adapted to fit the LOOP framework.

Key Insights and Ideas

  • Eliminating Iterations: The most significant insight is the potential to completely bypass iterative solvers. This offers a paradigm shift for optimization, enabling near real-time performance where traditional methods are too slow.
  • Learning the "Solution" Directly: Instead of learning how to iterate, LOOP learns to directly produce the solution. This leverages the power of deep learning to approximate complex functions that map problem instances to their optimal outcomes.
  • Adaptability to Data Distributions: LOOP is designed to learn from a distribution of optimization problems. This allows it to improve over time and adapt to specific problem types, a capability not inherent in fixed, classic solvers.
  • "Self-Supervised" Training for Efficiency: The "without solver" training approach is crucial for scalability, as it avoids the computational burden of running traditional solvers during the training phase, especially for complex or non-convex problems.

Key Results

  • Speedup: LOOP models were consistently orders of magnitude faster than classic iterative solvers. For instance, in supply management, LOOP achieved significantly faster computation times, especially when using GPUs, outperforming solvers like ECOS, CVXOPT, and OSQP.
  • Near-Optimal Solutions: Despite the speed advantage, LOOP achieved results that were very close to those of commercial solvers. For example, in supply management, LOOP's outputs showed small optimality and feasibility distances compared to the solver's results.
  • Performance Across Problems: LOOP demonstrated effectiveness across diverse optimization tasks, including regression, PCA, coreset construction, and supply management, showcasing its generality.
  • Set Transformer Advantage: The Set Transformer architecture generally showed the smallest performance gap between LOOP and the solver, suggesting its suitability for capturing complex set-based relationships.
  • Continual Learning Potential: The "without solver" LOOP setting is well-suited for continual learning, allowing the model to adapt to shifting data distributions (e.g., in non-linear regression) without catastrophic forgetting, especially when combined with memory replay.

Limitations and Future Work

  • Lack of Theoretical Guarantees: Similar to other data-driven L2O methods, LOOP does not come with the theoretical convergence guarantees of classic iterative solvers.
  • Training Cost: While inference is fast, training the LOOP models can still be computationally intensive, especially for the "solver in the loop" approach.
  • Penalty Tuning: For the "without solver" approach in constrained problems, careful tuning of penalty coefficients is required to balance optimality and feasibility, as highlighted in the supply management experiment.
  • Future Work: The authors suggest exploring other continual learning mechanisms (regularization-based, gradient projection) and further investigating the application of LOOP to more complex optimization problems. The potential for leveraging advancements in deep learning like meta-learning and few-shot learning with LOOP is also a promising avenue.

Summary updated

BibTeX
@inproceedings{liu2022teaching,
  author = {Xinran Liu and Yuzhe Lu and Ali Abbasi and Meiyi Li and Javad Mohammadi and Soheil Kolouri},
  title = {{Teaching Networks to Solve Optimization Problems}},
  booktitle = {IEEE Access},
  year = {2022},
  doi = {10.1109/access.2024.3358724},
}
Figure