Title: Error Correction Output Codes for Robust Neural Networks against Weight-errors: A Neural Tangent Kernel Point of View
Venue: NeurIPS 2024
Accepted: yes
Keywords: error correction output codes

ECOC

DNN hardware accelerator

DNN robustness
Abstract: Error correcting output code (ECOC) is a classic method that encodes binary classifiers to tackle the multi-class classification problem in decision trees and neural networks.
Among ECOCs, the one-hot code has become the default choice in modern deep neural networks (DNNs) due to its simplicity in decision making. However, it suffers from a significant limitation in its ability to achieve high robust accuracy, particularly in the presence of weight errors. While recent studies have experimentally demonstrated that the non-one-hot ECOCs with multi-bits error correction ability, could be a better solution, there is a notable absence of theoretical foundations that can elucidate the relationship between codeword design, weight-error magnitude, and network characteristics, so as to provide robustness guarantees. This work is positioned to bridge this gap through the lens of neural tangent kernel (NTK). We have two important theoretical findings: 1) In clean models (without weight errors), utilizing one-hot code and non-one-hot ECOC is akin to altering decoding metrics from $l_2$ distance to Mahalanobis distance. 2) In non-clean models (with weight errors), if the normalized distance exceeds a threshold, then non-clean DNNs can reach the clean model's accuracy as long as the code length approaches infinity. This threshold is determined by DNN architecture (e.g. layer number, activation), weight error magnitude, and the distance between the output and the nearest codeword. Based on these findings, we further demonstrate how to practically use them to identify optimal ECOCs for simple tasks (short-code ECOCs) and complex tasks (long-code ECOCs), by balancing the code orthogonality (as per finding 1) and code distance (as per finding 2). Extensive experimental results across four datasets and four DNN models validate the superior performance of constructed codes, guided by our findings, compared to existing ECOCs. To our best knowledge, this is the first work that provides theoretical explanations for the effectiveness of ECOCS and offers associated design guidance for optimal ECOCs specifically tailored to DNNs.

Error Correction Output Codes for Robust Neural Networks against Weight-errors: A Neural Tangent Kernel Point of View

Abstract

Error correcting output code (ECOC) is a classic method that encodes binary classifiers to tackle the multi-class classification problem in decision trees and neural networks. Among ECOCs, the one-hot code has become the default choice in modern deep neural networks (DNNs) due to its simplicity in decision making. However, it suffers from a significant limitation in its ability to achieve high robust accuracy, particularly in the presence of weight-errors. While recent studies have experimentally demonstrated that the non-one-hot ECOCs with multi-bits error correction ability, could be a better solution, there is a notable absence of theoretical foundations that can elucidate the relationship between codeword design, weighterror magnitude, and network characteristics, so as to provide robustness guarantees. This work is positioned to bridge this gap through the lens of neural tangent kernel (NTK). We have two important theoretical findings: 1) In clean models (without weight-errors), utilizing one-hot code and non-one-hot ECOC is akin to altering decoding metrics from l 2 distance to Mahalanobis distance. 2) There exists a threshold, determined by the normalized distance among codewords, the DNN architecture, and the scale of weight-errors. If the distance between a clean output (without weight-errors) and its nearest codewords is smaller than this threshold, then the DNN can make predictions as if it is free of weight-errors. Based on these findings, we further demonstrate how to practically use them to identify optimal ECOCs for simple tasks (small number of classes) and complex tasks (large number of classes), by balancing the code orthogonality (as per finding 1) and code distance (as per finding 2). Extensive experimental results across four datasets and four DNN models validate the superior performance of constructed codes, guided by our findings, compared to existing ECOCs. To our best knowledge, this is the first work providing theoretical explanations for the effectiveness of ECOCs and offers associated design guidance for optimal ECOCs specifically tailored to DNNs.

1 Introduction

Inspired by error correction codes in wireless communication and memory system, error correction output codes (ECOCs) are proposed to improve the generalization performance of multi-class classification in decision trees by decomposing a complex problem into simpler binary classification

Zhiyuan Yan

tasks [1]. As deep neural networks (DNNs) are ever-increasingly popular in machine learning, one-hot code, as a special ECOC providing one bit protection, has been most widely adopted in the output layer of modern DNNs due to its simplicity in decision making and decent generalization performance. However, it experiences notable accuracy degradation in the presence of weight errors, such as those originating from hardware defects in non-volatile compute-in-memory (NVCiM) DNN accelerators [2, 3, 4, 5, 6, 7].

A number of works has adopted general ECOCs (non-one-hot code) to improve DNN's robust accuracy against weight errors [8, 9, 10, 11, 12]. While these studies demonstrate that ECOCs with stronger error correction capability, can outperform one-hot codes to some extent through experiments, they often directly apply existing ECOCs to DNNs, with no explicit code design optimization tailored to modern DNNs. In this regard, there lacks a systematic theoretical study to answer the following key questions: 1) What is the mechanism behind ECOC's efficacy in DNNs? 2) How effective can ECOC be? 3) How optimal ECOCs tailored for DNNs can be designed principally? To bridge this gap and provide insights to code construction, in this work, we overcome the challenges of characterizing the connection between the actual DNN performance and the application of ECOCs, and answer these questions rigorously based on novel theoretical proof. For the first question, the prevailing intuition in existing research, which suggests that enlarging the distance among codewords enhances robustness, is somewhat imprecise. In fact, we prove that the normalized distance (by the square root of the code length) among codewords is the crucial quantity in improving the DNNs' robustness. For the second question, we establish that there exists a threshold, determined by the normalized distance among codewords, DNN architecture, and the scale of weight-errors. If the distance between a clean output (in the absence of weight-errors) and its nearest codewords is smaller than this threshold, the DNN can make predictions as if it is free of weight-errors. For the third question, we analyze the overall performance of ECOCs by separating it into clean performance (in the absence of weight-errors) and performance degradation due to weight-errors. We demonstrate that the clean performance is influenced by the correlation among ECOC codewords (code orthogonality), while robustness is determined by the normalized distance among the codewords (code distance). Thus, both aspects should be carefully considered during code construction.

Contributions: To this end, we provide a theoretical characterization of the efficacy of ECOCs on DNNs through the lens of the neural tangent kernel (NTK). Building on our theoretical insights, we propose two ECOC construction methods tailored to DNNs focusing on small tasks and complex tasks. Our contributions are summarized as follows:

· In clean models (without weight errors), utilizing one-hot code and non-one-hot ECOC is akin to altering decoding metrics from l 2 distance to Mahalanobis distance.

· We prove that there exists a threshold, determined by the normalized distance among codewords, the DNN architecture, and the scale of weight-errors. If the distance between a clean output (in the absence of weight-errors) and its nearest codewords is smaller than this threshold, the DNN can make predictions as if it is free of weight-errors.

· Inspired by our theoretical results, we propose two ECOC construction methods optimizing the trade-off between codewords orthogonality and distance among codewords.

· Extensive experimental results on four datasets and four DNN models show that our constructed codes, based on our findings, surpass the performance of existing ECOCs with up to 7% .

To the best of our knowledge, this is the first work providing theoretical explanations for the effectiveness of ECOCs and offers associated design guidance for optimal ECOCs specifically tailored to DNNs.

2 Related Works

Error Correction Output Codes Previous works have adopted ECOCs to improve the robustness of DNNs [8, 9, 10, 12, 11]. Gupta et al. construct ECOCs by maximizing row-wise and column-wise Hamming distances together [12]. They particularly focus on short codes and weight-error free scenarios, instead of NN's robustness against weight-errors. Yu et al. propose a DNN output error decorrelation framework to enhance performance of ECOCs [11]. Deng et al. apply ECOCs to DNNs to improve reliability and false rejection rate [8]. Liu et al. adopt Hamming codes to improve the robustness of DNNs [9]. Verma et al. claim that the robustness provided by ECOCs may stem from

sigmoid activation functions, which allows larger error margin than softmax [10]. Existing works are mostly empirical studies and fail to address the theoretical foundation of ECOCs.

Neural Tangent Kernel Jacot et al. propose the concept of neural tangent kernel. They prove that the learning dynamic of an infinite-width DNN with proper initialization is essentially a dynamic of kernel ridge regression with defined neural tangent kernel [13]. Lee et al. refine the results in [13] and prove that infinite-width DNNs evolve like a linear model under gradient descent [14]. Lee et al. demonstrate that infinitely wide deep neural networks with specific types of initialization and non-linear activation functions converge to Gaussian processes [15]. These works focus on learning dynamic of the DNN in NTK regime without considering weight-errors.

3 Preliminaries

3.1 Error Correction Output Codes (ECOCs)

ECOC is a generalization of conventional one-hot codes with various code length and arbitrary binary entries. An ECOC is defined by an encoding function E : [ C ] →{ 1 , -1 } n L , where C is the number of classes, and [ C ] denotes the set [ C ] ≜ { 1 , 2 , ..., C } . Here n L is the code length, which is equal to the dimension of the DNN's outputs. The encoding function essentially maps a class label to a binary codeword. Let D denote the training data set with each entry as a pair ( x, c ) , where x ∈ R n 0 and c ∈ [ C ] are DNN inputs and the corresponding label, respectively; n 0 is the input dimension of the DNN. Let f ( x ; θ ) : R n 0 → R n L be the DNN model parameterized with weights θ . The objective during the training process is to minimize the loss function

where g ( · , · ) is referred to as sample loss. During the inference, the DNN outputs f ( x ; θ ) are mapped to classification decisions through the following decoding process

where D ( · ) : R K → [ C ] is the decoding function. We can choose arbitrary metric in Eq. (2) for decoding, but we mainly focus on the l 2 norm in this paper.

3.2 Neural Tangent Kernel (NTK)

NTK is a tool for analyzing the learning dynamic and generalization of DNNs. It allows us to study DNNs in a reproducible kernel Hilbert space (RKHS) instead of intractable DNN weights space. We adopt a fully-connected feed-forward neural networks with L layers. At the ( l +1) -th layer, we have

for l = 0 , 1 , ..., L -2 , where h l +1 ∈ R n l +1 and x l +1 ∈ R n l +1 are the pre- and post-activation values at the ( l +1) -th layer; w l +1 ∈ R n l +1 × n l and b l +1 ∈ R n l +1 are the weights and bias accordingly; n l is the width of the l -th layer; ϕ ( · ) is the activation function. In this case, n 0 is the dimension of DNN inputs and n L is the dimension of DNN outputs (also the ECOC code length). With NTK parameterization, the entries of w l +1 and b l +1 are initialized with independent and identically distributed (i.i.d.) Gaussian random variables with N (0 , 1 n l ) and N (0 , 1) , respectively.

Let X ∈ R n 0 ×|D| be the input set in D , where each column represents a sample of inputs, and let Y ∈ R n L ×|D| be the corresponding codewords, where each column represents the corresponding target. Without loss of generality, we parameterize n l = α l n with some α l > 0 and n > 0 , for 1 ≤ l ≤ L -1 , then training DNNs in the NTK regime minimizing MSE will result in the following DNN function according to [13] when hidden layer width parameter n →∞ ,

where K : R n 0 × R n 0 → R is the NTK, K ( X , X ) ∈ R |D|×|D| , and K ( X , x ) ∈ R |D|× 1 .

4 Theoretical Results

In this section, we analyze the efficacy of ECOCs on DNNs through the lens of NTK. To the best of our knowledge, this represents the first theoretical exploration of ECOCs' effectiveness on DNNs. Our findings are summarized as follows:

We prove that adopting ECOC as a replacement of one-hot codes is equivalent to changing the decoding metric from l 2 distance to a Mahalanobis distance.

We establish an upper bound for the perturbation of DNN outputs, suggesting that the normalized distance of code is a crucial factor determining the error correction capability of ECOCs.

4.1 Assumptions

Assumption 1. The activation functions in the hidden layers are bounded at 0 , i.e., ϕ (0) < ∞ , and they are Lipschitz continuous with parameter B , i.e., for any h and h ′ , we have

Assumption 2. For any DNN input x 0 , we have ∥ x 0 ∥ 2 √ n 0 ≤ 1 .

Assumption 3. The matrix K ( X , X ) ∈ R |D|×|D| is full-rank.

Assumption 4. The initial gradient with respect to the DNN output is bounded, i.e., there exists a constant R 0 such that ∥ ∥ ∇ f ( X ,θ 0 ) L ∥ ∥ 2 < R 0 .

