Lune

ICML2022Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CoAtNet: Marrying Convolution and Attention for All Data Sizes cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Learning by Sorting: Self-supervised Learning with Group Ordering Constraints cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Learning by Sorting: Self-supervised Learning with Group Ordering Constraints cites Fast Differentiable Sorting and Ranking
  • Learning by Sorting: Self-supervised Learning with Group Ordering Constraints cites Learning Transferable Visual Models From Natural Language Supervision
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Learning Transferable Visual Models From Natural Language Supervision
  • Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspective cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspective cites Fast Differentiable Sorting and Ranking
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Dynamic Focused Masking for Autoregressive Embodied Occupancy Prediction cites Fast Differentiable Sorting and Ranking
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Fast, Differentiable and Sparse Top-k: a Convex Analysis PerspectiveMichael Eli Sander, Joan Puigcerver, Josip Djolonga, Gabriel Peyré et al.ICML 2023 · 35 citations
  2. Learning by Sorting: Self-supervised Learning with Group Ordering ConstraintsNina Shvetsova, Felix Petersen, Anna Kukleva, Bernt Schiele et al.ICCV 2023 · 15 citations
  3. Dual-Encoders for Extreme Multi-label ClassificationNilesh Gupta, Devvrit, Ankit Singh Rawat, Srinadh Bhojanapalli et al.ICLR 2024 · 8 citations
  4. Training for Stable Explanation for FreeChao Chen, Chenghua Guo, Rufeng Chen, Guixiang Ma et al.NeurIPS 2024 · 7 citations
  5. Dynamic Focused Masking for Autoregressive Embodied Occupancy PredictionYuan Sun, Julio Contreras, Jorge OrtizNeurIPS 2025 · 3 citations

Builds on14

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. 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
  3. 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
  4. CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
  5. Fast Differentiable Sorting and RankingMathieu Blondel, Olivier Teboul, Quentin Berthet, Josip DjolongaICML 2020 · 285 citations

Related papers

  1. STk_k: A Scalable Module for Solving Top-k ProblemsHanchen Xia, Weidong Liu, Xiaojun MaoNeurIPS 2024 · 1 citation
  2. Weighted Sampling without Replacement for Deep Top-k ClassificationDieqiao Feng, Yuanqi Du, Carla P. Gomes, Bart SelmanICML 2023
  3. Differentiable sorting for censored time-to-event dataAndre Vauvelle, Benjamin Wild, Roland Eils, Spiros C. DenaxasNeurIPS 2023 · 6 citations
  4. Stochastic smoothing of the top-K calibrated hinge loss for deep imbalanced classificationCamille Garcin, Maximilien Servajean, Alexis Joly, Joseph SalmonICML 2022 · 14 citations
  5. MetricOpt: Learning To Optimize Black-Box Evaluation MetricsChen Huang, Shuangfei Zhai, Pengsheng Guo, Josh M. SusskindCVPR 2021
Dusk over the sea between two cliffs drawn in fine vertical lines