Redesigning Neural Networks to Not be Confidently Wrong even to Strong Adversarial Attacks
Organizations: University of Luxembourg, Department of Behavioural and Cognitive Sciences, L-4366 Esch-sur-Alzette, Luxembourg.
Abstract
Early deep learning models attempted to simulate visual perception using a neural hierarchy that alternated between two types of layer: one modelled on cortical simple cells (that was designed to increase selectivity), and one modelled on cortical complex cells (that aimed to increase tolerance). We show that such a neural network (NN) architecture, when implemented with novel components that are better able to learn selective and tolerant representations, is capable of accurate and robust image classification and improved alignment between the behaviour of the model and the perceptual abilities of humans. Firstly, the proposed models are shallow, fewer than ten layer-pairs, which is more consistent with the rapid feedforward object categorisation performed by the biological visual system. Secondly, they are far less prone to producing classification predictions with high confidence for samples from unknown classes or for image consisting of pure noise, and hence, like humans are not easily fooled into perceiving objects that are not present in the image. Thirdly, for the proposed NNs adversarial samples cause predictions with low confidence, enabling them to be accurately identified. In contrast to humans, our networks still do not correctly classify adversarial samples. However, the behaviour of our networks is a significant step towards human-like behaviour compared to standard DNNs that produce highly confident, but incorrect, classification predictions for adversarial samples. The increased robustness to adversarial and unknown samples is achieved while maintaining competitive performance in terms of generalisation to novel samples from the training categories. This enables models of this type to be competitive with state-of-the-art DNNs across multiple different evaluation metrics and benchmark tasks.
Figures & tables
| Integrat. | Pooling | Loss | Data-set | Network | Num. | Training | Clean | Corrupt | Advers. | Novel | Unrecog. | Mean Std | |
| Func. | Func. | Func. | Architecture | Params. | Time (s) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | ||
| our | ZINC | SCAM | HEM | MNIST | 2-5-20 | 44.0k | 56.45 | 94.94 | 69.30 | 89.26 | 94.01 | 99.73 | 89.45 (0.21) |
| std | CC | Max | CE | 2-5-160 | 44.2k | 54.02 | 94.96 | 69.92 | 1.36 | 83.50 | 80.91 | .84) | |
| our | ZINC | SCAM | HEM | FMNIST | 3-5-16 | 86.4k | 160.02 | 90.61 | 67.79 | 53.42 | 93.19 | 99.49 | 80.90 (0.54) |
| std | CC | Max | CE | 3-5-54 | 87.9k | 157.75 | 90.67 | 62.83 | 4.29 | 52.64 | 41.67 | .63) | |
| our | ZINC | SCAM | HEM | SVHN | 3-5-30 | 258k | 233.51 | 93.51 | 71.36 | 64.28 | 90.64 | 96.24 | 83.21 (0.61) |
| Integrat. | Pooling | Loss | Network | Num. | Time Per | Num. Int. | Clean | Corrupt | Advers. | Novel | Unrecog. | Mean | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Func. | Func. | Func. | Architecture | Params. | Epoch (s) | Layers | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | |
| our | ZINC | SCAM | HEM | 9-3-15-exp | 27.6M | 1429.1 | 75.8 | 72.7 | 78.2 | 44.2 | 67.7 | 67.70 | |
| CC/FC | Max | CE | AlexNet | 61.1M | 1288.2 | 67.3 | 62.4 | 15.5 | 38.0 | 55.0 | 47.66 | ||
| CC/FC | Max | CE | VGG11 | 133M | 1798.8 | 77.7 | 75.3 | 10.4 | 48.3 | 73.8 | 57.10 | ||
| CC/FC | Max | CE | VGG16 | 138M | 1604.0 | 79.3 | 76.5 | 10.5 | 51.2 | 67.3 | 56.96 | ||
| CC/FC | Strided | CE | ResNet18 | 11.7M | 1268.2 | 78.0 | 75.0 | 12.7 | 49.2 | 87.2 | 60.44 |
| Origin | Data-set | Network | Num. | Clean | Corrupt | Advers. | Novel | Unrecog. | Mean |
|---|---|---|---|---|---|---|---|---|---|
| Architecture | Params. | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | ||
| our | CIFAR10 | 5-3-225 | 11.1M | 92.87 | 86.36 | 90.41 | 78.09 | 98.02 | 89.15 |
| RobustBench | WideResNet18-2 | 268M | 94.16 | 86.63 | 40.76 | 71.32 | 68.59 | 72.29 | |
| corruptions | Diffenderfer et al. (2021) | ||||||||
| RobustBench | ResNet18 | 11.7M | 93.31 | 89.69 | 19.73 | 56.40 | 54.56 | 62.74 | |
| corruptions | Kireev et al. (2022) |
| clean | corrupt | adversarial | novel | unrecognisable | |
|---|---|---|---|---|---|
| our | |||||
| std |
| our | ||||
|---|---|---|---|---|
| std |
| clean | corrupt | adversarial | novel | unrecognisable | |
| Strong Augmentations + weak AT | |||||
|---|---|---|---|---|---|
| our | |||||
| std | |||||
| Strong Augmentations + strong AT | |||||
| our | |||||
| std | |||||
| Network used to create | Attacked Network | |
|---|---|---|
| adversarial samples | our (v1) | std (v1) |
| same as attacked network | 51.66 | 46.41 |
| our (v2) | 57.25 | 61.55 |
| std (v2) | 70.06 | 55.67 |
| Schedule | |||||||||
| Learning Rate | Optimiser | None | Multi-Step | One-Cycle | |||||
| our | std | our | std | our | std | ||||
| 0.001 | SGD | 68.51 | 80.70 | 66.50 | 80.93 | 55.94 | 73.62 | ||
| RMSprop | 89.61 | 85.53 | 90.60 | 86.99 | 91.19 | 82.76 | |||
| AdamW | 90.54 | 85.00 | 91.02 | 87.08 | 91.19 | 88.57 | |||
| Lion | 90.65 | 10.00 | 91.26 | 10.00 | 90.90 | 10.00 | |||
| ZINC | SCAM | HEM | Network | Num. | Clean | Corrupt | Advers. | Novel | Unrecog. | Mean Std | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Arch. | Params. | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | |||||
| our | 2 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | 91.50 | 80.26 | 69.85 | 66.32 | 92.25 | 80.04 (1.17) |
| 1 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | 91.34 | 80.23 | 66.64 | 65.07 | 83.14 | .48) | |
| 4 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | 91.43 | 80.66 | 67.92 | 68.39 | 89.03 | .48) | |
| 2 | 0.05 | 8 | 0.1 | 5-3-44 | 459k | 91.43 | 80.67 | 66.34 | 68.94 | 89.41 | .12) | |
| 2 | 0.2 | 8 | 0.1 | 5-3-44 | 459k | 91.45 | 79.99 | 70.32 | 63.79 | 73.19 | .07) | |
| Integrat. | Pooling | Loss | Network | Num. | Training | Clean | Corrupt | Advers. | Novel | Unrecog. | Mean Std | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Func. | Func. | Func. | Arch. | Params. | Time (s) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | DAR (%) | |
| our | ZINC | SCAM | HEM | 5-3-44 | 459k | 2209.3 | 91.50 | 80.26 | 69.85 | 66.32 | 92.25 | 80.04 (1.17) |
| CC | SCAM | HEM | 5-3-44 | 461k | 1964.7 | 85.93 | 77.86 | 24.54 | 41.85 | 32.52 | .39) | |
| ZINC | Max | HEM | 5-3-128 | 457k | 2013.1 | 90.57 | 79.49 | 7.74 | 60.67 | 78.01 | .80) | |
| ZINC | SCAM | CE | 5-3-44 | 459k | 2228.3 | 70.54 | 61.97 | 42.16 | 24.64 | 31.54 | .05) | |
| std | CC | Max | CE | 5-3-128 | 458k | 1890.5 | 89.49 | 77.47 | 5.01 | 47.25 | 34.59 | .57) |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Evaluation using DAR | Evaluation using traditional metrics |
| Table 1 | Table 9 |
| Table 2 | Table 10 |
| Table 3 | Table 11 |
| Table 6 | Table 13 |
| Table 7 | Table 14 |
| Integrat. | Pooling | Loss | Data-set | Network | Num. | Training | Clean | Corrupt | Advers. | OOD rejection | |
| Func. | Func. | Func. | Architecture | Params. | Time (s) | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | ||
| our | ZINC | SCAM | HEM | MNIST | 2-5-20 | 44.0k | 56.45 | 99.29 (0.01) | 93.79 (0.15) | 1.98 (0.15) | 99.17 (0.08) |
| std | CC | Max | CE | 2-5-160 | 44.2k | 54.02 | .07) | .66) | .00) | .47) | |
| our | ZINC | SCAM | HEM | FMNIST | 3-5-16 | 86.4k | 160.02 | 92.45 (0.16) | 62.42 (0.40) | .00) | 98.86 (0.24) |
| std | CC | Max | CE | 3-5-54 | 87.9k | 157.75 | .16) | .31) | .00) | .21) | |
| our | ZINC | SCAM | HEM | SVHN | 3-5-30 | 258k | 233.51 | 95.56 (0.25) | 69.93 (0.38) | 13.98 (0.25) | 97.83 (0.22) |
| Integrat. | Pooling | Loss | Network | Num. | Time Per | Num. Int. | Clean | Corrupt | Advers. | OOD rejection | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Func. | Func. | Func. | Architecture | Params. | Epoch (s) | Layers | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | |
| our | ZINC | SCAM | HEM | 9-3-15-exp | 27.6M | 1429.1 | 68.60 | 28.58 | 0.00 | 83.27 | |
| CC/FC | Max | CE | AlexNet | 61.1M | 1288.2 | 55.49 | 22.89 | 0.00 | 74.61 | ||
| CC/FC | Max | CE | VGG11 | 133M | 1798.8 | 69.72 | 28.34 | 0.00 | 82.06 | ||
| CC/FC | Max | CE | VGG16 | 138M | 1604.0 | 72.46 | 32.03 | 0.00 | 82.85 | ||
| CC/FC | Strided | CE | ResNet18 | 11.7M | 1268.2 | 69.33 | 32.36 | 0.00 | 84.94 |
| Origin | Data-set | Network | Num. | Clean | Corrupt | Advers. | OOD rejection |
|---|---|---|---|---|---|---|---|
| Architecture | Params. | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | ||
| our | CIFAR10 | 5-3-225 | 11.1M | 94.60 | 90.13 | 0.15 | 97.29 |
| RobustBench | WideResNet18-2 | 268M | 96.56 | 93.49 | 8.82 | 94.25 | |
| corruptions | Diffenderfer et al. (2021) | ||||||
| RobustBench | ResNet18 | 11.7M | 94.75 | 90.45 | 8.56 | 88.92 | |
| corruptions | Kireev et al. (2022) |
| Integrat. | Pooling | Loss | Network | Num. | AT | Clean | Corrupt | Advers. | OOD rejection | |
|---|---|---|---|---|---|---|---|---|---|---|
| Func. | Func. | Func. | Architecture | Params. | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | ||
| our | ZINC | SCAM | HEM | 5-3-225 | 11.1M | Weak | 94.60 | 90.13 | 0.15 | 97.29 |
| std | CC | Max | CE | 5-3-640 | 11.1M | 92.05 | 84.38 | 0.03 | 96.04 | |
| our | ZINC | SCAM | HEM | 5-3-225 | 11.1M | Strong | 80.70 | 73.30 | 51.66 | 85.48 |
| std | CC | Max | CE | 5-3-640 | 11.1M | 75.03 | 68.44 | 46.41 | 86.29 |
| ZINC | SCAM | HEM | Network | Num. | Clean | Corrupt | Advers. | OOD rejection | ||
|---|---|---|---|---|---|---|---|---|---|---|
| Architecture | Params. | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | |||||
| our | 2 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | .14) | .36) | .01) | .37) |
| 1 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | 92.54 (0.14) | .43) | .004) | .88) | |
| 4 | 0.1 | 8 | 0.1 | 5-3-44 | 459k | 92.54 (0.12) | 76.10 (0.62) | 0.08 (0.01) | .23) | |
| 2 | 0.05 | 8 | 0.1 | 5-3-44 | 459k | .13) | .31) | .002) | .59) | |
| 2 | 0.2 | 8 | 0.1 | 5-3-44 | 459k | .12) | .62) | .02) | .25) | |
| Integrat. | Pooling | Loss | Network | Num. | Training | Clean | Corrupt | Advers. | OOD rejection | |
|---|---|---|---|---|---|---|---|---|---|---|
| Func. | Func. | Func. | Architecture | Params. | Time (s) | Acc. (%) | Acc. (%) | Acc. (%) | AUROC (%) | |
| our | ZINC | SCAM | HEM | 5-3-44 | 459k | 2209.3 | 92.32 (0.14) | 75.05 (0.36) | .01) | 95.21 (0.37) |
| CC | SCAM | HEM | 5-3-44 | 461k | 1964.7 | .16) | .40) | .38) | .63) | |
| ZINC | Max | HEM | 5-3-128 | 457k | 2013.1 | .24) | .35) | .002) | .39) | |
| ZINC | SCAM | CE | 5-3-44 | 459k | 2228.3 | .68) | .60) | .01) | .59) | |
| std | CC | Max | CE | 5-3-128 | 458k | 1890.5 | .28) | .05) | .02) | .58) |
Neural Network Robustness
Neural network robustness studies how models withstand adversarial inputs, data shifts, noise, and hardware faults while maintaining reliable predictions.
See all 251 papers