Constructing Multiclass Classifiers using Binary Classifiers Under Log-Loss

Assaf Ben-Yishai, Or Ordentlich

Abstract

While the reduction of multiclass classification to binary tasks is well-established for zero-one loss, its application to log-loss—the standard for training modern neural networks—has lacked a rigorous theoretical foundation. This paper establishes that multiclass regret under log-loss can be exactly decomposed into a weighted sum of binary regrets within a hierarchical tree. Building on this, we introduce Leveraged Hierarchical Classification (LCOVA), an architecture that decouples parameters across the tree to enhance model capacity. Empirical results on MNIST and synthetic datasets demonstrate that this approach significantly improves both log-loss and accuracy over standard Softmax baselines.

Introduction

In machine learning, multiclass problems are frequently solved by decomposing them into simpler binary classification tasks. While strategies like One-vs-All (OVA) or Error-Correcting Output Codes (ECOC) are well-understood for hard classification (minimizing error rate), modern probabilistic models rely on log-loss (cross-entropy). The theoretical relationship between the performance of individual binary components and the final multiclass output under log-loss has remained under-explored. This work bridges that gap by providing precise regret bounds and a novel "leveraged" architecture.

Hierarchical Decomposition of Log-Loss

The core theoretical contribution is the proof that hierarchical log-loss is additive. By arranging $K$ classes into a binary tree, the multiclass problem is transformed into a sequence of binary decisions.

Figure 1: A hierarchical tree decomposition for a 5-class problem. Each leaf represents a class, and internal nodes represent subsets of classes. The binary labels on edges define the unique path (code) for each class.

As shown in Figure 1, each class is associated with a unique binary vector representing its path from the root. The authors prove that the total multiclass regret—the gap between the model's performance and the optimal Bayes performance—is exactly equal to the weighted sum of the binary regrets at each internal node. This exact decomposition is a stronger result than the upper bounds typically found in OVA strategies.

Leveraged Hierarchical Classification (LCOVA)

Standard Softmax models are often "constrained" because a single set of parameters influences the probabilities of all classes simultaneously. To overcome this, the authors propose Leveraged Hierarchical Classification (LCOVA).

Figure 2: Probabilistic view of the hierarchical tree. Each internal node is associated with a binary classifier $p_B$ that estimates the conditional probability of branching left or right.

In the LCOVA framework (illustrated in Figure 2), the binary classifier at each node is allowed to have its own independent set of parameters. This "parametric richness" allows the model to specialize at different levels of the hierarchy. For instance, a root-level classifier might focus on broad features (e.g., "curved" vs. "straight" digits), while deeper nodes focus on fine-grained distinctions.

Experimental Results

The proposed methods were evaluated on synthetic Gaussian data and the MNIST handwritten digit database.

MNIST Performance

On the MNIST dataset, the Leveraged Hierarchical approach demonstrated clear superiority over the standard Softmax baseline:

  • Softmax Baseline: 7.9% error, 0.290 log-loss.
  • L-Hierarchical: 6.0% error, 0.225 log-loss.
  • L-Hierarchical (Graphical Tree): 5.6% error, 0.207 log-loss.

The "Graphical Tree" refers to a hierarchy manually designed to group visually similar digits (e.g., grouping {0, 2, 6, 8} together). This suggests that the choice of tree structure acts as an effective prior for the model.

Synthetic Data

In scenarios where the data distribution did not perfectly align with Softmax assumptions, LCOVA achieved a regret of approximately 0.66, significantly lower than the 0.70 regret of standard Softmax.

Discussion and Future Work

The primary advantage of LCOVA is its flexibility and the mathematical guarantee of additive regret. However, this increased capacity comes with a trade-off: the model uses more parameters (roughly $O(K \log K)$ or $O(K^2)$ depending on the tree), making it more susceptible to overfitting. Future research directions include automating tree selection through data-driven algorithms and integrating standard regularization techniques to scale the architecture to larger datasets.

Summary updated

BibTeX
@inproceedings{benyishai2021constructing,
  author = {Assaf Ben-Yishai and Or Ordentlich},
  title = {{Constructing Multiclass Classifiers using Binary Classifiers Under Log-Loss}},
  booktitle = {ISIT},
  year = {2021},
  doi = {10.1109/isit45174.2021.9518152},
}
Figure