Assumption 1 holds for most of the common state-of-the-art (SOTA) activation functions, such as ReLU, sigmoid and tanh. Assumption 2 essentially assumes a bounded norm of all DNN inputs. Without loss of generality, this assumption holds after input normalization. Assumption 3 holds almost surely for smooth kernel and continuous probability distribution of input samples. The assumption here is used to avoid the corner cases of uninvertible K ( X , X ) . Assumption 4 should hold with high probability with proper choice of R 0 due to random initialization.

4.2 Efficacy of ECOCs in Absence of Weight-errors

In this subsection, we discuss the behavior of DNNs after being trained with ECOC. Our first result is based on eq. (4) proved in [13].

Proposition 1. Let Assumption 1, 2, 3 and 4 hold. Suppose there is no weight-errors and hidden layer width parameter n →∞ , then applying ECOC is equivalent to changing the decoding function of one-hot codes (with 0 and 1 entries) to the following

where e c ∈ R C is the c -th one-hot codeword and ∥ x ∥ A ≜ √ x T Ax is referred as the Mahalanobis norm with positive definite matrix A .

Remark 1. From Proposition 1 we observe that, in NTK regime, ECOCs affect the performance of DNNs through the correlation matrix E ([ C ]) T E ([ C ]) of the codewords when the DNNs are free of weight-errors. For both one-hot and ECOCs, their target spaces R n L are equipped with l 2 -norm and the corresponding decoding metrics. Proposition 1 suggests that ECOCs generalize the decoding metric. Applying ECOCs is equivalent to equipping the target space of one-hot code with the Mahalanobis norm and the corresponding decoding metric.

Although it remains unclear which correlation matrices yield the best performance for ECOCs in absence of weight-errors, we know that codewords that are approximately orthogonal generally perform comparably to one-hot codes. Consequently, it is reasonable to regularize the orthogonality of the codewards during the ECOC construction.

4.3 Efficacy of ECOCs on the Robustness of DNNs

It has been reported in multiple works that ECOCs can improve the robustness of DNNs against weight-errors [8, 9, 11]. However, these studies lack a rigorous theoretical explanation of why DNNs become more robust after ECOC application. In this section, we provide theoretical guarantee on the error correction capability of ECOCs. We begin with the weight-error model.

4.3.1 Weight-error Model

We consider the weight-errors proportional to the weight scale. Considering the typically small initial values of neural network weights and the minimal changes from these initial values after training in the NTK regime [14], we assume that the noise terms are independent and identically distributed (i.i.d.) Gaussian variables with zero mean and variance ¯ σ 2 /n .

4.3.2 Theoretical Guarantee for Robustness with ECOCs

We first show the bound of hidden layer outputs in absence of weight-errors, which will be used to prove other results.

Lemma 1 (Hidden layer output bound) . Let Assumptions 1, 2, 3, and 4 hold. Then, for any hidden layer l ≤ L -1 and any δ > 0 ,

holds with probability at least 1 -δ when n is large enough, where the hidden layer width n l = α l n with constant α l > 0 for all 1 ≤ l ≤ L -1 .

Based on the lemma, we show the perturbation bound in the following theorem.

Theorem 1 (Perturbation bound) . Let Assumptions 1, 2, 3, and 4 hold. Adopt the weight-error model in Sec. 4.3.1, and denote σ 2 = max l α l ¯ σ 2 . Let x L and ˜ x L denote any clean output (in absence of weight-errors) and its perturbed counterpart due to weight-errors, respectively. Then for arbitrary δ > 0 and arbitrary DNN input, we have

with probability at least 1 -δ -o ( n -1 L δ -1 ) when n and n L are large enough, where

Remark 2. The theorem suggests that the normalized output perturbation ∥ x L -˜ x L ∥ 2 √ n L can be bounded in terms of weight-error scale σ , Lipschitz constant B , absolute activation function value | ϕ (0) | and DNN depth L with high probability when hidden layer width n and code length n L are large enough. It can be observed that: 1) The bound can be made arbitrarily small when σ = 0 , suggesting that the bound is tight. 2) The bound can be made arbitrarily small when B = 0 , which means the activation function ϕ always outputs a constant regardless of its input. Obviously, in this situation, there will be no output perturbation, but training this DNN will be meaningless. 3) The DNN depth L on the exponents accounts for the error propagation due to the feed-forward architecture of the DNNs.

Based on Theorem 1, we present our main result in the following corollary to characterize the error correction capability of ECOCs.

Corollary 1 (Main result) . Let all the conditions in Theorem 1 hold. Denote normalized ( l 2 ) distance of a codeword E ( i ) and normalized uncertainty of clean prediction given the clean output x L as dist ( E ( i )) and U ( x L ) , respectively, with the following definition:

̸

Then a DNN with an ECOC can make prediction with ˜ x L as if it is free of weight-errors after decoding, i.e., D (˜ x L ) = D ( x L ) with probability arbitrarily close to 1 , if the ECOC satisfies

for arbitrary small δ > 0 when n, n L →∞ .

Remark 3. In eq. (40), U ( x L ) accounts for the distance between clean output x L and its closest codewords, and Ξ( σ, B, | ϕ (0) | , L ) + δ accounts for the output perturbation due to weight-errors. Note that Corollary 1 specifies conditions under which predictions can be made as if the DNN is free of weight-errors; however, it does not guarantee that these predictions will be the ground-truth labels. Even in the absence of weight-errors, DNNs may still produce incorrect predictions due to the data and model generalization, which cannot be corrected by ECOCs.

A geometric explanation of Corollary 1 is given in Figure 1. The perturbed output ˜ x L (red diamond) is within the ball centered at clean output x L (blue dot) with radius Ξ + δ according to Theorem 1. If eq. (40) holds, then distance between ˜ x L and the codeword D ( x L ) (black dot at the bottom left), which is the decoding result of clean output x L , will be smaller than the distance from ˜ x L to any other codewords (black dot at top right), mean that D ( x L ) = D (˜ x L ) after decoding.

5 ECOC Constructions

Inspired by our theoretical results, in this section, we propose two ECOC construction methods for small scale and large scale classification tasks, respectively.

5.1 Problem Formulation

