Online Optimization Methods for the Quantification Problem

Purushottam Kar, Shuai Li, Harikrishna Narasimhan, Sanjay Chawla, Fabrizio Sebastiani

Abstract

The estimation of class prevalence—the fraction of a population belonging to a specific class—is a critical task in data analytics with applications ranging from social sciences to epidemiology. Traditional supervised learning often focuses on individual classification, but many domains require accurate aggregate distribution estimates, a task known as quantification. This paper presents the first online stochastic algorithms designed to directly optimize quantification-specific and hybrid performance measures. Through rigorous theoretical analysis and extensive experimentation, we demonstrate that our methods, NEMSIS and SCAN, achieve optimal convergence and significantly outperform existing batch-oriented techniques in both speed and accuracy, particularly under distribution drift.

Introduction: The Quantification Challenge

In many real-world scenarios, the primary goal is not to label specific data points but to understand the aggregate distribution. For instance, in sentiment analysis, a company might prioritize knowing the overall percentage of positive vs. negative feedback over the label of any single tweet. This is the core of the quantification problem.

Standard machine learning often assumes that training and test data share the same distribution. However, "distribution drift"—where class prevalence changes over time—is common. A standard "classify and count" approach often fails in these settings; even a high-accuracy classifier can be a poor quantifier if its errors are biased (e.g., consistently mislabeling negatives as positives). While existing tools like SVMperf address this, they are computationally intensive and unsuitable for large-scale or streaming data.

Algorithmic Frameworks: NEMSIS and SCAN

To address these challenges, we propose two online stochastic frameworks designed to optimize non-decomposable quantification metrics:

  1. NEMSIS (NEsted priMal-dual StochastIc updateS): This algorithm is tailored for "nested concave" performance measures, such as Kullback-Leibler Divergence (KLD). By utilizing Fenchel duality, NEMSIS decomposes complex global metrics into manageable, cheap updates performed at every time step.
  2. SCAN (Stochastic Concave AlternatioN): Designed for "pseudo-concave" measures, which often represent ratios of classification and quantification performance (e.g., CQReward). SCAN alternates between a learning phase using NEMSIS and a level estimation phase to find an optimal balance.

A significant innovation is the introduction of Non-Surrogate (NS) variants. Unlike traditional methods that rely on smooth surrogate losses (like hinge loss), our NS variants use raw, count-based True Positive and True Negative rates in dual updates, leading to more stable performance.

Table 1: Decomposition of quantification-specific and hybrid performance measures into the nested concave framework.

The table above illustrates how various performance measures are structured within our framework, enabling the efficient optimization provided by NEMSIS and SCAN.

Key Insights

  • The "FP = FN" Principle: Perfect quantification is achieved when False Positives (FP) equal False Negatives (FN). A model can be a mediocre classifier yet a perfect quantifier if its errors cancel out.
  • Non-Decomposable Metrics: Quantification metrics cannot be optimized using standard Stochastic Gradient Descent (SGD) on individual points because they depend on the aggregate state. Our algorithms are designed to "remember" this state.
  • Hybrid Objectives: Optimizing solely for quantification can result in "unreliable" models that guess correctly in aggregate but fail individually. We advocate for hybrid measures (like BAKLD) that balance classification accuracy with prevalence estimation.

Experimental Results

We evaluated our algorithms on a variety of datasets, including UCI benchmarks (IJCNN, Covertype, Adult) and real-world applications in drug discovery (ChemInfo) and medical diagnosis (KDD08).

  • Efficiency: Our methods are significantly faster than batch-oriented structural SVMs, often reaching optimal performance in a fraction of the time.
  • Convergence: Theoretical analysis confirms that NEMSIS achieves an $O(1/\sqrt{T})$ convergence rate, the gold standard for stochastic optimization.
  • Robustness: In tests with artificial prevalence shifts, NEMSIS (particularly the NS version) demonstrated superior robustness compared to baseline methods.
  • Pareto Optimality: Using the BAKLD metric, we demonstrated that NEMSIS effectively identifies the "sweet spot" between classification and quantification performance.

Limitations and Future Work

While effective, our current focus is on binary classification and linear models. Extending these methods to multi-class settings and integrating kernel methods for non-linear problems without sacrificing streaming efficiency are key areas for future research. Additionally, while robust to moderate drift, extreme shifts in class proportions (over 100%) remain a challenge for all current quantification algorithms.

Summary updated

BibTeX
@inproceedings{kar2016online,
  author = {Purushottam Kar and Shuai Li and Harikrishna Narasimhan and Sanjay Chawla and Fabrizio Sebastiani},
  title = {{Online Optimization Methods for the Quantification Problem}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2016},
  url = {https://openreview.net/forum?id=HyWvGN-ubB},
}
Figure