Learning Classifiers with Fenchel-Young Losses: Generalized Entropies, Margins, and Algorithms

Mathieu Blondel, André F. T. Martins, Vlad Niculae

Introduction

In machine learning, the choice of a loss function often involves a trade-off between probabilistic interpretability and the desire for sparse outputs with clear separation margins. The logistic loss is smooth and provides probabilities but produces dense outputs and lacks a margin. Conversely, the hinge loss offers a margin but lacks a natural probabilistic interpretation. While recent methods like sparsemax have attempted to bridge this gap, they often appear as ad-hoc solutions.

This paper introduces a unified mathematical framework—Fenchel-Young (F-Y) losses—that generates a wide array of convex loss functions from a single regularization function. This framework not only explains the relationship between existing losses but also provides a principled way to design new ones with specific properties.

The Fenchel-Young Framework

The core of the F-Y framework is the use of Fenchel duality to construct losses from a regularizer $\Omega$. The process follows three steps:

  1. Select a Regularizer ($\Omega$): A function measuring "certainty" or "smoothness." For instance, Shannon entropy leads to logistic loss, while a squared norm leads to sparsemax.
  2. Define the Prediction Function: Scores are converted to probabilities by solving an optimization problem that balances score affinity against the regularizer penalty.
  3. Construct the Loss: The F-Y loss is the difference between the maximum possible affinity and the affinity of the ground-truth label, guaranteed to be non-negative and convex.
Visualization of how different entropy choices (Tsallis and Norm) interpolate between classic loss functions and predictive distributions.

The authors highlight Tsallis $\alpha$-entropies as a powerful parametric family. By adjusting $\alpha$, one can smoothly interpolate from logistic loss ($\alpha=1$) to sparsemax ($\alpha=2$) and perceptron loss ($\alpha \to \infty$).

Sparsity and Margins: Two Sides of the Same Coin

A key theoretical insight of this work is the formal connection between sparsity and margins. The authors prove that if a regularizer allows the model to assign exactly zero probability to a class (sparsity), the resulting loss function must possess a separation margin. This unification shows that squared loss, hinge loss, and logistic loss are "siblings" within the same mathematical family.

Computational Efficiency

A common concern with generalized frameworks is computational overhead. However, for "separable" entropies, computing the F-Y loss and its predictive distribution simplifies to a 1D root-finding problem. The authors demonstrate that using Brent’s method for this task is significantly faster than generic optimization approaches.

Comparison of computation times for different root-finding and optimization algorithms across varying dimensions $d$.

As shown in the figure above, Brent's method and bisection are orders of magnitude faster than FISTA, making these generalized losses practically viable for large-scale applications.

Empirical Validation

The framework was tested on sparse label proportion estimation using several multi-label benchmark datasets including Birds (audio), Yeast (biology), and Scene (images). By tuning the $\alpha$ parameter, the researchers achieved superior performance compared to using fixed logistic or sparsemax losses, proving that the "best" loss is data-dependent and discoverable through this framework.

Conclusion

Fenchel-Young losses provide a robust theoretical foundation for understanding and designing loss functions. By linking regularization, sparsity, and margins, this work offers researchers a "knob" to fine-tune model behavior. Future work may extend these sparse properties to structured prediction tasks, potentially capturing complex correlations between classes.

Summary updated

BibTeX
@inproceedings{blondel2019learning,
  author = {Mathieu Blondel and André F. T. Martins and Vlad Niculae},
  title = {{Learning Classifiers with Fenchel-Young Losses: Generalized Entropies, Margins, and Algorithms}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=p34YtSpwqBe},
}
Figure