betaFeedback

WorksComputer Science

The Reliability Function of Error-Correcting Output Codes with Noisy Binary Classifiers

Abstract

Error-correcting output coding (ECOC) builds a multi-class classifier from binary classifiers. We study the excess error rate of ECOC over the Bayes (MAP) classifier when each binary classifier outputs a posterior estimate whose log-odds is corrupted by Gaussian noise. Recasting decoding as a test over a Gaussian channel, we derive an upper bound from the union and Chernoff bounds and a lower bound from the nearest competing category and the Mills ratio. The bounds show that a large Hamming distance is both necessary and sufficient for reducing the excess error rate. The excess error rate stays bounded away from zero, by a constant that depends on the two largest posteriors and the noise level but not on the number of categories MM, whenever the distance between the code words of the two most probable categories is bounded; for equidistant codes this distance is dmin⁡d_{\min}. Conversely, it is at most M−1M-1 times a factor that is exponentially small in the minimum distance dmin⁡d_{\min}, and it vanishes whenever κ dmin⁡−ln⁡(M−1)→∞κ\,d_{\min}-\ln(M-1)\to\infty for an explicit κκ (for general codes, under a posterior condition). For nn-vs-rest codes with n≥2n\geq2, the upper and lower exponents coincide asymptotically, which determines the reliability function of ECOC in closed form. The results extend to correlated Gaussian noise with the Hamming distance replaced by an effective distance; when noise is shared at the level of categories, the effective distance stays bounded and the excess error rate does not vanish for any code. All theorems are machine-checked in Lean 4. In a semi-synthetic setting, the measured decay agrees with the predicted exponent. On ResNet-50 features of CIFAR-10/100 and ImageNet-1k, the excess error over a log-likelihood decoding reference decreases with dmin⁡d_{\min} and, for larger MM, levels off at a moderate distance, while codes with dmin⁡=1d_{\min}=1 degrade as MM grows.

Introduction

A multi-class classification problem (M≥3M \ge3 categories) can be solved by combining several binary classifiers, a method called Error-Correcting Output Coding (ECOC) ([7]). ECOC is widely used for its performance and ease of implementation, and loss-based decoding unifies it with other reductions of multi-class to binary problems [2]. Its performance depends on which binary classifiers are combined; effective combinations have been demonstrated empirically on many datasets [7, 8] (Rifkin & Klautau 2004; Rocha & Goldenstein 2014), but they depend strongly on the dataset, and no general principle governing these choices has been established.

Conditions for the optimal combination have been given under the noiseless assumption that each binary classifier estimates the true posterior [14, 16] (Rifkin & Klautau 2004). Kumoi et al. (2022; 2023) proposed a framework that evaluates noisy binary classifiers analytically and showed the effect of the Hamming distance on the pairwise error probability — the error rate between two categories. That result, however, was confined to the pairwise error probability and did not reach the classification error rate over all MM categories, leaving open how increasing the Hamming distance reduces the classification error rate of ECOC, and whether that contribution is both sufficient and necessary.

This paper answers these questions for the excess error rate of ECOC, the amount by which its error rate exceeds that of the Bayes (MAP) classifier (the excess risk under the 00–11 loss; [4] (Tewari & Bartlett 2007)). Our contributions are as follows. (i) We recast ECOC decoding under log-odds noise as a test over a Gaussian channel and reduce the excess error rate to the probability that ECOC fails to select the MAP category (§ 3). (ii) We derive an upper bound (§ 4) and a lower bound (§ 5) that give, for every code word table, the sufficiency of a large minimum distance and the necessity of a large distance between the code words of the two most probable categories, the latter uniformly in MM. (iii) For nvRnvR codes (n≥2n \ge2), a family of equidistant codes, the two exponents coincide asymptotically, which determines the reliability function of ECOC in closed form (§ 6). (iv) We extend the results to an arbitrary Gaussian noise covariance through an effective distance, under which common-mode correlation is harmless and category-level noise bounds the attainable gain (§ 8). (v) Semi-synthetic and real-image experiments confirm the predicted exponent and the decay of the excess error rate with the minimum distance (§ 9), and we identify the factors that limit the quantitative agreement on real data (§ 10). All lemmas, propositions, corollaries and theorems of Sections 2–8, with the proofs in the appendices, are machine-checked in Lean 4 with Mathlib, from the Gaussian noise model and the decoder to the reliability function (ancillary files of this arXiv submission); the numerical and experimental results are not part of the formalization.

