Title: EXCESSIVE INVARIANCE CAUSES ADVERSARIAL VULNERABILITY

Abstract: Despite their impressive performance, deep neural networks exhibit striking failures on out-of-distribution inputs. One core idea of adversarial example research is to reveal neural network errors under such distribution shifts. We decompose these errors into two complementary sources: sensitivity and invariance. We show deep networks are not only too sensitive to task-irrelevant changes of their input, as is well-known from -adversarial examples, but are also too invariant to a wide range of task-relevant changes, thus making vast regions in input space vulnerable to adversarial attacks. We show such excessive invariance occurs across various tasks and architecture types. On MNIST and ImageNet one can manipulate the class-specific content of almost any image without changing the hidden activations. We identify an insufficiency of the standard cross-entropy loss as a reason for these failures. Further, we extend this objective based on an informationtheoretic analysis so it encourages the model to consider all task-dependent features in its decision. This provides the first approach tailored explicitly to overcome excessive invariance and resulting vulnerabilities.

1. INTRODUCTION:

Figure 1 : All images shown cause a competitive ImageNet-trained network to output the exact same probabilities over all 1000 classes (logits shown above each image). The leftmost image is from the ImageNet validation set; all other images are constructed such that they match the non-class related information of images taken from other classes (for details see section 2.1). The excessive invariance revealed by this set of adversarial examples demonstrates that the logits contain only a small fraction of the information perceptually relevant to humans for discrimination between the classes.

Adversarial vulnerability is one of the most iconic failure cases of modern machine learning models (Szegedy et al., 2013) and a prime example of their weakness in out-of-distribution generalization. It is particularly striking that under i.i.d. settings deep networks show superhuman performance on many tasks (LeCun et al., 2015) , while tiny targeted shifts of the input distribution can cause them to make unintuitive mistakes. The reason for these failures and how they may be avoided or at least mitigated is an active research area (Schmidt et al., 2018; Gilmer et al., 2018b; Bubeck et al., 2018) .

So far, the study of adversarial examples has mostly been concerned with the setting of small perturbation, or -adversaries (Goodfellow et al., 2015; Madry et al., 2017; Raghunathan et al., 2018) .

Perturbation-based adversarial examples are appealing because they allow to quantitatively measure notions of adversarial robustness (Brendel et al., 2018) . However, recent work argued that the perturbation-based approach is unrealistically restrictive and called for the need of generalizing the concept of adversarial examples to the unrestricted case, including any input crafted to be misinterpreted by the learned model (Song et al., 2018; Brown et al., 2018) . Yet, settings beyond -robustness are hard to formalize (Gilmer et al., 2018a) .

We argue here for an alternative, complementary viewpoint on the problem of adversarial examples. Instead of focusing on transformations erroneously crossing the decision-boundary of classifiers, we focus on excessive invariance as a major cause for adversarial vulnerability. To this end, we introduce the concept of invariance-based adversarial examples and show that class-specific content of almost any input can be changed arbitrarily without changing activations of the network, as illustrated in figure 1 for ImageNet. This viewpoint opens up new directions to analyze and control crucial aspects underlying vulnerability to unrestricted adversarial examples.

The invariance perspective suggests that adversarial vulnerability is a consequence of narrow learning, yielding classifiers that rely only on few highly predictive features in their decisions. This has also been supported by the observation that deep networks strongly rely on spectral statistical regularities (Jo & Bengio, 2017) , or stationary statistics (Gatys et al., 2017) to make their decisions, rather than more abstract features like shape and appearance. We hypothesize that a major reason for this excessive invariance can be understood from an information-theoretic viewpoint of crossentropy, which maximizes a bound on the mutual information between labels and representation, giving no incentive to explain all class-dependent aspects of the input. This may be desirable in some cases, but to achieve truly general understanding of a scene or an object, machine learning models have to learn to successfully separate essence from nuisance and subsequently generalize even under shifted input distributions.

Our contributions::

• We identify excessive invariance underlying striking failures in deep networks and formalize the connection to adversarial examples.

• We show invariance-based adversarial examples can be observed across various tasks and types of deep network architectures.

• We propose an invertible network architecture that gives explicit access to its decision space, enabling class-specific manipulations to images while leaving all dimensions of the representation seen by the final classifier invariant.

• From an information-theoretic viewpoint, we identify the cross-entropy objective as a major reason for the observed failures. Leveraging invertible networks, we propose an alternative objective that provably reduces excessive invariance and works well in practice.

2. TWO COMPLEMENTARY APPROACHES TO ADVERSARIAL EXAMPLES:

In this section, we define pre-images and establish a link to adversarial examples.

Definition 1 (Pre-images / Invariance). Let F : R d → R C be a neural network, F = f L • • • • • f 1

