Abstract
Matching sets of objects is a fundamental task in computer vision and robotics. While the Sinkhorn algorithm provides a differentiable approximation for 1-to-1 matching (Linear Sum Assignment Problem), it struggles with sets of different sizes or noisy data. This paper introduces a modified Sinkhorn algorithm for the Linear Sum Assignment Problem with Edition (LSAPE), which explicitly handles deletions and insertions. By introducing "$ε$-bi-stochastic" constraints, the authors develop a differentiable, GPU-optimized solver suitable for modern deep learning architectures.
Introduction
The Linear Sum Assignment Problem (LSAP) is traditionally solved using the Hungarian algorithm. However, the Hungarian algorithm is non-differentiable and assumes a perfect 1-to-1 mapping. In real-world scenarios, such as keypoint matching under occlusion, some elements should remain unmatched. The LSAPE addresses this by allowing "editing" operations: deleting an element from the source set or inserting one into the target set.
The ε-Assignment Framework
To handle deletions and insertions differentiably, the authors propose an ε-assignment framework. This involves augmenting the cost matrix with a "dummy" row and column representing a pseudo-element ε. Mapping an element to ε in the target set signifies a deletion, while mapping ε from the source set to a target element signifies an insertion.
As shown in Figure 1, the matrix $X$ represents the assignment probabilities, where the last row and column correspond to the ε element. This "pseudo-element trick" transforms a combinatorial editing problem into a continuous matrix scaling problem.
ε-Bi-stochastic Matrices
The core innovation is the definition of ε-bi-stochastic matrices. Unlike standard bi-stochastic matrices where all rows and columns sum to 1, an ε-bi-stochastic matrix $B$ of size $(n+1) \times (m+1)$ satisfies specific constraints on its first $n$ rows and $m$ columns, while the entry $B_{n+1, m+1}$ is fixed to 1.
Figure 2 illustrates this block structure. The sub-matrix $B(\alpha, \beta)$ contains the matching probabilities for the original elements. The zeros in the augmented regions ensure that the dummy element only interacts with the sets in a controlled manner, satisfying the marginal constraints required for valid assignments.
Algorithms and Implementation
The authors propose two iterative algorithms to find the optimal ε-assignment:
sinkhorn_D1D2: An extension of the classic Sinkhorn-Knopp algorithm that updates diagonal scaling matrices.sinkhorn_Sp: A more efficient version that directly updates the similarity matrix. This version is specifically optimized for GPU (CUDA) execution, leveraging parallel matrix-vector products.
The paper provides a formal proof of convergence for these iterations, extending the 1967 Sinkhorn-Knopp theorem to this new class of matrices.
Experimental Results
The algorithm was evaluated on synthetic datasets with varying matrix sizes (up to $200 \times 200$) and rectangular configurations (e.g., $n \times 2n$).
Key findings include:
- Accuracy: The differentiable approximation maintains a relative error of 20-23% compared to the exact Hungarian-based LSAPE solver, which is consistent with standard Sinkhorn performance for LSAP.
- Efficiency: The
sinkhorn_Spimplementation on an Nvidia Quadro P2000 GPU achieved a speedup of over 10x compared to CPU-based execution. - Scalability: The algorithm converges reliably even for large sets, with execution time decreasing as the relative cost of deletion/insertion increases.
Conclusion
The ε-Sinkhorn algorithm provides a robust, differentiable bridge between combinatorial set matching and deep learning. By natively supporting deletions and insertions, it offers a more flexible tool for tasks involving noisy or incomplete data. Future work will focus on relaxing the positivity constraints on the similarity matrix and integrating the solver into Graph Neural Networks for large-scale graph matching benchmarks.
Summary updated