General framework for binary classification on top samples

Lukás Adam, Václav Mácha, Václav Smídl, Tomás Pevný

TL;DR

This paper introduces a unified framework for several important binary classification tasks, including ranking, "accuracy at the top," and hypothesis testing, by framing them as minimizing misclassifications above a threshold. They propose new methods and analyze existing ones, offering theoretical guarantees and empirical validation to guide practitioners in choosing the best approach for their specific needs.

What Problem Does This Paper Address?

Many real-world machine learning problems involve identifying the most relevant or "top" samples from a dataset, rather than simply classifying each sample independently. Examples include search engine result ranking, where users are most interested in the first few results, or anomaly detection, where identifying a few critical anomalies is paramount. These tasks often boil down to optimizing performance on a subset of the data, typically the highest-scoring samples. However, these problems have historically been treated separately, leading to a fragmented landscape of algorithms. This paper aims to bridge this gap by unifying these diverse problems under a single theoretical umbrella and providing a comprehensive analysis of existing and novel methods.

Methods

The core of the paper is the introduction of a general framework for minimizing misclassification above a threshold. This framework is expressed as an optimization problem where the objective is to minimize the number of false negatives (misclassified positive samples) above a certain threshold, with the threshold itself being a function of the learned model's scores.

To handle the discontinuous nature of the 0-1 loss, the authors employ surrogate functions, particularly the hinge loss, to create continuous and differentiable objectives. This allows for the application of standard optimization techniques like gradient descent.

Several methods are then categorized and analyzed within this framework:

  • Methods based on pushing positives to the top: These aim to rank positive samples higher than negative ones. Examples include TopPush and a novel robust version, TopPushK.
  • Methods for Accuracy at the Top: These focus on maximizing accuracy within a specific quantile of ranked samples. Grill and a novel method, Pat&Mat, are presented.
  • Methods optimizing the Neyman-Pearson criterion: These are related to hypothesis testing and aim to minimize Type II errors (false negatives) while controlling Type I errors (false positives). Grill-NP, Pat&Mat-NP, and TopMean-NP are discussed.

The paper also introduces numerical improvements such as implicit differentiation to remove the threshold as an explicit decision variable and the use of stochastic gradient descent for efficiency.

Datasets

The paper utilizes a variety of datasets for their numerical experiments:

  • Standard UCI datasets: Ionosphere, Spambase, Gisette, Hepmass.
  • A modified Hepmass dataset: Hepmass 10% (reducing positive samples to 10% to increase difficulty).
  • Real-world network traffic datasets: CTA and NetFlow.
  • Noisy versions of CTA and NetFlow: CTA MLT and NetFlow MLT, created by removing or mislabeling positive samples in the training set to simulate real-world challenges.

Key Insights and Ideas

  • Unified Problem Formulation: The most significant insight is that ranking, accuracy at the top, and Neyman-Pearson problems can be elegantly unified under a single optimization framework, simplifying the theoretical understanding and practical application of related algorithms.
  • Convexity is Key, but Not Always Present: While convexity is a desirable property ensuring a unique global minimum, methods like Grill and Grill-NP are shown to be non-convex, potentially leading to suboptimal solutions.
  • The "Global Minimum at Zero" Problem: A critical issue identified is that some methods can have a global minimum at $w=0$, which provides no useful information for classification. This problem is more prevalent when the threshold is higher, and the paper proposes solutions like including false positives in the objective or modifying threshold calculation (as in Pat&Mat).
  • Threshold as a Key Differentiator: The paper highlights how the choice of threshold calculation significantly impacts method performance and robustness, particularly concerning the "global minimum at zero" problem. Methods with lower thresholds are generally less vulnerable.
  • Trade-offs in Robustness and Convexity: The paper demonstrates a trade-off: methods that are more robust to the $w=0$ problem (like Pat&Mat) might sacrifice convexity, while convex methods (like TopPushK) might be more sensitive to outliers.

Key Results

  • Theoretical Analysis: The paper provides theoretical guarantees for convexity and robustness for various methods. It proves that TopPush and TopMean are vulnerable to the global minimum at $w=0$ under certain conditions.
  • Method Comparison: Through extensive numerical experiments on nine datasets, the paper compares the performance of various methods across different criteria (Positives@Top, Positives@Quantile, Positives@NP).
  • Top Performers: Pat&Mat and Pat&Mat-NP are identified as strong performers, especially for larger quantiles, due to their convexity and robustness. TopPushK and TopMean-NP are recommended for extremely small $\tau$ (top quantiles).
  • Efficiency: The proposed methods are shown to be computationally efficient, converging within seconds on datasets with millions of samples.
  • Robustness Findings: Table 5 and 6 show that Pat&Mat and Pat&Mat-NP consistently perform well and avoid the $w=0$ problem across many datasets, while TopPush and TopMean are more susceptible.

Limitations and Future Work

  • Non-convexity of Grill/Grill-NP: The paper acknowledges that Grill and Grill-NP are non-convex, which can lead to local minima. While they are shown to be continuous, their optimization landscape is more complex.
  • Numerical Errors: An exception in the robustness analysis for Spambase is attributed to numerical errors, suggesting that extreme cases might still pose challenges.
  • Hyperparameter Tuning: While methods like Pat&Mat are designed to require less tuning, other methods still rely on careful hyperparameter selection, as explored in Section 5.4.
  • Future Work: The paper implicitly suggests further exploration of the trade-offs between convexity, robustness, and performance. The unified framework also opens avenues for developing new methods that balance these properties more effectively. The authors also provide code, encouraging further research and application of their framework.

Summary updated

BibTeX
@article{adam2022general,
  author = {Lukás Adam and Václav Mácha and Václav Smídl and Tomás Pevný},
  title = {{General framework for binary classification on top samples}},
  journal = {Optim. Methods Softw.},
  year = {2022},
  doi = {10.1080/10556788.2021.1965601},
}
Figure