Fast Differentiable Sorting and Ranking
By Mathieu Blondel, Olivier Teboul, Quentin Berthet, Josip Djolonga. International Conference on Machine Learning, 2020
300 citations recorded by the source corpus.
The sorting operation is one of the most commonly used building blocks in computer programming. In machine learning, it is often used for robust statistics. However, seen as a function, it is piecewise linear and as a result includes many kinks where it is non-differentiable. More problematic is the related ranking operator, often used for order statistics and ranking metrics. It is a piecewise constant function, meaning that its derivatives are null or undefined. While numerous works have proposed differentiable proxies to sorting and ranking, they do not achieve the $O(n \log n)$ time complexity one would expect from sorting and ranking operations. In this paper, we propose the first differentiable sorting and ranking operators with $O(n \log n)$ time and $O(n)$ space complexity. Our proposal in addition enjoys exact computation and differentiation. We achieve this feat by constructing differentiable operators as projections onto the permutahedron, the convex hull of permutations, and using a reduction to isotonic optimization. Empirically, we confirm that our approach is an order of magnitude faster than existing approaches and showcase two novel applications: differentiable Spearman's rank correlation coefficient and least trimmed squares.
Subfields: Artificial Intelligence, Discrete Mathematics and Combinatorics
View Paper: https://www.semanticscholar.org/paper/5eef6a00d9eab08f3071ef19ea3e4b545421e8cb
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Sergey Levine
- Quoc V. Le
- Percy Liang
- Mohit Bansal
- Yoshua Bengio
- Jianfeng Gao
- Ruslan Salakhutdinov
- Pieter Abbeel
In Discrete Mathematics and Combinatorics
Citations in the corpus
- Git Re-Basin: Merging Models modulo Permutation Symmetries (2022, background): “Blondel et al. (2020) studied differentiable sorting and ranking with asymptotics that correspond to their non-differentiable versions.”
- Blind Image Quality Assessment via Vision-Language Correspondence: A Multitask Learning Perspective (2023, background): “We find that LIQE achieves a higher SRCC.”
- Gradient Estimation with Stochastic Softmax Tricks (2020, background): “In addition, specialized solutions have been proposed for quadratic programs [6, 54, 15] and linear programs with entropic regularizers over various domains [55, 7, 2, 57, 15].”
- Differentiable Patch Selection for Image Recognition (2021, methodology): “Differentiable Top-K : The subset sampling operation can be implemented by expanding the Gumbel-Softmax trick [43] or based on optimal-transport formulations for ranking and sorting [44, 10], the latter of which was recently made significantly faster by Blondel et. al [6].”
- Towards Safe Policy Improvement for Non-Stationary MDPs (2020, unknown): “More advanced techniques for differentiable sorting has been proposed by Cuturi et al. [18] and Blondel et al. [8].”