Related work. Regret analyses of reductions bound the excess error of a multi-class classifier by the excess error of the binary problems it is reduced to, for every distribution. For ECOC with Hamming decoding the multi-class training error is at most 2N/dmin⁡2N/d_{\min} times the average binary error rate [2 Corollary 2], and error-limiting reductions bound the multi-class error by a constant multiple of the binary error [5]; modified reductions instead transform binary regret into multi-class regret, at the cost of a square root [19], or with only a constant-factor increase and O(log⁡M)O(\log M) computation per example [6]; Ramaswamy et al. (2014) characterize when output-code methods with surrogate losses are consistent. In these worst-case guarantees the minimum distance enters only through a constant factor, whereas under a noise model it controls an exponential rate. Nguyen et al. (2021) showed, assuming that the binary decisions err independently, that the error rate of Hamming decoding decays exponentially in the code length. We instead model the noise in the posterior estimates that the binary classifiers output, decode by likelihood, and bound the excess error over the MAP classifier from both sides, which identifies the exponent and its dependence on the posterior. For codes drawn at random, Kobayashi et al. (2024) bounded the average probability that ECOC disagrees with MAP estimation by an exponent of the form N(c−R)N(c-R) with rate R=ln⁡M/NR = \ln M/N; our results concern fixed (constructive) code word tables, and the sufficiency condition kdmin⁡−ln⁡(M−1)→∞k d_{\min} - \ln(M-1) \to\infty is its counterpart. Output codes with only ⌈log⁡2M⌉\lceil\log_2 M\rceil bits are also used to reduce the output layer of neural sequence models over large vocabularies, where plain binary codes have been found insufficient and redundancy from an error-correcting code improves accuracy (Oda et al., 2017); our necessity result is consistent with this observation.

Problem Setting

ECOC and code word tables

The classification problem is to estimate the category cic_i (i∈C≜{1,2,…,M}i \in\mathcal{C} \triangleq\{1,2,\ldots,M\}) corresponding to given input data x∈RD\boldsymbol{x} \in\mathbb{R}^{D}, with M≥3M \ge3. In ECOC the category is estimated from the outputs of binary classifiers constructed according to a predefined code word table [7, 8] (Rifkin & Klautau 2004). A code word table is an M×NM \times N matrix WW with entries wij∈{0,1}w_{ij} \in\{0,1\} in which each row is the code word of a category and each column defines a binary classifier. We denote by fjf_j the binary classifier constructed from the jj-th column of WW and let F≜{1,2,…,N}\mathcal{F} \triangleq\{1,2,\ldots,N\} be the set of binary classifiers.

We assume the following properties of WW. The first two entail no loss of generality, since a constant column defines no classifier and complementing a column only relabels the two sides of a classifier; the last two are requirements.

  • No column has all entries equal to 0 or all equal to 1: 0<∑i∈Cwij<M0 < \sum_{i\in\mathcal{C}} w_{ij} < M, ∀j∈F\forall j \in\mathcal{F}.

  • The number of ones in each column is at most M/2M/2: ∑i∈Cwij≤M/2\sum_{i\in\mathcal{C}} w_{ij} \le M/2.

  • The code words of all categories are mutually distinct.

  • All binary classifiers are distinct.

The Hamming distance between categories cic_i and ckc_k is

dH(ci,ck)=∑j=1Nwij⊕wkj,(1)d_H(c_i,c_k)=\sum_{j=1}^{N} w_{ij}\oplus w_{kj}, \tag*{(1)}

