Lune

ICML2025Top-tier venue

Self-Supervised Transformers as Iterative Solution Improvers for Constraint Satisfaction

Yudong Xu, Wenhao Li, Scott Sanner, Elias Boutros Khalil

Abstract

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 expertdesigned 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on15

  1. Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer et al.NeurIPS 2022 · 2,039 citations
  2. Erdos Goes Neural: an Unsupervised Learning Framework for Combinatorial Optimization on GraphsNikolaos Karalias, Andreas LoukasNeurIPS 2020 · 190 citations
  3. Deep Differentiable Logic Gate NetworksFelix Petersen, Christian Borgelt, Hilde Kuehne, Oliver DeussenNeurIPS 2022 · 117 citations
  4. Transformers Can Do Arithmetic with the Right EmbeddingsSean McLeish, Arpit Bansal, Alex Stein, Neel Jain et al.NeurIPS 2024 · 94 citations
  5. Self-Supervised Primal-Dual Learning for Constrained OptimizationSeonho Park, Pascal Van HentenryckAAAI 2023 · 81 citations

Related papers

  1. Learning to Solve Constraint Satisfaction Problems with Recurrent TransformerZhun Yang, Adam Ishay, Joohyung LeeICLR 2023
  2. Causal language modeling can elicit search and reasoning capabilities on logic puzzlesKulin Shah, Nishanth Dikkala, Xin Wang, Rina PanigrahyNeurIPS 2024 · 44 citations
  3. Geometric Algorithms for Neural Combinatorial Optimization with ConstraintsNikolaos Karalias, Akbar Rafiey, Yifei Xu, Zhishang Luo et al.NeurIPS 2025 · 4 citations
  4. Instructions are all you need: Self-supervised Reinforcement Learning for Instruction FollowingQingyu Ren, Qianyu He, Powei Chang, Jie Zeng et al.ACL 2026 · 6 citations
  5. Unsupervised Learning for Combinatorial Optimization with Principled Objective RelaxationHaoyu Wang, Nan Wu, Hang Yang, Cong Hao et al.NeurIPS 2022 · 54 citations
Dusk over the sea between two cliffs drawn in fine vertical lines