arXiv(opens in a new tab)Computer ScienceJan 1995Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:cs/9501101

Solving Multiclass Learning Problems via Error-Correcting Output Codes

Thomas G. Dietterich, Ghulum Bakiri

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Multiclass learning problems involve finding a definition for an unknown function f(x)f(\mathbf{x}) whose range is a discrete set containing k>2k > 2 values (i.e., kk “classes”). The definition is acquired by studying collections of training examples of the form ⟨xi,f(xi)⟩\langle \mathbf{x}_i, f(\mathbf{x}_i) \rangle. Existing approaches to multiclass learning problems include direct application of multiclass algorithms such as the decision-tree algorithms C4.5 and CART, application of binary concept learning algorithms to learn individual binary functions for each of the kk classes, and application of binary concept learning algorithms with distributed output representations. This paper compares these three approaches to a new technique in which error-correcting codes are employed as a distributed output representation. We show that these output representations improve the generalization performance of both C4.5 and backpropagation on a wide range of multiclass learning tasks. We also demonstrate that this approach is robust with respect to changes in the size of the training sample, the assignment of distributed representations to particular classes, and the application of overfitting avoidance techniques such as decision-tree pruning. Finally, we show that—like the other methods—the error-correcting code technique can provide reliable class probability estimates. Taken together, these results demonstrate that error-correcting output codes provide a general-purpose method for improving the performance of inductive learning programs on multiclass problems.

1. Introduction

The task of learning from examples is to find an approximate definition for an unknown function f(x)f(\mathbf{x}) given training examples of the form ⟨xi,f(xi)⟩\langle \mathbf{x}_i, f(\mathbf{x}_i) \rangle. For cases in which ff takes only the values {0,1}\{0, 1\}—binary functions—there are many algorithms available. For example, the decision-tree methods, such as C4.5 (Quinlan, 1993) and CART (Breiman, Friedman, Olshen, & Stone, 1984) can construct trees whose leaves are labeled with binary values. Most artificial neural network algorithms, such as the perceptron algorithm (Rosenblatt, 1958) and the error backpropagation (BP) algorithm (Rumelhart, Hinton, & Williams, 1986), are best suited to learning binary functions. Theoretical studies of learning have focused almost entirely on learning binary functions (Valiant, 1984; Natarajan, 1991).

In many real-world learning tasks, however, the unknown function ff often takes values from a discrete set of “classes”: {c1,…,ck}\{c_1, \dots, c_k\}. For example, in medical diagnosis, the function might map a description of a patient to one of kk possible diseases. In digit recognition (e.g.,

©1995 AI Access Foundation and Morgan Kaufmann Publishers. All rights reserved.

LeCun, Boser, Denker, Henderson, Howard, Hubbard, & Jackel, 1989), the function maps each hand-printed digit to one of k=10k = 10 classes. Phoneme recognition systems (e.g., Waibel, Hanazawa, Hinton, Shikano, & Lang, 1989) typically classify a speech segment into one of 50 to 60 phonemes.

Decision-tree algorithms can be easily generalized to handle these “multiclass” learning tasks. Each leaf of the decision tree can be labeled with one of the kk classes, and internal nodes can be selected to discriminate among these classes. We will call this the direct multiclass approach.

Connectionist algorithms are more difficult to apply to multiclass problems. The standard approach is to learn kk individual binary functions f1,…,fkf_1, \dots, f_k, one for each class. To assign a new case, x\mathbf{x}, to one of these classes, each of the fif_i is evaluated on x\mathbf{x}, and x\mathbf{x} is assigned the class jj of the function fjf_j that returns the highest activation (Nilsson, 1965). We will call this the one-per-class approach, since one binary function is learned for each class.

An alternative approach explored by some researchers is to employ a distributed output code. This approach was pioneered by Sejnowski and Rosenberg (1987) in their widely-known NETtalk system. Each class is assigned a unique binary string of length nn; we will refer to these strings as “codewords.” Then nn binary functions are learned, one for each bit position in these binary strings. During training for an example from class ii, the desired outputs of these nn binary functions are specified by the codeword for class ii. With artificial neural networks, these nn functions can be implemented by the nn output units of a single network.

New values of x\mathbf{x} are classified by evaluating each of the nn binary functions to generate an nn-bit string ss. This string is then compared to each of the kk codewords, and x\mathbf{x} is assigned to the class whose codeword is closest, according to some distance measure, to the generated string ss.

As an example, consider Table 1, which shows a six-bit distributed code for a ten-class digit-recognition problem. Notice that each row is distinct, so that each class has a unique codeword. As in most applications of distributed output codes, the bit positions (columns) have been chosen to be meaningful. Table 2 gives the meanings for the six columns. During learning, one binary function will be learned for each column. Notice that each column is also distinct and that each binary function to be learned is a disjunction of the original classes. For example, fvl(x)=1f_{vl}(\mathbf{x}) = 1 if f(x)f(\mathbf{x}) is 1, 4, or 5.

To classify a new hand-printed digit, x\mathbf{x}, the six functions fvl,fhl,fdl,fcc,folf_{vl}, f_{hl}, f_{dl}, f_{cc}, f_{ol}, and forf_{or} are evaluated to obtain a six-bit string, such as 110001. Then the distance of this string to each of the ten codewords is computed. The nearest codeword, according to Hamming distance (which counts the number of bits that differ), is 110000, which corresponds to class 4. Hence, this predicts that f(x)=4f(\mathbf{x}) = 4.

