DeepTopPush: Simple and Scalable Method for Accuracy at the Top

Lukás Adam, Václav Mácha, Václav SmídlarXiv 2020

Abstract

DeepTopPush is a simple, scalable method for training deep neural networks to maximize "accuracy at the top"—correctly classifying the highest-scoring samples while maintaining extremely low false positive rates. By carrying over a single delayed sample between minibatches, the method fixes the gradient bias inherent in minibatch training for non-decomposable loss functions, achieving state-of-the-art results in tasks like malware detection and drug discovery.

The Challenge of Non-Decomposable Losses

Standard binary classifiers are typically trained to maximize overall accuracy. However, many real-world applications—such as search engines, drug discovery, and cybersecurity—prioritize performance at the very top of a ranked list. In these scenarios, the decision threshold is not fixed at 0.5 but depends on the scores of the entire dataset (e.g., the score of the highest-ranked negative sample). This makes the loss function non-decomposable.

When training with Stochastic Gradient Descent (SGD), computing the threshold on a small minibatch leads to a significant underestimation of the true global threshold. This creates a biased sampled threshold and, consequently, a biased gradient that hinders optimization.

Minibatch size vs. Threshold estimation bias.

The DeepTopPush Solution

The authors propose DeepTopPush, which generalizes the linear "TopPush" algorithm for deep neural networks. To overcome the gradient bias problem without the computational burden of massive minibatches, DeepTopPush introduces a "delayed values" mechanism.

Since neural network weights change slowly during training, the negative sample with the highest score in the previous minibatch is likely to remain a "hard negative" in the current step. By carrying over just this one sample from the previous iteration, the minibatch threshold can accurately track the true global threshold. This allows for direct, end-to-end optimization via SGD without needing complex surrogate models or dual formulations.

Empirical Performance

DeepTopPush was evaluated on diverse datasets, including CIFAR100 and a complex real-world malware detection task. The results demonstrate that DeepTopPush consistently outperforms standard baselines and prior state-of-the-art methods like TFCO and AP-Perf, particularly at very low False Positive Rates (FPR).

Performance comparison on CIFAR100 and Malware detection.

On the malware detection dataset, DeepTopPush achieved a detection rate of 46% at an extremely strict false alarm rate of $10^{-5}$. Furthermore, the method is highly efficient; training on CIFAR100 took approximately 5.6 seconds per epoch, compared to over 80 seconds for competing methods like AP-Perf. It also scales effectively to pre-trained models, improving top-accuracy on ImageNet when used for fine-tuning.

Conclusion

DeepTopPush provides a mathematically grounded yet practically simple solution for ranking problems in deep learning. By addressing gradient bias through a minimal memory mechanism, it enables scalable training for high-precision applications where only the top-ranked results matter.

Summary updated

BibTeX
@misc{adam2020deeptoppush,
  author = {Lukás Adam and Václav Mácha and Václav Smídl},
  title = {{DeepTopPush: Simple and Scalable Method for Accuracy at the Top}},
  year = {2020},
  eprint = {2006.12293},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.12293},
}
Figure