with layers f i and let F i denote the network up to layer i. Further, let D : R d → {1, . . . , C} be a classifier with D = arg max k=1,...,C sof tmax(F (x)) k . Then, for input x ∈ R d , we define the following pre-images

(i) i-th Layer pre-image: {x * ∈ R d | F i (x * ) = F i (x)} (ii) Logit pre-image: {x * ∈ R d | F (x * ) = F (x)} (iii) Argmax pre-image: {x * ∈ R d | D(x * ) = D(x)},

where (i) ⊂ (ii) ⊂ (iii) by the compositional nature of D. Moreover, the (sub-)network is invariant to perturbations ∆x which satisfy x * = x + ∆x.

→ Invariance-based: Non-trivial pre-images (pre-images containing more elements than input x) after the i-th layer occur if the chain

F (x) = F (x) y = ỹ (1) → Perturbation-based: F (x) = F (x) y = ỹ (2)

f i • • • • • f 1 is not injective,

for instance due to subsampling or non-injective activation functions like ReLU (Behrmann et al., 2018a) . This accumulated invariance can become problematic if not controlled properly, as we will show in the following.

We Further, -bounded adversarial ex. x * of x fulfill x -x * < , • a norm on R d and > 0.

Usually, such examples are constructed as -bounded adversarial examples (Goodfellow et al., 2015) . However, as our goal is to characterize general invariances of the network, we do not restrict ourselves to bounded perturbations. Definition 3 (Invariance-based Adversarial Examples). Let G denote the i-th layer, logits or the classifier (Definition 1) and let x * = x be in the G pre-image of x and and o an oracle (Definition 2). Then, an invariance-based adversarial example fulfills o(x) = o(x * ), while G(x) = G(x * ) (and hence D(x) = D(x * )).

Intuitively, adversarial perturbations cause the output of the classifier to change while the oracle would still consider the new input x * as being from the original class. Hence in the context ofbounded perturbations, the classifier is too sensitive to task-irrelevant changes. On the other hand, movements in the pre-image leave the classifier invariant. If those movements induce a change in class as judged by the oracle, we call these invariance-based adversarial examples. In this case, however, the classifier is too insensitive to task-relevant changes. In conclusion, these two modes are complementary to each other, whereas both constitute failure modes of the learned classifier.

When not restricting to -perturbations, perturbation-based and invariance-based adversarial examples yield the same input x * via

EQUATION

with different reference points x 1 and x 2 , see Figure 2 . Hence, the key difference is the change of reference, which allows us to approach these failure modes from different directions. To connect these failure modes with an intuitive understanding of variations in the data, we now introduce the notion of invariance to nuisance and semantic variations, see also (Achille & Soatto, 2018) . For example, such a nuisance perturbation could be a translation or occlusion in image classification. Further in Appendix A, we discuss the synthetic example called Adversarial Spheres from (Gilmer et al., 2018b) , where nuisance and semantics can be explicitly formalized as rotation and norm scaling.

2 Bijective classifiers with simplified readout.

We build deep networks that give access to their decision space by removing the final linear mapping onto the class probes in invertible RevNet-classifiers and call these networks fully invertible RevNets. The fully invertible RevNet classifier can be written as D θ = arg max k=1,...,C sof tmax(F θ (x) k ), where F θ represents the bijective network. We denote z = F θ (x), z s = z 1,...,C as the logits (semantic variables) and z n = z C+1,...,d as the nuisance variables (z n is not used for classification). In practice we choose the first C indices of the final z tensor or apply a more sophiscticated DCT scheme (see appendix D) to set the subspace z s , but other choices work as well. The architecture of the network is similar to iRevNets (Jacobsen et al., 2018) with some additional Glow components like actnorm (Kingma & Dhariwal, 2018) , squeezing, dimension splitting and affine block structure (Dinh et al., 2017) , see Figure 3 for a graphical description. As all components are common in the bijective network literature, we refer the reader to Appendix D for exact training and architecture details. Due to its simple readout structure, the resulting invertible network allows to qualitatively and quantitatively investigate the task-specific content in nuisance and logit variables. Despite this restriction, we achieve performance on par with commonly-used baselines on MNIST and ImageNet, see Table 1 and  (Simonyan & Zisserman, 2014) and two ResNet (He et al., 2016) variants, as well as an iRevNet (Jacobsen et al., 2018) with a non-invertible final projection onto the logits. Our proposed fully invertible RevNet performs roughly on par with others.