The final performance of ECOCs is determined by weight-error free performance and performance degradation on top of that due to weight-errors, which are discussed in Proposition 1 and Corollary 1, respectively. According to Proposition 1, the weight-error free performance is influenced by the correlation matrices of ECOCs. Although the optimal correlation matrices remain unidentified, extensive experiments have verified that near orthogonal codewords are generally good. Therefore, we penalize the correlation of codewords during code construction. On the other hand, according to Corollary 1, larger normalized distance of codes leads to better error correction capability of ECOCs, therefore we encourage the distances of the codes during code construction. Let Z ∈ {-1 , 1 } n L × C be the ECOC codebook, i.e., a horizontal stack of codeword, then we construct the code by solving the following optimization problem:

̸

̸

Note the second part of the objective penalizes the magnitude of off-diagonal elements while promoting the amplitude of diagonal elements in the correlation matrix Z T Z .

5.2 Method 1: Direct Optimization

Before employing standard optimization algorithms, it is necessary to relax the feasible set from the discrete binary domain {-1 , 1 } n L × C to the continuous interval [ -1 , 1] n L × C . To further eliminate these box constraints, we reparameterize Z with Z = tanh ( Z ′ ) . This allows the application of gradient descent to effectively solve the optimization problem. Finally, we take the sign of each elements in Z as the generated codebook.

5.3 Method 2: Picking from Hadamard

Since the objective in eq. (12) is non-convex, Method 1 can be easily trapped in local optima, especially for ECOCs with large number of classes C . For this reason, we introduce Method 2 in this section which constructs ECOCs on top of Hadamard codes. Hadamard codes exhibit several beneficial properties: 1) the number of codewords is equal to the code length, and both are powers of 2; 2) all codewords are orthogonal to each other; 3) the Hamming distance between any two codewords is half of the code length. This property allows Hadamard codes to achieve the upper bound of the minimum Hamming distance of ECOCs given the code length. Hadamard code is an excellent choice for ECOCs, which has been validated in previous works [10, 11, 12, 16]. An example of Hadamard code with code length 8 is given in Section A.2.

In Method 2, we pick C codewords from Hadamard codes and their complementary codes. Without loss of generality, we decompose C into C = 2 a + b , where a and b are non-negative integers. Let

𝐷 ෤ 𝑥

𝐿

= 𝐷(𝑥𝐿)

𝑥𝐿

෤

𝑥𝐿

𝑈(𝑥𝐿)

Ξ + 𝛿

≥ 𝑑𝑖𝑠𝑡(𝐷(𝑥𝐿))

𝑑𝑖𝑠𝑡(𝐷(𝑥𝐿 ))

2

<

𝑑𝑖𝑠𝑡(𝐷(𝑥𝐿 ))

2

ℰ(𝑖)

Hadamard

Method 2

Hadamard

Method 2

(b) Correlation matrix

Hadamard

Method 2

(c) Distance matrix

{ v 1 , v 2 , ..., v H } be the Hadamard codewords, then the code constructed by Method 2 is given by

In other words, its codebook E pick a,b ([ C ]]) = { v 1 , v 2 , ..., v a , -v 1 , -v 2 , ..., -v a , v a +1 , v a +2 , ..., v a + b } . We can observe that for a codeword E pick a,b ( i ) = v i with i ≤ a , it is orthogonal to all other codewords except E pick a,b ( i + a ) = -v i . In addition, the Hamming distance between it and other codewords is half of the code length n L 2 , except E pick a,b ( i + a ) , where the Hamming distance is n L . When a = 0 , codebook E pick a,b ([ C ]]) = { v 1 , v 2 , ..., v C } is composed of codewords from a Hadamard code.

Figure 2 provides a more intuitive comparison between Hadamard codes and the codes constructed by Method 2. Figure 2(a) illustrates the geometric structure of Hadamard codes and the codes constructed by Method 2 with C = 3 , a = 1 . As previously mentioned, the codewords of a Hadamard code are orthogonal to each other. In contrast, some pairs of codewords in Method 2 are located in the opposite direction from another. Figure 2(b) compares the correlation matrices of Hadamard code with code length n L = 8 and the code constructed by Method 2 with C = 8 , a = 3 . We observe that the correlation matrix of Method 2 contains off-diagonal elements, indicating a higher level of correlation compared to that of Hadamard codes. Figure 2(c) shows the distance matrices of Hadamard code and Method 2 with C = 8 , a = 3 . We observe that the codewords of Hadamard codes have uniform Hamming distances (the number of different entries), whereas the codewords constructed by Method 2 produces some codeword pairs with larger Hamming distances and others that are equivalent to those found in Hadamard codes. Notice that, by adjusting a and b we can achieve different trade-off between averaged codeword distance and correlations.

6 Experiments

6.1 Experimental Setup

We conducted all simulations using PyTorch framework on a workstation equipped with an AMD EPYC 7542 32-Core Processor and four NVIDIA RTX A6000 GPUs, each with 40GB of memory.

Datasets and models MNIST [17], CIFAR10 and CIFAR100 [18], and Tiny ImageNet [19] datasets are used for evaluation. In our experiments, MNIST and CIFAR10 represent small scale tasks, while CIFAR100 [18] and Tiny ImageNet represent large scale tasks. We adopt a (784-4096-4096-10) multilayer perceptron (MLP), AlexNet, VGG16 and ResNet-50 for MNIST, CIFAR10, CIFAR100 and Tiny ImageNet, respectively.

Benchmarks Our ECOCs are compared against one-hot codes, repetition codes, random codes, and Hadamard codes [10]. For a given number of classes, both the number of codewords and code length for one-hot codes are the same as the number of classes. We further derive a repetition code from a one-hot code: each codeword of a one-hot code is repeated for multiple times. Hence, the number of codewords in a repetition code is the same as the number of classes, but its code length is a multiple of the number of classes. The codewords of a random code is obtained by choosing random binary entries of -1 and 1 with equal probability. For small scale tasks such as MNIST and CIFAR10, we compare codes constructed using Method 1 to with benchmarks. For large scale tasks, i.e., CIFAR100 and Tiny ImageNet, codes constructed based on Method 2 are used for comparison.

Weight-errors Gaussian noises with different variance ω 2 are added to the weights during inferences to test the robustness of the networks. For each code, except for random codes, the network is trained 20 times. After each training session, we perform 200 inference runs, each with different randomly generated weight-errors applied. For random codes, each training uses a different randomly generated codes.

