Improving VAEs' Robustness to Adversarial Attack
Authors: Matthew JF Willetts
Alexander Camuto
Tom Rainforth
S Roberts
Christopher C Holmes
Venue: ICLR 2021 Poster (2021)
Keywords: deep generative models
variational autoencoders
robustness
adversarial attack

Abstract: Variational autoencoders (VAEs) have recently been shown to be vulnerable to adversarial attacks, wherein they are fooled into reconstructing a chosen target image. However, how to defend against such attacks remains an open problem. We make significant advances in addressing this issue by introducing methods for producing adversarially robust VAEs. Namely, we first demonstrate that methods proposed to obtain disentangled latent representations produce VAEs that are more robust to these attacks. However, this robustness comes at the cost of reducing the quality of the reconstructions. We ameliorate this by applying disentangling methods to hierarchical VAEs. The resulting models produce high--fidelity autoencoders that are also adversarially robust. We confirm their capabilities on several different datasets and with current state-of-the-art VAE adversarial attacks, and also show that they increase the robustness of downstream tasks to attack.

Published as a conference paper at ICLR 2021
IMPROVING VAEs' ROBUSTNESS TO ADVERSARIAL ATTACK
Matthew Willetts*:1. Alexander Camuto Tom Rainforth
Stephen Roberts!.2
Chris Holmes
University of Oxford Alla Turing Institute, London
ABSTRACT
Variational autoencoders (VAEs) have recently been shown to be vulnerable to ad- versarial attacks, wherein they are fooled into reconstructing a chosen target image. However, how to defend against such attacks remains an open problem. We make significant advances addressing this issue by introducing methods for producing adversarially robust VA Namely, we first demonstrate that methods proposed to obtain disentangled latent representations produce VAEs that are more robust these attacks. However, this robustness comes at the cost of reducing the quality of the reconstructions. We ameliorate this by applying disentangling methods to hierarchical VAEs. The resulting models produce high- fighfiielity autoencoders that are also adversarially robust. We confirm their capabilities on several different datasets and with current state of the art VAE adversarial attacks, and also show that they increase the robustness of downstream tasks to attack.
INTRODUCTION
Variational autoencoders (VAEs) are a powerful approach to learning deep generative models and probabilistic autoencoders (Kingma & Welling 2014 Rezende et al. (0144). However, previous work has shown that they are vulnerable to adversarial attacks (Tabacof et al.] 2016 (Gondim-Ribeiro et al.
2018 Kos al., 2018): an adversary attempts fool the VAE to produce reconstructions similar to a chosen target by adding distortions to the original input, as shown in Fig This kind of attack can be
2017); Kusner et al. (2177); harmful when the encoder's output is used downstream, as in Xu et al.
Theis et al. (2017): Townsend et al. )2119): Ha & Schmidhuber (2018) 8) : Higgins et al. (201 7b). As
VAES are often themselves used to protect classifiers from adversarial attack (Schott et al. 2019
Ghosh et al. 2019), ensuring VAEs are robust to adversarial attack is an important endeavour.
Despite these vulnerabilities, little progress has been made in the literature on how to defend VAEs from such attacks. The aim of this paper is to investigate and introduce possible strategies for defence. We seek to defend VAEs manner that maintains reconstruction performance. Further, we are also interested in whether methods for defence increase the robustness of downstream tasks using VAEs.
Our first contribution is show that regularising the variational objective during training can lead to more robust VAEs. Specifically, we leverage ideas from the disentanglement literature (Mathieu et al.) 2019) to improve VABs' robustness by learning smoother, more stochastic representations that less vulnerable to attack. In particular, we show that the total correlation (TC) term used to encourage independence between latents of the learned representations (Kim & Mnih 2018 Chen al. 2018
Esmacili et al. 2019) also serves as an effective regulariser for learning robust VAEs.
Though a clear improvement over the standard VAE, severe drawback of this approach is that the gains in robustness are coupled with drops in the reconstruction performance, due to the increased regularisation. Furthermore, we find that the achievable robustness with this approach can be limited (see Fig [ and thus potentially insufficient for particularly sensitive tasks. To address this, we apply TC-regularisation hierarchical VAEs. By using richer latent space representation than a standard VAE, the resulting models are not only more robust still to adversarial attacks than single-layer models with TC regularisation, but can also provide reconstructions which are comparable to, and often even better than, the standard (unregularised, lingle-layer) VAE.
"Equal Contribution. Contact Ellettstturinggcc..u ocamuta@tturing..cc.r

---

Published as a conference paper at ICLR 2021
Adiersoo Target
Figure 1: Adversarial attacks on CelebA for different models. Here we start with the image of Hugh Jackman and introduce an adversary that tries to produce recon- structions that look like Anna Wintour. This is done by applying a distortion (third column) to the original image to produce adversarial input (second column). We can see that the adversarial reconstruction for the Vanilla VAE looks substantially like Wintour, indicating successful attack. Adding a regu regularisation term using the 3-TCVAE produces adversarial reconstruction that does not look like Wintour, but it is also far from successful recon- struction. The hierarchical version of B-TCVAE (which we call Seatbelt- VAE) is sufficiently hard to attack that the output under attack still looks like Jackman, not Wintour.
p-TOvAE
To summarise: We provide insights into what makes VAEs vulnerable to attack and how we might go about defending them. We unearth novel connections between disentanglement and adversarial robustness. We demonstrate that regularised VAEs, trained with an up-weighted total correlation, are much more robust attacks than vanilla VAEs. Building this we develop regularised hierarchical VAEs that are more robustness still and offer improved reconstructions. Finally, we show that robustness to adversarial attack also confers increased robustness to downstream tasks.
BACKGROUND: ATTACKING VAES
In adversarial attacks agent is trying to manipulate the behaviour of some model towards a goal of their choosing (Akhtar & Mian 2018 Gilmer et al., 2018). For many deep learning models, very small changes in the input can produce large changes in output. Attacks on VAEs have been proposed where the adversary looks to apply small input distortions that produce reconstructions close to target adversarial image (Tabacof al., 2016,
al. 2018: Kos et al. 2018). An example is shown in Fig a standard VAE is successfully attacked, turning Jackman into Wintour.
Unlike more established adversarial settings, only small number of such VAE attacks have been suggested in the literature. The current known most effective mode of attack is a latent spuce attack (Tabacof et al. 2016 Gondim- Ribeiro et al., 2018 Kos et al., 2018). This aims to find distorted d such that its posterior go Z xxx is close that of the agent's chosen target image
image x" qo(2|x') under some metric. This then implies that the likelihood pe (x") (z) is high when given draws from the posterior of the adversarial example. It is particularly important to be robust to this attack if one is concerned with using the encoder network of a VAE as part of a downstream task. For a VAE with single stochastic layer, the latent-space adversarial objective is
Ax d, x"; A) = r(go(zix + d), (x(2)())) + +|||d| |2,
where r(..)) is some divergence or distance, commonly a DKL (Tabacof et al. 2016 Gondim Ribeero al. 2018). We are penalising the L2 norm of too, so as aim for attacks that change the image less. We can then simply optimise to find a good distortion d.
Alternatively, we can aim to directly increase the ELBO for the target datapoint (Kos et al. 2018):
Doutpur (x, d, x >) = (Ego()) [log(x' 2)] DKI,(a((2)x + d)]lp(z)) + A||d||2- (2)
3 DEFENDING VAES
This problem was not considered by prior works [T] To address it, we first need to consider what makes VAEs vulnerable to adversarial attacks. We argue that two key factors dictate whether can perform a successful attack on a VAE: a) whether we can induce significant changes in the encoding distribution go go(2) (z|x) through only small changes in the data x, and b) whether we can induce significant changes in the reconstructed images through only small changes to the latents z. The first of these relates to the smoothness of the encoder mapping. the latter to the smoothness of the decoder mapping.
We note that the earliest version of this work appeared in June 2019 (Willetts et al. 2019), here extended. Since then other works, eg Camuto et al, (2020);Cemmgl Cemgil et al. (2020) (Barrett et al. (2021). have built of our own consider this problem of VAE robustness, including investigating from more thcoretical standpoint.
2

---

Published as a conference paper at ICLR 2021
Consider, for the sake of argument, the case where the encoder-decoder process is almost completely noiseless. Here successful reconstruction places no direct pressure for similar encodings to correspond to similar images: given sufficiently powerful networks, very small changes to embeddings z can imply very large changes to the reconstructed image; there is no ambiguity in the "correct" encoding of particular datapoint. In essence, we have lookup-table style behaviour nearby realisations of z do not necessarily relate to each other and very different images can have very similar encodings.
This will now be very vulnerable to adversarial attacks: small input changes can lead to large changes in the encoding, and small encoding changes can lead to large changes in the reconstruction. It will also tend overfit and have gaps in the aggregate posterior, (z(z) T >n go go (z|(x)), as each qs (z(2)x,) will be sharply peaked. These gaps can then be exploited by an adversary.
There are two mechanisms by which we can reduce this tookup-table behaviour, thereby reducing gaps in the aggregate posterior. First, we can try to regulate the level of noise in the per-datapoint posterior covariance, to then obtain smoothness in the overall embeddings. Having a stochastic encoding creates uncertainty in the latent that gives rise particular image, forcing similar latents to correspond to similar images, Adding noise forces the VAE to smooth the encode-decode process in that similar images will lead similar embeddings in the latent space, ensuring that small changes in the input result in small changes in the latent space and result in small changes in the decoded outputs. This proportional input-output change is what we refer to as a 'simple' encode-decode process, which is the second mechanism that can reduce look-up table behaviour.
The fact that the VAE is vulnerable to adversarial attack suggests that its standard setup does not obtain sufficiently smooth and simple representations to provide an adequate defence. Introducing additional regularisation to enforce simplicity or increased posterior covariance thus provides a prospect for defending VAEs. We could attempt to obtain this by direct regularisation of the networks (e.g. weight decay). Here, however, we focus on macro-level regularisation approaches as discussed in the next section. The reason for this that controlling the macroscopic behaviour of the networks through low-level regularisations can be difficult to control and, in particular, difficult to calibrate. Further, as the most effective attack on VAEs currently attack the latent space, it is reasonable that regularisation methods that directly act on the properties of the latent space form good place to start.
3.1 DISENTANGLING METHODS AND ROBUSTNESS
Recent research into disentangling VAEs (Higgins et al. 2017a Siddharth et al., 2017 Kim & Mnih, 2018, Chen et al.] 2018, Esmaeili et al.) 2019 Mathieu et al. 2019) and the information bottleneck (Alemi et al. 2017 has looked to regularise the ELBO with the hope of providing more interpretable embeddings. These regularisers also have influences on the smoothness and stochasticity of the embeddings learned.
Of particular relevance, Mathieu et al. (2019) introduce the notion of overlap the embedding of a VAE: the level of overlap between per-datapoint posteriors as they combine to form the aggregate posterior. Controlling this is critical to achieving a smoothly varying latent embedding. Overlap encapsulates both the level of uncertainty in the encoding process and also a locality of this uncertainty. To learn a smooth representation we not only need our encoder distribution to have an appropriate entropy, also want the different possible encodings to be similar to each other. Critically, Mathieul ct al. (2019) show that many methods proposed for disentangling, and in particular the 3 VAE (Higgins al. 2017a Alemi al. 2017). provide mechanism for directly controlling this overlap.
Going back to our previous arguments, we see that controlling this overlap may also provide mechanism for improving VAEs' robustness. This observation now hints at an interesting question: can we methods initially proposed to encourage disentanglement to encourage robustness?
It is important to note here that disentangling can be difficult to achieve in practice. typically requiring precise choices in the hyperparameters of the model and the weighting of the added regularisation term, and often also fair degree of luck (Locatello et al., 2019 Mathieu et al., 2019: Rolinek et al., 2019). As such, we are not suggesting to induce disentangled representations to induces robustness, or indeed that disentangled representations should be any more robust. Rather, as highlighted above, we are interested in whether the regularisers traditionally used to encourage disentanglement reliably lead to adversarially robust VAEs. Indeed, we will find that though our approaches- based these regularisers- -previde reliable and significant improvements in robustness, these improvements are not generally due to any noticeable improvements in disentanglement itself (see Appendix E.I)
3

---

Published as a conference paper at ICLR 2021
2000
VAE B-VAE B-TC
1500
1500
density
logpx(X2)
1000
1000
500
500
B-VAE
B-VAF
0
B-TC
P.TC
10 20
2.5
5.0
7.5
10.0
B
Figure 2: [Left] density plot (x) (the norm of the encoder standard deviation) for a VAE, a 3-VAE and 33TCVVE each trained on CelebA, / = 10. The B- VAVAsss posterior variance saturates, while the 3-TCVAE's does not and as such is able to induce more overlap. [Right] the likelihood (log po (x(z)) and ELBO for both function of Clearly the model quality degrades lesser degree for the TC-penalised models under increasing /3.
Regularising for Robustness There are a number of different disentanglement methods that one might consider using train robust VAEs. Perhaps the simplest would be use 3 3-V (Higgins) et al. 2017a), wherein we up- ip-eeight the DEL term in the VAE's ELBO by factor 33 2 1. However, as mentioned previously the 3-VAE only increases overlap at the expense of substantial reductions in reconstruction quality as the data likelihood term has, in effect, been down- (Kim & Mnih
2018 Chen et al. 2018 Mathieu et al. 2019).
Because of these shortfalls, we instead propose to regularise through penalisation of a total correlation (TC) term (Kim Mnih 2018 Chen et al. 2018). As discussed in Section A. this looks to directly force independence across the different latent dimensions in aggregate posterior qo (z(z)., such that the aggregate posterior factorises across dimensions. This approach has been shown to have a smaller deleterious effect reconstruction quality than found in B-VAEs (Chen et al. 2018). As seen in Fig[ this method also gives greater overlap by increasing posterior variance. To summarise, the greater overlap and the lesser degradation of reconstruction quality induced by 3-TCVAE make them highly suitable for our purposes.
3.2 ADVERSARIAL ATTACKS ON TC-PENALISED VAFS
We now consider attacking these TC-penalised VAEs and demonstrate one of the key contributions of the paper: that empirically this form of regularisation makes adversarial attacks on VAEs harder to carry out. To do this, first train them under the 3-TCVAE objective (i.e. Eq [5 ), jointly optimising 0, ø for a given 3. Once trained, we then attack the models using the latent-space attack method outlined in Section 2 finding an input distortion d that minimises the latent attack loss A as per Eq with r(: = (-I-)-
One possible metric for how successful such attacks have been the achieved value reached of the attack loss AKT. If the latent space distributions for the original input and for the distorted input match closely for a small distortion, then AKL small and the model has been successfully fooled reconstructions from samples from the attacked posterior would be indistinguishable from those from the target posterior. Mcanwhile, the larger the converged value of the attack loss the less similar these distributions are and the more different the reconstructed image is to the adversarial target image.
We carry our these attacks for dSprites (Matthey et al. 2017 Chairs (Aubry al., 2014) and 3D faces (Paysan et al.] 2009), for a range of 33 and À values. We pick values of À following standard methodology (TTbacof et al. 2016, Mondim-Ribeire et al., 2018), and use L-BFGG-B for gradient descent (Byrd et al. 1995). We also varied the dimensionality of the latent space of the model, dz. but found had little effect on the effectiveness of the attack.
In Fig 3 we show the effect on the attack loss AKL. for varying 3, averaged over different original input-target pairs and values of dz. Note that the plot is logarithmic the loss. We see a clear pattern for each dataset that the loss values reached by the adversary increases we increase 3 from the standard VAE (i.e. B = 1). This analysis is also borne out by visual inspection of the effectiveness of these attacks, for example shown in Fig I We will return to give further experimental results in Section An interesting aspect of Fig 3 is that in many cases the adversarial loss starts to decrease is too large: as B increases there is less pressure in the objective produce good reconstructions.
4

---

Published as a conference paper at ICLR 2021
10
10
Adversafial Loss
10"
Adversarial Loss
Adversarial
10
10¹
10"
10"
10
10'
2
6
10
10
P
(a) dSprites
(b) Chairs
3D Faces
Figure 3: Attacker's achieved loss AKL (i.e. Eq (1) with DKL) for 3-TCVAE for different
values and datasets. Higher loss indicates more robustness. Shading corresponds to the 95% CI produced by attacking 20 images for each combination of dz = (4, 8, 16, 32, 64, 128} and taking 50 geometrically distributed values of À between 2 and 2 (giving 1000 total trials). Note that the loss axis logarithmic. / clearly induces much larger loss for the adversary relative to f = for all datasets.
HIERARCHICAL TC- TC-PENALISED VAES
We are now armed with the fact that penalising the TC in the ELBO induces robustness in VAEs. However, TC "C-penalisation in single layer VAEs comes at the expense of model reconstruction quality (Chen et al. 2018), albeit less than that V-VAEs. Our aim is to develop a model that is robust to adversarial attack while mitigating this trade-off between robustness and sample quality. To achieve
this, we now consider instead using hierarchical VAEs (Rezende et al.) 2014 Sønderby et al. 2016)
Kingma et al. 2016 Zhao al. 2017 Maaløe al., 2019] Vahdat & Kautz 2020 Child 2021). These are known for their superior modelling capabilities and more accurate reconstructions. As these gains stem from using more complex hierarchical latent spaces, rather than less noisy encoders. this suggests they may be able to produce better reconstructions and generative capabilities, while also remaining robust to adversarial attacks when appropriately regularised.
The simplest hierarchical extension of conditional stochastic variables in the generative model is the Deep Latent Gaussian Model (DLGM) of Rezende et al. (2014). Here forward model factorises as a chain, (x(, ž) = po (x H Po po(z'|z'*) [22l22+)))x" )p(('))(())))))))))))))))))))) where each po 2
Gaussian distribution with mean and variance parameterised by deep nets, while p(z") ) is an isotropic Gaussian. Unfortunately, found that naively applying TC-correlation penalisation DLGM-style VAEs did not confer the improved robustness we observed in single layer VAEs. We postulate that this observed weakness inherent the structure of chain factorisation in the generative model. This means that the data-likelin lita-likelihood depends solely on zz the bottom-most latent variable, and attackers only need to manipulate z' produce successful attack.
To account for this, we instead use generative model in which the likelihood (x( depends on all the latent variables in the chain ž, rather than just the bottom layer z as has been done in Kingma al. 2016); Maaløe et al. (2019). This leads to the following factorisation of the generative structure:
Po x, ž) po Z
(o 1 )p(z")
To construct the ELBO, we must further introduce an inference network ga (z)x). the basis of simplicity and that it produces effective empirical performance, we use the factorisation:
ds [z = 9 (z xx)
(z (zz,)
takes the form a Gaussian. Again, marginalising out intermediate z' layers, (x(z"(x) a non- Gaussian, highly flexible distribution. To defend this model against adversarial attack, we apply TC regularisation term per the last section. We refer to the resulting models as Seatbelt- VAEs. We obtain a decomposition the ELBO for this model, revealing the existence of TC term for the top-most layer (see Appendix B for proof).
where each conditional distribution go (z

---

Published as a conference paper at ICLR 2021
Theorem 1. The Evidence Lower Bound, for hierarchical VAE with forward model in Eq and amortised variational posterior as in Eq (4) can be decomposed to reveal the total correlation (see Definition A.T, I, of the aggregate posterior of the top-most layer of latent variables:
C(O, o; D)- = Exxz,)) log Pe (x R
So +
Sb - DKL (q(*")]] II,
((25))
(5)
where the last term is the required TC term, and, using j to index over the coordinates in zt,
R = / dx (dz' (dz))))(())))()))))))))))))))))) log
I po (z (2++1)
(6)
2o x)
I Lo (2
S. Eg DRI (as x|a=
1lg (x(x))
S6 = E, DxL PkL(9ol2))llp(a
(8)
In other words, following the Factor and 3-TC,E,S, we up-weight the TC term for z²_ We can upweight this term then recombine the decomposed parts of the ELBO, to give us the following compact form of this objective.
Definition 1. A Seatbelt-VAL VAE is hierarchical VAE with forward model as in Eq (3) and amortised variational posterior as in Eq 44) trained wrt its parameters 0, & to maximise the objective:
Seatbeltt (0,6: 3, D) == Bg (x,xx
log
Po (x, ž)
- (B 1)DKL (glz 111 II a(e))).
(9)
go (z
We see that, when L Seatbelt- VAE reduces 3-TCVAE. We the 8 case
baseline in our experiments as it corresponds to a Vanilla VAE for == 1 and for T > 1, =
produces hierarchical model with likelihood function conditioned all latents.
As with the 3-TCVAE, training SSathellt using stochastic gradient ascent with minibatches of the L0,6;
data is complicated by the presence of aggregate posteriors (z(z) which depend the entire dataset. To deal with this, Appendix C we derive a minibatch estimator for TC- TC-penalised hierarchical VAEs, building off that used for 3-TCVAEs (Chen al. (018)). We note that, as in Chen et al. (2018) large batch sizes are generally required to provide accurate TC estimates.
Attacking Hierarchical Pe-Penaleeed VAES In the above hierarchical model the likelihood over data is conditioned on all layers, so manipulations to any layer have the potential to be significant. We focus on simultaneously attacking all layers, noting that, as shown Appendix [D] this is more effective that just targeting the top base layers individually. Hence our adversarial objective for latent-space attacks on Seatbelt- VAEs is the following generalisation of that introduced in Tabacof
al. 2016); Gondin-oiiin Ribeiro et al. 2018 Kos et al. (2018), to attack all the layers the same time:
Seathelt (x, d, x x²;
lldd|a
Σ
i r(gs(2 xx +d) (z)xx()((x)).
(10)
5 EXPERIMENTS
Expanding on the brief experiments in Section 3.2 we perform a battery of adversarial attacks on each of the introduced models. We do this for three different adversarial attacks: first (as in Section 3.2) latent attack, Eqs 10) using the DKL divergence between attacked and target posteriors; secondly, we attack via the model's output, aiming make the target maximally likely under the attacked model as in Eq (2): finally, new latent attack method as per Eqs (110) where we use r(..)) = W2(+.)). :), the Wassersstei distance between attacked and target posteriors.
We then evaluate the effectiveness of these attacks in three ways. First, like Fig 1 we can plot the attacks themselves, to see how effective these attacks are in fooling us. Secondly, we can measure the adversary's 's loss under the attack objective. Thirdly, we give the negative adversarial likelihood of the target image x' given an attacked latent representation z". Larger, more positive, values of
log po (x' (zz) correspond to less successful attacks as they correspond to large distances between the target and the adversarial reconstruction. Lower values correspond to successful attacks as they correspond small distance between the adversarial target and the reconstruction. We also measure

---

Published as a conference paper at ICLR 2021
Orginal
Orginal mc
Adaraat
Orginal
Orginainc
Adworatt
Ordhal
Orginaine
Adwrrattl
Criie
Orghzinn:
Adwrastil
Terpsl
Adwrsenil rea
Ditarion
Terpd
Alomend mm
Oetation
lenpd
Adermond tco
Tureet
Advenorelroe
Daaukon
(a) B-TCVAE, B=1
(b) 3-TCVAE, 3=2
(c) SS-, 3=1
(d) SB- SAE,
Figure 4: DKL. Latent space attacks only on rolation of a heart-shaped dSprite for 3-TCVAFs (dz = 64) and Seathelt- VAEs (7. 2) for 3 = [1,2]. The attacks are conducted by applying distortion (third column of each image) to the original image (top first column) to produce adversarial input (bottom second column of each image) to try to cause the output of the target image (bottom first column). Here show the most successful adversarial distortion in terms of adversarial loss for each model. apparent that Seatbelt- VAEs are the most resilient to attack. Note that the distortions plots (bottom right) are scaled to [0,1] ]] for ease of viewing.
reconstruction quality of these models, as a function of degree of regularisation. Finally, we also measure how downstream tasks that use output of these models perform under attack. We train classifiers, on the reconstructions and on the latent representations, and see how robust performance is when the upstream VAE is attacked.
We demonstrate that hierarchical I'C-Penalised VAEs (Seatbelt-VAie confer superior robustness to 3-TCVAEs and standard VAEs, while preserving the ability reconstruct inputs effectively. Through this, we demonstrate that they are powerful tool for learning robust deep generative models.
Following previous work (Tabacof et al. 2016 Gondim-Ribeiro et al. 2018) we randomly sample 10 input-target pairs for each dataset and for each image pair we consider 50 different values of geometrically -listiill from 2 to 2 Thus each individual trained model undergoes 500 attacks for each attack mode. As before, we used L-BFGS-B for gradient descent (Byrd et al. 1995). We perform these experiments on Chairs (Aubry al.) 2014). 3D faces (Paysan al. 2009), and CelebA (Liu al. 2015). Details of neural architectures and training are given in Appendix
5.1 VISUAL APPRAISAL OF ATTACKS
We first visually appraise the effectiveness of attacks that use the DEL divergence vanilla VAEs, 3-TCVAEs, and Seatbelt- VAEs. As mentioned in Section 1, Fig shows the results of latent space attacks three models trained CelebA. It is apparent that the 3-TCVAE provides additional resilience to the attacks compared with the standard VAE, Furthermore, this figure shows that Seathelt- VABs sufficiently robust to almost completely thwart the adversary: its adversarial construction still resembles the original input. Moreover, this was achieved while also producing a clearer non- adversarial reconstruction. One might expect attacks targeting a single generative factor underpinning the data to be casier. However, we find that these models protect effectively against this as well. For example, see Fig for plots showing an attacker attempting to rotate a dSprites heart.
In both figures we follow the method of Gonddi--iibiii et al. (2088) plot attacks. Those shown are representative of the adversarial inputs the attacker was able to find over the 50 different values of A. The Seatbelt- VAE input only undergoes a small perturbation because it sufficiently robust that the attacker is not able to make the reconstruction look more like the target image in any meaningful way, such that the optimiser never drifts far from the initial input. Note that the 3-TCVAE is also robust here. The attacker is unable to induce the desired adversarial reconstruction. even though the attack may be large magnitude. In contrast, attacks on vanilla-VAI are able to move through latent space and find perturbation that reconstructs to the adversary's 's target image.
5.2 QUANTITATIVE ANALYSIS OF ROBUSTNESS
Having ascertained perceptually that Seatbelt- VAEs offer the strongest protection to adversarial attack, we demonstrate this quantitatively. Fig shows log (x (z*) and A over range of datasets and Es for Seatbelt- VAEs (L = 4) and 3-TCVAEs for our three different attacks. demonstrates that the combination of depth and high TC-penalisation offers the best protection to
7

---

Published as a conference paper at ICLR 2021
1x3
1014
(a) DKL. Latent
Adtuerataal Lone.
Srhammar Loke.
-100 00.01
2.0
30*
101
124
PPC
9.5
J-TC
(b) Output
2.0
Serticet
4%.07
Sealtw
-00 PAR
6.5
660
10
10
35
10
F-1c
Art
(c) W2 Latent
Statto
Sontbel:
Geatoskt
Scathec
Satarro 10 Lork.
Adversstel Lzne
300
20
-log Pe (x")
Faces
A Faces
-log Po Chairs
A Chairs
Figure 5: Plots showing the robustness of Seatbelt VAEs (L=4) and B-TCVAES models for different
values of 33 for three different attack methods: a) Latent space attack via DKL. in Eqs 1 b)
Attack via the model output as Eq 2 and c) Latent space attack via the 2-Wasserstein (W2)
distance in Eqs TO). Note that the 3-TCVAE with 3 = 1 corresponds to vanilla VAE and models correspond to hierarchical baselines. We show the negative adversarial likelihood of target image x' given an attacked latent representation z for Faces (1 col) and Chairs (3rd col) respectively. Larger values of log Pa (x'1lz)) mean less successful adversarial attacks. We also show the adversarial loss A in 2nd and 4th cols, which have a logarithmic axis. Shading in results corresponds to the 95% over variation for 10 images for each combination of dg {4, 8, 16, 32, 64, 128} and À taking 50 geometrically distributed values between 2 and 2
that >
adversarial attacks and that the hierarchical extension confers much greater protection to adversarial attack than a single layer 3-TCVAE. As we go to the largest values of | for both Chairs and 3D Faces, adversarial loss ÁKL grows by factor of z 10" and - log (x xx |z") for those attacks doubles for Seatbelt- VAE. For all attacks, TC-penalised models outperformed standard VAEs (3=1) and Seatbelt- VAEs outperform single-layer VAEs. B-TCVAES do not experience such a large uptick in adversarial loss and negative adversarial likelihood. These results show that the hierarchical approach can offer very strong protection from the adversarial attacks studied.
In Appendix D we provide plots detailing these metries for range of L values. In Appendix we also calculate the Lg distance between target images and adversarial outputs and show that the loss of effectiveness of adversaria attacks is not due to the degradation of reconstruction quality from increasing B. We also test VAE robustness to random noise. We noise the inputs and evaluate the model's s ability to reconstruct the original input. Through this denoise. See Appendix F for an illustration of this for TC-penalised models. It is plausible that the ability of these models' denoise linked their robustness to attacks.
evaluating their ability to
ELBO and Reconstructions Though Seatbelt-VAr offer better protection to adversarial attack than 3-TCVAEs, we also motivate their utility by way of their reconstruction quality. In Fig 6 we plot the ELBO of the two TC-penalised models, calculated without the 3 penalisation that was applied during training. We further show the effect of depth and TC- renaalaiiottion on CelebA reconstructions. These plots show that Seatbelt- VAEs" reconstructions are more resilient increasing /3 than 3-TCVAEs'.
8

---

Published as a conference paper at ICLR 2021
-322
-2000
-4000
-2523
2253
PTCC
10000
Soatbet
10
(a) Chairs ELBO
(b) 3D Faces ELBO
(c) Reconstructions
Figure 6: Effect of varying 3 on the reconstructions of TC-penalised models. In sub-figures (a) and (b) we plot the final ELBO of TC-penalised models trained on the Chairs and 3D faces, calculated without the 3 penalisation applied during training. Shading gives the 95% CI over variation due to variation of d₂ {32. 64, 128} for B-TCVAE and also L = {2, 3, 4, 5) for Seatbelt. As 3 increases L degrades more slowly for Seatbelt-VAE, relative to 8-TCVAE, (c) serves as a visual confirmation of these results. The top row shows CelebA input data. The bottom row, the reconstructions from Seatbelt- VAE with L = 4 and 3 20, clearly maintains facial identity better than those from 8-TCVAE. the middle row: many of the individuals' finer facial features lost by the 3-TCVAE are maintained by the Scatbelt-VAL
Table 1: Robustness of downstream classification tasks under adversarial attack. We consider classifiers trained either on the reconstructed image (denoted ((y) or on the latent representations (p(vlz)). We show accuracy when the model is attacked, resulting in perturbed embeddings z and
reconstructions (x"). Parentheses show the drop in accuracy resulting from the attack the smaller the drop in magnitude the better
Accuracy by Model
Dataset
Task
VAE
3-TCVAE
Seatbelt-VAF
PMLP (y) x))
0.17 (-0.35)
0.22 (-0.29)
0.35 (-0.15)
SVHN
PCanv x)
0.13 (0.44)
0.36 (-0.28)
0.41 (- (-0.26)
PMLP (y/z)
0.15 (-0.57)
0.46 (-0.23)
0.57 (-0.21)
PMLP (y)x)
0.17 (-0.32)
0.25 (-0.21)
0.38 (-0.09)
CIFARIO
PConv (3) x)
0.07 (0337
0.32 (-0.10)
0.34 (-0.07)
PMLP (y (z)
0.16 (-0.41)
0.26 (-0.23)
0.39 (-0.09)
5.3 PROTECTION TO DOWNSTREAM TASKS
Finally, we consider the protection that Seatbelt-VAN might provide to downstream tasks, noting that VAES are often used subcomponents in larger ML systems (Higgins al. (017b)) or
mechanism to protect another model from attack (Schott et al. 2019; Ghosh et al. 2019). Table [ shows results for classification tasks using 2-layer MLPs and muly-convolutiona. nets trained on the reconstructions or on the embeddings. It shows the drop in accuracy caused by an adversary that picks a target with different label and attacks the VAEs* embedding using the attack objective with A 1. We see that Seatbelt- VAFS produced significantly better accuracies under these attacks.
6 CONCLUSION
We have shown that VAEs can be rendered more robust to adversarial attacks by regularising the evidence lower bound. This increase in robustness can be strengthened by extending these regularisation methods hierarchical VAES, forming Seatbelt-VAHs which uses a generative structure where the likelihood makes use of all the latent variables. Designing robust VAES is becoming pressing as they are increasingly deployed as subcomponents in larger pipelines. As we have shown, methods typically used for disentangling, motivated by their ability to provide interpretable representations, also confer robustness. Studying the beneficial effects of these methods is starting to come to the fore of VAE research.

---

Published as a conference paper at ICLR 2021
ACKNOWLEDGEMENTS
This research was directly funded by the Alan Turing Institute under Engineering and Physical Sciences Research Council (EPSRC) grant EP/N510129/1, MW was supported by EPSRC grant EP/G03706X/1. AC was supported by an EPSRC Studentship. SR gratefully acknowledges support from the UK Royal Academy of Engineering and the Oxford-Man Institute. CH was supported by the Medical Research Council, the Engineering and Physical Sciences Research Council, Health Data Research UK, and the Li Ka Shing Foundation
We thank Tomas Lazauskas, Jim Madge and Oscar Giles from the Alan Turing Institute's Research Engineering team for their help and support.
REFERENCES
Naveed Akhtar and Ajmal Mian. Threat of Adversarial Attacks on Deep Learning in Computer Vision: A Survey. Access, 6:14410-14430, 2018. ISSN 21693536. doi: 109/ACESSS
2018.2807385.
Alexander A Alemi, lan Fischer, Joshua V Dillon, and Kevin Murphy. Deep Variational Information Bottleneck. In ICLR, 2017. ISBN 1612.00410v5.
Alexander A Alemi, Ben Poole, Ian Fischer, Joshua V Dillon, Rif A Saurous, and Kevin Murphy. Fixing a Broken ELBO. In ICMI., 2018.
Mathieu Aubry, Daniel Maturana, Alexei A Efros, Bryan C Russell, and Josef Sivic. Seeing 3D chairs: Exemplar part-based 2D-3D alignment using a large dataset of CAD models. In Proceedings of the IEEE Computer Society Conference Computer Vision and Pattern Recognition, pp. 3762-3769, 2014. ISBN 9781479951179
doi: 10.1109/VVPR.20144449
Ben Barrett, Alexander Camuto, Matthew Willetts, and Tom Rainforth, Certifiably Robust Variational Autoencoders. arXiv preprint, 2021. URL http:://aaaiiii owg/ wttpg/////a.....//00020 0atos//222..000 07559
Anthony J Bell and Terrence J Sejnowski. An maaittiiiiimmmmiiiitttininooonnn approach to blind separation and blind deconvolution. Neural Computation, 7(6): 1004-1034 1995.
Yoshua Bengio, Aaron Courville, and Pascal Vincent. perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 3598):1798-1888 2013. ISSN 01628828, doi: 10. 10.11099M....213.....
Representation learning: A review and new
URLhttt::/ www. imagemmaeae..... net. /rg/
challennes/LLsvvc/2010 http1///eeeeltteeo html
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance Weighted Autoencoders. In ICLR, 2016.
Christopher Burgess, Irina Higgins, Arka Pal, Loic Matthey, Nick Watters, Guillaume Desjardins, Alexander Lerchner, and Deepmind London. Understanding disentangling in bet.-VAF. In NeurlPS, 2017.
Richard H Byrd, Peihuang Lu, Jorge Nocedal, and Ciyou Zhu. A Limited Memory Algorithm for Bound Constrained Optimization. SIAM J. Sci. Comput., 1605):1 1995. ISSN 1064-8275. doi: 10. 10.1199//966069
Alexander Camuto, Matthew Willetts, Stephen Roberts, Chris Holmes, and Tom Rainforth. Towards Theoretical Understanding of the Robustness of Variational Autoencoders. arXiv preprint, 2020.
URL httt:::/axxxv..rrrrttt/// otg.//iiii....aaeaeeoooea abs/2007 07365
Taylan Cemgil, Sumedh Ghaisas, Krishnamurthy Dvijotham, and Pushmeet Kohli. Adversarially robust representations with smooth encoders. In /CLR, 2020.
Ricky Chen, Xuechen Li, Roger Grosse, and David Duvenaud. Isolating Sources of Disentanglement in Variational Autoencoders. In NewrIPS, 2018.
Rewon Child. Very Deep VAEs Generalize Autoregressive Models and Can Outperform Them on Images. In ICLR, 2021.
10

---

Published as a conference paper at ICLR 2021
Babak Esmacili, Hao Wu, Sarthak Jain, Alican Bozkurt, N Siddharth, Brooks Paige, Dana H Brooks, Jennifer Dy, and Jan- Willem van de Meent. Structured Disentangled Representations. AISTATS, 2019.
Partha Ghosh, Arpan Losalka, and Michael Black. Resisting Adversarial Attacks Using Gaussian Mixture Variational Autoencoders. In AAAI, 2019.
Justin Gilmer, Ryan P Adams, Ian Goodfellow, David Andersen, and George E Dahl. Motivating the Rules of the Game for Adversarial Example Research. arXiv preprint, 2018.
George Gondim-Ribeiro, Pedro Tabacof, and Eduardo Valle. Adversarial Attacks on Variational Autoencoders. arXiv preprint, 2018.
David Ha and Jürgen Schmidhuber. World Models. In NeurIPS, 2018
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. 3- 3-VAE: Learning Basic Visual Concepts with Constrained Variational Framework. In ICLR, 2017a.
Irina Higgins, Arka Pal, Andrei Rusu, Loic Matthey, Christopher Burgess, Alexander Pritzel, Matthew Botvinick, Charles Blundell, and Alexander Lerchner. DARLA: Improving Zero-Shot Transfer in Reinforcement Learning. ICML, 2017b.
Matthew Hoffman and Matthew Johnson. ELBO surgery: yet another way to carve up the variational evidence lower bound. NeurlPS, 2016.
llyes Khemakhem, Diederik Kingma, Ricardo Pio Monti, and Aapo Hyvärinen. Variational Autoencoders and Nonlinear ICA: A Unifying Framework. In AISTATS, 2020.
Hyunjik Kim and Andriy Mnih. Disentangling by Factorising. In NearlPS, 2018
Diederik P Kingma and Jimmy Lei Ba. Adam: A Method for Stochastic Optimisation. In ICLR, 2015.
Diederik Kingma and Max Welling. Auto-encoding Variational Bayes. In ICLR, 2014.
Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved Variational Inference with Inverse Autoregressive Flow. In NeurlPS, 2016.
J Kos, Fischer, and D Song. Adversarial Examples for Generative Models. In IEEE Security and Privacy Workshops, pp. 36-42, 5 2018. doi: 10. 1099/PW..2188.00014
Tejas D Kulkarni, Will Whitney, Pushmeet Kohli, and Joshua B Tenenbaum. Deep Convolutional Inverse Graphics Network. In NeurIPS, 2015.
Abhishek Kumar and Ben Poole. On Implicit Regularization in 8-VAE. In ICML, 2020.
Matt Kusner, Brooks Paige, and José Miguel Hermández-Lobato. Grammar Variational Autoencoder. In ICMI., 2017.
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep Learning Face Autributes in the Wild. In Proceedings of International Conference Computer Vision (ICCV), 2015.
Francesco Locatello, Stefan Bauer, Mario Lucie, Gunnar Rätsch, Sylvain Gelly, Bernhard Schölkopf, and Olivier Bachem. Challenging Common Assumptions in the Unsupervised Learning of Disen- tangled Representations. In ICML, 2019.
Lars Maalge, Marco Fraccaro, Valentin Liévin, and Ole Winther. BIVA: Very Deep Hierarchy of Latent Variables for Generative Modeling. In NeurIPS, 2019.
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, lan Goodfellow, and Brendan Frey. Adversarial Autoencoders. ICLR, 2016.
Emile Mathieu, Tom Rainforth, N. Siddharth, and Yee Whye Teh. Disentangling Disentanglement in Variational Autoencoders. In ICML., 2019.
11

---

Published as a conference paper at ICLR 2021
Loic Matthey, Irina Higgins, Demis Hassabis, and Alexander Lerchner. dSprites: Disentanglement testing Sprites dataset, 2017.
Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3D face model for pose and illumination invariant face recognition. In 6th IEEE International Conference on Advanced Video and Signal Based Surveillance, AVSS 2009, pp. 296-301, 2009. ISBN
9780769537184. doi: 10.1 10.1109//VSS.2009.55
Tom Rainforth, Robert Cornish, Hongseok Yang, Andrew Warrington, and Frank Wood. On nesting Monte Carlo estimators. In ICML, 2018.
Danilo Rezende and Fabio Viola. Taming VAEs. arXiv preprint, 2018.
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models, In ICML, 2014.
Michal Rolinek, Dominik Zietlow, and Georg Martius. Variational autoencoders pursue pea directions (by accident). Proceedings of the IEEE Computer Society Conference on Computer Vision and Puttern Recognition, volume 2019-June, pp. 12398-12407, 2019. ISBN 9781728132938. doi: 10. N0.1109/CVPR..21..1122
Lukas Schott, Jonas Rauber, Matthias Bethge, and Wieland Brendel. Toward the First Adversarially Robust Neural Network Model on MNIST. In ICLR, 2019.
Siddharth, Brooks Paige, Jan Willem Van De Meent, Alban Desmaison, Noah D Goodman, Pushmeet Kohli, Frank Wood, and Philip H.S. Torr. Learning disentangled representations with semi-supervised deep generative models. In NeurlPS, 2017.
Casper Kaae Sønderby, Tapani Raiko, Lars Maaloe, Søren Kaae Sønderby, and Ole Winther. Ladder Variational Autoencoders. In NeurlPS, 2016.
Pedro Tabacof, Julia Tavares, and Eduardo Valle. Adversarial Images for Variational Autoencoders. In NewrlPS Workshop on Adversarial Training, 2016.
Lucas Theis, Wenzhe Shi, Andrew Cunningham, and Ferenc Huszár. Lossy Image Compression with Compressive Autoencoders. In ICLR, 2017.
James Townsend, Tom Bird, and David Barber. Practical Lossless Compression with Latent Variables using Bits Back Coding. In ICLR, 2019.
Arash Vahdat and Jan Kautz. NVAE: A Deep Hierarchical Variational Autoencoder. In NeurIPS, 2020.
Satosi Watanabe. Information Theoretical Analysis of Multivariate Correlation. IBM Journal of Research and Development, 4(1):66-82, 1960. ISSN 0018-8646. doi: 10.1147/rd.4..0066
Matthew Willetts, Alexander Camuto, Stephen Roberts, and Chris Holmes. Disentangling Improves VAEs' Robustness to Adversarial Attacks. arXiv preprint, 2019, URL htt.htttp////ii..ooo /rg/
abs/ abs/1906. 00230v1
Weidi Xu, Haoze Sun, Chao Deng, and Ying Tan. Variational Autoencoder for Semi-supervised Text Classification. In AAAI, 2017.
Shengjia Zhao, Jiaming Song, and Stefano Ermon. Learning Hierarchical Features from Generative Models. In ICML, 2017.
12

---

Published as a conference paper at ICLR 2021
A VARIATIONAL AUTOENCODERS
Variational autoencoders ( (VAEs) are a variety of generative model suitable for high-dimensional data like images (Kingma & Welling 2014 Rezende et al. 2014). They introduce a joint distribution over data and latent variables pe X Z ( p((z) Z where pe (x(z) is appropriate distribution given the form of the data, the parameters which are represented by deep nets with parameters 0, and p(z) (O, I) is common choice for the prior. As exact inference is intractable, one performs amortised stochastic variational inference by introducing an inference network for the latent variables, go(z)x), which often also takes the form of a Gaussian, (x)lu,(x), Ex)x). We can then perform gradient ascent, with respect to both and Φ, on the evidence lower bound (ELBO)
[(x) (x(xx) po (
DKL Dka((o(z)x)/ll/zz))
(11)
using the reparameterisation trick to take gradients through Monte Carlo samples from 4s (z)x).
A.1 DISENTANGLING VAES
When learning disentangled representations (Bengio et al.
2013) in a VAE, one attempts to establish
a one-to-one correspondence between dimensions the learnt latent space and some interpretable aspect of the data (Higgins et al. 2017a Burgess et al., 2017 Chen et al., 2018 Mathieu et al. 2019). One dimension of the latent space could encode the rotation of a face for instance. Mathieu al. 2019) offers broader perspective, where disentangling can be interpreted of decomposition. decomposition, models have the right degree of overlap between their latent posteriors such that the aggregate posterior matches the prior well throughout the latent space Z.
particular case
Disentangling is often enforced by an added penalisation the VAE ELBO that acts akin to a regulari- sation method. Because of this, disentangling can be difficult to achieve in practice, and often requires precisely choosing the hyperparameters of the model and of the weighting of the added regularisation term (Locatello et al. 2019 Mathieu et al.] 2019 Rolinek et al.] 2019). That disentangling relies on forms of soft supervision renders the task of learning disentangled representations potentially problematic (Khemakhem et al. 2020). When viewed as a purely unsupervised task it can be hard to establish a direct correspondence between a disentangling- VAE's training objective and the learning of disentangled latent space. Nevertheless, models trained under disentangling objectives have other beneficial properties. For example, the encoders of some disentangled VA have been used as the perceptual part of deep reinforcement learning models to create agents more robust variation in their environment (Higgins et al., 2017b). Thus, regardless of the presence of disentangled generative factors, these regularisation methods can be useful for downstream tasks. In this paper we show that methods developed to obtain disentangled representations have the benefit of conferring robustness to adversarial attack.
commonly used disentangling method is that of the 3-V In a 3- B-V (Higgins et al. 2017a), a free parameter 3 multiplies the DxL. term in the evidence lower bound C(x). This objective Zg(x) (x) remains a lower bound on the evidence:
Lx(x) == Bgals(s)) [o (afia)))3300Kn 3D (xxx)>)))(
The 3-VAE though it offers simple method for obtaining potentially disentangled representations does so at the expense of model quality. Models trained with large 3 penalisation suffer from poor quality reconstructions and lower ELBO. For more discussion of their theoretical aspects, see Kumar & Poole (2020).
Other methods seek to offset this degradation in model quality by decomposing the ELBO and more precisely targeting the regularisation when obtaining disentangled representations. We can more insight into VAEs by defining the evidence lower bound not per data-point, but instead over the dataset D of size N, (x") }. so we have L(0, Φ. D) (Hoffman & Johnson 2016 Makhzani et al. 2016;
Kim & Mnih 2018 Chen al. 2018
Esmaeili al. 2019). From this Esmaeili et al. (0019)
13

---

Published as a conference paper at ICLR 2021
gives decomposition of the dataset-level evidence lower bound:
C(0, Φ, D) = -Bg((xx) log Px(x,20 2)
(12)
(z( x)
Bgx(2xx) [log Po (x(x)))
9d (z/2x) (rI,(g(x)((po(x)) DRL. (us (z)l(()((
log
po (x
(x)
(13)
where under the assumption that p(z) factorises we can further decompose @
D = g (x) [log (6(z)
+
Σ DKL (es (2,(2)))
(14)
II, 90 (z(Z))
where indexes over coordinates in (o x) qo (z(x))) and g(x) N En 8(x x") is
the empirical data distribution. (z) == + Σn 96 (z(xx) is called the aggregate posterior.
A is the total correlation (TC) for (z).
Definition A.1. The total correlation (TC) is a generalisation of mutual information to multiple variables WWttaaabe 1960) and often used as the objective Independent Component Analysis (Bell & Sejnowski 1995). The TC is defined as is defined as the KL divergence from the joint distribution p(s), 8 E R the independent distribution over the dimensions of the variable p(s) ((2))))())))))))))))))))))) (s.)). Formally: TC(s) = (xI,(((s)) II; P(8,))
With this mean-field p(z), Factor and 3-TCVAEs upweight the TC of the aggregate posterior, so we have objective:
BTC (. 1 + 3
(15)
Upweighting the penalisation associated with the TC term promotes the learning of independent latent factors, one of the key objectives of disentangling, Chen et al. (2018) show empirically that the learnt representations are disentangled when the hyperparameters of the model are well-chosen. They also give a differentiable, stochastic approximation to (x)(() log (z), rendering this decomposition simple
training objective using stochastic gradient descent. However this is biased estimator: it is nested expectation, for which unbiased, finite-vrriance, estimators do not generally exist (Rainforth al. 2018). Consequently, it has the unfortunate consequence of needing large batch sizes to have the desired behaviour; for small batch sizes its practical behaviour mimics that of the 3- 3-VAE (Mathieu et al. 2019
14

---

Published as a conference paper at ICLR 2021
A.2 B- B-VAEs. TC-PENALISATION AND OVERLAP
(a) VAE ((x)
recons
VAE g
(d) B.VAE recons, B
T-VVAA (x))
9: 3-TCVAE
(+) 3-VAE v(2). 8 32
( 3-VAB rocons, = 32
(g) 8-TCVAE ((2), 8 = 32
00) 6-TCVAE recons, 8 32
G
0(2).8 8
① J.VAE recons, 128
3-TCVAE (z)) 128
3-TCVAE recons, B
Figure A.7: B-VAEs and B-TCVAEs trained on 3D 'Swiss Roll' data, with a vanilla VAE as baseline {8, 32, 128). The aggregate posteriors, for both model types, tend
and all with 2D latents. to become smoother as 3 increases. Note, however, that for large 3 values the 3- 3-VAEs suffer a catastrophic collapse in performance (in terms of reconstructions), while the 3-TCVAEs degrade more gracefully. The requirement that 3-TCVAEs upweight, that the aggregate posterior is well- approximated by the produce of its dimensionwise marginals, is clearly much less onerous achieve while still modelling the data well than that of B-VAEs, which requires each datapoint's amortised posterior to closely match the prior.
Recall from the discussion & that is gaps, holes, in the aggregate posterior that adversaries can exploit. We also want to close up these holes without degrading the model too much. Rezende & Viola (2018) observed that in regions of when the aggregate posterior places no density the decoder unconstrained by the ELBO. It is these regions, with associated unconstrained decoder behaviour, that enable adversaries to have an easy time attacking the model. Thus our aim in making robust VAEs is to have aggregate posterior that is smooth in the sense of having relatively flat density across Z, so therefore having no holes. This is equivalent to overlap, as introduced in Mathieu et al. (009
15

---

Published as a conference paper at ICLR 2021
So, why do these regularisation methods increase overlap? Why can upweighting penalisation of the Total Correlation demanding that the aggregate posterior is well-approximattd by the product of its marginals- be expected to increase overlap? And why it does so superior way to a 3 3- VAE's upweighting of (go ( (z]x))lp(z)) Recall that in Fig 2 we showed that the L2 norm of the standard deviation of the encoder concentrates a particular value for 3-VAEs, but for 3-TCVAEs it takes broader ranger of values, values above the saturation point of 3-VAEs.
In 8-VAE with large 3 we are asking that the amortised posterior is close to the prior for all inputs. So for p(z) (0, 1) we are forcing (x)x) to 0 and (x to 1. Naturally this will lead our aggregate posterior to have a high degree of overlap between its constituent mixture components, because all of them are being driven to be the same. And with all per-datapoint posteriors being driven to be the same, information about the initial input data is necessarily lost in these representations.
For 3-TCVAE, however, the demand for the aggregate posterior to be well-approximated by the product of its marginals does not in itself entail fixed scale, nor does push all the per-datapoint posteriors towards the prior. Rather we are directly asking for statistical independence between coordinate directions. Holes in the aggregate posterior are (as long as they are off-axis) a form of dependency between the latent variables. By demanding that the aggregate posterior factorises, we are thus asking the model to 'smooth out' any holes (or peaks) that do not lie along the axes of the latent space. Intuitively, and shown in Figure 2 can be done achieved without causing as strong degradation to model quality, as measured by the fidelity of reconstructions and the values of the (B 1) ELBO.
To give us a more direct understanding here we perform some toy experiments on 'Swiss Roll' data, Fig A.7 We train 2D-latent-space VAEs: vanilla, 3-VEEs, and 3-TCVAES. We plot the aggregate posterior and the reconstructions (the means of the likelihood conditioned on a sample of each per-datapoint posterior). Clearly the amount of overlap increases with 3 for both kinds of model, but the 3-TCVAEs seem to do this in a more structured way and, unlike the 3- 3-V,E, does not suffer from (eventually catastrophic) degradation in model quality for large B.
A.3 HIERARCHICAL VAES
In hierarchical VAE we have set of L layers of z variables: z (z'). However, training DLGMs is challenging: the latent variables furthest from the data can fail to learn anything informative (Sønderby et al., 2016 Zhao et al. 2017). Due to the factorisation of qs (Z)x) and pe(x, ž) in DLGM, it Is possible for a single-layer VAE to train in isolation within hierarchical model: each Po(z' 2 +1) distribution can become fixed distribution not depending on zi+1 such that each DKL divergence present in the objective between corresponding z' layers can still be driven to local minima. (Zhao et al. 2017) gives proof of this separation for the case where the model perfectly trained, i.e. DKL (go
(x, z)) 0.
This is the hierarchical version of the collapse of units in a single-layer VAE (Burda et al. 2016), but now the collapse is over entire layers z'. It was part of the motivation for the Ladder VAE (Sonderyy ct al. 2016) and BIVA (Maaløe et al. 2019).
More recently Vahdat & Kautz 2020); Child (2021) have shown that by judicious neural param- eterisation and training strategy, hierarchical VAEs can obtain ~-OTAA results in the probabilistic modelling and generation of images.
16

---

Published as a conference paper at ICLR 2021
B TOTAL-CORRELATION DECOMPOSITION OF ELBO
Proof of Theorem
Here prove that the ELBO for hierarchical VAE with forward model as in Eq ( and amortised variational posterior as in Eq can be decomposed to reveal total-correlation the top-most latent variable.
Specifically, now considering the ELBO for the whole dataset and using g(x) to indicate the empirical data distribution, will obtain, denoting 2
C (0, o: D) ye [log Po (x/z)] - (X(x)(()
DKL xx)ppo (x)llo(2(|22++)
- co DKTt (2t x|z=~1)|lq0f" (z)(()))))
- -E, DRL(a [[p(2))) - 3DKL. go (z
2o (2(2))
(16)
We start with the forms of and q given in Theorem (x(
1 The likelihood is conditioned all layers:
Po (x, σ) C(8, D) = Egg (8,x) log
(17)
(z,
(2.x) [log (x)pPo((())) Eggxx) [DKL (1o x)]lpo(2))
(18)
Po Po(z)
Eg((E)) log (0)0o((]) (x(z) Bx(x) log g(x) + Rx(E log
(19)
[(2)x) x)
EEg() log po (x H((((x))
(20)
(dz' 2o (z'lz= (z)) log / dx dz II
1
p(z²) I Po
(z z
4o (z) (x) II 96 (0( (z
|
So here have three terms: an expectation over the data likelihood, the entropy of the empirical data distribution (a constant) and We now can expand to term involving the prior for the latent z and term involving the conditional distributions from the generative model for the remaining components of
L
k= po (z" Iz ++1 no (z( x)) I g m 1 x)
W = dx
ddz' (a (z)x)g(x) log
+ / dx II (dz (gd (x))) log q (z' 2/1-1,10
p(z²)
(21)
The first part R that part of W involving the prior for 'top-most" latent variable z4, the first subject of our attention. We split out the part of ( involving the generative and posterior terms for the latent variable closest to the data, 2t and the rest:
(z 1z2)
1--1
dx II (dz' (g (g. (Z(x){(x)) pe pz m+1)
R
dx I (dz') y (x log
log
4a (z x)
go (z Izm
2
1=1
R
The first these terms R. is an expectation over a DKL:
R
Egg (x².x) DKL xx) (x)l
(22)
17

---

Published as a conference paper at ICLR 2021
And the rest, R provides the DKL divergences in the ELBO for all latent variables other than z and z' It reduces of expectations over DKL divergences, one per latent variable.
(z dz (g (x))x(()((xx) [I + 1z* x))qo(z") -m=-=,,______ x) log p0 zm++1
R₂
dx
go (z z x)
k=1,m
(23)
1-1
dx
dz )as (x)))))()))))))))))()))))))))( (2 <oo ,x)](po(z" 1z)+1))
m=2
i=
(24)
L-1
90 (a 2m DKI(9a(z")) 1z- x)]lpo lz))))).
(z"(z")))))
(25)
2
Now we have:
[(0,0; = [E)()) log Po + H(((x)) +
Ra +
R
(26)
We wish to apply TC decomposition the top-most latent variable z.. DKL divergence between (z (z-11111___ x) and p(z²)
S is expectation over the
E (2 x) DKL (90 (xl xx)lx((z))(
(27)
Applying the decomposition, with j indexes over units in zt_
xc xx [log go (z4 12 1---11111 x) - log log + log (2()
log g0 (z!") ) + log II 2 (z))) log II 2o [20())) j
log Lo 2z 12 ,x)
2 (z(
(x x xx)
(2))
log
(0(2!)
11, 200 (2())
I1 4at (2
- (xt))
log p(z(.)
log 4o (o(2))
(z(2))
--Egs (at xz xxx)
E (xc))
log II, 20 (2(7)
log (o(
Σ Bgolere
p(z
3
( DKI (at x (2g0 (xxx))
Σ Dka(90(2)))llee - DKL II (z(2)))
Where we have used p(z*) = II p(25) for our chosen generative model, a product of independent unit-variance Gaussian distributions.
C(,, d: D) = (x lo pa (x|z) + H(((()) +
R. +
R +
S.
So
S.
(28)
Giving us decomposition of the evidence lower bound that reveals the TC-term in zz as required. Multiplying this with chosen fre-fa / gives us the required form. .
18

---

Published as a conference paper at ICLR 2021
C MINIBATCH WEIGHTED SAMPLING
As in Chen et al. 20188) applying 3-TC decomposition requires us to calculate terms the form:
E (zx) log go (z())
(29)
The case is covered in the appendix of Chen et al. (2018). First we will repeat the argument for i = as made in Chen et al. (2018), but in our notation, and then we cover the case > 1 for models with factorisation of qo (7|x) of Seathelt VAEs.
C.I MWS FOR 3-TCVAES
We denote Bм X2,, XM ). minibatch of datapoints drawn uniformly iid from q(x:
1/N > m- 5(x x,)). For any minibatch we have p(BM) = N
M Chen et al. (2018) introduce (B),(x), the probability of a sampled minibatch given that one member and the remaining
M - 1 points are sampled iid from q(x), so rBB x) M-1
E Exy(x)) log go (z²) Byglz' log Ey(x) I0p (2* x)]]
(30)
M
Bo x)) [log (p(
Σ
90(zz xm)]]
(31)
M
m=1
p(BMr) 1
Bygix x)) flog Er (x)
Σ (xm)ll
(32)
r(BM (x) M
M
-Bglle x) [log (r(Bar
1
Σ
do (z (xm)
(33)
NM
(34)
So then during training, samples (xt log (z(2)) as:
minibatch
X2, xm3 and can estimate
M
E (ot (o(2))
RV Σ flgg Σ
go (o(2)())) x,) log NM]
(35)
j=1
and z! is sample from (z
C.2 MINIBATCH WEIGHTED SAMPLING FOR SEATBELT-VAES
Here we have that g(Z x) = I (z0(2' x))ua(z (2" xx)((x) Now instead of having minibatch
of datapoints, have minibatch of draws of z' B {z/-1 2 ..... 2-13. Each member of which is the result sequentially sampling along a chain, starting with some particular datapoint Xm (xx).
For 2, members of Biy are drawn:
2 ~ g6 1- (1))- xx)
(36)
and for i = 2:
2)
g0(z (x,)
(37)
Thus each member of this batch B the descendant of a particular datapoint that was sampled in an iid minibatch 3и as defined above. We similarly define r(Bir |zi=,,xx] (1iiz11zii1, x) as the probability of
selecting a particular minibatch Bi71 of these values out from our set ((x.; x (of cardinality
N) given that we have selected into our minibatch one particular pair of values (x, z z²-1) from these M-1
N values. Like above, rB 1 1x = N
19

---

Published as a conference paper at ICLR 2021
Now consider (xt( log (o()) for i 1:
Eyg(et) log (z(z)) = go (x xx) [log Boole'- x)) 10a(z' 1oa" ,x]]
(38)
=B qutt [log E p(B M E 90(22 z Xm)]l
(39)
p MM
M
(xs(ztzt-1xx) loo E, (18777 1at ppt))
Σ
qo (z pmm
x 1]
r(BB)r 12'-1, x)
(40)
E (xi (.))) [ [log B BB 122-1,x)) x)
Σ
2o 2o
(m Xm )]I
(41)
NM
Where we have followed the same steps as in the previous subsection.
During training, samples a minibateh {zi-1 2 235 ")²²), where each is constructed by sampling ancestrally. Then one estimate Eg (wr) log (0(2z) as:
M
M
E (xt) log (o()) =
log
4s (z bzj xx))
log NM]
(42)
M
and z is sample from (z (a so we have:
i-1 xk).
In our approach we only need terms of this form for i = L,
M
M
2olz log log (z() ~
log
E 2z 1-1
.x,) .x,) log NM]
(43)
M
R=
and 2/ is a sample from qs 12 xx).
20

---

Published as a conference paper at ICLR 2021
D
SEATBELT-VAL RESULTS
D.1
SEATBELT- VAE LAYERWISE ATTACKS
Z1
X10
7
Z
X10
-7
Z
x10
7
4
5
5
5
3
3
3
2
2
2
1
4
8
B
B
B
(a) 3D Faces
Z1 x10
Zi x10
Z x10
3.0
3.0
3.0
2.5
2.0
2.0
2.0
3
1.5
1.0
1.0
1.0
2
0.5
0.5
0.5
4
8
1
4
8
B
β
ß
(b) Chairs
Figure D.8: log Po (x' [2), 8 q(z[x+ where d is some adversarial distortion. for Seatbelt VAEs trained on (a) 3D Faces and (b) Chairs; over 8 and L values for latent attacks. We attack the bottom layer (z²), the top layer (z²), and finally show the effect when attacking all layers (z). Larger values of - log po (x* (x*1z) (2. correspond to less successful adversarial attacks. Generally attacking all layers seems to give the attacker a slight advantage (as seen by the slightly lower log Pe (x* (2) values for Faces and Chairs).
21

---

Published as a conference paper at ICLR 2021
D.2 SEATBELT- VAE ATTACKS BY MODEL DEPTH AND B
Adversorial Likelhood
x10
5.8
Adverserial Loss
1e10
4.8
4.0
4.5
3.2
2.4
1.6
(a) log (x" Iz") Faces
(b) Faces
Adversania Likolhood
K1o
Adversataal Lass
111
3.0
244
0.8
1.8
0.6
12
(c) - log pa (x" (2") Chairs
(d) A Chairs
Figure D.9: Here measure the robustness of TC-penalised models numerically. Sub-figures (a) and (c) show - log pa (xxx (x"Iz"), the adversarial likelihood of target image x given an attacked latent representation for Scatbelt-VAEs for Chairs and 3D Faces. Larger likelihood values correspond to less successful adversarial attacks. Sub-figures (b) and (d) show adversarial loss A for Seatbelt- for Chairs and 3D Faces. We show these likelihood and loss values over 3 and L (total number of stochastic layers) values for attacks. Note that the bottom rows of all figures have L = 1, and thus correspond 3-TCVAES. The leftmost column corresponds to models with 3 1, which are vanilla VAEs and hierarchical VAEs. As go to the largest values of 8 and L for both Chairs and 3D Faces, A grows by a factor of 10" and llog po (z*) doubles. These results tell us that depth and TC- TC-penalisation together, i. Seatbelt- VAE, offer immense protection from the adversarial attacks studied.
22

---

Published as a conference paper at ICLR 2021
E AGGREGATE ANALYSIS OF ADVERSARIAL ATTACK
LLateni Space Altack
Output Atack
18
Latent
1e3
Output
Adversarial Target Distance
Bargl-Rezon Distance
6.0
1.9
5.5
14
10
5.0
Adversarial
12
4.5
10"
1.5
4.0
10
3.5
5
10
8
B
(a) dSprites Distances
(b) dSprites Losses
Latent Space Attack
Output Atlack
Latent
1e2
Output
7.5
Adversarial Maarial--arreett Target Distance
16
10
Target-Recom Recon Distance
6.5
10"
12
Adversataal
10"
6.0
100
5.5
8
6.0
10
5.0
6
10
2
6
B
(c) Chairs Distances
(d) Chairs Losses
Latent Space F
3.4
Outpul Altack
Latent
163
Output
Adversarial- aaaaa-aa-TTaa Taarraaia---aggee Target Distance
Target-Rest Re--RR Dislance
1.70
10"
1.85
3.0
2.8
10²
1.80
1.55
6
10
2
6
10
B
(e) 3D Faces Distances
(1) 3D Faces Losses
Figure 10: Plots showing the effect of varying /3 in 3-TCVAE trained dSprites (a.b), Chairs (c.d), and 3D Faces (d,e) on: the Le distance from the adversarial target x' to its reconstruction when given as input (target-recon distance) and the Le distance between the adversarial input x= and x (adversarial-tart) distance); and the adversarial objectives A. We also include these metrics for "output" attacks -Gondim-Riieiro Ribeiro et al. (2018), which we find be generally less effective. In such attacks the attacker directly tries to reduce the L2 distance between the reconstructed output and target image. For latent attacks the adversarial-targe L2 distance grows more rapidly than the target-recon distance (i.e the degradation of reconstruction quality) we increase B. This effect is much less clear for output attacks. This makes it apparent that the robustness we see in 3-TCVAE to latent space adversarial attacks is not due the degradation in reconstruction quality we see as increases. also apparent that increasing 3 increases the adversarial loss for latent attacks and output attacks.
23

---

Published as a conference paper at ICLR 2021
E.1 DISENTANGLING AND ROBUSTNESS?
Although we are using regularisation methods that were initially proposed to encourage disentangled representations,
interested here in their effect on robustness not whether the representations we learn are in fact disentangled. This is not least due to the questions that have arisen about the hyperparameter tuning required for disentangled representations Locatello et (2019); Rolinek et al. (2019). For the / pre-factor is just the degree of regularisation imposed.
However, may be of interest to see what relationship, if any, exists between the ease of attacking of a model and how disentangled is. Here we show the MIG score (Chen et al. 2018) against the achieved adversarial loss on the Faces data for B-TCVAEs. MIG measures the degree to which representations are disentangled and larger adversarial losses correspond to a less successful attack. Shading is over the range of / and d, values. There does not seem to be any simple correspondence between increased MIG and increases in adversarial loss, indicative of less successful attack.
107
4000
100
20
Advervetaal
Adversenal
20
A
10"
2000
10
0.05
0.10
0.15
0.20
0.05
0.10
0.15
0.20
MIG
MIG
(a) Faces
(b) Chairs
Figure E.11: Adversarial attack loss reached vs MIG score for 3 8-TCVAEs trained on Faces and
Chairs presented for a range of B {1, 4, 6, 8, 10) and d, {8, 32) values.
24

---

Published as a conference paper at ICLR 2021
F ROBUSTNESS TO NOISE
3.04
ChaRS RLDI
0.004
(HRSS B.1
3.00
9-2
B-)
F-2
2.064
6004
0.004
2.02
0.00
0.000
3038
1093
2000 1160
2003 1830
(a) Chairs 3-TCVAE log (x(2)
(b) Chairs Seatbelt- VAE log (x(lz)
Figure F.12: Here we measure the robustness of both 3-TCVAE and Seatbelt- VAE when Gaussian noise is added Chairs. Within each plot range of values shown. We evaluate each model's ability to decode noisy embedding to the original non-noised data x by measuring the distribution of log (x(()z) when z 4s (z(z ae) (a some scaling factor taking values in {0.1, 0.5, 1} and ~ (0, 1)) for which higher values indicate better denoising. We show these likelihood values as density plots for the 3-TCVAE in (a) and for the Seatbelt-VAE with
in (b), taking (1,2, 4, 6, 8, 10). Note the axis scalings are different for each subplot. We see that for both produces autoencoders that are better denoising their inputs. Namely, the mean of the density, i.e. (x|x++e) [log po(x 2)]. shifts dramatically to higher values for B > 1 relative to 1. In other words, for both these models, the likelihood of the dataset in the noisy setting is much closer the non-noisy dataset when across all noise scales (0.1c, 0.5c, c).
models using 3 >
25

---

Published as a conference paper at ICLR 2021
G IMPLEMENTATION DETAILS
All runs were done on the Azure cloud system on NC6 GPU machines.
G.1 ENCODER AND DECODER ARCHITECTURES
We used the same convolutional network architectures as Chen et al. 2018). For the encoders all our models (q(- (q(-(x)) we used purely convolutional networks with 5 convolutional layers. When training on single-channel (binary/greyscale) datasets such as dSprites, 3D Faces, or Chairs the 5 layers took the following number of filters in order: {32, 32, 64, 64, 512). For more complex RGB datasets, such as CelebA, the layers had the following number of filters in order: {64, 64, 128, 128, 512}. The mean and variance the amortised posteriors are the output of dense layers acting on the output of the purely convolutional network, where the number of neurons in these layers is equal to the dimensionality of the latent space Z.
Similarly, for the decoders (p(x(z)) of all our models we also used purely convolutional networks with deconvolutional layers. When training on single-channel (binary/greyscale) datasets, dSprites, 3D Faces, or Chairs, the 6 layers took the following number of filters in order: {512, 64, 64, 32, 32, }}. For CelebA the layers had the following number of filters order: {512, 128, 128, 64, 64,3). 3). The
mean of the likelihood p(xl-) was directly encoded by the final de-convolutional layer. The variance of the decoder, o, was fixed to 0.1.
For 3-TCVAE the range of dz values used was 6, 6, 8, 16, 32, 64, 128}. For Seatbelt- the number of units in each layer z' decreases sequentially. There is a list z zisizes for each dataset, and for model of L layers that the last L entries to give dz,s; i {1,..., L}.
[dg) dSprittes (996, 48, 24, 12, 6}
(44)
{dz} Chairs 196,, 48, 24, 12, 6}
(45)
{dz} }. 3DDFaces (96,, 48, 24, 12, 6}
(46)
{dz] CelebA -(26,, 128, 62,
(47)
For Seatbelt- VAEs we also have the mappings (z 2 x) and pa (2)))). These are amortised as MLPs with 2 hidden layers with batchnorm and Leaky-ReLU activation. The dimensionality of the hidden layers also decreases as a function of layer index i:
dn (qs (z ++ zz,,, x)) haizes
(48)
du (po lz 1)) = haizes [i]
(49)
haizes [1024, 512, 256, 128, 64]
(50)
To train the model we used ADAM Kingma & Lei Ba 2015) with default parameters, a cosine decaying learning rate of 0.001, and batch size of T024. All data was pre-processed to fall on the interval -1 to 1. CelebA and Chairs were both downsampled and cropped as in Chen et al. (2018) and Kulkarni et al. (2015) respectively. We find that using free-bits regularisation (Kingma 2016)
greatly ameliorates the optimisation challenges associated with DLGMss
26


Reviews:
[{"review_id": "r40eqCHw2lJ", "reviewer": "AnonReviewer1", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "The paper considers the regularization of latent space toward achieving adversarial robustness against latent space attack. The paper demonstrates the applicability of disentanglement promoting VAEs for achieving adversarial robustness and further enhancing such VAEs by considering their hierarchical counterparts. The paper demonstrates their results in the benchmark datasets considered in the disentanglement and computer vision literature. The overall research direction pursued by this paper is exciting. However, I have some concerns, which include:\n\n1. The paper attempts to establish the connection between disentanglement and robustness. The linkage, however, is not clear. In section 3, the paper argues for the smoothness of the encoder mapping and the decoder mapping. Toward this, the paper postulates additional regularization to enforce \"simplicity\" or \"noiseness\". First of all, it is unclear how disentangled latent space helps achieve \"simplicity\" in the \"encode-decode process\". Secondly, regarding \"noiseness\", it is not explained what extra would disentangled version of VAEs (e.g., TCVAE) provide compared to the standard setup. \n\n2. In section 3.2, the paper empirically demonstrates the connection between disentanglement and adversarial robustness. However, the evaluation carried out are not explicit. Firstly, to demonstrate the connection, the paper uses the attacker's achieved loss \\delta (from Eqn 1) as the metric. Although the \\delta is shown across different \\beta values, it is still unclear if disentanglement is directly related to robustness. Can the authors point out some disentanglement metrics (e.g., MIG) for each beta and compare MIG vs. \\delta? Also, the curves are combined for all the d_z. What is the motivation behind doing that? Because it has been known that disentanglement behavior is related to the dimension of latent space. Also, authors could consider decomposing the first term of \\delta for all the latent space dimensions and analyze if the disentangled dimensions are robust compared to the entangled dimension. This could be more helpful to establish the linkage. Secondly, authors have picked TCVAE considering \"reconstruction quality\" compared to \\beta-VAE, but in Fig 2 (right), ELBO is compared. Can the authors compare the reconstruction error? Also, for fig 3, I think it is natural to see the comparison with \\beta-VAE. Why is such a comparison not included? \n\n3. In section 4, for the motivation for the hierarchical TC-penalised VAEs, the paper states that \"TC-penalisation in single layer VAEs comes at the expense of model reconstruction quality\". However, this directly contradicts the use of TC-VAE in the previous section. Although the results presented afterward support the authors' statement, the motivation must be clear and well written. The same comments for section 3.2 apply here too. \n\n4. The experimental results demonstrating protection against downstream tasks is performed using a simple 2-lear MLPs. This is different from the regular CNN network commonly considered for these datasets. Although this was meant to demonstrate the proposed model's efficacy, it would be more clear if the experimental setup is consistent with the current literature setting. Also, can the authors point out the initial results for the models before the attack? \n\n\nMinor comments:\n\n- There are a lot of grammatical errors and hard-to-follow sentences. Some examples:\n    - \".. are not only even more ..\"\n    - \".. attack the models using methods outlined ..\". But Eq (1) refers to only one method, right?\n    - \"… then \\delta too is small ..\" \n\n(Update): The score has been updated after a rebuttal from the authors. ", "extra_scores": {}, "extra_text": {}}, {"review_id": "QtVaB52NViJ", "reviewer": "AnonReviewer3", "summary": "", "questions": "", "limitations": "", "rating": 7, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "The paper considers the problem of training VAEs which are robust to adversarial attacks. It shows that learning disentangled representations improves the robustness of VAE. However, this hurts the reconstruction accuracy. The paper then shows that using hierarchical VAEs can ensure robustness without sacrificing reconstruction.\n\nStrengths:\n\n1. The problem considered is interesting and relevant. There is very little work on training robust VAEs---though they have been found to not be robust, and are also used for training robust classifiers downstream.\n2. The paper uncovers some interesting phenomenon about VAEs such as links between disentangled representations and robustness, and tradeoffs between disentanglement and reconstruction accuracy.\n3. The method also provides some protection for downstream classification tasks.\n\nWeaknesses:\n\n1. There is a lack of baselines to compare against, and the paper has not really stress-tested the algorithm to ensure it is in fact robust. Most of the literature on adversarial examples does significantly more extensive testing to attempt to break the model. \n2. I found the story and the experimental evaluation a bit incomplete. Though the experiments demonstrate that the method achieves success in practice, the paper does not seem to sufficiently explore \"why\" it seems to work. I think this is a bit important here considering the previous point regarding baselines and testing. At the moment, it seems like the paper combines these two ideas of learning disentangled representation and hierarchical VAEs in a somewhat ad-hoc manner which ends up providing some robustness, but it is a bit opaque why this is supposed to work. Some experiments or ablation studies which establish a more direct link between disentangled representations and robustness will be helpful.\n\nOverall, I think this is a decent paper but I don't feel that I can advocate strongly for it since the scientific contribution seems a bit limited. \n\n------Updates after author response------\n\nI thank the authors for the response and the new experiments. In light of the clarifications and additional evaluations, I have increased my score to 7.", "extra_scores": {}, "extra_text": {}}, {"review_id": "GA26ylAC_rc", "reviewer": "AnonReviewer2", "summary": "", "questions": "", "limitations": "", "rating": 7, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "Summary: This work builds on the vulnerability of VAEs to adversarial attacks to propose investigate how training with alternative losses may alleviate this problem, with a specific focus on disentanglement. In particular it is found that disentanglement constraints may improve the robustness to adversarial attacks, to the detriment of the performance. In order to get the best of both, the author(s) propose a more flexible (hierarchical) model, trained with the beta-TC penalization on the ELBO. The algorithm, named Seatbelt-VAE, shows improvement over the beta-TC VAE in terms of reconstruction, as well as in term of adversarial robustness for several datasets (Chairs, 3D Faces, dSprites). \n\nComments: \n1. The paper is well-written and the underlying reasoning is easy to follow.\n2. The experiments are sound and well documented (results are reported across latent space dimensions, and adversarial attack parameters)\n\nQuestions:\n1. I am wondering how the bias of estimating the TC term on Z^L in Eq (8) scales with L and the minibatch size, compared to the more simple TC estimator from Chen et al. (2018) and if the author(s) had any evidence from the experiments that it might be problematic? Does the algorithm require even larger batch sizes?\n2. Should this approach be compared as well to weight decay or other simple regularization on the weights?\n\nMinor questions:\n3. I wish the paper would make a stronger connection between disentanglement and robustness. The beta-TC VAE is only one choice among other possible to constrain the variational network. Did the authors ever try anything else? \n4. Is it possible that the TC-VAE is effective at providing a defense against adversarial attacks in this manuscript because of the nature of the attack used in this manuscript (Eq. (1))? If the attack was not based on the Kullback-Leibler divergence, but based on another geometry, maybe another disentanglement constraints would be more performant?", "extra_scores": {}, "extra_text": {}}, {"review_id": "6OJJhfUxgNN", "reviewer": "AnonReviewer4", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "--Summary:\nThey proposed a robust method for the adversarial attack on VAE using a hierarchical version of $\\beta$-TCVAE and conduct analysis on the relationship between disentanglement and robustness to support their choice of approach. The experimental results demonstrate the effectiveness of the proposed defense method.\n\n--Strongness:\n1. The paper is well organized.\n2. They provide extensive analysis of their approach and provide proof.\n3. They demonstrate that the proposed method is more robust to other VAE baselines for the attacks.\n\n--Weakness:\n1. The qualitative results are not quite convincing. See below question 1.\n\n\n--Questions:\n1. Question on qualitative results:\n- For Figure 1, the adversarial examples for the three approaches are largely different. For the baselines -- VAE and $\\beta$-TCVAE, the provided inputs look not like just applying a small noise/distortion (which is the setting of adversarial attack) but have a huge difference from the original input. Therefore, the reconstructions can be expected that it won't look similar to the original reconstruction.\n- In Figure 6(c), are you using similar adversarial examples / similar amount of distortions to generate the reconstruction images for $\\beta$-TCVAE and your approach?\n\nI'm not an expert in the adversarial attack domain, but shouldn't the adversarial examples be similar across different baselines?\n\n2. Figure 4(b) top-right adversarial example seems not to be distorted (almost the same as the input). Is it the adversarial example derived by applying distortion? Since the distortion is large, I don't know why the adversarial looks just the same as the input.\n\n--Recommendation\nIn sum, the paper is well organized and consists of extensive theoretical proofs and experiments. While I'm not very convinced by the results. I vote for a more neutral score for now. The authors are couraged to address these issues.", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper presents a hierarchical version of β-TCVAE that promotes disentanglement in the latent space and improves the robustness of VAEs over adversarial attacks, without (much) degeneration on the quality of reconstructions. The analysis on the relationship between disentanglement and adversarial robustness is valuable and the method is new. The results look promising. The comments were properly addressed.
Decision: Accept (Poster)