| Literature DB >> 33286850 |
Ian Fischer1, Alexander A Alemi1.
Abstract
Intuitively, one way to make classifiers more robust to their input is to have them depend less sensitively on their input. The Information Bottleneck (IB) tries to learn compressed representations of input that are still predictive. Scaling up IB approaches to large scale image classification tasks has proved difficult. We demonstrate that the Conditional Entropy Bottleneck (CEB) can not only scale up to large scale image classification tasks, but can additionally improve model robustness. CEB is an easy strategy to implement and works in tandem with data augmentation procedures. We report results of a large scale adversarial robustness study on CIFAR-10, as well as the ImageNet-C Common Corruptions Benchmark, ImageNet-A, and PGD attacks.Entities:
Keywords: information bottleneck; information theory; machine learning
Year: 2020 PMID: 33286850 PMCID: PMC7597163 DOI: 10.3390/e22101081
Source DB: PubMed Journal: Entropy (Basel) ISSN: 1099-4300 Impact factor: 2.524
Figure 1Conditional Entropy Bottleneck (CEB) vs. test set accuracy, and L and L Projected Gradient Descent (PGD) adversarial attacks on CIFAR10. None of the CEB models is adversarially trained.
Figure 2Untargeted adversarial attacks on CIFAR10 models showing both strong robustness to PGD L and L attacks, as well as good test accuracy of up to 95.1%. (Left): Accuracy on untargeted L attacks at different values of for all 10,000 test set examples. (Right): Accuracy on untargeted L attacks at different values of . Note the switch to log scale on the x axis at L. indicates the Wide ResNet size. CEB indicates a CEB model trained at . Madry is the adversarially-trained model from Madry et al. [5] (values provided by Aleksander Madry). None of the CEB models is adversarially-trained.
Figure 3Summary of the ResNet50 ImageNet-C experiments. Lower is better in all cases. In the main part of the figure (in blue), the average errors across corruption magnitude are shown for 33 different networks for each of the labeled Common Corruptions, ImageNet-A, and targeted PGD attacks. The networks come in paired sets, with the vertical lines denoting the baseline XEnt network’s performance, and then in the corresponding color the errors for each of 10 different CEB networks are shown with varying , arranged from 10 at the top to 1 at the bottom. The light blue lines indicate ResNet50 models trained without AutoAug. The blue lines show the same network trained with AutoAug. The dark blue lines show ResNet50 AutoAug networks that were made twice as wide. For these models, we display cCEB rather than CEB, which gave qualitatively similar but slightly weaker performance. The figure separately shows the effects of data augmentation, enlarging the model, and the additive effect of CEB on each model. At the top in red are shown the same data for three summary statistics. clean denotes the clean top-1 errors of each of the networks. mCE denotes the AlexNet regularized average corruption errors. avg shows an equally-weighted average error across all common corruptions. The dots denote the value for each CEB network and each corruption at , the optimum for the network as measured in terms of clean error. The values at these dots and the baseline values are given in detail in Table 1. Figure 4 show the same data for the ResNet152 models.
Figure 4Replication of Figure 3 but for ResNet152. Lower is better in all cases. The light blue lines indicate ResNet152 models trained without AutoAug. The blue lines show the same network trained with AutoAug. The dark blue lines show ResNet152 AutoAug networks that were made twice as wide. As in Figure 3, we show the cCEB models for the largest network to reduce visual clutter. The deeper model shows marked improvement across the board compared to ResNet50, but the improvements due to CEB and cCEB are even more striking. Notice in particular the adversarial robustness to L and L PGD attacks for the CEB models over the XEnt baselines. The L baselines all have error rates above , so they are to the right edge of the figure. See Table 1 for details of the best-performing models, which correspond to the dots in this figure.
Baseline and cross-validated CEB values for the ImageNet experiments. cCEB uses the consistent classifier. XEnt is the baseline cross entropy objective. “-aa” indicates AutoAug is not used during training. “x2” indicates the ResNet architecture is twice as wide. The CEB values reported here are denoted with the dots in Figure 3 and Figure 4. Lower values are better in all cases, and the lowest value for each architecture is shown in bold. All values are percentages.
| Architecture | ResNet152x2 | ResNet152 | ResNet152-aa | ResNet50x2 | ResNet50 | ResNet50-aa | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
| 2 | 2 | NA | 3 | NA | 3 | NA | 4 | 3 | NA | 6 | NA | 4 | NA |
| Clean |
| 19.3 | 20.7 |
| 20.7 |
| 22.4 |
| 20.2 | 21.8 |
| 22.5 |
| 24.0 |
| mCE |
| 53.2 | 57.8 |
| 57.4 |
| 71.9 | 57.9 |
| 62.0 |
| 64.4 |
| 77.0 |
| Average CE |
| 41.8 | 45.5 |
| 45.2 |
| 56.8 | 45.6 |
| 48.9 |
| 50.8 |
| 60.9 |
| Gauss. Noise |
| 40.1 | 44.7 |
| 43.7 |
| 62.5 | 44.8 |
| 48.3 |
| 50.7 |
| 67.3 |
| Shot Noise |
| 40.3 | 45.0 |
| 43.8 |
| 63.7 | 44.5 |
| 48.4 |
| 50.7 |
| 68.8 |
| Impulse Noise |
| 43.6 | 50.5 |
| 46.6 |
| 66.8 | 48.7 |
| 53.1 |
| 54.8 |
| 72.7 |
| Defocus Blur | 49.6 |
| 54.5 |
| 52.1 |
| 58.3 | 54.4 |
| 57.3 |
| 58.8 |
| 62.7 |
| Glass Blur | 57.4 |
| 60.1 |
| 59.4 |
| 67.7 |
| 61.0 | 62.6 |
| 64.9 |
| 72.3 |
| Motion Blur |
| 51.4 | 55.0 |
| 57.8 |
| 59.7 | 57.0 |
| 59.5 |
| 62.3 |
| 68.1 |
| Zoom Blur |
| 54.7 | 57.3 |
| 57.9 |
| 59.8 | 58.6 |
| 61.3 |
| 64.8 |
| 63.7 |
| Snow |
|
| 51.9 |
| 51.8 |
| 64.2 | 51.4 |
| 55.9 |
| 58.8 |
| 68.7 |
| Frost |
| 43.9 | 46.3 |
| 47.2 |
| 57.6 |
|
| 50.7 |
| 52.7 |
| 61.7 |
| Fog |
|
| 31.4 |
| 31.5 |
| 43.3 | 30.6 |
| 33.9 |
| 34.8 |
| 47.0 |
| Brightness |
| 22.6 | 24.5 |
| 24.4 |
| 30.8 |
| 24.1 | 26.3 |
| 26.8 |
| 33.4 |
| Contrast | 38.0 |
| 39.5 | 40.0 |
|
| 58.7 |
| 42.4 | 44.9 |
| 47.6 |
| 62.8 |
| Elastic Trans. |
| 45.3 | 46.6 |
| 47.8 |
| 51.4 | 49.0 |
| 52.4 |
| 53.7 |
| 56.0 |
| Pixelate | 36.0 |
| 40.5 |
| 38.8 |
| 64.9 |
| 37.9 | 41.1 |
| 42.8 |
| 64.6 |
| JPEG Comp. | 31.9 |
| 34.9 |
| 34.5 |
| 43.0 |
| 35.1 | 37.4 |
| 37.9 |
| 43.5 |
| ImageNet-A |
| 82.0 | 84.6 |
| 87.1 |
| 93.4 |
| 88.1 | 89.8 |
| 94.2 |
| 96.8 |
| PGD L | 68.5 |
| 99.1 |
| 99.2 |
| 99.4 | 86.6 |
| 99.8 |
| 99.7 |
| 99.7 |
| PGD L | 79.7 |
| 99.3 |
| 99.4 |
| 99.4 | 95.1 |
| 99.4 |
| 99.4 |
| 99.5 |
Figure 5Comparison of accuracy and Expected Calibration Error (ECE) between Xent baseline models and corresponding CEB models at the value of that gives the closest accuracy to the XEnt baseline. Higher is better for accuracy; lower is better for ECE. The box plots show the minimum, 25th percentile, mean, 75th percentile, and maximum values across the 15 different ImageNet-C corruptions for the given shift intensity. XEnt baseline models are always the lighter color, with the corresponding CEB model having the darker color.
Modifications to the model.py file.
| |
|
|
| inputs = tf.reshape( |
| inputs, [−1, 2048 if block_fn |
|
|
| |
| |
Modification to the head of resnet_main.py.
|
|
|
|
| tfd = tfp.distributions |
|
|
| dist = tfd.MultivariateNormalDiag(loc = x) |
| |
|
|
| y_onehot = tf.one_hot(y, num_classes) |
| mus =| tf.layers.dense(y_onehot, z_dims, activation = |
| dist = tfd.MultivariateNormalDiag(loc = mus) |
| |
|
|
| |
| |
| |
| logits = tf.layers.dense( |
| z, num_classes, activation = |
| kernel_initializer=tf.random_normal_initializer(stddev = 0.01)) |
| |
|
|
| interp = (tf.cast(global_step - start_step, tf.float32) |
| / tf.cast(end_step - start_step, tf.float32)) |
| interp = tf.maximum(0.0, tf.minimum(1.0, interp)) |
| |
Modifications to resnet_model_fn in resnet_main.py.
|
|
| |
| |
| |
| |
| |
| |
| |
| net = build_network() |
| net = tf.cast(net, tf.float32) |
| |
| net = build_network() |
| |
| |
| ezx = ezx_dist(net) |
| |
| |
| bzy = bzy_dist(labels) |
| |
| |
| |
| z = ezx.sample() |
| |
| z = ezx.mean() |
| |
| |
| cyz = cyz_dist(z, params) |
| |
| logits = cyz.logits |
| |
| hzx = −ezx.log_prob(z) |
| hzy = −bzy.log_prob(z) |
| hyz = −cyz.log_prob(labels) |
| |
|
|
| rex = −hzx + hzy |
| rho = 3.0 |
| rho_to_gamma = |
| gamma = tf.cast(rho_to_gamma(rho), tf.float32) |
| |
| global_step = tf.train.get_global_step() |
| anneal_rho = 12,000 |
| |
| |
| |
| gamma = lerp(global_step, 0, aneal_rho, |
| rho_to_gamma(100.0), gamma) |
| |
| loss = tf.reduce_mean(gamma ∗ rex + hyz) |
| |