# Improving Convolutional Neural Networks' Accuracy in Noisy Environments Using k-Nearest Neighbors
## 3 Experiments
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Method**} & \multicolumn{6}{c}{**Noise (\%)**} \\ \cline{3-8}  & & **0** & **10** & **20** & **30** & **40** \\ \hline \multirow{4}{*}{USPS} & kNN & 97.11 (1) & 96.48 (5) & 95.75 (9) & 95.33 (15) & **94.54** (15) \\  & CNN + softmax & **98.71** & 98.00 & 96.71 & 96.22 & 93.53 \\  & CNN + kNN & 98.60 (5) & 97.83 (9) & 96.26 (11) & 93.50 (11) & 88.22 (20) \\  & CNN + \(\ell_{2}\) + kNN & 98.53 (3) & **98.01** (7) & **97.40** (11) & **96.40** (25) & 94.49 (40) \\ \hline \multirow{4}{*}{MNIST} & kNN & 97.22 (1) & 96.83 (7) & 96.59 (9) & 96.24 (15) & **95.81** (20) \\  & CNN + softmax & 99.00 & 98.66 & 97.95 & **97.70** & 95.25 \\  & CNN + kNN & 99.21 (5) & 98.73 (15) & 98.34 (20) & 96.88 (40) & 92.24 (50) \\  & CNN + \(\ell_{2}\) + kNN & **99.29** (3) & **98.78** (11) & **98.50** (11) & 97.62 (30) & 95.63 (50) \\ \hline \multirow{4}{*}{Landsat} & kNN & 89.16 (3) & 88.42 (7) & 87.85 (9) & **86.97** (20) & **85.46** (20) \\  & CNN + softmax & **93.00** & **91.04** & **88.08** & 83.57 & 78.35 \\  & CNN + kNN & 90.95 (7) & 89.19 (11) & 87.63 (20) & 85.10 (30) & 81.02 (50) \\  & CNN + \(\ell_{2}\) + kNN & 91.23 (1) & 89.43 (15) & 87.77 (25) & 85.11 (40) & 81.33 (50) \\ \hline \multirow{4}{*}{HOMUS} & kNN & 66.52 (1) & 61.17 (7) & 59.56 (7) & 58.12 (9) & 56.1 (15) \\  & CNN + softmax & 94.00 & 89.18 & 82.57 & 74.90 & 69.28 \\  & CNN + kNN & 94.63 (3) & 90.20 (9) & 83.99 (7) & 78.67 (9) & 71.07 (9) \\  & CNN + \(\ell_{2}\) + kNN & **94.66** (1) & **91.28** (7) & **86.88** (15) & **83.01** (25) & **77.20** (15) \\ \hline \multirow{4}{*}{NIST} & kNN & 79.67 (5) & 78.66 (5) & 77.58 (7) & 76.53 (9) & 75.01 (15) \\  & CNN + softmax & 98.00 (1) & 95.75 & 93.64 & 90.72 & 88.5 \\  & CNN + kNN & 98.00 (1) & 95.75 (50) & 93.52 (50) & 90.96 (50) & 87.22 (50) \\  & CNN + \(\ell_{2}\) + kNN & **98.03** (1) & **96.22** (40) & **94.64** (50) & **92.77** (50) & **90.35** (50) \\ \hline \multirow{4}{*}{CIFAR10} & kNN & 34.28 (1) & 31.7 (9) & 30.87 (9) & 29.95 (15) & 29 (30) \\  & CNN + softmax & 86.50 & **81.66** & 75.49 & **69.22** & 61.00 \\  & CNN + kNN & 86.70 (5) & 81.30 (5) & 75.77 (20) & 69.07 (30) & **61.69** (15) \\  & CNN + \(\ell_{2}\) + kNN & **86.79** (7) & 81.26 (7) & **75.78** (5) & 69.04 (20) & 61.54 (7) \\ \hline \multirow{4}{*}{CIFAR100} & kNN & 17.11 (1) & 15.41 (1) & 13.76 (1) & 12.62 (11) & 12.11 (20) \\  & CNN + softmax & 62.60 & 46.80 & 31.80 & 22.20 & 14.20 \\  & CNN + kNN & 63.93 (25) & 48.30 (50) & 35.21 (50) & 24.28 (50) & 15.56 (50) \\  & CNN + \(\ell_{2}\) + kNN & **64.23** (11) & **48.85** (20) & **35.46** (40) & **25.27** (50) & **16.51** (50) \\ \hline \multirow{4}{*}{Average} & kNN & 68.62 & 66.63 & 65.83 & 64.88 & 63.83 \\  & CNN + softmax & 90.17 & 85.56 & 81.06 & 76.77 & 71.97 \\ \cline{1-1}  & CNN + kNN & 90.20 & 85.70 & 81.16 & 76.39 & 70.37 \\ \cline{1-1}  & CNN + \(\ell_{2}\) + kNN & **90.35** & **86.20** & **82.25** & **78.37** & **73.76** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: \(F_{1}\) (%) accuracy for each image dataset, classification method and label noise level considered. In the kNN methods, the best value of \(k\) is shown between parentheses (unless in the average row). For simple datasets such as USPS, MNIST or Landsat (those in which kNN achieves good results), we observe that CNN-based approaches worsen their performance in a much more pronounced way than kNN as the level of noise label is increased. In fact, for high noise levels, the kNN eventually outperforms these approaches. In the remaining datasets (NIST, HOMUS, CIFAR10, CIFAR100),  
Figure 2: \(F_{1}\) (%) accuracy (\(y\)-axis) with respect to the noise level (\(x\)-axis) for the evaluated datasets. the kNN is far away from the results obtained with the CNN approaches. In the case of NIST, it turns out that CNN + softmax is less accurate in the original scenario, but shows a greater noise robustness even with the lowest noise levels considered. Hybrid approaches, however, depict a more pronounced degradation curve.