Analytic attack. To analyze the trained models, we can sample elements from the logit pre-image by computing x met = F -1 (z s , zn ), where z s and zn are taken from two different inputs. We term this heuristic metameric sampling. The samples would be from the true data distribution if the subspaces would be factorized as P (z s , z n ) = P (z s )P (z n ). Experimentally we find that logit metamers are revealing adversarial subspaces and are visually close to natural images on ImageNet. Thus, metameric sampling gives us an analytic tool to inspect dependencies between semantic and nuisance variables without the need for expensive and approximate optimization procedures.

Attack on adversarial spheres. First, we evaluate our analytic attack on the synthetic spheres dataset, where the task is to classify samples as belonging to one out of two spheres with different radii. We choose the sphere dimensionality to be d = 100 and the radii: Here, it is possible to move any point from the inner sphere to the outer sphere without changing the classifiers predictions. However, this is not possible for the classifier trained on z n . Most notably, the visualized failure is not due to a lack of data seen during training, but rather due to excessive invariance of the original classifier D on z s . Thus, the nuisance classifier on z n does not exhibit the same adversarial vulnerability in its subspace. Attack on MNIST and ImageNet. After validating its potential to uncover adversarial subspaces, we apply metameric sampling to fully invertible RevNets trained on MNIST and Imagenet, see Figure 5 . The result is striking, as the nuisance variables z n are dominating the visual appearance of the logit metamers, making it possible to attach any semantic content to any logit activation pattern. Note that the entire 1000-dimensional feature vector containing probabilities over all ImageNet classses remains unchanged by any of the transformations we apply. To show our findings are not a particular property of bijective networks, we attack an ImageNet trained ResNet152 with a gradientbased version of our metameric attack, also known as feature adversaries (Sabour et al., 2016) . The attack minimizes the mean squared error between a given set of logits from one image to another image (see appendix B for details). The attack shows the same failures for non-bijective models. This result highlights the general relevance of our finding and poses the question of the origin of this excessive invariance, which we will analyze in the following section.

3. OVERCOMING INSUFFICIENCY OF CROSSENTROPY-BASED INFORMATION-MAXIMIZATION:

In this section we identify why the cross-entropy objective does not necessarily encourage to explain all task-dependent variations of the data and propose a way to fix this. As shown in figure 4 , the nuisance classifier on z n uses task-relevant information not captured by the logit classifier D θ on z s (evident by its superior performance in the adversarial subspace).

We leverage the simple readout-structure of our invertible network and turn this observation into a formal explanation framework using information theory: Let (x, y) ∼ D with labels y ∈ {0, 1} C . Then the goal of a classifier can be stated as maximizing the mutual information (Cover & Thomas, 2006) between semantic features z s (logits) extracted by network F θ and labels y, denoted by I(y; z s ).

Adversarial distribution shift. As the previously discussed failures required to modify input data from distribution D, we introduce the concept of an adversarial distribution shift D Adv = D to formalize these modifications. Our first assumptions for D Adv is

I D Adv (z n ; y) ≤ I D (z n ; y).

Intuitively, the nuisance variables z n of our network do not become more informative about y. Thus, the distribution shift may reduce the predictiveness of features encoded in z s , but does not introduce or increase the predictive value of variations captured in z n . Second, we assume I D Adv (y; z s |z n ) ≤ I D Adv (y; z s ), which corresponds to positive or zero interaction information, see e.g. (Ghassami & Kiyavash, 2017) . While the information in z s and z n can be redundant in this assumption, synergetic effects where conditioning on z n increase the mutual information between y and z s are excluded.

Bijective networks F θ capture all variations by design which translates to information preservation I(y; x) = I(y; F θ (x)), see (Kraskov et al., 2004) . Consider the reformulation

EQUATION

by the chain rule of mutual information (Cover & Thomas, 2006) , where I(y; z n |z s ) denotes the conditional mutual information. Most strikingly, equation 5 offers two ways forward:

1. Direct increase of I(y; z s )

2. Indirect increase of I(y; z s |z n ) via decreasing I(y; z n ).

Usually in a classification task, only I(y; z s ) is increased actively via training a classifier. While this approach is sufficient in most cases, expressed via high accuracies on training and test data, it may fail under D Adv . This highlights why cross-entropy training may not be sufficient to overcome excessive semantic invariance. However, by leveraging the bijection F θ we can minimize the unused information I(y; z n ) using the intuition of a nuisance classifier.

Definition 5 (Independence cross-entropy loss). Let F θ : R d → R d a bijective network with parameters θ ∈ R p1 and Fθ (x) = sof tmax(F θ (x) 1,...,C ). Furthermore, let D θnc : R d-C → [0, 1] C be the nuisance classifier with θ nc ∈ R p2 . Then, the independence cross-entropy loss is defined as:

min θ max θnc L iCE (θ, θ nc ) = C i=1 -y i log F zs θ (x) i =:L sCE (θ) + C i=1 y i log D θnc (F zn θ (x)) i =:L nCE (θ,θnc)