6.2 Results and Analysis

Superior performance of the proposed methods over existing ECOCs The performances of different ECOCs on small scale tasks (MNIST and CIFAR10) and large scale tasks (CIFAR100 and Tiny ImageNet) are summarized in Tables 1 and 2, respectively. We made the following observations from Tables 1 and 2: 1) The clean accuracy ( ω = 0 ) of different codes are similar for small scale tasks in Table 1, even with different code lengths. We believe this is partially due to the simplicity of the tasks. Besides, these codes all have good orthogonality, therefore they have similar generalization performance according to Proposition 1. In contrast, the clean accuracy is more varied for large scale tasks in Table 2. We believe this is because the assumption of infinitely wide DNN does not hold when the code length is comparable to the width of networks. In these cases, ECOCs with better structures can reduce more generalization error. 2) One-hot and repetition codes have much worse performance than other codes under large weight-errors. This is due to their smaller normalized distances. On the contrary, our proposed codes outperform other benchmarks under large weight-errors because of their larger normalized distances. 3) Larger code length n L yields better robustness under weight-errors since more protections are applied by the additional nodes. Besides, longer codes lead to higher success probability of bounds in our theoretical results, making the proposed methods inspired by them more effective. 4) Interestingly, Hadamard and random codes perform similarly when the code length is large. This is because the expectation of correlation matrices and pair-wise distances of

codeword in random codes are exactly same to those of Hadamard codes. When the code length is larger, the randomness of these quantities concentrate due to the law of large number.

Performance comparison between Method 1 and Method 2 Recall that Method 1 and Method 2 are proposed for small scale and large scale tasks, respectively. Here, we compare the performance of Method 1 and Method 2 on tasks with different number of classes, which is summarized in Table 3. For small scale task, i.e., CIFAR10, Method 1 outperforms Method 2. However, for larger tasks with more classes, i.e., CIFAR20-100, Method 2 outperforms Method 1. As mentioned previously, we believe this is because Method 1 is more likely to be trapped in bad local minima in large scale tasks than small scale tasks. Additional experiments and analysis can be found in Section A.3.

7 Conclusion

In this paper, we provide theoretical explanations for the efficacy of ECOCs. We showed that using ECOCs to replace one-hot code is equivalent to changing the decoding metric from l 2 norm to a Mahalanobis norm corresponding to the correlation matrix of the codewords. Moreover, we provided an NN output perturbation bound, implying that the quantity normalized distance of codes is the key factor of the robustness of DNN with ECOCs. Based on the theoretical findings, we proposed two code construction methods for small and large scale classification tasks. Experimental results show that our proposed methods perform better than existing ECOCs.

Acknowledgments and Disclosure of Funding

This work is partially supported by the National Science Foundation (NSF) under Grants No. 2349538 and No. 2401544.

References

Thomas G Dietterich and Ghulum Bakiri. Solving multiclass learning problems via error-correcting output codes. Journal of artificial intelligence research , 2:263-286, 1994.

Guanpeng Li, Siva Kumar Sastry Hari, Michael Sullivan, Timothy Tsai, Karthik Pattabiraman, Joel Emer, and Stephen W Keckler. Understanding error propagation in deep learning neural network (dnn) accelerators and applications. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis , pages 1-12, 2017.

Xiaofan Zhang, Junsong Wang, Chao Zhu, Yonghua Lin, Jinjun Xiong, Wen-mei Hwu, and Deming Chen. Dnnbuilder: An automated tool for building high-performance dnn hardware accelerators for fpgas. In 2018 IEEE/ACM International Conference on Computer-Aided Design (ICCAD) , pages 1-8. IEEE, 2018.

Yun Long, Xueyuan She, and Saibal Mukhopadhyay. Design of reliable dnn accelerator with un-reliable reram. In 2019 Design, Automation & Test in Europe Conference & Exhibition (DATE) , pages 1769-1774. IEEE, 2019.

Sparsh Mittal. A survey on modeling and improving reliability of dnn algorithms and accelerators. Journal of Systems Architecture , 104:101689, 2020.

Younis Ibrahim, Haibin Wang, Junyang Liu, Jinghe Wei, Li Chen, Paolo Rech, Khalid Adam, and Gang Guo. Soft errors in dnn accelerators: A comprehensive review. Microelectronics Reliability , 115:113969, 2020.

Saurabh Dash, Yandong Luo, Anni Lu, Shimeng Yu, and Saibal Mukhopadhyay. Robust processing-inmemory with multibit reram using hessian-driven mixed-precision computation. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems , 41(4):1006-1019, 2021.

Huiqun Deng, George Stathopoulos, and Ching Y Suen. Applying error-correcting output coding to enhance convolutional neural network for target detection and pattern recognition. In 2010 20th International Conference on Pattern Recognition , pages 4291-4294. IEEE, 2010.

Tao Liu and Wujie Wen. Making the fault-tolerance of emerging neural network accelerators scalable. In 2019 IEEE/ACM International Conference on Computer-Aided Design (ICCAD) , pages 1-5. IEEE, 2019.

Gunjan Verma and Ananthram Swami. Error correcting output codes improve probability estimation and adversarial robustness of deep neural networks. Advances in Neural Information Processing Systems , 32, 2019.

Anlan Yu, Ning Lyu, Jieming Yin, Zhiyuan Yan, and Wujie Wen. COLA: Orchestrating error coding and learning for robust neural network inference against hardware defects. In Proceedings of the 40th International Conference on Machine Learning , volume 202, pages 40277-40289. PMLR, 23-29 Jul 2023.

Samarth Gupta and Saurabh Amin. Scalable design of error-correcting output codes using discrete optimization with graph coloring. Advances in Neural Information Processing Systems , 35:10094-10107, 2022.

Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. Advances in neural information processing systems , 31, 2018.

Jaehoon Lee, Lechao Xiao, Samuel Schoenholz, Yasaman Bahri, Roman Novak, Jascha Sohl-Dickstein, and Jeffrey Pennington. Wide neural networks of any depth evolve as linear models under gradient descent. Advances in neural information processing systems , 32, 2019.

Jaehoon Lee, Yasaman Bahri, Roman Novak, Samuel S Schoenholz, Jeffrey Pennington, and Jascha Sohl-Dickstein. Deep neural networks as gaussian processes. arXiv preprint arXiv:1711.00165 , 2017.