where ⊕\oplus denotes the exclusive OR; distinct code words give dH(ci,ck)≥1d_H(c_i,c_k) \ge1 for i≠ki \ne k. We write dmin⁡≜min⁡i≠kdH(ci,ck)d_{\min} \triangleq\min_{i\ne k}d_H(c_i,c_k) for the minimum distance of the table and, once the MAP category c1c_1 is fixed in § 2.2, dmin⁡(c1)≜min⁡k≠1dH(c1,ck)≥dmin⁡d_{\min}(c_1) \triangleq\min_{k\ne1}d_H(c_1,c_k) \ge d_{\min} for the distance from its code word to the nearest other code word; the two coincide for equidistant codes.

Definition 1 (nvRnvR code). An nvRnvR code is a code word table that contains all combinations partitioning the MM categories into nn versus (M−n)(M-n), 0<n≤⌊M/2⌋0 < n \le\lfloor M/2\rfloor; for n=M/2n=M/2 each partition is included once. The Hamming distance of an nvRnvR code is

d(n,M)={2M−2(M−1n−1),n≠M2,(M−2n−1),n=M2.(2)d(n,M)= \begin{cases} 2^{M-2}\binom{M-1}{n-1}, & n\ne\frac{M}{2},\\ \binom{M-2}{n-1}, & n=\frac{M}{2}. \end{cases} \tag*{(2)}

In particular, an nvRnvR code is an equidistant code: dH(ci,ck)=d(n,M)d_H(c_i,c_k)=d(n,M) for all i≠ki\ne k.

Definition 2 (Exhaustive Code). The Exhaustive Code is the code word table obtained by concatenating all nvRnvR codes (1≤n≤⌊M/2⌋1 \le n \le\lfloor M/2\rfloor). Its code length is Nexh=2M−1−1N_{\mathrm{exh}}=2^{M-1}-1 and its minimum Hamming distance is dmin⁡=2M−2d_{\min}=2^{M-2}.

Definition 3 (Hadamard code). For M≡0(mod4)M \equiv0 \pmod{4} such that a Hadamard matrix of order MM exists (conjecturally every such MM), the Hadamard code is obtained from a normalized Hadamard matrix of order MM by mapping +1↦0+1 \mapsto0 and −1↦1-1 \mapsto1; its MM code words of length MM are at mutual distance M/2M/2 [20, 21]. Its first column is constant, so as a code word table we delete it, which leaves an equidistant table with N=M−1N=M-1 and d=M/2d=M/2, attaining the Plotkin bound (Plotkin, 1960); it is in general non-linear, and for M=2mM=2^m with a Sylvester matrix it is the linear simplex code. Equidistant codes of this kind have been constructed for ECOC from Reed–Muller codes and Hadamard matrices by Hirasawa et al. [13]; Kumoi et al. [17] and Hirasawa et al. [13] call the code of length M−1M-1 the simplex code. For M=4M=4 it coincides with the 2vR code up to column complementation (§ 7.1).

The logMlogM code, whose code words are the binary representations of the category indices (N=⌈log⁡2M⌉N=\lceil\log_2 M\rceil, dmin⁡=1d_{\min}=1), is the shortest table and serves as the small-distance extreme in § 9.

Noise model and pairwise error probability

We define the true posterior probability of each category for input data xx by θi=P(ci∣x)\theta_i = P(c_i|x) and write θ=(θ1,…,θM)\boldsymbol{\theta} = (\theta_1,\ldots,\theta_M). Hereafter, fj(y∣θ)f_j(y|\boldsymbol{\theta}) denotes the conditional probability of the binary category y∈{0,1}y \in\{0,1\} given xx. The output of a noiseless binary classifier fj∗f_j^* is

fj∗(1∣θ)=∑i′∈C:wi′j=1θi′.(3)f_j^*(1|\boldsymbol{\theta}) = \sum_{i'\in\mathcal{C}:w_{i'j}=1}\theta_{i'}. \tag*{(3)}

We use decoding based on the product of the posterior probabilities output by the binary classifiers,

g(ci∣θ)=∏j=1Nfj(wij∣θ),i^=arg max⁡i∈C g(ci∣θ),(4)g(c_i|\boldsymbol{\theta}) = \prod_{j=1}^{N} f_j(w_{ij}|\boldsymbol{\theta}), \qquad\hat{i} = \underset{i\in\mathcal{C}}{\operatorname{arg\,max}}\ g(c_i|\boldsymbol{\theta}), \tag*{(4)}

and write g∗(ci∣θ)=∏j=1Nfj∗(wij∣θ)g^*(c_i|\boldsymbol{\theta}) = \prod_{j=1}^{N} f_j^*(w_{ij}|\boldsymbol{\theta}) in the noiseless case.

Definition 4. The error term εj\varepsilon_j of the log posterior probability ratio is

εj=ln⁡fj(1∣θ)1−fj(1∣θ)−ln⁡fj∗(1∣θ)1−fj∗(1∣θ).(5)\varepsilon_j = \ln\frac{f_j(1|\boldsymbol{\theta})}{1-f_j(1|\boldsymbol{\theta})} - \ln\frac{f_j^*(1|\boldsymbol{\theta})}{1-f_j^*(1|\boldsymbol{\theta})}. \tag*{(5)}

If fj∗(1∣θ)∈{0,1}f_j^*(1|\boldsymbol{\theta}) \in\{0,1\}, we define fj(1∣θ)=fj∗(1∣θ)f_j(1|\boldsymbol{\theta}) = f_j^*(1|\boldsymbol{\theta}) and εj=0\varepsilon_j = 0.

Equivalently,

fj(1∣θ)=eεjfj∗(1∣θ)1+(eεj−1)fj∗(1∣θ).(6)f_j(1|\boldsymbol{\theta}) = \frac{e^{\varepsilon_j}f_j^*(1|\boldsymbol{\theta})}{1+(e^{\varepsilon_j}-1)f_j^*(1|\boldsymbol{\theta})}. \tag*{(6)}

Assumption 1. εj∼N(0,σ2)\varepsilon_j \sim N(0,\sigma^2), i.i.d.

From (4) and (6), the ratio of the decoding scores of cic_i and ckc_k is the random variable

Rik=g(ci∣θ)g(ck∣θ)=e∑j=1N(wij−wkj)εjg∗(ci∣θ)g∗(ck∣θ).(7)R_{ik} = \frac{g(c_i|\boldsymbol{\theta})}{g(c_k|\boldsymbol{\theta})} = e^{\sum_{j=1}^{N}(w_{ij}-w_{kj})\varepsilon_j}\frac{g^*(c_i|\boldsymbol{\theta})}{g^*(c_k|\boldsymbol{\theta})}. \tag*{(7)}

References

  1. [1]Noriaki Abe and Gendo Kumoi. A theoretical analysis of Bayes-optimal calibration under the logit-noise model. Transactions on Machine Learning Research, 2026. ISSN 2835-8856. URL https://openreview.net/forum?id=r8F3dqoppt.
  2. [2]Erin L. Allwein, Robert E. Schapire, and Yoram Singer. Reducing multiclass to binary: A unifying approach for margin classifiers. Journal of Machine Learning Research, 1:113–141, 2000.
  3. [3]Jean-Yves Audibert and Alexandre B. Tsybakov. Fast learning rates for plug-in classifiers. The Annals of Statistics, 35(2):608–633, 2007. doi: 10.1214/009053606000001217.DOI
  4. [4]Peter L. Bartlett, Michael I. Jordan, and Jon D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. doi: 10.1198/016214505000000907.DOI
  5. [5]Alina Beygelzimer, Varsha Dani, Thomas P. Hayes, John Langford, and Bianca Zadrozny. Error limiting reductions between classification tasks. In Proceedings of the 22nd International Conference on Machine Learning (ICML), pp. 49–56, 2005. doi: 10.1145/1102351.1102358.DOI
  6. [6]Alina Beygelzimer, John Langford, and Pradeep Ravikumar. Error-correcting tournaments. In Algorithmic Learning Theory (ALT), volume 5809 of Lecture Notes in Computer Science, pp. 247–262. Springer, 2009. doi: 10.1007/978-3-642-04414-4_22.DOI
  7. [7]Thomas G. Dietterich and Ghulum Bakiri. Solving multiclass learning problems via error-correcting output codes. Journal of Artificial Intelligence Research, 2:263–286, 1995. doi: 10.1613/jair.105.DOI
  8. [8]Sergio Escalera, Oriol Pujol, and Petia Radeva. Error-correcting output codes library. Journal of Machine Learning Research, 11:661–664, 2010.
  9. [9]William Feller. An Introduction to Probability Theory and Its Applications, volume 1. John Wiley & Sons, third edition, 1968.
  10. [10]Robert G. Gallager. A simple derivation of the coding theorem and some applications. IEEE Transactions on Information Theory, 11(1):3–18, 1965. doi: 10.1109/TIT.1965.1053730.DOI
  11. [11]Robert G. Gallager. Information Theory and Reliable Communication. John Wiley & Sons, 1968.
  12. [12]Robert D. Gordon. Values of Mills’ ratio of area to bounding ordinate and of the normal probability integral for large values of the argument. The Annals of Mathematical Statistics, 12(3):364–366, 1941. doi: 10.1214/aoms/1177731721.DOI
  13. [13]Shigeichi Hirasawa, Gendo Kumoi, Hideki Yagi, Manabu Kobayashi, Masayuki Goto, and Hiroshige Inazumi. Construction methods for error correcting output codes using constructive coding and their system evaluations. In Proceedings of the 2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pp. 3053–3059, 2022. doi: 10.1109/SMC53654.2022.9945163.DOI
  14. [14]Gareth James and Trevor Hastie. The error coding method and PICTs. Journal of Computational and Graphical Statistics, 7(3):377–387, 1998. doi: 10.1080/10618600.1998.10474782.DOI
  15. [15]Manabu Kobayashi, Gendo Kumoi, Hideki Yagi, and Shigeichi Hirasawa. Average performance analysis of multi-class classification based on error-correcting output codes. In Proceedings of the 2024 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pp. 5373–5378, 2024. doi: 10.1109/SMC54092.2024.10831957.DOI
  16. [16]Gendo Kumoi, Hideki Yagi, Manabu Kobayashi, Masayuki Goto, and Shigeichi Hirasawa. A study on the optimization of the ECOC method for multi-label classification problems (in Japanese). IPSJ Transactions on Mathematical Modeling and its Applications (TOM), 14(3):1–10, 2021.
  17. [17]Gendo Kumoi, Hideki Yagi, Manabu Kobayashi, and Shigeichi Hirasawa. Effect of Hamming distance on performance of ECOC with estimated binary classifiers. In Proceedings of the 2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pp. 111–116, 2022. doi: 10.1109/SMC53654.2022.9945575.DOI
  18. [18]Gendo Kumoi, Hideki Yagi, Manabu Kobayashi, Masayuki Goto, and Shigeichi Hirasawa. Performance evaluation of error-correcting output coding based on noisy and noiseless binary classifiers. International Journal of Neural Systems, 33(2):2350004, 2023. doi: 10.1142/S0129065723500041.DOI
  19. [19]John Langford and Alina Beygelzimer. Sensitive error correcting output codes. In Learning Theory: 18th Annual Conference on Learning Theory (COLT), volume 3559 of Lecture Notes in Computer Science, pp. 158–172. Springer, 2005. doi: 10.1007/11503415_11.DOI
  20. [20]Vladimir I. Levenshtein. Application of Hadamard matrices to a problem in coding theory. Problems of Cybernetics, 5:125–136, 1961.
  21. [21]F. Jessie MacWilliams and Neil J. A. Sloane. The Theory of Error-Correcting Codes. North-Holland, Amsterdam, 1977.

Paper details

vlnc:W_khcfpejp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents