Consistent Polyhedral Surrogates for Top-k Classification and Variants

Jessie Finocchiaro, Rafael M. Frongillo, Emma Goodwill, Anish Thilagar · DOI

Abstract

This paper addresses the challenge of designing convex, piecewise-linear (polyhedral) surrogate losses that are consistent for top-$k$ classification. By employing a modern embedding framework, the authors construct $L_k$, the first known consistent polyhedral surrogate for this task, resolving a long-standing open question in multi-class learning.

Introduction

In many machine learning applications, such as information retrieval and image tagging, the goal is to predict a set of $k$ likely labels rather than a single one. This is known as top-$k$ classification. While the discrete 0-1 top-$k$ loss is the natural performance metric, its non-convexity and lack of gradients make it unsuitable for direct optimization. Consequently, researchers rely on surrogate losses.

An ideal surrogate should be convex for optimization, polyhedral (piecewise-linear) for efficiency, and consistent—meaning that minimizing the surrogate leads to the optimal solution for the original top-$k$ problem. Historically, finding a surrogate that satisfies all three properties for top-$k$ classification has been an elusive goal, leading some to conjecture that such a loss might not exist.

Methodology: The Embedding Framework

The authors utilize the "embedding framework" to map discrete target predictions into a continuous surrogate space. Their approach involves two main steps:

  1. Analysis of Existing Surrogates: They examine previously proposed polyhedral surrogates, such as $L^{(2)}, L^{(3)},$ and $L^{(4)}$. Their analysis reveals that these losses are inconsistent for top-$k$ classification because they are implicitly optimized for different tasks, such as predicting ordered partitions or variable-sized sets.
  2. Construction of $L_k$: By leveraging the convex conjugate of the Bayes risk associated with the top-$k$ loss, the authors derive a new surrogate, $L_k$. They formally prove that $L_k$ is calibrated with respect to the top-$k$ loss using $\epsilon$-separation techniques, ensuring that convergence to the minimum of $L_k$ implies optimal top-$k$ performance.

Visualizing Consistency and Failure

A key insight of the paper is that inconsistency in previous surrogates typically arises in "ambiguous" regions of the label probability simplex—where the $k$-th and $(k+1)$-th most likely labels have nearly identical probabilities.

Comparison of surrogate loss consistency on the probability simplex for $k=2$ and $k=3$. Shaded regions indicate areas of inconsistency for previous losses ($L^{(2)}, L^{(3)}, L^{(4)}$), while $L_k$ remains consistent throughout.

As shown in the visualizations above, existing polyhedral surrogates fail to correctly partition the probability space, leading to sub-optimal decisions when label distributions are noisy. In contrast, the newly proposed $L_k$ surrogate maintains consistency across the entire simplex, effectively resolving these ties.

Results and Discussion

Numerical simulations using synthetic Dirichlet-distributed data confirm the theoretical findings. While previous surrogates exhibit significant "regret" (performance gap from the theoretical optimum) in ambiguous settings, $L_k$ consistently achieves zero regret.

Despite its theoretical superiority, the authors note practical considerations. The gradients of $L_k$ can become "shallow" when label distributions are near-uniform, potentially slowing convergence. Future work will focus on empirical scaling to large-scale datasets like ImageNet-21k and exploring the trade-offs between the efficiency of polyhedral losses and the informativeness of smooth alternatives like Cross-Entropy.

Conclusion

This work provides the first formal proof and construction of a consistent polyhedral surrogate for top-$k$ classification. By demonstrating that the geometric constraints of piecewise-linear losses do not preclude consistency, the authors open new avenues for designing efficient and mathematically grounded losses for complex multi-class tasks.

Summary updated

BibTeX
@inproceedings{finocchiaro2022consistent,
  author = {Jessie Finocchiaro and Rafael M. Frongillo and Emma Goodwill and Anish Thilagar},
  title = {{Consistent Polyhedral Surrogates for Top-k Classification and Variants}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=FSqhoJdTba},
}
Figure