Yang Song, Qiyu Kang, Wee Peng Tay, and Y Tay. Error-correcting output codes with ensemble diversity for robust learning in neural networks. In AAAI , pages 9722-9729, 2021.

Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/ , 1998.

Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.

Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision , 115(3):211-252, 2015.

A Supplementary Material

A.1 Proofs for Theoretical Results

We start with a results in [14], which will be used in our proof.

Theorem 2 (Theorem G.1 in [14]) . Let Assumptions 1, 2, 3, and 4 be satisfied. For any given δ > 0 , there exist constants n ′ > 0 , A > 0 , and η 0 > 0 , such that for all n > n ′ and any step t , employing gradient descent with a learning rate of η = η 0 n ensures that

with probability at least 1 -δ .

A.1.1 Proofs of Proposition 1

Proposition 1. Let Assumption 1, 2, 3 and 4 hold. Suppose there is no weight-errors and hidden layer width parameter n →∞ , then applying ECOC is equivalent to changing the decoding function of one-hot codes (with 0 and 1 entries) to the following

where e c ∈ R C is the c -th one-hot codeword and E is the ECOC encoding function.

Proof. Let ˜ Y denote the target encoded by the one-hot code. Notice that E ( c ) = E ([ C ]) e c , then the ECOC target can be written as Y = E ([ C ]) ˜ Y . The decoding process can be described as

A.1.2 Proofs of Lemma 1

Lemma 1 (Hidden layer output bound) . Let Assumptions 1, 2, 3, and 4 hold. Then, for any hidden layer l ≤ L -1 and any δ > 0 ,

holds with probability at least 1 -δ when n is large enough, where the hidden later width n l = α l n with constant α l > 0 for all l .

Proof. Consider w ini,l and b ini,l as the initial weights and bias of the l -th layer, respectively. Define u l and v l as the adjustments to the weights and bias of the l -th layer due to training, respectively, meaning w l = w ini,l + u l and b l = b ini,l + v l . From eq. (3), we get

Applying the triangle inequality, we obtain

Recall that the entries of w ini,l and b ini,l follow N (0 , 1 /n l -1 ) and N (0 , 1) , respectively, the elements of ( w ini,l x l -1 + b ini,l ) are independently and identically distributed Gaussian with zero mean and variance

( ∥ x l -1 ∥ 2 2 /n l -1 +1) . The square of each element follows a χ 2 distribution with mean ( ∥ x l -1 ∥ 2 2 /n l -1 +1) and variance 2( ∥ x l -1 ∥ 2 2 /n l -1 +1) . Leveraging Chebyshev's inequality, for any δ 1 > 0 ,

with a probability of at least 1 -2( ∥ x l -1 ∥ 2 2 /n l -1 +1) n l δ 1 . For the second term,

where the second inequality uses Theorem 2 and the definition of α l = n l /n . Acknowledging Assumption 1, which posits | ϕ ( h ) -ϕ (0) | ≤ B | h | , and combining eq. (19) with eqs. (20) and (21), we have

with a probability of at least 1 -2( ∥ x l -1 ∥ 2 2 /n l -1 +1) n l δ 1 . With sufficiently large n , we have

with probability at least 1 -δ ′ and n large enough. After recursion, we have

with probability at least 1 -δ ′ and n large enough, where the last inequality uses Assumption 2.

A.1.3 Proofs of Theorem 1

Theorem 1 (Perturbation bound) . Let Assumptions 1, 2, 3, and 4 hold. Adopt the weight-error model in Sec. 4.3.1, and denote σ 2 = max l α l ¯ σ 2 . Let x L and ˜ x L denote the clean output (in absence of weight-errors) and perturbed output due to weight-errors, respectively. Then for arbitrary δ > 0 and arbitrary DNN input, we have

with probability at least 1 -δ -o ( n -1 L δ -1 ) when n and n L are large enough, where

Proof. Let ˜ w l +1 and ˜ b l +1 denote the noisy weights and bias at the ( l +1) -th layer, respectively, with the noise variances being σ 2 w /n l for the weights and σ 2 b for the bias. Consequently, at the l +1 -th layer, the relationships can be represented as:

Analyzing the preactivation term further, we obtain:

where w ini,l +1 represents the initial weights at the ( l +1) -th layer, characterized by a variance of 1 /n l , and u l +1 is the adjustment of weights as a result of the training process. The prefix ∆ denotes the perturbation of corresponding variable due to the weight noise. Utilizing the triangle inequality, we deduce:

Recalling that the weight perturbation ∆ w l +1 has a zero mean and a variance of σ 2 /n l for l ≤ L -2 . Similar to eq. (20), Chebyshev's inequality gives

for any δ 1 > 0 , with the probability at least 1 -2 σ 2 ∥ x l ∥ 2 2 /n l n l +1 δ 1 ≤ 1 -o ( n -1 δ -1 1 ) .

Similarly, for the perturbed weights combined with the perturbed inputs, we obtain:

for any δ 2 > 0 , with a corresponding probability of at least 1 -2(1+ σ 2 ) ∥ ∆ x l ∥ 2 2 /n l n l +1 δ 2 . For the bias perturbation, we have

for any δ 3 > 0 with the probability at least 1 -2 σ 2 b n l +1 δ 3 = 1 -o ( n -1 δ -1 3 ) . According to Theorem 2, for arbitrary δ 4 > 0 , we have ∥ u l +1 ∥ F ≤ AR 0 n -1 / 2 with probability at least 1 -δ 4 and n large enough, which results in

Note that this term can be arbitrarily small when n is large enough. Combine eq. (29), (30), (31), (32) and (33), we have

with probability at least 1 -δ l for n large enough, where the first inequality uses Assumption 2, and the second inequality uses Lemma 1. Reuse eq. (34) for multiple times, we have for l ≤ L -1

with probability at least 1 -δ ′ l when n is large enough, where the second inequality uses the fact ∥ ∆ x 0 ∥ 2 = 0 , and that δ i can be arbitrarily small for all i when n is large enough.

We take care of the final layer specially due to the finite dimension. Specifically, we first rewrite eq. (33) as

According to eq. (34), we have

