Differentiable Top-k Classification Learning
Felix Petersen, Hilde Kuehne, Christian Borgelt, Oliver Deussen
Abstract
The top-k classification accuracy is one of the core metrics in machine learning. Here, k is conventionally a positive integer, such as 1 or 5, leading to top-1 or top-5 training objectives. In this work, we relax this assumption and optimize the model for multiple k simultaneously instead of using a single k. Leveraging recent advances in differentiable sorting and ranking, we propose a differentiable top-k cross-entropy classification loss. This allows training the network while not only considering the top-1 prediction, but also, e.g., the top-2 and top-5 predictions. We evaluate the proposed loss function for fine-tuning on state-of-the-art architectures, as well as for training from scratch. We find that relaxing k does not only produce better top-5 accuracies, but also leads to top-1 accuracy improvements. When fine-tuning publicly available ImageNet models, we achieve a new state-of-the-art for these models.
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 08165c9d-6769-4bdb-a970-111eccac7fb1Cited by top-tier papers12
- Fast, Differentiable and Sparse Top-k: a Convex Analysis PerspectiveMichael Eli Sander, Joan Puigcerver, Josip Djolonga, Gabriel Peyré et al.ICML 2023 · 35 citations
- Learning by Sorting: Self-supervised Learning with Group Ordering ConstraintsNina Shvetsova, Felix Petersen, Anna Kukleva, Bernt Schiele et al.ICCV 2023 · 15 citations
- Dual-Encoders for Extreme Multi-label ClassificationNilesh Gupta, Devvrit, Ankit Singh Rawat, Srinadh Bhojanapalli et al.ICLR 2024 · 8 citations
- Training for Stable Explanation for FreeChao Chen, Chenghua Guo, Rufeng Chen, Guixiang Ma et al.NeurIPS 2024 · 7 citations
- Dynamic Focused Masking for Autoregressive Embodied Occupancy PredictionYuan Sun, Julio Contreras, Jorge OrtizNeurIPS 2025 · 3 citations
Builds on14
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
- CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
- Fast Differentiable Sorting and RankingMathieu Blondel, Olivier Teboul, Quentin Berthet, Josip DjolongaICML 2020 · 285 citations
Related papers
- ST: A Scalable Module for Solving Top-k ProblemsHanchen Xia, Weidong Liu, Xiaojun MaoNeurIPS 2024 · 1 citation
- Weighted Sampling without Replacement for Deep Top-k ClassificationDieqiao Feng, Yuanqi Du, Carla P. Gomes, Bart SelmanICML 2023
- Differentiable sorting for censored time-to-event dataAndre Vauvelle, Benjamin Wild, Roland Eils, Spiros C. DenaxasNeurIPS 2023 · 6 citations
- Stochastic smoothing of the top-K calibrated hinge loss for deep imbalanced classificationCamille Garcin, Maximilien Servajean, Alexis Joly, Joseph SalmonICML 2022 · 14 citations
- MetricOpt: Learning To Optimize Black-Box Evaluation MetricsChen Huang, Shuangfei Zhai, Pengsheng Guo, Josh M. SusskindCVPR 2021