.

The underlying principles of the nuisance classification loss L nCE can be understood using a variational lower bound on mutual information from Barber & Agakov (2003) . In summary, the minimization is with respect to a lower bound on I D (y; z n ), while the maximization aims to tighten the bound (see Lemma 10 in Appendix C). By using these results, we now state the main result under the assumed distribution shift and successful minimization (proof in Appendix C. Thus, incorporating the nuisance classifier allows for the discussed indirect increase of I D Adv (y; z s ) under an adversarial distribution shift, visualized in Figure 6 .

To aid stability and further encourage factorization of z s and z n in practice, we add a maximum likelihood term to our independence cross-entropy objective as

EQUATION

where det(J x θ ) denotes the determinant of the Jacobian of F θ (x) and p k ∼ N (β k , γ k ) with β k , γ k learned parameter. The log-determinant can be computed exactly in our model with negligible additional cost. Note, that optimizing L M LEn on the nuisance variables together with L sCE amounts to maximum-likelihood under a factorial prior (see Lemma 11 in Appendix C).

Just as in GANs the quality of the result relies on a tight bound provided by the nuisance classifier and convergence of the MLE term. Thus, it is important to analyze the success of the objective after training. We do this by applying our metameric sampling attack, but there are also other ways like evaluating a more powerful nuisance classifier after training.

4. APPLYING INDEPENDENCE CROSS-ENTROPY:

In this section, we show that our proposed independence cross-entropy loss is effective in reducing invariance-based vulnerability in practice by comparing it to vanilla cross-entropy training in four aspects: (1) error on train and test set, (2) effect under distribution shift, perturbing nuisances via metameric sampling, (3) evaluate accuracy of a classifier on the nuisance variables to quantify the class-specific information in them and (4) on our newly introduced shiftMNIST, an augmented version of MNIST to benchmark adversarial distribution shifts according to Theorem 6.

For all experiments we use the same network architecture and settings, the only difference being the two additional loss terms as explained in Definition 5 and equation 6. In terms of test error of the logit classifier, both losses perform approximately on par, whereas the gap between train and test error vanishes for our proposed loss function, indicating less overfitting. For classification errors see Table 2 in appendix D.

Robustness under metameric sampling attack.:

To analyze if our proposed loss indeed leads to independence between z n and labels y, we attack it with our metameric sampling procedure. As we are only looking on data samples and not on samples from the model (factorized gaussian on nuisances), this attack should reveal if the network learned to trick the objective. In Figure 7 we show interpolations between original images and logit metamers in CE-and iCE-trained fully invertible RevNets. In particular, we are holding the activations z s constant, while linearly interpolating nuisances z n down the column. The CE-trained network allows us to transform any image into any class without changing the logits. However, when training with our proposed iCE, the picture changes fundamentally and interpolations in the pre-image only change the style of a digit, but not its semantic content. This shows our loss has the ability to overcome excessive task-related invariance and encourages the model to explain and separate all task-related variability of the input from the nuisances of the task. A classifier trained on the nuisance variables of the cross-entropy trained model performs even better than the logit classifier. Yet, a classifier on the nuisances of the independence cross-entropy trained model is performing poorly (Table 2 in appendix D). This indicates little class-specific information in the nuisances z n , as intended by our objective function. Note also that this inability of the nuisance classifier to decode class-specific information is not due to it being hard to read out from z n , as this would be revealed by the metameric sampling attack (see Figure 7 ). shiftMNIST: Benchmarking adversarial distribution shift. To further test the efficacy of our proposed independence cross-entropy, we introduce a simple, but challenging new dataset termed shiftMNIST to test classifiers under adversarial distribution shifts D Adv . The dataset is based on vanilla MNIST, augmented by introducing additional, highly predictive features at train time that are randomized or removed at test time. Randomization or removal ensures that there are no synergy effects between digits and planted features under D Adv . This setup allows us to reduce mutual information between category and the newly introduced feature in a targeted manner. (a) Binary shiftMNIST is vanilla MNIST augmented by coding the category for each digit into a single binary pixel scheme. The location of the binary pixel reveals the category of each image unambigiously, while only minimally altering the image's appearance.

At test time, the binary code is not present and the network can not rely on it anymore. (b) Textured shiftMNIST introduces textured backgrounds for each digit category which are patches sampled from the describable texture dataset (Cimpoi et al., 2014) .

At train time the same type of texture is underlayed each digit of the same category, while texture types across categories differ. At test time, the relationship is broken and texture backgrounds are paired with digits randomly, again minimizing the mutual information between background and label in a targeted manner. See Figure 8 for examples1 .

It turns out that this task is indeed very hard for standard classifiers and their tendency to become excessively invariant to semantically meaningful features, as predicted by our theoretical analysis. When trained with cross-entropy, ResNets and fi-RevNets make zero errors on the train set, while having error rates of up to 87% on the shifted test set. This is striking, given that e.g. in binary shiftMNIST, only one single pixel is removed under D Adv , leaving the whole image almost unchanged. When applying our independence cross-entropy, the picture changes again. The errors made by the network improve by up to almost 38% on binary shiftMNIST and around 28% on textured shiftMNIST. This highlights the effectiveness of our proposed loss function and its ability to minimize catastrophic failure under severe distribution shifts exploiting excessive invariance.

5. RELATED WORK:

Adversarial examples. Adversarial examples often include -norm restrictions (Szegedy et al., 2013) , while (Gilmer et al., 2018a) argue for a broader definition to fully capture the implications for security. The -adversarial examples have also been extended to -feature adversaries (Sabour et al., 2016) , which are equivalent to our approximate metameric sampling attack. Some works (Song et al., 2018; Fawzi et al., 2018 ) consider unrestricted adversarial examples, which are closely related to invariance-based adversarial vulnerability. The difference to human perception revealed by adversarial examples fundamentally questions which statistics deep networks use to base their decisions (Jo & Bengio, 2017; Tsipras et al., 2019) .

Relationship between standard and bijective networks. We leverage recent advances in reversible (Gomez et al., 2017) and bijective networks (Jacobsen et al., 2018; Ardizzone et al., 2019; Kingma & Dhariwal, 2018) for our analysis. It has been shown that ResNets and iRevNets behave similarly on various levels of their representation on challenging tasks (Jacobsen et al., 2018) and that iRevNets as well as Glow-type networks are related to ResNets by the choice of dimension splitting applied in their residual blocks (Grathwohl et al., 2019) . Perhaps unsurprisingly, given so many similarities, ResNets themselves have been shown to be provably bijective under mild conditions (Behrmann et al., 2018b) . Further, excessive invariance of the type we discuss here has been shown to occur in non residual-type architectures as well (Gilmer et al., 2018b; Behrmann et al., 2018a) . For instance, it has been observed that up to 60% of semantically meaningful input dimensions on the adversarial spheres problem are learned to be ignored, while retaining virtually perfect performance (Gilmer et al., 2018b) . In summary, there is ample evidence that RevNet-type networks are closely related to ResNets, while providing a principled framework to study widely observed issues related to excessive invariance in deep learning in general and adversarial robustness in particular.

Information theory. The information-theoretic view has gained recent interest in machine learning due to the information bottleneck (Tishby & Zaslavsky, 2015; Shwartz-Ziv & Tishby, 2017; Alemi et al., 2017) and usage in generative modelling (Chen et al., 2016; Hjelm et al., 2019) . As a consequence, the estimation of mutual information (Barber & Agakov, 2003; Alemi et al., 2018; Achille & Soatto, 2018; Belghazi et al., 2018) has attracted growing attention. The concept of group-wise independence between latent variables goes back to classical independent subspace analysis (Hyvärinen & Hoyer, 2000) and received attention in learning unbiased representations, e.g. see the Fair Variational Autoencoder (Louizos et al., 2015) . Furthermore, extended cross-entropy losses via entropy terms (Pereyra et al., 2017) or minimizing predictability of variables (Schmidhuber, 1991) has been introduced for other applications. Our proposed loss also shows similarity to the GAN loss (Goodfellow et al., 2014) . However, in our case there is no notion of real or fake samples, but exploring similarities in the optimization are a promising avenue for future work.

6. CONCLUSION:

Failures of deep networks under distribution shift and their difficulty in out-of-distribution generalization are prime examples of the limitations in current machine learning models. The field of adversarial example research aims to close this gap from a robustness point of view. While a lot of work has studied -adversarial examples, recent trends extend the efforts towards the unrestricted case. However, adversarial examples with no restriction are hard to formalize beyond testing error. We introduce a reverse view on the problem to: (1) show that a major cause for adversarial vulnerability is excessive invariance to semantically meaningful variations, (2) demonstrate that this issue persists across tasks and architectures; and (3) make the control of invariance tractable via fully-invertible networks.

In summary, we demonstrated how a bijective network architecture enables us to identify large adversarial subspaces on multiple datasets like the adversarial spheres, MNIST and ImageNet. Afterwards, we formalized the distribution shifts causing such undesirable behavior via information theory. Using this framework, we find one of the major reasons is the insufficiency of the vanilla cross-entropy loss to learn semantic representations that capture all task-dependent variations in the input. We extend the loss function by components that explicitly encourage a split between semantically meaningful and nuisance features. 

(z n ) = p(y|z n ), it holds I θ * nc (y; z n ) = I D (y; z n ).

Proof. To proof above result, we need to draw the connection to the variational lower bound on mutual information from Lemma 9. Let the nuisance classifier D θnc (z n ) model the variational posterior q θnc (y|z n ). Then we have the lower bound

EQUATION

From Lemma 9 follows, that if D θnc (z n ) = p(y|z n ), it holds I(y; z n ) = I θnc (y; z n ). Hence, the nuisance classifier needs to model the conditional density perfectly.

Estimating this bound via Monte Carlo simulation requires sampling from the conditional density p(y|z n ). Following (Alemi et al., 2017) , we have the Markov property y ↔ x ↔ z n as labels y interact with inputs x and representation z n interacts with inputs x. Hence,

p(y|z n )p(z n ) = p(y, z n ) = X p(x, y, z n )dx = X p(z n |x, y)p(y|x)p(x)dx = X p(z n |x)p(y|x)p(x)dx = E x [p(z n |x)p(y|x)].

Including above and assuming F θ (x) = z n to be a deterministic function, we have

E zn E y|zn log D θnc (z n ) = E x E y|x E zn|x log D θnc (z n ) = E x E y|x log D θnc (z n ).

Lemma 11 (Effect of MLE-term). Define semantics as z s = F θ (x) 1,...,C and nuisances as z n = F θ (x) C+1,...,d , where (x, y) ∼ D. Then, the MLE-term in equation 6 together with cross-entropy on the semantics

θ * = arg min θ L sCE (θ) + L M LEn (θ)

minimizes the mutual information I(z s ; z n ).

Proof. Let zs = sof tmax(z s ). Then minimizing the loss terms L sCE and L M LEn is a maximum likelihood estimation under the factorial prior

EQUATION

)

