The sorting operation is one of the most basic and commonly used building
blocks in computer programming. In machine learning, it is commonly used for
robust statistics. However, seen as a function, it is piecewise linear and as a
result includes many kinks at which it is non-differentiable. More problematic
is the related ranking operator, commonly 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 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 n)$ time and
$O(n)$ space complexity. Our proposal in addition enjoys exact computation and
differentiation. We achieve this feat by constructing differentiable sorting
and ranking 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 soft least trimmed squares.
Description
[2002.08871] Fast Differentiable Sorting and Ranking
%0 Journal Article
%1 blondel2020differentiable
%A Blondel, Mathieu
%A Teboul, Olivier
%A Berthet, Quentin
%A Djolonga, Josip
%D 2020
%K algorithms differential-programming optimization
%T Fast Differentiable Sorting and Ranking
%U http://arxiv.org/abs/2002.08871
%X The sorting operation is one of the most basic and commonly used building
blocks in computer programming. In machine learning, it is commonly used for
robust statistics. However, seen as a function, it is piecewise linear and as a
result includes many kinks at which it is non-differentiable. More problematic
is the related ranking operator, commonly 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 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 n)$ time and
$O(n)$ space complexity. Our proposal in addition enjoys exact computation and
differentiation. We achieve this feat by constructing differentiable sorting
and ranking 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 soft least trimmed squares.
@article{blondel2020differentiable,
abstract = {The sorting operation is one of the most basic and commonly used building
blocks in computer programming. In machine learning, it is commonly used for
robust statistics. However, seen as a function, it is piecewise linear and as a
result includes many kinks at which it is non-differentiable. More problematic
is the related ranking operator, commonly 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 sorting
and ranking 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 soft least trimmed squares.},
added-at = {2020-02-22T03:05:04.000+0100},
author = {Blondel, Mathieu and Teboul, Olivier and Berthet, Quentin and Djolonga, Josip},
biburl = {https://www.bibsonomy.org/bibtex/226a6611fe022e79e86fbeb11036edd45/kirk86},
description = {[2002.08871] Fast Differentiable Sorting and Ranking},
interhash = {36881a04da0d7234203e2523e8508e7a},
intrahash = {26a6611fe022e79e86fbeb11036edd45},
keywords = {algorithms differential-programming optimization},
note = {cite arxiv:2002.08871},
timestamp = {2020-02-22T03:05:04.000+0100},
title = {Fast Differentiable Sorting and Ranking},
url = {http://arxiv.org/abs/2002.08871},
year = 2020
}