Smooth Loss Functions for Deep Top-k Classification
Not on the map. Why?
Abstract (arXiv)
The top-k error is a common measure of performance in machine learning and computer vision. In practice, top-k classification is typically performed with deep neural networks trained with the cross-entropy loss. Theoretical results indeed suggest that cross-entropy is an optimal learning objective for such a task in the limit of infinite data. In the context of limited and noisy data however, the use of a loss function that is specifically designed for top-k classification can bring significant improvements. Our empirical evidence suggests that the loss function must be smooth and have non-sparse gradients in order to work well with deep neural networks. Consequently, we introduce a family of smoothed loss functions that are suited to top-k optimization via deep learning. The widely used cross-entropy is a special case of our family. Evaluating our smooth loss functions is computationally challenging: a na"ive algorithm would require O(binomnk) operations, where n is the number of classes. Thanks to a connection to polynomial algebra and a divide-and-conquer approach, we provide an algorithm with a time complexity of O(k n). Furthermore, we present a novel approximation to obtain fast and stable algorithms on GPUs with single floating point precision. We compare the performance of the cross-entropy loss and our margin-based losses in various regimes of noise and data size, for the predominant use case of k=5. Our investigation reveals that our loss is more robust to noise and overfitting than cross-entropy.
Key facts. Cited by 46 papers in the map (data through 7 Oct 2026). First posted on arXiv 21 Feb 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 5; 2022: 9; 2023: 15; 2024: 6; 2025: 6; 2026: 5.
46 papers.
Sort:
By area:
- 2021Self-Regulated Learning for Egocentric Video Activity Anticipationcited by 32
- 2021Set-valued classification -- overview via a unified frameworkcited by 27
- 2023Diagnose Like a Pathologist: Transformer-Enabled Hierarchical Attention-Guided Multiple Instance Learning for Whole Slide Image Classificationcited by 27
- 2022Rank-based Decomposable Losses in Machine Learning: A Surveycited by 26
- 2023Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspectivecited by 26
- 2023PowerBEV: A Powerful Yet Lightweight Framework for Instance Prediction in Bird's-Eye Viewcited by 24
- 2024Cardinality-Aware Set Prediction and Top-k Classificationcited by 23
- 2022Differentiable Top-k Classification Learningcited by 21
- 2022An Embedding Framework for the Design and Analysis of Consistent Polyhedral Surrogatescited by 14
- 2023Backpropagation of Unrolled Solvers with Folded Optimizationcited by 13
- 2025UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Modelscited by 12
- 2025LapSum -- One Method to Differentiate Them All: Ranking, Sorting and Top-k Selectioncited by 12
34 more
- 2022Stochastic smoothing of the top-K calibrated hinge loss for deep imbalanced classificationcited by 10
- 2022Optimizing Partial Area Under the Top-k Curve: Theory and Practicecited by 9
- 2022Unified Recurrence Modeling for Video Action Anticipationcited by 7
- 2023OOD Aware Supervised Contrastive Learningcited by 7
- 2023Dual-Encoders for Extreme Multi-Label Classificationcited by 7
- 2021Higher Order Recurrent Space-Time Transformer for Video Action Predictioncited by 6
- 2021Relaxing Local Robustnesscited by 6
- 2024Probabilistic Decomposed Linear Dynamical Systems for Robust Discovery of Latent Neural Dynamicscited by 6
- 2024Top-k Classification and Cardinality-Aware Predictioncited by 5
- 2022Contrastive Classification and Representation Learning with Probabilistic Interpretationcited by 4
- 2023VS-TransGRU: A Novel Transformer-GRU-based Framework Enhanced by Visual-Semantic Fusion for Egocentric Action Anticipationcited by 4
- 2023Generalized Neural Sorting Networks with Error-Free Differentiable Swap Functionscited by 4
- 2025Applications of Entropy in Data Analysis and Machine Learning: A Reviewcited by 3
- 2026SoftMoE: Soft Differentiable Routing for Mixture-of-Experts in LLMscited by 3
- 2022Bridging the Gap: Differentially Private Equivariant Deep Learning for Medical Image Analysiscited by 2
- 2023Slim U-Net: Efficient Anatomical Feature Preserving U-net Architecture for Ultrasound Image Segmentationcited by 2
- 2023Smooth and Stepwise Self-Distillation for Object Detectioncited by 2
- 2023Kidney abnormality segmentation in thorax-abdomen CT scanscited by 2
- 2023Locally Differentially Private Gradient Tracking for Distributed Online Learning over Directed Graphscited by 2
- 2024ParCon: Noise-Robust Collaborative Perception via Multi-module Parallel Connectioncited by 2
- 2025Differentiable Fast Top-K Selection for Large-Scale Recommendationcited by 2
- 2026BlockPilot: Instance-Adaptive Policy Learning for Diffusion-based Speculative Decodingcited by 2
- 2021Classification Under Ambiguity: When Is Average-K Better Than Top-K?cited by 1
- 2022Provable Robust Saliency-based Explanationscited by 1
- 2023Analyzing and Enhancing the Backward-Pass Convergence of Unrolled Optimizationcited by 1
- 2024Universally Harmonizing Differential Privacy Mechanisms for Federated Learning: Boosting Accuracy and Convergencecited by 1
- 2023A two-head loss function for deep Average-K classificationcited by 0
- 2023When Measures are Unreliable: Imperceptible Adversarial Perturbations toward Top-k Multi-Label Learningcited by 0
- 2024Learning to Rank for Maps at Airbnbcited by 0
- 2025Pathological Prior-Guided Multiple Instance Learning For Mitigating Catastrophic Forgetting in Breast Cancer Whole Slide Image Classificationcited by 0
- 2025Scalable and Precise Patch Robustness Certification for Deep Learning Models with Top-k Predictionscited by 0
- 2026MB-DSMIL-CL-PL: Scalable Weakly Supervised Ovarian Cancer Subtype Classification and Localisation Using Contrastive and Prototype Learning with Frozen Patch Featurescited by 0
- 2026ConquerNet: Convolution-Smoothed Quantile ReLU Neural Networks with Minimax Guaranteescited by 0
- 2026Information Specialization and Constrained Synthesis in Multi-Agent LLM Forecasting: A Prospective Live-Study of the 2026 FIFA World Cupcited by 0
- 2026Information Specialization and Constrained Synthesis in Multi-Agent LLM Forecasting: A Prospective Live-Study of the 2026 FIFA World Cup11 Sep 2026
- 2026BlockPilot: Instance-Adaptive Policy Learning for Diffusion-based Speculative Decoding30 Jun 2026
- 2026SoftMoE: Soft Differentiable Routing for Mixture-of-Experts in LLMs16 Jun 2026
- 2026ConquerNet: Convolution-Smoothed Quantile ReLU Neural Networks with Minimax Guarantees7 May 2026
- 2026MB-DSMIL-CL-PL: Scalable Weakly Supervised Ovarian Cancer Subtype Classification and Localisation Using Contrastive and Prototype Learning with Frozen Patch Features16 Feb 2026
- 2025Differentiable Fast Top-K Selection for Large-Scale Recommendation13 Oct 2025
- 2025Scalable and Precise Patch Robustness Certification for Deep Learning Models with Top-k Predictions31 Jul 2025
- 2025LapSum -- One Method to Differentiate Them All: Ranking, Sorting and Top-k Selection8 Mar 2025
- 2025Pathological Prior-Guided Multiple Instance Learning For Mitigating Catastrophic Forgetting in Breast Cancer Whole Slide Image Classification8 Mar 2025
- 2025Applications of Entropy in Data Analysis and Machine Learning: A Review4 Mar 2025
- 2025UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models18 Feb 2025
- 2024Probabilistic Decomposed Linear Dynamical Systems for Robust Discovery of Latent Neural Dynamics29 Aug 2024
34 more
- 2024Universally Harmonizing Differential Privacy Mechanisms for Federated Learning: Boosting Accuracy and Convergence20 Jul 2024
- 2024ParCon: Noise-Robust Collaborative Perception via Multi-module Parallel Connection16 Jul 2024
- 2024Cardinality-Aware Set Prediction and Top-k Classification9 Jul 2024
- 2024Learning to Rank for Maps at Airbnb25 Jun 2024
- 2024Top-k Classification and Cardinality-Aware Prediction28 Mar 2024
- 2023Analyzing and Enhancing the Backward-Pass Convergence of Unrolled Optimization28 Dec 2023
- 2023Locally Differentially Private Gradient Tracking for Distributed Online Learning over Directed Graphs24 Oct 2023
- 2023Dual-Encoders for Extreme Multi-Label Classification16 Oct 2023
- 2023Generalized Neural Sorting Networks with Error-Free Differentiable Swap Functions11 Oct 2023
- 2023OOD Aware Supervised Contrastive Learning3 Oct 2023
- 2023Kidney abnormality segmentation in thorax-abdomen CT scans6 Sep 2023
- 2023When Measures are Unreliable: Imperceptible Adversarial Perturbations toward Top-k Multi-Label Learning27 Jul 2023
- 2023VS-TransGRU: A Novel Transformer-GRU-based Framework Enhanced by Visual-Semantic Fusion for Egocentric Action Anticipation8 Jul 2023
- 2023PowerBEV: A Powerful Yet Lightweight Framework for Instance Prediction in Bird's-Eye View19 Jun 2023
- 2023A two-head loss function for deep Average-K classification31 Mar 2023
- 2023Smooth and Stepwise Self-Distillation for Object Detection9 Mar 2023
- 2023Slim U-Net: Efficient Anatomical Feature Preserving U-net Architecture for Ultrasound Image Segmentation22 Feb 2023
- 2023Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspective2 Feb 2023
- 2023Backpropagation of Unrolled Solvers with Folded Optimization28 Jan 2023
- 2023Diagnose Like a Pathologist: Transformer-Enabled Hierarchical Attention-Guided Multiple Instance Learning for Whole Slide Image Classification19 Jan 2023
- 2022Provable Robust Saliency-based Explanations28 Dec 2022
- 2022Contrastive Classification and Representation Learning with Probabilistic Interpretation7 Nov 2022
- 2022Bridging the Gap: Differentially Private Equivariant Deep Learning for Medical Image Analysis9 Sep 2022
- 2022Optimizing Partial Area Under the Top-k Curve: Theory and Practice3 Sep 2022
- 2022Rank-based Decomposable Losses in Machine Learning: A Survey18 Jul 2022
- 2022An Embedding Framework for the Design and Analysis of Consistent Polyhedral Surrogates29 Jun 2022
- 2022Differentiable Top-k Classification Learning15 Jun 2022
- 2022Unified Recurrence Modeling for Video Action Anticipation2 Jun 2022
- 2022Stochastic smoothing of the top-K calibrated hinge loss for deep imbalanced classification4 Feb 2022
- 2021Classification Under Ambiguity: When Is Average-K Better Than Top-K?16 Dec 2021
- 2021Self-Regulated Learning for Egocentric Video Activity Anticipation23 Nov 2021
- 2021Relaxing Local Robustness11 Jun 2021
- 2021Higher Order Recurrent Space-Time Transformer for Video Action Prediction17 Apr 2021
- 2021Set-valued classification -- overview via a unified framework24 Feb 2021
- 2021Self-Regulated Learning for Egocentric Video Activity Anticipationcited by 32
- 2021Set-valued classification -- overview via a unified frameworkcited by 27
- 2023Diagnose Like a Pathologist: Transformer-Enabled Hierarchical Attention-Guided Multiple Instance Learning for Whole Slide Image Classificationcited by 27
- 2022Rank-based Decomposable Losses in Machine Learning: A Surveycited by 26
- 2023Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspectivecited by 26
- 2023PowerBEV: A Powerful Yet Lightweight Framework for Instance Prediction in Bird's-Eye Viewcited by 24
- 2024Cardinality-Aware Set Prediction and Top-k Classificationcited by 23
- 2022Differentiable Top-k Classification Learningcited by 21
- 2022An Embedding Framework for the Design and Analysis of Consistent Polyhedral Surrogatescited by 14
- 2023Backpropagation of Unrolled Solvers with Folded Optimizationcited by 13
- 2025LapSum -- One Method to Differentiate Them All: Ranking, Sorting and Top-k Selectioncited by 12
- 2022Stochastic smoothing of the top-K calibrated hinge loss for deep imbalanced classificationcited by 10
12 most cited of 42 All 42 (JSON)
- 2026ConquerNet: Convolution-Smoothed Quantile ReLU Neural Networks with Minimax Guarantees7 May 2026
- 2026MB-DSMIL-CL-PL: Scalable Weakly Supervised Ovarian Cancer Subtype Classification and Localisation Using Contrastive and Prototype Learning with Frozen Patch Features16 Feb 2026
- 2025Differentiable Fast Top-K Selection for Large-Scale Recommendation13 Oct 2025
- 2025Scalable and Precise Patch Robustness Certification for Deep Learning Models with Top-k Predictions31 Jul 2025
- 2025LapSum -- One Method to Differentiate Them All: Ranking, Sorting and Top-k Selection8 Mar 2025
- 2025Pathological Prior-Guided Multiple Instance Learning For Mitigating Catastrophic Forgetting in Breast Cancer Whole Slide Image Classification8 Mar 2025
- 2025Applications of Entropy in Data Analysis and Machine Learning: A Review4 Mar 2025
- 2024Probabilistic Decomposed Linear Dynamical Systems for Robust Discovery of Latent Neural Dynamics29 Aug 2024
- 2024Universally Harmonizing Differential Privacy Mechanisms for Federated Learning: Boosting Accuracy and Convergence20 Jul 2024
- 2024ParCon: Noise-Robust Collaborative Perception via Multi-module Parallel Connection16 Jul 2024
- 2024Cardinality-Aware Set Prediction and Top-k Classification9 Jul 2024
- 2024Learning to Rank for Maps at Airbnb25 Jun 2024
12 newest of 42 All 42 (JSON)