One-Pass AUC Optimization

Wei Gao, Rong Jin, Shenghuo Zhu, Zhi-Hua Zhou

Introduction

Optimizing for the Area Under the ROC Curve (AUC) is critical in machine learning, especially when dealing with imbalanced datasets like those found in fraud detection or medical diagnosis. However, optimizing AUC when you can only scan the data once—a necessity for massive, streaming datasets—presents a significant bottleneck.

The paper "One-Pass AUC Optimization" introduces OPAUC, an algorithm designed to optimize AUC by scanning training data exactly once without storing the entire dataset. By leveraging a square loss function, the authors reduce the storage requirement from scaling with the number of samples to scaling only with the data's dimensionality.

The Challenge of Online AUC Optimization

While standard classification loss is calculated on a single data point, AUC is calculated based on pairs of instances (comparing every positive instance to every negative one). Conventional online learning algorithms struggle here because calculating the gradient for a new point theoretically requires comparing it against every previously seen point.

Prior state-of-the-art methods attempted to solve this by keeping a "buffer" of past points using reservoir sampling. However, this approach requires storage that grows with the number of training examples ($T$), which is unsustainable for true "big data" or infinite streams.

The OPAUC Approach

To overcome the storage bottleneck, the authors introduce two versions of their approach:

1. OPAUC (The Core Framework) Instead of using the common hinge loss (often used in SVMs), OPAUC employs a square loss function. The authors prove that square loss is "consistent" with AUC, meaning minimizing it directly maximizes the AUC.

The mathematical advantage of square loss is that its gradient can be computed using only the first- and second-order statistics (the mean and covariance) of the positive and negative classes. The algorithm only needs to store and update a few matrices and vectors, reducing the storage cost to $O(d^2)$, where $d$ is the number of features. This makes the memory footprint completely independent of the number of samples ($T$).

2. OPAUCr (For High Dimensions) When the number of features $d$ is very large, an $O(d^2)$ storage requirement becomes prohibitively expensive. To address this, the authors developed a randomized version, OPAUCr, which approximates the covariance matrices using low-rank matrices. By using a random Gaussian matrix to project the data, they reduce storage to $O(\tau d)$, where $\tau$ is a small constant representing the rank.

Key Insights and Results

The authors evaluated their approach on 16 benchmark datasets and 6 high-dimensional datasets, revealing several key insights:

  • The Square Loss Advantage: Square loss allows the pairwise AUC problem to be decomposed into class-specific statistics. The algorithm remembers the shape of the data seen so far, rather than the individual points.
  • Better Convergence: Theoretically, OPAUC achieves a convergence rate of $O(1/T)$ for separable data and $O(1/\sqrt{T})$ for general cases, significantly faster than previous reservoir-sampling-based online AUC methods.
  • Superior Performance: On almost all benchmark datasets, OPAUC significantly outperformed existing online AUC optimization algorithms. Remarkably, despite only seeing the data once, OPAUC performed as well as—or sometimes better than—"batch" algorithms that iterate over the entire dataset multiple times.
Average AUC vs. number of iterations on the german dataset
  • Efficiency in High Dimensions: OPAUCr proved exceptionally robust on high-dimensional data. On the news20.binary dataset (which contains over 1 million features), OPAUCr successfully returned results where other methods either crashed due to memory limits or took an impractical amount of time (over 11 days).
Running time comparison on high-dimensional datasets

Limitations and Future Work

While a significant step forward, the approach has limitations:

  • The $d^2$ Bottleneck: While $O(d^2)$ is vastly superior to $O(T)$ for large sample sizes, it remains heavy for moderately high-dimensional data (e.g., 10,000 features requires a 100-million-element matrix). The low-rank approximation (OPAUCr) mitigates this but assumes the data's covariance has a "skewed" eigenvalue distribution.
  • Computational Cost: Updating the covariance matrix at every step is more computationally expensive than the simple updates used in univariate loss optimization.

Future work suggested by the authors includes exploring "epoch gradient methods" to further improve convergence and finding ways to make one-pass AUC optimization as computationally efficient as standard linear classification.

Summary updated

Abstract

AUC is an important performance measure and many algorithms have been devoted to AUC optimization, mostly by minimizing a surrogate convex loss on a training data set. In this work, we focus on one...
BibTeX
@article{gao2016one,
  author = {Wei Gao and Rong Jin and Shenghuo Zhu and Zhi-Hua Zhou},
  title = {{One-Pass AUC Optimization}},
  journal = {Artificial Intelligence},
  year = {2016},
  doi = {10.1016/j.artint.2016.03.003},
}
Figure