where Cat is a categorical distribution. As sof tmax is shift-invariant, sof tmax(x + c) = sof tmax(x), above factorial prior for zs and z n yields independence between logits z s and z n up to a constant c. Finally note, the log term and summation in L M LEn and L CE is re-formulation for computational ease but does not change its minimizer as the logarithm is monotone.

C.1 PROOF OF THEOREM 6:

From the assumptions follows I D Adv (y; z n ) = 0. Furthermore, we have the assumption

I D Adv (y; z s |z n ) ≤ I D Adv (z s ; y),

excluding synergetic effects in the interaction information (Ghassami & Kiyavash, 2017) . By information preservation under homeomorphisms (Kraskov et al., 2004) and the chain rule of mutual information (Cover & Thomas, 2006) , we have I D Adv (y; x) = I D Adv (y; z s , z n ) = I D Adv (y; z n ) + I D Adv (y; z s |z n ) ≤ I D Adv (y; z s ). As z s = F (x) 1,...,C is obtained by the deterministic transform F , by the data processing inequality (Cover & Thomas, 2006) we have the inequality I D Adv (y; x) ≥ I D Adv (y; z s ). Thus, the claimed equality must hold.

C.2 MUTUAL INFORMATION BOUNDED:

Remark 12. Since our goal is to maximize the mutual information I(y; z s ) while minimizing I(y; z n ), we need to ensure that this objective is well defined as mutual information can be unbounded from above for continuous random variables. However, due to the data processing inequality (Cover & Thomas, 2006) we have I(y; z n ) = I(y; F θ (x)) ≤ I(y; x). Hence, we have a fixed upper bound given by our data (x, y). Compared to (Belghazi et al., 2018) there is thus no need for gradient clipping or a switch to the bounded Jensen-Shannon divergence as in (Hjelm et al., 2019) is not necessary.

