Abstract
We show that the derivatives of the Sinkhorn-Knopp algorithm, or iterative proportional fitting procedure, converge towards the derivatives of the entropic regularization of the optimal transport problem with a locally uniform linear convergence rate.
Introduction
Optimal Transport (OT) has emerged as a fundamental tool in machine learning, facilitating tasks ranging from generative modeling to the computation of Wasserstein barycenters. However, the standard OT problem is computationally demanding. To address this, practitioners typically employ entropic regularization, which transforms the problem into one solvable via the efficient, iterative Sinkhorn-Knopp algorithm.
In modern ML workflows, obtaining the transport plan is often just the first step. Many applications require the derivative (Jacobian) of this plan with respect to input parameters to enable gradient-based optimization. Currently, researchers rely on two primary methods: Automatic Differentiation (AD), which involves backpropagating through the algorithm's iterations, and Implicit Differentiation, which differentiates the optimality conditions of the final solution. While the convergence of the Sinkhorn-Knopp iterates themselves is well-established, a significant theoretical gap remained: do the derivatives of these iterates actually converge to the true derivative of the entropic OT solution?
The Theoretical Challenge
Standard proofs for the convergence of AD typically require the underlying algorithm to be a "strict contraction," meaning it reduces the distance between points at every iteration. The Sinkhorn-Knopp algorithm fails this criterion because it is invariant to scaling—a property that contributes to its speed but complicates derivative convergence analysis. This paper provides the first formal proof that these derivatives do indeed converge, and they do so at a linear rate, providing a rigorous mathematical foundation for the common practice of "backpropagating through Sinkhorn."
Methodology: Analyzing the Log-Domain
The authors bridge this gap by analyzing the Sinkhorn-Knopp algorithm in the log-domain. Their technical approach involves several sophisticated steps:
- Spectral Analysis: By decomposing the Jacobian of the Sinkhorn update, the authors identify that while the Jacobian possesses an eigenvalue of 1 (preventing strict contraction), the corresponding eigenvector aligns perfectly with the algorithm's scaling invariance.
- The Alignment Trick: They demonstrate that the derivative of the transport plan is "aligned" in such a way that it effectively ignores the non-contractive directions of the algorithm.
- Reduced Jacobians: The introduction of a proxy operator ($G$) allows for the removal of the problematic eigenvalue, enabling the application of standard contraction mapping theorems to a reduced version of the Jacobian.
- Spectral Pseudo-inverse: To derive an explicit formula for the final derivative, the authors utilize the spectral pseudo-inverse, which is more appropriate for diagonalizable matrices in this context than the Moore-Penrose pseudo-inverse.
Key Results and Numerical Verification
The central contribution of this work is Theorem 3.3, which establishes that the sequence of derivatives $\frac{dP_k}{d\theta}$ converges to the true derivative $\frac{d\hat{P}}{d\theta}$ with a locally uniform linear convergence rate. This implies that increasing the number of Sinkhorn iterations yields a predictable improvement in the precision of the calculated gradients.
To validate these theoretical findings, the authors conducted numerical experiments using synthetic point clouds in $\mathbb{R}^2$ (with $n=100$ and $m=50$). Using the jax library for automatic differentiation, they compared the iterative derivatives against their theoretical predictions.
As shown in the figure, both the transport plan $P_k$ and its derivative $\frac{dP_k}{d\epsilon}$ exhibit clear linear convergence. The empirical results confirm that the derivative converges at the same asymptotic rate as the iterates themselves. Furthermore, as the regularization parameter $\epsilon$ decreases—making the OT problem "sharper"—the number of iterations required for convergence increases proportionally, consistent with the theoretical bounds.
Conclusion and Future Work
This research provides a crucial "safety net" for practitioners using Optimal Transport in machine learning. By proving that "piggyback" differentiation is theoretically sound for Sinkhorn-Knopp, it justifies the use of AD even in the absence of strict contraction.
While this work settles the convergence of the transport plan's derivative, some avenues for future research remain. The current proof does not necessarily extend to the derivatives of individual scaling factors ($u_k, v_k$) or internal log-domain variables. Additionally, the theoretical convergence rate bound ($\sqrt{\rho}$) derived in the paper appears more pessimistic than the rate ($\rho$) observed in practice. Future efforts may focus on tightening these bounds and relaxing the requirement for twice-differentiable input functions.
Summary updated