Online Learning with Pairwise Loss Functions

Yuyang Wang, Roni Khardon, Dmitry Pechyony, Rosie JonesarXiv 2013

Abstract

Efficient online learning with pairwise loss functions is a crucial component in building large-scale learning systems that maximize the Area Under the Receiver Operating Characteristic (ROC) curve. In this paper, we investigate the generalization performance of online learning algorithms with pairwise loss functions. We show that existing proof techniques for generalization bounds of online algorithms with univariate losses cannot be directly applied to pairwise losses. We derive the first results providing data-dependent bounds for the average risk of the sequence of hypotheses generated by an arbitrary online learner in terms of an easily computable statistic, and show how to extract a low-risk hypothesis from the sequence. We demonstrate the generality of our results by applying them to two important problems in machine learning: bipartite ranking (via a natural extension of the perceptron algorithm and online convex optimization) and supervised metric learning.

Introduction

In standard online learning, models are typically updated based on a "univariate" loss function, where the loss is calculated using a single data point at each time step. However, many critical machine learning tasks—such as bipartite ranking (maximizing AUC) and metric learning—are inherently pairwise. In these scenarios, the loss function depends on pairs of examples (e.g., ensuring a positive example is ranked higher than a negative one, or that similar items are closer than dissimilar ones).

While online learning is essential for processing large-scale datasets, the transition from univariate to pairwise loss introduces significant theoretical hurdles. This paper establishes a formal framework for "online-to-batch conversion" for pairwise losses, providing the mathematical guarantees necessary to ensure these algorithms generalize well to unseen data.

The Challenge of Pairwise Dependencies

The primary mathematical challenge in pairwise online learning is the breakdown of standard generalization proof techniques. In univariate settings, researchers typically rely on martingale difference sequences, which assume a degree of independence between steps. In the pairwise setting, every new example is compared against previous examples, creating a complex web of dependencies. Because the loss at time $t$ depends on the entire history of the sequence, the errors are not independent, making it impossible to apply standard concentration inequalities directly.

Theoretical Framework and Methodology

To bridge this gap, the authors derive new generalization bounds using a combination of sophisticated statistical tools:

  • Online-to-Batch Conversion: The paper provides a mechanism to take the sequence of models generated by an online learner and select a single "best" model that is guaranteed to have low risk on the overall data distribution.
  • Symmetrization and Ghost Samples: To handle the dependencies in pairwise loss, the proof utilizes a "ghost sample" technique. This involves comparing the model's performance on the training data against an independent, imaginary set of data to decouple the variables and allow for concentration analysis.
  • Hypothesis Space Complexity: The authors employ $L_\infty$ covering numbers to account for the flexibility and complexity of the set of possible models, ensuring the bounds remain tight even for complex hypothesis spaces.

Algorithmic Applications

The framework is applied to several key algorithms to demonstrate its versatility:

  1. Online AUC Maximization (OAM): A Perceptron-like algorithm adapted for pairwise ranking. The authors prove a mistake bound for OAM that matches the best-known batch results while operating in a streaming fashion.
  2. Online Projected Gradient Descent: This is applied to both bipartite ranking and supervised metric learning. For metric learning, the algorithm performs gradient descent over the space of positive semi-definite matrices to learn a Mahalanobis distance metric.
  3. Finite Buffer Strategy: Since comparing a new point to all previous points is computationally expensive ($O(t)$ time), the authors analyze a First-In-First-Out (FIFO) buffer strategy. This keeps the algorithm efficient ($O(1)$ or $O(Buffer)$ time per update).

Key Insights

The Logarithmic Buffer Requirement

A significant finding of this research is that for an online algorithm using a buffer to converge to the true risk, the buffer size cannot remain fixed. The authors demonstrate that the buffer must grow at least logarithmically ($\log n$) relative to the total number of examples $n$ to maintain generalization guarantees.

Penalized Risk Selection

The research suggests that one should not simply select the final model produced by the online learner. Instead, the authors propose a "penalized empirical risk" formula. This selection strategy balances the observed performance of a hypothesis with the reliability of its estimate, providing a more robust model for deployment.

Unified Framework

By treating ranking and metric learning under the same mathematical umbrella, the paper shows that these seemingly disparate tasks share the same underlying theoretical structure regarding pairwise dependencies and online convergence.

Conclusion and Future Work

This paper provides the first formal risk bounds for online metric learning and a comprehensive framework for online-to-batch conversion in pairwise tasks. While the current work assumes data is independent and identically distributed (i.i.d.), it opens the door for future research into non-i.i.d. sequences and the development of more sophisticated buffer management strategies (e.g., reservoir sampling or "hard" example mining) that may further improve practical performance while maintaining theoretical rigor.

Summary updated

BibTeX
@misc{wang2013online,
  author = {Yuyang Wang and Roni Khardon and Dmitry Pechyony and Rosie Jones},
  title = {{Online Learning with Pairwise Loss Functions}},
  year = {2013},
  eprint = {1301.5332},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1301.5332},
}
Figure