D TRAINING AND ARCHITECTURAL DETAILS:

All experiments were based on a fully invertible RevNet model with different hyperparameters for each dataset. For the spheres experiment we used Pytorch (Paszke et al., 2017) and for MNIST, as well as Imagenet Tensorflow (Abadi et al., 2016) .

D.1 SPHERES EXPERIMENTS:

The network is a fully connected fully invertible RevNet. It has 4 RevNet-type ReLU bottleneck blocks with additive couplings and uses no batchnorm. We train it via cross-entropy and use the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.0001 and otherwise default Pytorch settings. The nuisance classifier is a 3 layer ReLU network with 1000 hidden units per layer.

We choose the spheres to be 100-dimensional, with R 1 = 1 and R 2 = 10, train on 500k samples for 10 epochs and then validate on another 100k holdout set. We achieve 100% train and validation accuracy for logit and nuisance classifier.

D.2 MNIST EXPERIMENTS:

We use a convolutional fully invertible RevNet with additional actnorm and invertible 1x1 convolutions between each layer as introduced in Kingma & Dhariwal (2018). The network has 3 stages, after which half of the variables are factored out and an invertible downsampling, or squeezing (Dinh et al., 2017; Jacobsen et al., 2018) is applied. The network has 16 RevNet blocks with batch norm per stage and 128 filters per layer. We also dequantize the inputs as is typically done in flow-based generative models.

