math.OCOct 26, 2026

Constraint Learning by Optimizing over Trained Neural Networks: A Pragmatic Tutorial

Authors: Jiaxiao Fang, Thiago Serra

Organizations: University of Iowa

Abstract

Constraint learning is an emerging paradigm of modeling optimization problems with the help of machine learning. In this paradigm, trained machine learning models are embedded into the optimization model. For example, we can learn constraints empirically from available data, or we can avoid using a nonlinear objective function by learning a simpler approximation for it. Neural networks become a compelling option if the machine learning models must capture more elaborate and nuanced relationships. However, optimization models embedding neural networks may become too large or too slow to solve. In this tutorial, we present practical considerations for an effective and efficient use of constraint learning with neural networks and validate it with a case study highlighting the benefit of smaller and sparser networks.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Embedding Linear Equality Constraints in Probabilistic Neural Networks for Dynamic Modelling

    Jun 19, 2026Matthew Marsh, Benoit Chachuat, Antonio del Rio ChanonaNeural Surrogate ModelingBayesian Neural Networks

  2. HardNet++: Nonlinear Constraint Enforcement in Neural Networks

    Apr 21, 2026Andrea Goertzen, Kaveh Alim, Youngjae Min +1Nonlinear MPCNeural Network Optimization