This process of mapping the output string to the nearest codeword is identical to the decoding step for error-correcting codes (Bose & Ray-Chaudhuri, 1960; Hocquenghem, 1959). This suggests that there might be some advantage to employing error-correcting codes as a distributed representation. Indeed, the idea of employing error-correcting, distributed representations can be traced to early research in machine learning (Duda, Machanik, & Singleton, 1963).

Table 1: A distributed code for the digit recognition task.

ClassCode Word
vlhldlccolor
0000100
1100000
2011010
3000010
4110000
5110010
6001101
7001000
8000100
9001100

Table 2: Meanings of the six columns for the code in Table 1.

Column positionAbbreviationMeaning
1vlcontains vertical line
2hlcontains horizontal line
3dlcontains diagonal line
4cccontains closed curve
5olcontains curve open to left
6orcontains curve open to right

Table 3: A 15-bit error-correcting output code for a ten-class problem.

ClassCode Word
f0f_0f1f_1f2f_2f3f_3f4f_4f5f_5f6f_6f7f_7f8f_8f9f_9f10f_{10}f11f_{11}f12f_{12}f13f_{13}f14f_{14}
0110000101001101
1001111010110010
2100100011110101
3001101110000101
4111010110010001
5010011011100001
6101110000101001
7000111101011001
8110101100100011
9011100001010011

Table 3 shows a 15-bit error-correcting code for the digit-recognition task. Each class is represented by a code word drawn from an error-correcting code. As with the distributed encoding of Table 1, a separate boolean function is learned for each bit position of the error-correcting code. To classify a new example xx, each of the learned functions f0(x),…,f14(x)f_0(x), \dots, f_{14}(x) is evaluated to produce a 15-bit string. This is then mapped to the nearest of the ten codewords. This code can correct up to three errors out of the 15 bits.

This error-correcting code approach suggests that we view machine learning as a kind of communications problem in which the identity of the correct output class for a new example is being “transmitted” over a channel. The channel consists of the input features, the training examples, and the learning algorithm. Because of errors introduced by the finite training sample, poor choice of input features, and flaws in the learning process, the class information is corrupted. By encoding the class in an error-correcting code and “transmitting” each bit separately (i.e., via a separate run of the learning algorithm), the system may be able to recover from the errors.

This perspective further suggests that the one-per-class and “meaningful” distributed output approaches will be inferior, because their output representations do not constitute robust error-correcting codes. A measure of the quality of an error-correcting code is the minimum Hamming distance between any pair of code words. If the minimum Hamming distance is dd, then the code can correct at least ⌊d−12⌋\lfloor \frac{d-1}{2} \rfloor single bit errors. This is because each single bit error moves us one unit away from the true codeword (in Hamming distance). If we make only ⌊d−12⌋\lfloor \frac{d-1}{2} \rfloor errors, the nearest codeword will still be the correct codeword. (The code of Table 3 has minimum Hamming distance seven and hence it can correct errors in any three bit positions.) The Hamming distance between any two codewords in the one-per-class code is two, so the one-per-class encoding of the kk output classes cannot correct any errors.

The minimum Hamming distance between pairs of codewords in a “meaningful” distributed representation tends to be very low. For example, in Table 1, the Hamming distance between the codewords for classes 4 and 5 is only one. In these kinds of codes, new columns are often introduced to discriminate between only two classes. Those two classes will therefore differ only in one bit position, so the Hamming distance between their output representations will be one. This is also true of the distributed representation developed by Sejnowski and Rosenberg (1987) in the NETtalk task.

In this paper, we compare the performance of the error-correcting code approach to the three existing approaches: the direct multiclass method (using decision trees), the one-per-class method, and (in the NETtalk task only) the meaningful distributed output representation approach. We show that error-correcting codes produce uniformly better generalization performance across a variety of multiclass domains for both the C4.5 decision-tree learning algorithm and the backpropagation neural network learning algorithm. We then report a series of experiments designed to assess the robustness of the error-correcting code approach to various changes in the learning task: length of the code, size of the training set, assignment of codewords to classes, and decision-tree pruning. Finally, we show that the error-correcting code approach can produce reliable class probability estimates.

The paper concludes with a discussion of the open questions raised by these results. Chief among these questions is the issue of why the errors being made in the different bit positions of the output are somewhat independent of one another. Without this indepen-

Table 4: Data sets employed in the study.

NameNumber of FeaturesNumber of ClassesNumber of Training ExamplesNumber of Test Examples
glass9621410-fold xval
vowel1011528462
POS30123,06010-fold xval
soybean3519307376
audiologyS692420026
ISOLET617266,2381,559
letter162616,0004,000
NETtalk20354 phonemes6 stresses1000 words =7,229 letters1000 words =7,242 letters

dence, the error-correcting output code method would fail. We address this question—for the case of decision-tree algorithms—in a companion paper (Kong & Dietterich, 1995).

References (15)

  • CNAPS back-propagation guide
  • Converting English text to speech: A machine learning approach
  • Using decision trees to improve case-based learning
  • An improved boosting algorithm and its implications on learning complexity
  • Flexible discriminant analysis by optimal scoring
  • Connectionist learning procedures
  • Codes corecteurs d'erreurs
  • E., & Waibel, A
  • UCI repository of machine learning databases [machine-readable data repository]
  • W., & Weldon, Jr., E. J
  • The perceptron: a probabilistic model for information storage and organization in the brain
  • A new method for solving hard satisfiability problems
  • Phoneme recognition using time-delay networks
  • Measuring the effective number of dimensions during backpropagation training
  • A., Geist, J., Janet, S., et al