# Deep Neural Networks Classification via Binary Error-Detecting Output Codes
## 2 Methods and Materials
### Decision Method
\(\square\)  
The idea of the syndrome truth-values is based on truth-value calculations of the algebraic expressions given by their crisp result and fuzzy truth-values. Binary operations modulo 2 are calculated as follows:  
\[\begin{array}{|c|c|c|}\alpha\odot b,\ \ a,b\in\{0,1\}\\ \hline\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit \span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit \span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span \omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span \omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit \span\omit\span\omit\span\omit\omit\span\omit\span\omit\span\omit\span\omit \span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit \span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\span\omit\omit\span \omit\span\We apply Equation (13) also for \(t\left(\widetilde{y}_{ij}\odot h_{ij}^{T}\right)\), \(\widetilde{y}_{ij}\in[0,1]\), \(h_{ij}^{T}\in\{0,1\}\), where \(h_{ij}^{T}\) is a crisp value in the check matrix H [15]. If the normalized network output \(\widetilde{y}\) is the truth-value of the codeword \(\mathbf{c}\) i.e., \(\widetilde{\mathbf{y}}\ =\ t(\widetilde{\mathbf{c}}=\mathbf{c})\) or \(\widetilde{y}_{j}\ =\ t(\widetilde{c}_{i}\ =\ c_{i})\), \(i\ =\ (0,\ldots,n-1)\), then the syndrome estimation \(\widetilde{\mathbf{s}}\) is \(\widetilde{\mathbf{s}}\ =\ \widetilde{\mathbf{c}}\mathbf{H}^{T}\), where \(\mathbf{H}\ =\ (\mathbf{P}|\mathbf{I})\), and \(\mathbf{I}\) is a quite matrix for the tested code CRC7  
\[\mathbf{P}^{T}\ =\ \left( \begin{array}{rrrr}0&1&0&1&1&0\\ 0&0&1&0&1&1\\ 1&0&1&1&1&0\\ 0&1&0&1&1&1\end{array} \right).\]  
Applying Equations (9) and (13), the truth-value of the zero syndrome (no error detected) is  
\[ \begin{array}{l}t(\widetilde{s}_{i}\ =\ 0)\ =\ t\Big{(}\Big{(}\sum_{\oplus j} \widetilde{y}_{j}\odot h_{ij}^{T}\Big{)}\ =\ 0\Big{)},\\ t(\widetilde{s}_{i}\ =\ 0)\ =\ \max_{j\ =\ 0,\ldots,n-1}\left\{\min\{t\big{(} \widetilde{y}_{j}\ =\ c_{j}\big{)},h_{ij}^{T}\}\right\}\end{array}  \tag{14}\]  
Note that for the following theorem \(t(\widetilde{y}_{i}\odot a)\
eq 1/2\) and \((n,k)\) linear block code means codewords with \(n\) bits and \(k\) information (class) bits. **Theorem 2**. : Let \(\Big{\{}\mathbf{c}^{j}\ =\ \Big{(}c_{0}^{j},\ldots,c_{n-1}^{j}\Big{)}\in\{0,1\}^{n} \Big{\}}\), \(j\in\{0,1,\ldots,2^{n}-1\}\) be the binary codespace, \(\widetilde{\mathbf{y}}\ =\ (\widetilde{y}_{0},\ldots,\widetilde{y}_{n-1})\in[0,1]^{n}\) be a normalized output of the neural network, \(t\left(\widetilde{y}_{i}\ =\ c_{i}^{j}\right)\) be defined according to Equation (9), then the winning codeword \(\widetilde{c}\) is taken as  
\[\widetilde{\mathbf{c}}\ =\ \underset{\widetilde{\mathbf{c}}\in\{0,1\}^{n-k}}{argmax}\{t( \widetilde{\mathbf{y}}\ =\ \widetilde{\mathbf{c}})\},\]  
the code syndrome true values \(\mathbf{r}\ =\ (r_{0},\ldots,r_{n-k-1})\in[0,1]^{n-k}\) are calculated as \(\mathbf{r}\ =\ \widetilde{\mathbf{y}}\mathbf{H}^{T}\), where \(\mathbf{H}^{T}\) is the check matrix of a given error-detecting linear (\(n,k\)) block code, and the winning syndrome is  
\[\widetilde{\mathbf{s}}\ =\ \underset{\widetilde{\mathbf{s}}\in\{0,1\}^{n-k}}{argmax}\ \{t(\mathbf{r}\ =\ \widetilde{\mathbf{s}})\}.\]  
Then \(\widetilde{\mathbf{c}}\mathbf{H}^{T}\ =\ \mathbf{0}\Leftrightarrow\widetilde{\mathbf{s}}\ =\ \mathbf{0}\), i.e., the statement \"winning codeword is correct\" is equal to the statement \"the winning syndrome is equal to zero\".