The network is trained via Adamax (Kingma & Ba, 2014) with a base learning rate of 0.001 for 100 epochs and we multiply the it with a factor of 0.2 every 30 epochs and use a batch size of 64 and l2 weight decay of 1e-4. For training we compare vanilla cross-entropy training with our proposed independence cross-entropy loss. To have a more balanced loss signal, we normalize L nCE by the number of input dimensions it receives for the maximization step. The nuisance classifier is a fullyconnected 3 layer ReLU network with 512 units. As data-augmentation we use random shifts of 3 pixels. For classification errors of the different architectures we compare, see Table 2 .

D.3 IMAGENET EXPERIMENTS:

We use a convolutional fully invertible RevNet with 4 stages, 4 RevNet blocks per stage and invertible downsampling after each stage, as well as two invertible downsamplings on the input of the

:

Link to code and dataset: https://github.com/jhjacobsen/fully-invertible-revnet

Figures and Tables:

Figure 2: Connection between (1) invariance-based (long pink arrow) and (2) perturbation-based adversarial examples (short orange arrow). Class distributions are shown in green and blue; dashed line is the decision-boundary of a classifier. All adversarial examples can be reached either by crossing the decision-boundary of the classifier via perturbations, or by moving within the pre-image of the classifier to mis-classified regions. The two viewpoints are complementary to one another and highlight that adversarial vulnerability is not only caused by excessive sensitivity to semantically meaningless perturbations, but also by excessive insensitivity to semantically meaningful transformations.

define perturbation-based adversarial examples by introducing the notion of an oracle (e.g., a human decision-maker or the unknown input-output function considered in learning theory): Definition 2 (Perturbation-based Adversarial Examples). A Perturbation-based adversarial example x * ∈ R d of x ∈ R d fulfills: (i) Perturbation of decision: D(x * ) = o(x * ) and D(x) = D(x * ), where D : R d → {1, . . . , C} is the classifier and o : R d → {1, . . . , C} is the oracle.

ii) Created by adversary: x * ∈ R d is created by an algorithm A : R d → R d with x → x * .

Semantic/ Nuisance perturbation of an input). Let o be an oracle (Definition 2) and x ∈ R d . Then, a perturbation ∆x of an input x ∈ R d is called semantic, if o(x) = o(x + ∆x) and nuisance if o(x) = o(x + ∆x).

Figure 4: Left: Decision-boundaries in 2D subspace spanned by two random data points x 1 , x 2 . Right: Decision-boundaries in 2D subspace spanned by random datapoint x and metamer x met .

R 1 = 1, R 2 = 10. By training a fully-connected fully invertible RevNet, we obtain 100% accuracy. After training we visualize the decision-boundaries of the original classifier D and a posthoc trained classifier on z n (nuisance classifier), see Figure 4. We densely sample points in a 2D subspace, following Gilmer et al. (2018b), to visualize two cases: 1) the decision-boundary on a 2D plane spanned by two randomly chosen data points, 2) the decision-boundary spanned by metameric sample x met and reference point x. In the metameric sample subspace we identify excessive invariance of the classifier.

Figure 5: Each column shows three images belonging together. Top row are source images from which we sample the logits, middle row are logit metamers and bottom row images from which we sample the nuisances. Top row and middle row have the same (approximately for ResNets, exactly for fully invertible RevNets) logit activations. Thus, it is possible to change the image content completely without changing the 10-and 1000-dimensional logit vectors respectively. This highlights a striking failure of classifiers to capture all task-dependent variability.

1): Theorem 6 (Information I DAdv (y; z s ) maximal after distribution shift). Let D Adv denote the adversarial distribution and D the training distribution. Assume I D (y; z n ) = 0 by minimizing L iCE and the distribution shift satisfies I D Adv (z n ; y) ≤ I D (z n ; y) and I D Adv (y; z s |z n ) ≤ I D Adv (y; z s ). Then, I D Adv (y; z s ) = I D (y; x).

Figure 6: Left: Mutual information under distribution D train , Right: Effect of distributional shift to D Adv . Each case under training with cross-entropy (CE) and independence cross-entropy (iCE).Under distribution D, the iCE-loss minimizes I(y; z n ) (Lemma 10, Appendix C), but has no effect as the CE-loss already maximizes I(y; z s ). However under the shift to D Adv , the information I(y; z s ) decreases when training only under the CE-loss (orange arrow), while the iCE-loss induces I(y; z n ) = 0 and thus leaves I(y; z s ) unchanged (Theorem 6).

