SoftSort: A Continuous Relaxation for the argsort Operator
Sebastian Prillo, Julian Martin Eisenschlos
Abstract
While sorting is an important procedure in computer science, the argsort operator - which takes as input a vector and returns its sorting permutation - has a discrete image and thus zero gradients almost everywhere. This prohibits end-to-end, gradient-based learning of models that rely on the argsort operator. A natural way to overcome this problem is to replace the argsort operator with a continuous relaxation. Recent work has shown a number of ways to do this, but the relaxations proposed so far are computationally complex. In this work we propose a simple continuous relaxation for the argsort operator which has the following qualities: it can be implemented in three lines of code, achieves state-of-the-art performance, is easy to reason about mathematically - substantially simplifying proofs - and is faster than competing approaches. We open source the code to reproduce all of the experiments and results.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3d5e99b9-c896-4888-a818-a3465faf0812Cited by top-tier papers35
- Robustness of Graph Neural Networks at ScaleSimon Geisler, Tobias Schmidt, Hakan Sirin, Daniel Zügner et al.NeurIPS 2021 · 189 citations
- HeatViT: Hardware-Efficient Adaptive Token Pruning for Vision TransformersPeiyan Dong, Mengshu Sun, Alec Lu, Yanyue Xie et al.HPCA 2023 · 117 citations
- On the Symmetries of Deep Learning Models and their Internal RepresentationsCharles Godfrey, Davis Brown, Tegan Emerson, Henry KvingeNeurIPS 2022 · 78 citations
- Learning with Noisy Labels via Sparse RegularizationXiong Zhou, Xianming Liu, Chenyang Wang, Deming Zhai et al.ICCV 2021 · 77 citations
- Unsupervised Learning of Group Invariant and Equivariant RepresentationsRobin Winter, Marco Bertolini, Tuan Le, Frank Noé et al.NeurIPS 2022 · 61 citations
Related papers
- Learning with Algorithmic Supervision via Continuous RelaxationsFelix Petersen, Christian Borgelt, Hilde Kuehne, Oliver DeussenNeurIPS 2021 · 33 citations
- Learning with Differentiable Pertubed OptimizersQuentin Berthet, Mathieu Blondel, Olivier Teboul, Marco Cuturi et al.NeurIPS 2020 · 181 citations
- PiRank: Scalable Learning To Rank via Differentiable SortingRobin M. E. Swezey, Aditya Grover, Bruno Charron, Stefano ErmonNeurIPS 2021 · 45 citations
- SoftJAX & SoftTorch: Empowering Automatic Differentiation Libraries with Informative GradientsAnselm Paulus, Andreas René Geist, Vit Musil, Sebastian Hoffmann et al.ICML 2026 · 3 citations
- Differentiable Sorting Networks for Scalable Sorting and Ranking SupervisionFelix Petersen, Christian Borgelt, Hilde Kuehne, Oliver DeussenICML 2021 · 39 citations
