When Is Product Decoding of ECOC MAP-Consistent? Pair Structure and the n-vs-Rest Codes
Organizations: Department of Information and Management Systems Engineering Nagaoka University of Technology
Abstract
Error-Correcting Output Codes (ECOC) combine binary classifiers by the sum decoder, which totals probabilities, or the product decoder, which totals log-likelihoods. In the noiseless setting, where the binary classifiers output the true posteriors, we ask on which code matrices each decoder always agrees with the Bayes-optimal (MAP) class. For the sum decoder the answer is known: the code must be equidistant (James and Hastie, 1998). We answer the question for the product decoder. Two classes are compared through the votes of the columns on which they differ: the sum decoder decides by their sample mean, the product decoder by an M-estimator with influence function artanh, and each vote is the MAP margin plus a bias determined by the other classes alone. Our main theorem states that the product decoder is MAP-consistent if and only if, for every class pair, the columns on which the two classes differ are matched with the columns obtained by swapping the two classes (or their complements), and equivalently if and only if the code is a union of n-vs-Rest codes. Efficient equidistant codes are therefore excluded: Hadamard codes (), which meet the Plotkin bound with columns, have no such pairs, and for the Sylvester type the reversal margin can be at least a constant 0.0182 independent of . All theorems are machine-checked in Lean 4. On six real datasets with estimated probabilities, the product decoder is slightly more accurate when each column is calibrated, and the sum decoder is better when the calibration error differs across columns; in either case the decoders disagree only near ties.
Figures & tables
| Name | Shape | Equidistant | Pair structure | Sum | Product |
|---|---|---|---|---|---|
| 1-vs-Rest | Yes, | Yes | Yes | Yes | |
| 2vR | Yes, | Yes | Yes | Yes | |
| Half-vs-Half | Yes, | Yes | Yes | Yes | |
| Hadamard ( ) | Yes, | Yes | Yes | Yes | |
| Hadamard ( ) | Yes, | No | Yes | No | |
| logM | No | No | No | No |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Exp. | Main settings |
|---|---|
| A | Noiseless agreement: 1-vs-Rest, 2vR, half-vs-half, Hadamard, logM ; four series (Dirichlet and two derived from Gaussian data), samples each ( for codes with many columns); column deletion from 2vR (10 seeds); pair-structure check on 49 codes and 977 class pairs |
| A’ | Row deletion (Corollary 2 ): two rows deleted from Hadamard to give (equal-weight and unequal-weight cases); Dirichlet , samples each; zero sum-decoder disagreements |
| B | Hadamard ; typical values (largest margin at disagreement points) from Dirichlet ( seeds) and Gaussian data ( variances seeds); worst values by multi-start SLSQP (maximum over 100 starts 3 seeds); margin distribution at disagreement points from noiseless samples for |
| C | letter, isolet, pendigits, MNIST and Fashion-MNIST (PCA-50, at most 1500 per class), CIFAR-100 (MobileNetV2 features, PCA-100); (as far as the number of classes allows); class subsets and splits (train/validation/test ) varied over 5 seeds; per-column logistic regression (inverse regularization strength , standardized features) with temperature calibration on validation data; (a) common factor , (b) column-specific factors , (3 draws each). The hypotheses and the design of (a) were fixed before the runs |