When solving combinatorial puzzles like Sudoku or N-Queens, there are often multiple valid solutions for a single starting point. For instance, a partially filled Sudoku grid might have several valid completions. However, standard neural network training methods typically assume a single "gold" target.
This paper introduces SELECTR, a reinforcement learning framework that allows neural networks to navigate this "solution multiplicity." By dynamically choosing the best target solution to learn from during training, SELECTR achieves accuracy gains of up to 21 points over standard methods.
The Problem: The Penalty of Ignorance
Imagine teaching a student to solve a Sudoku puzzle. The student provides a perfectly valid completion of the board, but you mark it as "wrong" simply because it doesn't match the specific solution key in your hand—even though your key is just one of many possible correct answers.
This is exactly what happens when we train standard non-autoregressive neural networks on combinatorial problems in structured output spaces. A single input often has many valid outputs. Traditional training methods either ignore this multiplicity or penalize the model for picking a "correct" solution that doesn't happen to be the one provided in the training set. The authors argue that being oblivious to these multiple solutions severely hampers a model's ability to learn the underlying constraints of the problem. If a model correctly predicts one valid solution but is forced to compare it against a different valid "gold" solution, the resulting loss signal is noisy and misleading.
The SELECTR Framework
To address this, the authors formalize the task of One-of-Many Learning (1oML). They propose moving beyond a "Naïve Objective" (which averages loss across all known solutions) and a greedy "MINLOSS" approach (which simply picks the target closest to the current prediction).
The centerpiece of their work is SELECTR, a reinforcement learning (RL) based framework.
SELECTR consists of two main components:
- The Prediction Network ($M_\Theta$): The primary model being trained to solve the puzzle (e.g., a Recurrent Relational Network or a Neural Logic Machine).
- The Selection Module ($S_\phi$): An RL agent that acts as a "curator." For every training input, it looks at the current state of the prediction network and the set of valid solutions, then outputs a probability distribution over which solution should be used for training in that iteration.
The Selection Module is trained using policy gradients. Its "reward" is based on how "easy" it is for the prediction network to learn a specific target, measured by the Hamming distance between the prediction and the target. This allows the system to trade off between exploration (trying different valid solutions) and exploitation (focusing on the most promising ones). Effectively, the Selection Module learns a curriculum, identifying which solutions are most "instructive" for the prediction network at its current stage of learning.
Datasets and Evaluation
The researchers evaluated their framework on three classic Constraint Satisfaction Problems (CSPs):
- N-Queens: Placing $N$ queens on an $N \times N$ board so none attack each other. They used 10-Queens for training and tested on 11-Queens to demonstrate size-invariance.
- Futoshiki: A logic puzzle involving a grid, digits, and inequality constraints ($<$ or $>$).
- Sudoku: They created a custom dataset by taking 17-clue puzzles (which have unique solutions) and removing clues to ensure multiple valid completions existed.
As shown in the dataset statistics, a significant percentage of queries in these datasets possess multiple solutions (MS), particularly in the Sudoku dataset where 50% of queries have an average of nearly 14 valid solutions.
Key Results
SELECTR consistently outperformed all baselines across all three domains:
- Sudoku: SELECTR achieved an overall accuracy of 85.21%, compared to just 48.49% for the naïve baseline and 77.79% for a model trained only on unique-solution instances.
- N-Queens: It reached 79.72% accuracy, a significant jump over the 68.04% naïve baseline.
- Robustness: As the number of possible solutions for a puzzle increases (making the problem "harder" for neural models), SELECTR’s performance degrades much more slowly than other methods. This proves it is more robust to high solution multiplicity. Furthermore, while a greedy MINLOSS approach helps, it often gets stuck in local optima. SELECTR’s RL-based exploration allows the model to "jump off" these local peaks by occasionally training on targets that aren't the immediate closest, leading to better global generalization.
Limitations and Future Work
While highly effective, the framework has some limitations. Training an RL agent alongside the main prediction network increases the computational overhead and time required for training. Additionally, in the Sudoku experiments, the authors only sampled up to 5 solutions even when thousands might exist. While SELECTR handled this well, the impact of extremely large or poorly sampled solution sets remains an open question.
Looking ahead, the authors suggest that the next big step is combining these neural learning techniques with traditional symbolic solvers to create a "best of both worlds" system for complex reasoning tasks.
Summary updated