for arbitrary δ ′ L > 0 with probability at least 1 -δ ′ L and n large enough. Note that the probability bound in eq. (29), (30), (31), (32) and (33) all have order o ( n -1 L δ -1 ) . Plug in eq. (35) and use Lemma 1, we finally have

with probability at least 1 -δ -o ( n -1 L δ -1 ) when n is large enough.

A.1.4 Proofs of Corollary 1

Corollary 1 (Main result) . Let all the conditions in Theorem 1 hold. Denote normalized ( l 2 ) distance of a codeword E ( i ) and normalized uncertainty of clean prediction given the clean output x L as dist ( E ( i )) and U ( x L ) , respectively, with the following definition:

̸

Then a DNN with an ECOC can make prediction with ˜ x L as if it is free of weight-errors after decoding, i.e., D (˜ x L ) = D ( x L ) with probability arbitrarily close to 1 , if the ECOC satisfies

for arbitrary small δ > 0 when n, n L →∞ .

Proof. Our goal is to prove that for any codeword E ( i ) = D ( x L ) , the distance ∥ ˜ x L -D ( x L ) ∥ 2 √ n L ≤ ∥ ˜ x L -E ( i ) ∥ 2 √ n L , which suggests that ˜ x L is mapped to D ( x L ) instead of any other codewords after decoding. By triangle inequality, we have

̸

where the second and the third inequality use eq. (8) and (40), respectively. Given the definition of dist ( D ( x L )) , we have ∥E ( i ) -D ( x L ) ∥ 2 √ n L ≥ dist ( D ( x L )) . By triangle inequality again, we have

where the second inequality uses eq. (41). Comparing eqs. (41) and (42), we complete the proof.

A.2 Hadamard Codes

Hadamard codes exhibit several beneficial properties: 1) the number of codewords is equal to the code length, and both are powers of 2; 2) all codewords are orthogonal to each other; 3) the Hamming distance between any two codewords is half of the code length. This property allows Hadamard codes to achieve the upper bound for the minimum Hamming distance given the code length. Hadamard code is an excellent choice for ECOC, which has been validated in previous works [11, 12]. An example of Hadamard code with code length 8 is as follows:

ω

0

0.01

0.02

0.03

0.04

Method 1

82.34

±

0.23

81.33

±

0.18

77.54

±

0.21

65.63

±

0.60

34.89

±

0.88

Method 2

82.00

±

0.28

81.01

±

0.19

76.71

±

0.25

63.53

±

0.62

34.71

±

0.75

20

25

30

35

40

45

50

55

60

0

10

20

30

40

50

Accuracy (%)

Number of complement pairs

0.01

0.012

0.013

A.3 Additional Experiments

Performance comparison between Method 1 and Method 2 Additionally, we compare the performance of ECOC constructed by Method 1 and Method 2 on small scale task with small scale DNN, i.e., AlexNet CIFAR10. Similarly, as shown in Table 4, Method 1 outperforms Method 2, which emphasizes the benefit of using Method 1 on small scale tasks.

Performance comparison with correlation and distance trade-off In Section 4, we claimed that correlation of code matrices determines the weight-error free performance of ECOC and distance of codewords determines the performance degradation from weight-error. Here we use Method 2 as an example to show such trade-off. As shown in Figure 3, we vary the number of complement pairs a in ECOC constructed by Method 2 and compare the performance. Larger a means larger correlation while larger distance. In this set of experiments, a = 40 achieves the best correlation and distance trade-off.

A.4 Limitation

In this paper, experimental results are from simulation without implementation on actual hardware accelerator. The theoretical results adopt assumptions of NTK, which requires the width of the network to approach to infinity. This assumption can be strong for some neural networks.

NeurIPS Paper Checklist

The checklist is designed to encourage best practices for responsible machine learning research, addressing issues of reproducibility, transparency, research ethics, and societal impact. Do not remove the checklist: The papers not including the checklist will be desk rejected. The checklist should follow the references and precede the (optional) supplemental material. The checklist does NOT count towards the page limit.

Please read the checklist guidelines carefully for information on how to answer these questions. For each question in the checklist:

You should answer [Yes] , [No] , or [NA] .

[NA] means either that the question is Not Applicable for that particular paper or the relevant information is Not Available.

Please provide a short (1-2 sentence) justification right after your answer (even for NA).

The checklist answers are an integral part of your paper submission. They are visible to the reviewers, area chairs, senior area chairs, and ethics reviewers. You will be asked to also include it (after eventual revisions) with the final version of your paper, and its final version will be published with the paper.

The reviewers of your paper will be asked to use the checklist as one of the factors in their evaluation. While "[Yes] " is generally preferable to "[No] ", it is perfectly acceptable to answer "[No] " provided a proper justification is given (e.g., "error bars are not reported because it would be too computationally expensive" or "we were unable to find the license for the dataset we used"). In general, answering "[No] " or "[NA] " is not grounds for rejection. While the questions are phrased in a binary way, we acknowledge that the true answer is often more nuanced, so please just use your best judgment and write a justification to elaborate. All supporting evidence can appear either in the main paper or the supplemental material, provided in appendix. If you answer [Yes] to a question, in the justification please point to the section(s) where related material for the question can be found.

IMPORTANT, please:

Delete this instruction block, but keep the section heading 'NeurIPS paper checklist" ,

Keep the checklist subsection headings, questions/answers and guidelines below.

Do not modify the questions and only use the provided macros for your answers .

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: The main theoretical results and proposed ECOC construction methods are clearly summarized in the abstract and introduction.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: We discuss the limitations of the work in Section A.4.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: We provide the full set of assumptions and a complete proof in Section 4 and Section A.1.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: Implementation details can be found in Section 6.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: Code is submitted in a zip file.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/public/ guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https://nips.cc/public/ guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: All the details are provided in Section 6 and in the code submitted.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: All the experimental results provide error bars as shown in Table 1, Table 2, and Table 3. Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: CPU and GPU types are provided in Section 6.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: This research does not violate any of NeurIPS Code of Ethics.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [NA]

Justification: The paper aims to improve the robustness of DNNs, which does not have more potential societal impact than the original DNN does.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: The paper does not have such risks.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: The corresponding papers, which published the datasets used in this paper, are cited in Section 6.

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: This paper does not release new assets.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: This paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: This paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
comments: SUMMARY:
The authors applied ECOCs to DNNs to bolster the model’s resilience to weight errors. Most significantly, they have derived a perturbation bound through the utilization of the neural tangent kernel. According to their mathematical analysis, some principles of designing the ECOCs were revealed, leading to the construction of ECOCs based on Hadamard codes or direct optimization.  Experimental results indicate that the proposed method is effective.

