[Paper Review] Automatic Cost Function Learning with Interpretable Compositional Networks
This paper introduces a supervised learning method using Interpretable Compositional Networks to automatically learn cost functions for Constraint Programming, enabling the expressivity of Cost Function Networks (CFN) with minimal modeling effort. The approach learns functions that closely approximate Hamming distance, achieving near-perfect performance on high-dimensional problems after training on small dimensions.
Cost Function Networks (CFN) are a formalism in Constraint Programming to model combinatorial satisfaction or optimization problems. By associating a function to each constraint type to evaluate the quality of an assignment, it extends the expressivity of regular CSP/COP formalisms but at a price of making harder the problem modeling. Indeed, instead of the regular constraints set, one must provide a set of cost functions that are not always easy to define. Here we first propose two clear definitions of Weighted CSP and CFN, separating these in two different problems considered so far to be similar, and we then propose a method to automatically learn a CF of a constraint, given a function deciding if assignments are valid or not. This is to the best of our knowledge the first attempt to automatically learn cost functions. Our method aims to learn cost functions in a supervised fashion, trying to reproduce the Hamming distance, by using a variation of neural networks we named Interpretable Compositional Networks, allowing us to get explainable results, unlike regular artificial neural networks. We experiment it on 5 different constraints to show its versatility. Experiments show that functions learned on small dimensions scale on high dimensions, outputting a perfect or near-perfect Hamming distance for most constraints. Our system can be used to automatically generate cost functions and then having the expressivity of CFN with the same modeling effort than for CSP/COP.
Motivation & Objective
- To address the challenge of manually defining cost functions in Cost Function Networks (CFN), which limits their adoption despite increased expressivity.
- To separate and formally define Weighted CSP and CFN as distinct problems, clarifying their differences in modeling and optimization.
- To develop a method that automatically learns interpretable cost functions from valid/invalid assignment decisions, reducing modeling burden.
- To ensure the learned cost functions generalize across dimensions, maintaining accuracy on high-dimensional problems.
Proposed method
- Propose a supervised learning framework where cost functions are trained to reproduce the Hamming distance between assignments.
- Introduce Interpretable Compositional Networks (ICNs), a neural network variant designed to produce explainable, modular representations of cost functions.
- Use a loss function based on Hamming distance to train the ICN on labeled data of valid and invalid assignments.
- Train the model on low-dimensional instances and evaluate generalization to high-dimensional problems.
- Decompose constraints into compositional components to improve interpretability and scalability of the learned functions.
- Apply the method to five different constraint types to validate versatility and performance.
Experimental results
Research questions
- RQ1Can cost functions in CFN be automatically learned from validity decisions without manual design?
- RQ2How well do automatically learned cost functions generalize from low to high-dimensional problem instances?
- RQ3To what extent can the learned functions reproduce the Hamming distance, a standard metric in constraint satisfaction?
- RQ4Can the proposed Interpretable Compositional Networks produce results that are both accurate and explainable compared to standard neural networks?
Key findings
- The proposed method successfully learns cost functions that achieve perfect or near-perfect Hamming distance approximation on most constraints.
- Cost functions trained on small-dimensional instances generalize effectively to high-dimensional problems without retraining.
- Interpretable Compositional Networks produce explainable results, unlike standard neural networks, while maintaining high accuracy.
- The approach enables the use of CFN's expressivity with modeling effort comparable to traditional CSP/COP formalisms.
- Experiments on five distinct constraint types demonstrate the method's versatility and robustness across different problem structures.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.