Self-Supervised Transformers as Iterative Solution Improvers for Constraint Satisfaction

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Xu, Yudong W., Li, Wenhao, Sanner, Scott, Khalil, Elias B.
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866918051835805696
author Xu, Yudong W.
Li, Wenhao
Sanner, Scott
Khalil, Elias B.
author_facet Xu, Yudong W.
Li, Wenhao
Sanner, Scott
Khalil, Elias B.
contents We present a Transformer-based framework for Constraint Satisfaction Problems (CSPs). CSPs find use in many applications and thus accelerating their solution with machine learning is of wide interest. Most existing approaches rely on supervised learning from feasible solutions or reinforcement learning, paradigms that require either feasible solutions to these NP-Complete CSPs or large training budgets and a complex expert-designed reward signal. To address these challenges, we propose ConsFormer, a self-supervised framework that leverages a Transformer as a solution refiner. ConsFormer constructs a solution to a CSP iteratively in a process that mimics local search. Instead of using feasible solutions as labeled data, we devise differentiable approximations to the discrete constraints of a CSP to guide model training. Our model is trained to improve random assignments for a single step but is deployed iteratively at test time, circumventing the bottlenecks of supervised and reinforcement learning. Experiments on Sudoku, Graph Coloring, Nurse Rostering, and MAXCUT demonstrate that our method can tackle out-of-distribution CSPs simply through additional iterations.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15794
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Self-Supervised Transformers as Iterative Solution Improvers for Constraint Satisfaction
Xu, Yudong W.
Li, Wenhao
Sanner, Scott
Khalil, Elias B.
Machine Learning
Artificial Intelligence
Computation and Language
Logic in Computer Science
We present a Transformer-based framework for Constraint Satisfaction Problems (CSPs). CSPs find use in many applications and thus accelerating their solution with machine learning is of wide interest. Most existing approaches rely on supervised learning from feasible solutions or reinforcement learning, paradigms that require either feasible solutions to these NP-Complete CSPs or large training budgets and a complex expert-designed reward signal. To address these challenges, we propose ConsFormer, a self-supervised framework that leverages a Transformer as a solution refiner. ConsFormer constructs a solution to a CSP iteratively in a process that mimics local search. Instead of using feasible solutions as labeled data, we devise differentiable approximations to the discrete constraints of a CSP to guide model training. Our model is trained to improve random assignments for a single step but is deployed iteratively at test time, circumventing the bottlenecks of supervised and reinforcement learning. Experiments on Sudoku, Graph Coloring, Nurse Rostering, and MAXCUT demonstrate that our method can tackle out-of-distribution CSPs simply through additional iterations.
title Self-Supervised Transformers as Iterative Solution Improvers for Constraint Satisfaction
topic Machine Learning
Artificial Intelligence
Computation and Language
Logic in Computer Science
url https://arxiv.org/abs/2502.15794