Figure 7: Samples x = F -1 (z s , zn ) with logit activations z s taken from original image and zn obtained by linearly interpolating from the original nuisance z n (first row) to the nuisance of a target example z * n (last row upper block). The used target example is shown at the bottom. When training with cross-entropy, virtually any image can be turned into any class without changing the logits z s , illustrating strong vulnerability to invariance-based adversaries. Yet, training with independence cross-entropy solves the problem and interpolations between nuisances z n and z * n preserve the semantic content of the image.

Figure 8: shiftMNIST experiments. (a): Binary shiftMNIST, where the class is additionally encoded with a location-based binary code on the left border of the image (highlighted with red circles). The shifted adversarial test distribution does not have the binary class encoding. (b): Texture shiftM-NIST, where the class is additionally encoded in background texture type. The texture-class coupling is randomized in the shifted adversarial test distribution. Right: Results of CE-trained ResNet, fully invertible RevNet and iCE-trained fully invertible RevNet. The CE-based models build excessive invariance with respect to the digit identity on D train and fail on D Adv . Difference denotes the largest improvement between CE-trained and iCE-trained model. The iCE model is more resilient to removing informative features, and reduces the error on D Adv up to 38%.

.1 USING BIJECTIVE NETWORKS TO ANALYZE EXCESSIVE INVARIANCE

Table content: <table><tr><td>As invariance-based adversarial examples manifest themselves in changes which do not affect the output of the network F , we need</td><td>z s</td><td>z n</td></tr><tr><td>a generic approach that gives us access to the discarded nuisance vari-</td><td/><td/></tr><tr><td>ability. While feature nuisances are intractable to access for general ar-chitectures (see comment after Definition 1), invertible classifiers only</td><td colspan="2">RevNet block x 16</td></tr><tr><td>remove nuisance variability in their final projection (Jacobsen et al.,</td><td colspan="2">squeeze</td></tr><tr><td>2018).</td><td/><td/></tr><tr><td/><td>split</td><td>(optional)</td></tr><tr><td>2 x</td><td colspan="2">RevNet block x 16</td></tr><tr><td/><td colspan="2">squeeze</td></tr><tr><td/><td>x</td><td/></tr><tr><td colspan="3">Figure 3: The fully in-</td></tr><tr><td colspan="3">vertible RevNet, a hybrid</td></tr><tr><td colspan="3">of Glow and iRevNet with</td></tr><tr><td colspan="3">simple readout structure.</td></tr><tr><td colspan="3">z s represents the logits and</td></tr><tr><td colspan="2">z n the nuisance.</td><td/></tr></table>

The table shows error rates on the ILSVRC-2012 validation set of our proposed fully invertible RevNet compared to a VGG

Table content: <table><tr><td>Appendix</td></tr></table>

Finally, we empirically show that this split can remove unwanted invariances by performing a set of targeted invariance-based distribution shift experiments. (i) Minimization of lower bound on I D (y; z n ): θ * = arg min θ L nCE (θ, θ * nc ) minimizes I θ * nc (y; z n ), where I θ * nc (y; z n ) ≤ I D (y; z n ) and θ * nc = arg max θ2 L nCE (θ, θ nc ). (ii) Maximization to tighten bound on I D (y; z n ): Under a perfect model of the conditional density, D θ * nc

Table content: <table/>

Peer review (iclr2019):
 The paper focuses on adversarial vulnerability of neural networks, and more specifically on perturbation-based versus invariance-based adversarial examples and how using bijective networks (with so-called metameric sampling) may help overcoming issues related to invariance. The approach is used to get around insufficiencies of cross-entropy-based information-maximization, as illustrated on experiments where the proposed variation on CE outperforms CE. While I am not a neural network expert, I felt that the ideas developed in the paper are worthwhile and should eventally lead to useful contributions and be published. This being said, I did not find the paper in its present form to be fit for publication in a high-tier conference or journal. The main reason for this is the disbalance between the somehow heavy and overly commented first four pages (especially in Section 2) contrasting with the surprisingly moderate level of detail when it comes to bijective networks, supposedly the heart of the actual original contribution. To me this is severely affecting the overall quality of the paper. The contents of sections 3 and 4 seem relevant, but I struggled find out what precisely is the main contribution in the end, probably because of the lack of detail on bijective networks mentioned before. Again, I am not an expert, and I will indicate that in the system of course, but while I cannot completely judge all aspects of the technical relevance and the originality of the approach, I am fairly convinced that the paper deserves to be substantially revised before it can be accepted for publication. Edit: After paper additions I am changing my score to a 6.