Deep Neural Network for Constraint Acquisition through Tailored Loss Function
Eduardo Vyhmeister, Rocio Paez, Gabriel Gonzalez
TL;DR
This work addresses constraint learning from data by introducing a deep neural network approach based on Symbolic Regression, specifically the Equation Learner (EQL). It pairs EQL with a tailored loss function that combines $z = \frac{\alpha_1}{N} \sum_{i=1}^{N} L_{e}(y,f(x_i)) + \frac{\alpha_2}{N} \sum_{i=1}^{N} L_{P_{\gamma}}(y,f(x_i)) + \alpha_3 L_{anchor}(y,f(x_i))$ to extract linear constraints from datasets, ensuring inequality directions and stability are respected. The method is implemented in Python with TensorFlow 2, using symbolic layers and SymPy, and evaluated on synthetic 2D and 3D geometries (e.g., square, circle, cube) to recover boundary-like inequalities with low constraint-violation rates. The results demonstrate the potential for interpretable, automated constraint discovery and point to future work extending to non-linear primitives and more diverse constraint types, enabling broader applicability and integration with existing frameworks.
Abstract
The significance of learning constraints from data is underscored by its potential applications in real-world problem-solving. While constraints are popular for modeling and solving, the approaches to learning constraints from data remain relatively scarce. Furthermore, the intricate task of modeling demands expertise and is prone to errors, thus constraint acquisition methods offer a solution by automating this process through learnt constraints from examples or behaviours of solutions and non-solutions. This work introduces a novel approach grounded in Deep Neural Network (DNN) based on Symbolic Regression that, by setting suitable loss functions, constraints can be extracted directly from datasets. Using the present approach, direct formulation of constraints was achieved. Furthermore, given the broad pre-developed architectures and functionalities of DNN, connections and extensions with other frameworks could be foreseen.
