Abstract
Many problems at the intersection of combinatorics and computer science require solving for a permutation that optimally matches, ranks, or sorts some data. These problems usually have a task-specific, often non-differentiable objective function that data-driven algorithms can use as a learning signal. In this paper, we propose the Sinkhorn Policy Gradient (SPG) algorithm for learning policies on permutation matrices. The actor-critic neural network architecture we introduce for SPG uniquely decouples representation learning of the state space from the highly-structured action space of permutations with a temperature-controlled Sinkhorn layer. The Sinkhorn layer produces continuous relaxations of permutation matrices so that the actor-critic architecture can be trained end-to-end. Our empirical results show that agents trained with SPG can perform competitively on sorting, the Euclidean TSP, and matching tasks. We also observe that SPG is significantly more data efficient at the matching task than the baseline methods, which indicates that SPG is conducive to learning representations that are useful for reasoning about permutations.
Introduction
Finding an optimal permutation is a fundamental challenge in tasks ranging from data sorting and search ranking to multi-object tracking. These problems are characterized by factorial complexity—where the search space grows as $N!$—and non-differentiability, as discrete permutations do not allow for the smooth gradient-based optimization typical of deep learning. While supervised learning can address some of these issues, obtaining ground-truth labels for complex combinatorial problems is often prohibitively expensive.
This work introduces the Sinkhorn Policy Gradient (SPG), an off-policy reinforcement learning (RL) framework that learns to output permutations using only task-specific rewards. By bridging the gap between discrete actions and continuous optimization, SPG enables end-to-end training for highly structured combinatorial tasks.
Methodology
The SPG algorithm utilizes an actor-critic architecture designed to handle the unique constraints of permutation spaces.
The Sinkhorn Layer and Action Selection
The core innovation is the Sinkhorn Layer, which transforms a raw matrix into a doubly-stochastic matrix through iterative row and column normalization. This provides a differentiable "soft" relaxation of a permutation matrix. During training, the actor network $\pi_\theta(s; \tau)$ outputs this relaxed matrix. To interact with the environment, which requires discrete actions, the Hungarian Method is employed to round the Sinkhorn output to the nearest valid permutation matrix.
De-biasing the Critic
A critical challenge in training actor-critic models for permutations is the discrepancy between the "soft" actions used for gradients and the "hard" actions executed in the environment. This discrepancy introduces bias in the critic's value estimates. To mitigate this, the authors introduce an auxiliary penalty term in the critic's loss function. This term forces the predicted Q-values for soft and hard actions to align, ensuring that the actor receives a reliable learning signal.
Experimental Results
The SPG algorithm was evaluated on three benchmarks: Sorting, Maximum Weight Matching (MWM), and the Euclidean Traveling Salesman Problem (TSP).
- Sorting: SPG achieved near-perfect performance on lists of up to $N=50$ numbers, reaching a Kendall-Tau correlation of 0.998 for $N=20$.
- Maximum Weight Matching: SPG demonstrated superior scaling and data efficiency compared to Pointer Network baselines. For $N=25$, SPG achieved an optimality ratio of 0.889, significantly outperforming the baseline's 0.703.
- Euclidean TSP: While not surpassing specialized solvers, SPG produced competitive results on this NP-hard problem, proving its capability to handle complex constraints.
Discussion and Conclusion
The success of SPG highlights the importance of decoupling representation learning from action-space structure. The Sinkhorn layer, combined with the de-biasing critic penalty, allows the model to navigate the discrete landscape of permutations effectively.
Future work includes improving generalization across different problem sizes through inductive graph-embedding layers and exploring more sophisticated exploration strategies. Despite current limitations in generalization, SPG represents a significant step forward in applying reinforcement learning to combinatorial optimization.
Summary updated