cs.LGMay 10, 2026

Adaptive Data Harvesting for Efficient Neural Network Learning with Universal Constraints

Authors: Siteng KangXinhua Zhang

Organizations: University of Illinois Chicago

Abstract

Training neural networks to satisfy universal constraints over continuous domains poses unique challenges. Common examples include Lyapunov Neural Networks (Lyapunov NNs) and Physics-Informed Neural Networks (PINNs), where analytical solutions are generally either unavailable or overly restrictive. Sample-based methods are therefore commonly used to enforce these constraints, and the choice of samples has a substantial impact on convergence speed, stability, and solution quality. Most existing methods rely on fixed heuristics or handcrafted rules, and are suboptimal in practice. In this paper, we aim to improve upon them by learning, from data and experience, how to dynamically and iteratively adjust the samples in response to the model's evolving learning performance. Trained by reinforcement learning, the learned policy improves empirical constraint satisfaction on test problems while significantly improving efficiency. We validate the approach on both Lyapunov NNs and PINNs, and demonstrate its broader applicability to domains where adaptive input selection is essential for effective training.

Explore similar work

May 8, 2026cs.LG

AdamFLIP: Adaptive Momentum Feedback Linearization Optimization for Hard Constrained PINN Training

Physics-informed neural networks (PINNs) provide a flexible framework for solving forward and inverse problems governed by partial differential equations (PDEs), but standard PINN training typically relies on soft penalty formulations that combine PDE residuals, data mismatch, and initial/boundary conditions using manually chosen weights. This often leads to ill-conditioning, sensitivity to loss weights, and poor constraint satisfaction. In this work, we reformulate PINN training as an equality-constrained optimization problem and propose a novel Adaptive Momentum Feedback Linearization Optimization for Hard Constrained PINN (AdamFLIP). The key idea is to view the constraint residuals as the output of a controlled dynamical system and to compute the Lagrange multiplier as a feedback input that locally drives these residuals toward stable linear contraction dynamics. AdamFLIP then applies Adam-style first- and second-moment adaptation to the resulting feedback-linearized Lagrangian gradient, combining principled constraint handling with the scalability and robustness of adaptive neural-network optimization. We test AdamFLIP on a range of benchmark forward and inverse PDE problem, and it consistently outperforms both the standard soft-constrained PINN and state-of-the-art constrained optimizers. Specifically, on the Navier--Stokes equations benchmark, AdamFLIP \textbf{reduces relative L2L_2 error by more than two thirds} for the predicted solution compared to the next best method. Our AdamFLIP framework provides an effective and computationally scalable hard constraint optimization method for PINN training.
Binghang Lu, Runyu Zhang, Changhong Mou +2
Oct 31, 2024cs.LG

Projected Neural Differential Equations for Learning Constrained Dynamics

Neural differential equations offer a powerful approach for learning dynamical systems from data. However, they do not inherently respect known constraints, such as conservation laws, that should be obeyed by the learned dynamics. It is well known that enforcing constraints in data-driven models can enhance their generalizability and numerical stability. In this paper, we introduce projected neural differential equations (PNDEs), a method for constraining neural differential equations based on projection of the predicted velocities onto the tangent space of the manifold that fulfills the constraint. In tests on several examples from different fields, including chaotic dynamical systems and power grid models, PNDEs outperform existing methods for constraining learned dynamics, require fewer hyperparameters, and are computationally more efficient. The proposed approach demonstrates potential for enhancing the modeling of constrained dynamical systems, particularly in domains where accuracy and reliability are essential.
Alistair White, Anna Büttner, Maximilian Gelbrecht +4
May 23, 2026cs.LG

CAffNet: Hard Constraint-Affine Neural Networks

We present a novel framework for embedding hard constraint satisfaction into neural network (NN) architectures, specifically feedforward neural networks and transformers, with input-dependent affine constraints of arbitrary cardinality. Traditional constraint enforcement approaches either rely on penalty-based soft constraints, which offer no guarantee of satisfaction, or on post-processing methods that enforce constraints after the NN is trained, which may lead to suboptimality. We introduce a trainable constraint-affine (CAffine) layer into NNs, yielding CAffNet, which goes beyond enforcing affine constraints via fixed orthogonal or parallel projections and enables joint optimization with network parameters. Moreover, we impose no restrictions on the constraint space dimensions and establish that our construction preserves the universal approximation properties of NNs, while providing provable guarantees on constraint adherence for all inputs. Experimental validation demonstrates robust performance across diverse domains requiring guaranteed constraint satisfaction. The code is available at https://github.com/ice-t-lab/CAffNet.git.
Yang Zhao, Jungeun Lee, Jeong hwan Jeon +1