I have not thoroughly examined the proofs of the theorems, but the theorems themselves appear to be plausible based on my understanding.

STRENGTHS:
+ The perspective presented under the NTK is novel.
+ The mathematical analysis within this work is sound and offers valuable contributions to the academic community, particularly in the context of considering the one-hot code as a specialized form of ECOC. 
+ The experimental results indicate that the proposed method exhibits a considerable performance advantage over existing approaches.
+ The manuscript is well written.

WEAKNESSES:
N/A

QUESTIONS:
+ Is there a parallel line of research analyzing the model’s robustness with one-hot/softmax outputs through the lens of the NTK?
+ Line 223, "Although the optimal correlation matrices remain unindentified". The authors should consider adding a relevant citation or providing an explanation to substantiate this claim. Could there be combinatorial approaches for constructing better codes?
+ Section 3.2. The use of $\ell$ (\ell in math mode) is preferred over $l$, as it helps to distinguish it from the numeral $1$.

LIMITATIONS:
N/A
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-11

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper deals with the use of error-correcting output codes (ECOCs) for multi-class classification problem. The standard solution is to use one-hot code. Existing literature shows that there are codes which are better than one-hot code. At the same time there is a lack of theory and explanations of this phenomenon. The current paper aim to fill this gap and provide theoretical results which help to choose proper ECOC as well as provide guarantees. The authors utilize neural tangent kernel (NTK) approach for theoretical analysis.\n\nSTRENGTHS:\nThe authors provide the results of theoretical analysis - this definitely the strong aspect of the paper. In particular, the main results are as follows:\n- the authors showed that replacing one-hot code with other ECOC is equivalent to the change of decoding metric from Euclidean distance to Mahalanobis distance. \n- the authors established an upper bound for the perturbation of DNN outputs (in case on weight-noise), which helps to choose the minimal distance of ECOC.\n- two ECOC constructions are proposed: optimization-based construction and the construction based on Hadamard matrix.\n- theoretical results are supported by numerical experiments.\n\nWEAKNESSES:\nI list the major weak points below:\n1. The main contribution is repeated several times, namely in Introduction and in Section 4.\n2. Please provide an explicit problem statement and describe the conditions. As I understand the main task is to deal with weight-error.\n3. Please introduce the weight-error model explicitly. Now (in section 4.1) it is described by words but please define it formally. E.g. what does «\tweight-errors proportional to the weight scale» mean? The result is w(1+z), where z ~ N(0, sigma^2) or it is not true? \n4. If you have the weight-error model, then in my opinion, it would be better to train such noisy NN. In this case ECOC should be learned automatically. Could you please make such a comparison?\n5. Corollary 1 seems to be trivial and follows directly from the coding theory. It says that (for the guaranteed recovery) the norm of the errors should be less or equal then d/2.\n6. «Although it remains unclear which correlation matrices yield the best performance for ECOCs in absence of weight-errors, we know that codewords that are approximately orthogonal generally perform comparably to one-hot codes. Consequently, it is reasonable to regularize the orthogonality of the codewards during the ECOC construction». This is strange statement for the theoretically oriented paper. Actually the correlation is related to the minimum distance, namely $||a-b||^2 = ||a||^2 + ||b||^2 - 2 a^T b$ (codeword norms are usually fixed).\n7. There are many ways to construct good codes over {+-1} alphabet. Usually you should start with good binary code (e.g. Reed-Muller code) and map 0 to +1 and 1 to -1. There exist tables of good binary codes. Please try to use them and compare to your solutions. I believe your Method 2 to be some particular case of this approach.\n8. Experimental results demonstrate that constructed codes are better than one-hot code. At the same time my question is as follows. Is ECOC itself strategy beneficial? Could you please improve some state-of-the-art classifier with this approach?\n\nQUESTIONS:\nSee Weaknesses\n\nLIMITATIONS:\nIn my opinion, the limitation section should be increased, please discuss the limitations of your method rather that «hardware acceleration».", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies  theoretical foundations of Error correcting output code for multi-class classification by means of coding theory  and NTK.  NTK is employed to  alter the decoding metric from  l2 to Mahalanobis norm and  based on that a few  code construction methods are proposed.\n\nSTRENGTHS:\nThe NTK  sees the model as an  Gaussian process, making it a  powerful tool for analysis of neural networks’ convergence and generalization. This paper  derives an interesting connection between decoding function in the infinite width regime  and NTK  formulation of Neural networks. The  derivation of bounds are  clear and  the codes are  tested  on different  tasks and datasets which is promising.\n\nWEAKNESSES:\nThe presentation of the paper  could be further improved. Please consider the following:\n- All parameters need to be defined in the main text. In  (6),  E([C])   and in (8)  $\\bar{\\delta}$ are not defined.\n-There are sporadic grammatical errors such as \n\"... then training DNNs in the NTK regime minimizing MSE will result ....\"\n\"... adopt a fully-connected feed-forward neural networks with L layers...\"\n\"... can reduce more generalization error....\"\n\"...each training uses a different randomly generated codes...\"\n\n- in eq (20), <= should be = .\n\n\n-I see in the NTK papers a regularized form of  (4) as  $(K(x,x)+\\lambda I)^{-1}$, therefore no need to   make assumption 3. \n-NTK is merely used in the  proof of theorem 1 and is not the main  topic  of this paper.  I feel it is overemphasized in the title of the paper. please consider choosing a better title.\n\nQUESTIONS:\n-What is the reason  you present your work in the context of NTK?  I see that you make a  connection between ECOC  and NTK because both are in the infinite width regime. However you don't use NTK to analyze the training dynamics of the  networks. \n\n- Given the sensitivity of your analysis  to width of the  networks, I expected some  figures demonstrating the  effect of increasing number of neurons on performance. Could you provide such a result to  show in what regime your codes are optimal?\n\nLIMITATIONS:\nNTK theory in general holds in the infinite width limit. Further discussions are  needed to adapt the methods in this paper to finite regime. For instance empirical NTK is developed in the literature to address the finite width regime.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-13"}