The Sinkhorn operator has recently experienced a surge of popularity in computer vision and related fields. One major reason is its ease of integration into deep learning frameworks. To allow for an efficient training of respective neural networks, we propose an algorithm that obtains analytical gradients of a Sinkhorn layer via implicit differentiation. In comparison to prior work, our framework is based on the most general formulation of the Sinkhorn operator. It allows for any type of loss function, while both the target capacities and cost matrices are differentiated jointly. We further construct error bounds of the resulting algorithm for approximate inputs. Finally, we demonstrate that for a number of applications, simply replacing automatic differentiation with our algorithm directly improves the stability and accuracy of the obtained gradients. Moreover, we show that it is computationally more efficient, particularly when resources like GPU memory are scarce.
翻译:Sinkhorn操作员最近经历了计算机视觉及相关领域受欢迎程度的激增,一个主要原因是它容易融入深层次学习框架。为了能够对各自的神经网络进行有效的培训,我们建议一种算法,通过隐含的差别来获得Sinkhorn层的分析梯度。与以前的工作相比,我们的框架是以Sinkhorn操作员最一般的公式为基础的。它允许任何类型的损失功能,同时目标能力和成本矩阵是共同区别的。我们进一步构建了由此得出的算法的误差界限,用于大致的投入。最后,我们证明,对于一些应用,仅仅用我们的算法取代自动差异,就能直接改善所获取的梯度的稳定性和准确性。此外,我们表明,它计算效率更高,特别是当像GPU记忆这样的资源稀缺时。