Out-of-Distribution Detection with An Adaptive Likelihood Ratio on Informative Hierarchical VAE
Authors: Yewen Li
Chaojie Wang
Xiaobo Xia
Tongliang Liu
Xin Miao
Bo An
Venue: NeurIPS 2022 Accept (2022)
Keywords: Unsupervised Out-of-Distribution Detection
Hierarchical VAE

Abstract: Unsupervised out-of-distribution (OOD) detection is essential for the reliability of machine learning. In the literature, existing work has shown that higher-level semantics captured by hierarchical VAEs can be used to detect OOD instances.
However, we empirically show that, the inherent issue of hierarchical VAEs, i.e., ``posterior collapse'', would seriously limit their capacity for OOD detection.
Based on a thorough analysis for `posterior collapse'', we propose a novel informative hierarchical VAE to alleviate this issue through enhancing the connections between the data sample and its multi-layer stochastic latent representations during training.
Furthermore, we propose a novel score function for unsupervised OOD detection, referred to as Adaptive Likelihood Ratio. With this score function, one can selectively aggregate the semantic information on multiple hidden layers of hierarchical VAEs, leading to a strong separability between in-distribution and OOD samples. 
Experimental results demonstrate that our method can significantly outperform existing state-of-the-art unsupervised OOD detection approaches.

Out-of-Distributio Detection with An Adaptive Likelihood Ratio on Informative Hierarchical VAE
Yewen Li Chaojie Wang + Xiaobo Xia?
Tongliang Liu Xin Miao
Bo An'
NNayyang Technological University
University of Sydney Amazon
Abstract
Unsupervised out-of-distribution (OOD) detection is essential for the reliability of machine learning. In the literature. existing work has shown that higher-level semantics captured by hierarchical VAEs can be used detect OOD instances. However, we empirically show that, the inheirt "posterior collapse" of hierarchical VAEs would seriously limit their capacity for OOD detection. Based on a thorough analysis, we propose an informative hierarchical VAE to alleviate this issue through enhancing the connections between the data sample and its multi-layer stochastic latent representations during training. Furthermore, we propose novel score function for unsupervised OOD detection, referred to as Adaptive Likelihood Ratio, which can selectively aggregate the semantic information multiple hidden layers hierarchical VAßs, leading to a strong separability between in-distribution and OOD samples. Experimental results demonstrate that our method can significantly outperform existing state-of- thehhhatt unsupervised OOD detection approaches.
1 Introduction
Despite achieving great success in real-world applications recently, existing machine learning (ML) systems are still designed to be tested on the in-distribution dataset, whose statistics are similar to those of the training set [П]. However, when applied to deal with the dataset consisting of out- of-distribution (OOD) samples, whose statistics are extremely different from those of the training set, these MI. systems would produce series of incorrect judgments 2 4 Considering the fact that OOD data is very common in real-world applications, pre-execution OOD detection is increasingly attractive to make
the reliability and safety of ML systems. Although several
supervised methods [5, 6 Z 10 IIl [2 [3] 14 15 [6] have achieved great success in OOD detection, the unsupervised ones are more practical since the category labels of in-distribution samples are often missing in real-world applications, which brings more challenges for OOD detection and is also the focus of this work.
Without labels, likelihood based models could be a promising way for unsupervised OOD detection, such as flow-based models [17). auto-regressive models [18 19], and variational autoencoders (VAEs) 20 21
21 23 Unfortunately, some recent studies have shown that, in some cases, these generative models tend achieve higher likelihoods certain types of OOD samples [I] 24 26 27] which makes the OOD detection methods based on thresholding likelihood scores problematic. To address this issue, based the prior knowledge collected from OOD samples, some improvements have been made for unsupervised OOD detection, i.e., Ren et al. I take additional datasets as the OOD validation sets for choosing the best hyperparameters: Hendrycks et al. [28 introduce an auxiliary dataset to teach the network to learn more expressive representations for OOD detection; However, the behaviour of borrowing the prior knowledge of OOD data is usually
22
"quual contributions. Conresponding to: Chaojie Wang <chaojie. wang @ ntu.edu.sg>.
36th Conference on Neural Information Processing Systems (NcurIPS 2022).

---

unreasonable in practice, because we will never know the statistic information of OOD samples to be dealt with.
To conduct purely unsupervised OOD detection without the labels or prior assumptions, deep ensemble method named WAIC [24] is developed by making full use of the difference between the
density estimations of multiple independent models trained on the in-distribution data. Recently, through capturing the semantic information with multi-layer latent variables, Maalée al. [29] and Havtorn et al. [27] develop various score functions based on Likelihood-Ratii which help hierarchical VAEs achieve competitive performance in unsupervised OOD detection. However, in our implementation, we find that the phenomenon of "posterior collapse" in hierarchical VAEs still limits their performance on OOD detection, where the main reason could be that "posterior collapse" will make the high-level latent variables meaningless and cannot provide faithful summaries for the data.
With this insight in hand, in this paper, start from rethinking the cause of "posterior collapse" in hierarchical VAEs, and then theoretically explain why "posterior collapse" will limit the OOD detection performance of these Likelihood-Raie based methods. Further, we develop an informative hierarchical VAE to alleviate "posterior collapse" and a novel Adaptive Likelihood Ratio score function for unsupervised OOD detection. The major contributions of this work include:
With thorough analysis of "posterior collapse" in hierarchical VAEs, we enhance the connections between the data sample and its multiple latent representations in the expected log- liellike term of evidence lower bound (ELBO) for training, and develop novel informative hierarchical VAE to extract more expressive hierarchical latent representations. We theoretically explain why alleviating "posterior collapse" in hierarchical VAEs can help the performance of Likelihood Ratio on OOD detection, and then develop a novel score function for fully unsupervised OOD detection, termed Adaptive Likelihood Ratio, which owns fewer hyperparameters to be tuned and can make full use the semantic divergences between in-distribution and OOD samples across all hidden layers of hierarchical VAEs. Combing the informative hierarchical VAE with the Adaptive Likelihood Ratio, we demon- strate that our method can achieve -fate-of-thh-art OOD detection performance across wide range of benchmarks in an unsupervised manner.
2 Background and Related Works
2.1 Hierarchical Variational Autoencoder
Preliminary: Extending the basic VAE 20). hierarchical VAE 30 31 is defined by the observation e that depends on a hierarchy of stochastic latent variables z 21, #L where the generative model
is defined with a top-down structure, formulated as (a 2) -oo (az) 21) II Po (0(22/211 )Po (=):;
the inference model is designed to approximate the posterior over these latent variables, commonly factorized with a top-down structure as 40 1 a=) = I 2 (z) )go (=1. |az) or a bottom-up le (z)z) 21 [z:). The demonstration of these structures could be seen in Fig. [ The parameters of the generative and infernce models, denoted as and é respectively, can be jointly optimized by maximizing the evidence lower bound (ELBO) expressed
structure (2|z) T'
L = Ey(a)) [L.r a;; 6)],
(1)
where C. is denoted as
Lu logp(æ) De
= (=tm) Po (m)=)] DRL (
(2)
where (xi(-1l-) denotes the KI. divergence and maximizing ELBO is equivalent to minimize the divergence between the varaitional distribution (=(xx) and true posterior (=(zz)
While the hierarchy of latent stochastic variables can improve the generation capability of standard VAEs, in practice, the posterior of higher-level stochastic latent variables have a tendency to collapse into the prior, called "posterior collapse". To address this issue, Sønderby et al. [30 propose a Ladder VAE (LVAE) to change the bottom up inference process into a top-down one: Vahdat and Kautz [11] develop variant of the LVAE, which carefully designs a sophisticated network architecture to achieve better generation quality; Maaløe et al. (29 combine the bottom- up inference with the top-down inference by proposing bidirectional inference scheme. Despite obtaining performance improvements with more flexible inference networks, these hierarchical VAFs
Related Works:
still lack a theoretical guide to alleviate the phenomenon of "posterior collapse".

---

23
Z3
22
22
Z2
Po(xiz5a)
Z1
Z₁
Bottom-up Inference
Top-down
Generation
Partial Generation
Inference
Figure 1: Illustration of the usual structures of both inference network and generative model in hierarchical VAEs.
2.2 Out-of-distribution Detection with Variational Autoencdoer
Suppose that there are set of N training samples (æ: ) drawn from the data distribution p(æ). after training VAE to model the generation of these data samples, the generative model pa(x) is supposed to detect whether testing sample æ is an outlier, where the outlier should have low density estimation under the true data distribution p(æ). However, on the contrary, former likelihood- based methods found the generative model always assign higher po(x) for OOD data than in-distribution data [ 24 25 26 Luckily, although the likelihood based methods with VAE are rarely investigated, they have revealed the potential to better address this problem without the help of labels or assumptions about the prior.
Problem Formulation:
Related Works: A pioneering VAE-based OOD detection method is Likelihood Regret (LRe) 32 obtained by iteratively finetuning the decoder parameters of VAF, which is time-consuming but achieves competitive performance in an unsupervised manner. Maalde et 29 reveal the potential of hierarchical VAE for OOD detection and Havtorn et al. (27] further propose a score function to improve the model performance, which needs to specify the backbone model. The backbone models in likelihood-baat based methods M24 E3] can be directly replaced with VAEs, but these methods usually
underperform dow-based models like Glow 17 or autoregressive models like PixelCNN 19
3 From Informative Hierarchical VAE to Adaptive Likelihood Ratio
3.1 Rethinking of "posterior collapse" in Hierarchical VAEs
Firstly, let's understand the cause of "posterior collapse" in hierarchical VAEs theoretically. Taking an L-layer hierarchical VAE with a top-down inference network as an example, the set of latent variables can separated as the lower-level variables =< {21, .... 2x and the higher-level ones >> {= }r}, where & E {O...., L 1}, then the ELBO in Eq. ① can be reformulated as
C = Ep(w) Egg Beu lo
Σ i-m Dxi (z)(())))))))) Ipo (=](2
(3)
where go (0(z1(z141)
(= p6(21/z1-1) := (=(),,, and the main contribution the expected ligelikelihood term is coming from the lower-level latent variables z before the kth hidden layer [2 Once the generation capacity of the generative model pe (=) is powerful enough to reconstruct the observation æ well, the variational posteriors of higher-Ievel latent variables z will be optimized to close their priors, i.e., qo (=<=)(²)) z pe xk), leading the representations
learned by VAE at higher layers to be meaningless and cannot provide faithful summaries for which
well-known as the phenomenon of "posterior collapse" or "latent variable collapse" 30
To find the potential solutions to alleviating "posterior collapse", in the following, we reinterpret this phenomenon from the perspective of information theory (35) by extending the findings in [34
hierarchical VAE scenario. For ease of undertanding, we define the mutual information between the data æ and the higher-level latent variables ž
Igg (2x >>*) = - Hl (z> (x) + Hy (z>)) (p(a)js log (z - Eg (=>a) log qs (x>)))

---

Po(1)
Po
7
4
2
3
5
1
2 2
7
4
2
3
5
1
(alesa))
po(*(ss))
7
4
1
3
5
2
pa(H(Rsa)
Po(*|ssa)
Po(+)Ps))
FashionMINIST (in)
(b) MNIST (out)
Illustration of "posterior collapse" in 5-layer hierarchical VAE trained on FashionMNIST (in) by visualizing its reconstructions conditioned on various Σyk for both in-distribution and OOD) samples. The first row is the imput æ, and the other rows are generated from the partial generative model pa zk by taking zy drawn from (z<x>x(<z) as input, where (O.....4 4).
Figure 2:
which is induced by the variational posterior 4s (= az). Then KL. term in Eq. B can be rewritten as
Ep(x)
Dxa 2141 [10
1m1
=Ep(=)
Σ
DRI,
+ Ep(a) [Der
(4)
im1
=Ep(=))
Dxi (xi (2))))))))) (2)
+ II, m>*) + Dr (4+(2>e) [po()>)));
where qa (= Exp(ae) (na x [=]] and the detailed derivation can be found in Appendix A By substituting Eq. into Eq. (3), due to the non-negativity of mutual information and KI. divergence, we can find that maximizing the ELBO is opposite to maximizing the mutual information Iy (x, >**).
When (x,, x*) minimized zero, the variational posterior (o(2>>) (<>x<<>)) will be independent of the data æ, which leads to the phenomenon of "posterior collapse".
3.2 Why "posterior collapse" limits Likelihood-Rann for OOD Detection
OOD detection has become one of the most important applications of VAEs, which can be applied to filter OOD samples by setting a threshold on the score of log-likelihooe term. However, some recent studies have shown that, in some cases, VAEs tend to achieve higher likelihoods on certain types of OOD samples (36), which makes the OOD detection rules based on likelihood threshold problematic. Recently, Havtorn et al. [27 reinterpreted this problematic behavior by providing evidence that the low-level features learned by VAES generalize well across datasets and dominate the estimated likelihoods. Inspired by the alternative log- likelihoodd lower bound [29] that partly replaces the inference network with the generative model to highlight high-level features, formulated as
logp(x) (ka po (* ggll > q (*> (x) lppp (* [z)),
(5)
Havtor et al. 27 considered to subtract L2 from L. to cancel out the data distribution log p(x). resulting in likelihood-ratie score for unsupervised OOD detection
CCR>* Dxa (po (0)0 > [p)
Dx Dx (2 >* (=> [=)) (p (=(x)),
which discards the likelihood term to prevent the low-level features from dominating and measures divergence the latent space to ensure that data should be in-distribution across all feature levels.
To intuitively understand the nature of success in the likelihood-ratio score and illustrate why alleviating "posterior collapse" in hierarchical VAEs improve its performance OOD detection, we provide an insightful analysis on LCR in Eq. (6 by reformulating as follows:
CCR²* (gg((sa (Po <=) (zg Dx (=<gq((=) (=g 2 x)]
(qgt (Po (*<u (==))==)))]]]]
where the detailed derivations can be found in Appendix B Eq.
shows that, when the inference network (=( {>))) can approximate the true posterior Pa Zck >> œ) very well, thorough equiv-
alent replacement, LCR>* >k will approach the expected KL divergence between the prior p

---

and variational posterior go(=<A| More specifically, conditioned on the expectation of > drawn from its variational posterior go (x(>><<z), LCR is developed to calculate the summation of k KL. divergence terms, measuring the distance between the lower-level variables z drawn from the generative model <=<=<|>>>)) and those from the variational inference network (0(2<<]=>*)
The premise of applying LCR* to OOD detection is that, after training hierarahical VAE on in-distribution samples, for each OOD sample, the latent variables zgk generated from the generative model po(=<<|z>>) will be clearly distinct from those drawn from the variational inference network (o(=<* k>*)) For ease of understanding the principle, after training a 5-layer hierarchical VAE on FashionMNIST, for each hidden layer, we exhibit the reconstructions of both in-distribution (FashionMNISTT) and OOD (MNIST) data samples with the partial generative model (o(2| >x*x) conditioned on the latent variables Σ drawn from {z<م> (a) shown in Fig. 2 From the results, we can find that, when setting h = 2. the reconstructions of MNIST samples tend to reflect the high-level semantic structures learned from FaSHionMNIST, indicating that the generation mechanism of po (æ x>2) seems to prevent accurate reconstruction of out-of-distribution data, which implics that a score function based on the distance between Po (#ga|>>>) and go (z<z|=>>) like LCR >2 in Eq. 77. could be promising metric for OOD detection.
However, when the phenomenon of "posterior collapse" occurs, the variational posterior go (2 (z) will be independent of the data æ resulting in {o(=>x(a=) s po(z>.), and the reconstructions of in-distribution and OOD samples, which are generated from the partial generative model po(ar) zy.). will be almost the same, such as the visualization examples shown in Fig. 2 by setting k = 3 or
k = 4. In that case, for each in-distribution sample, the latent variables z<* generated pe (=<x|=>>A will be clearly distinct from those drawn from 9o [ ( [>))), and similar conclusions can also be achieved by OOD samples, which will reduce the variance of LCR > scores between in-distribution and OOD samples and further bring troubles for OOD detection with LLR2*
3.3 Informative Hierarchical VAE to Alleviate "posterior collapse"
Recall to the conflict between the ELBO objective and (x, z>*) as discussed in Sec. 3.1 which causes "posterior collapse" in hierarchical VAEs, there could be two main approaches to alleviate
this phenomenon, including: 1) downweight the KL term, like applying a warm-up scheme on 37 which is the most common heuristic in practice but still cannot essentially address this issue; 2)
enhance the connections between the observation and its multi-layer stochastic latent representations
in the expected log- log-likelihood term, like modifying the generative process described by Pe (a: 2) (29).
In this paper, focused on exploring the potential of alleviating "posterior collapse" with the second approach, we try to introduce skip-comnection-like structures into expected log- likelihodd term to enhance the connections between the data æ and the latent variables z ž1, ..,. Z. However, con- strained by the layer-by-layer generation process of hierarchical VAE, there remains great challenge to introduce physical skip connections into the generative model po (I) z)) because arbitrarily adding or concatenating the stochastic hidden layers at different semantic levels will hurt the hierarchy of these multi-layer latent representations. We emphasize that the skip connections hetween the single stochastic layer and multiple deterministic layers (34 cannot be extended for hierarchical VAEs with multiple stochastic hidden layers, but our developed method below can be applied to any existing hierarchical VAE, which is one of the main contributions of this paper.
Generally speaking, moving beyond downweighting I, (x, 2**x) included in the KL term or modifying the structure of generative model (2 z), our main idea is to upweight the mutual information between the data x and the higher-level variables zsk, which is denoted as
(8) in the objective function of hierarchical VAES. In Eq. (8). the first item can be approximated by
(x, >) -H, >})) + H4, ax) Epte))ne ( log (= Ep((>) log p(z:),
Hy.g(32 (z) >>*) = (Ep(a))o(=>>all) log Po (a) >*) and H. (x) a constant, leading to the optimization direction of I, (x. >>*) is consistent with Hg,, >>)) Thus, targeted at directly maximizing multiple Hp. (z) >b), we develop an informative loss for training hierarchical VAEs, denoted as
1
(x pa [ Σ'., ( (aateeeall//aa):ll//////// ()(=(())))111))
n = Ep(()
where po (2) = Epo (#)) (no (#|=g])) describes a partial generative model to reconstruct
the observation x taking si drawn from the variational inference network go < (z) as input; the
5

---

weight L before each expected term is introduced to keep numerical stability. The developed L not only inherits the terms of ELBO in Eq. ( which helps preserve the original model properties of VAF, but also introduces virtual skip-connection-lice -iiee structures with partial generative models to enhance the connections between a and Byk, contributing to alleviating "posterior collapse".
To avoid directly calculating (=)))>>)) in practice, inspired by [27] 29), the informative loss in Eq. (9) can be optimized by maximizing its lower bound L expressed as
L 2 Čin =I -p(())
k=0 (po(sgallss)) hogps///oooeeeeeoooooo/ooo/ss/l)
-p(())
DxL Dalleeeee////NNNDlllllll
(10)
where the expected log-likelihood term is the summation of L components and each component de- noted CC*E = (otp(=/gllss)) [log (e(p(=<<x)) can be obtained by replacing the inference network 40 (=<x in the original log-likelihood term as described in Eq. (3) with the generative
model pa (=))) Intuitively, for each expected log-likelihood term CC* after sampling the top variables > from the variational posterior {0(*>*())) x)), these variables z will be forced to reconstruct the observation with the partial generative model pe (x)]=)), which builds the straightforward connections between x and Σ> to alleviate "posterior collapse".
We refer to the hierarchical VAE trained with the lower bound of informative loss in Eq. (IO) as informative hierarchical VAE. We note that this method is applicable for hierarchical VAEs with either top-down bottom-up inference network to explicitly utilize the generative hierarchy of the multi-layered stochastic variables during training, and can be flexibly extended in future works.
3.4 Adaptive Likelihood Ratio for OOD detection
Besides "posterior collapse", an inappropriate choice of l in the likelihood-ratio score function. denoted LCR in Eq. (6). will also bring negative impact on the performance of applying hierarchical VAEs for OOD detection. Recall to the visualization examples in Fig. 2 when setting k or 1, the reconstruction quality of either in-distribution OOD samples is surprisingly high, leading to the LCR>E scores both in-distribution and OOD samples are relatively small and further making it difficult to distinguish whether the data sample is OOD or not. Moving beyond cherry picking the hyperparameter k on testing OOD samples, which unreasonable for unsupervised OOD detection, we develop a novel adaptive likelihood-raie score function LLR described as
R(I, (CCR>* LCR k=U R(x,E>H)
LLRada
(11)
where R(x, k5*) is designed to measure the relevance between the data sample x and its latent variables н>* sampled from the variational posterior qo (()>))/)) specifically defining CLR 2-CR>-1_0 = and 2x-1) = R(æ, 200). More specifically, there are many choices for the definition of R(x, x)), but in the following experiments, we only use the log-likelihood score for brevity, by specifically defining R(x, >*) == 1/ log po(x|>>*)
The intuition of designing LLR is to move beyond the choose of k but adaptively enhance the importance of some discriminative terms, like LCR>? in the overall score function for OOD detection. With R(x, >>) to measure the relevance between æ and >>k, we find that the adaptive weight R(a,256-1) will be relatively large when the data information drop rapidly at the current R(..zse) hidden layer, like A = in Fig. 2 which can be naturally applied as the importance weights to enlarge the gap between the metric scores of in-distribution and OOD samples. Compared to the previous score functions for OOD detection [27 32), the developed LCRada Eq. (TT) owns less perparameets to be tuned, making its performance more stable on various benchmarks. More discussions about LLRade can be found in Appendix C

---

Table I: The comparisons of the 5-layer informative hicrarchical VAE with CCR and other OOD detection methods. The state-of-the-ard results achieved by the methods of the category "Not ensembles" of "Unsupervised" have been bold.
PunkinNENISTiiiMMNSSSTT
Labels
Prior
Unopervised
Labels
Peior
Unsuperisee
AUROOC
Mehrod
AUROC-
AUROCT
AUROC:
Mehod
AUROCT Method
AUROCT
73.4
LRPPC)
99.4
Ensombles
MD
99.7
LRPPC 1
95.0
Jinsembles
CP(Pat]
74.6
LRIBC)
45.5
WAICIVVAR)
X4
76.6
LMD 88
27.9
LR(VAR)
26.5
WAIC(3Glom
X
90.0
75.2
CPODDY
1
WAIC(SPC) 23
6288
VIB [
91.1
CPCCal [
90.4
Not Ensembles
DE 14
95.7
ICG)lon
A3
95.0
.Nrr Envembles
MD(CNN)
04.2
(C((loo))
99.8
1.Re
98.8
ICPC+++
92.9
1.Re
87.5
MDDDN) 0
98.6
(C(PC++)
96.7
IVV 2h
98.1
ICHIAAE)
33
83.3
IIVK 22
89.1
DE
85.7
(Cur)))(Unn)
98.0
(Ouns)
94.2
Table The comparisons of the 3-layer informative hierarchical VAEs with various score functions and other unsupervised OOD detection methods.
CHARIMMASVHNNN
Method
AUROCT
AUPRCT
FPRS0]
Method
AUROCT
AUPRCT
FPR80]
WAIC(SPC)
24
22.1
40.1
91.1
WAICLSPC)
24
62.8
61.6
65.7
27
98.4
98.4
1.3
HVK 27
89.1
87.5
17.2
-Our::
-Ours:
51.8
67.9
49.9
51.0
79.4
CCR-1
97.5
97.0
2.8
CCR>1
68.4
71.3
61.8
CCR
97.4
97.7
1.2
CCR
93.0
92.5
10.8
LCR
97.0
97.6
0.9
CCR
92.6
91.8
11.1
Experiments
4.1 Experimental setup
Datasets: Following I 17 we compare our method with previous works on two dataset pairs,
including: NNSHionMNIST where the suffix "in" and "out" denote the mn-distribution dataset and OOD dataset, respectively. To better evaluate the generalization ability of these methods, introduce additional OOD datasets: for
39
(in) / MNIST [40] (out) and CIFAR10 [4] (in) SVHN 42 (out),
FashionMNISST/MNIST pair, we add KMNIST [43], notMNIST 44). Omniglot 45 and SmalINORB
[66] datasets; for CIFAR 10/SVHN pair, add CelebA 47 Places365 48 Flower1
49 and
LFWPeople 50 datasets. More details about datasets can be found Appendix
Evaluation and Metrics: We follow the evaluation procedure in Havtorn et al. 27 where all methods are trained on the training split of the in-distribution dataset, and their OOD detection performance is evaluated on both the testing split of the in-distribution dataset and OOD dataset. Fol- lowing previous works' evaluation approaches 5 28 we adopt two popular threshold-inded irrepeeeddiddeeedeent evaluation metrics, including Area Under the Receiver Operator Characteristic (AUROC1) and Area Under the Precision Recall Curve (AUPRCT), and another metric False Positive Rate at 80% true positive rate (FPR8OL), where the arrow indicates the direction of improvement.
Baselines:
The comparisons our experiments mainly include two aspects: i) the comparisons with previous OOD detection methods to see whether our method can achieve competitive performance; ii) the comparisons with several hierarchical VAEs to see whether the new training objective of our method can lead to better performance. For the comparisons in i, the baselines can be divided into three categories: "Labels": methods using in-distribution data labels [5]
9 38 51: "Prior": methods using the prior knowledge collected from OOD data 1 28 33 and " "Unsupervised".
methods without any OOD-specific assumptions 22. 27 32). For the comparisons ii, we compare method with a normal bottom-up inference hierarchical VAE (HVAE) (20), which is also the backbone of our method, and its two major variants: a top-down inference hierarchical VAE named
Ladder VAE (LVAE) 30 and bidirectional inference hierarchical VAE (BIVA) (29] More details of these baselines and the categories they belong to can be found in Appendix
we set the network structure of hierarchical VAEs as [16, 8, 4] and [32, 24, 16, 8, 4] from shallow to deep, respectively. For CIFAR CIFAR10(in)SS 1(in))SVHNNouu, we set the network structure as [128, 64, 32] and [128, 64, 32, 28, 24], respectively. For optimization, we adopt the same Adam optimizer [52] with learning rate of 3c-4. We train all models in comparison by setting the batch size 128 and the max epoch as
Implementation Details: For the comparisons on DestiooNNISST((//MNIISII
7

---

Table The comparisons of the OOD detection performance of various 3-layer hierarchical VAEs with the same CLRada score function. "MI" refers the metric AUROC1, "M2" refers to the metric AUPRC1, and "M3" refers to the metric "FPR804".
Trained MNSH.
Trained CIFARIO.
00D
KMNIST
Omniglot
nocMNIST
SmalINORB
CelchA
Places365
Flower102
LPWPeople
M2
ML
HVAE
86.4
89.7
29.0
99.8
99.9
0.00
85.3
88.
29.2
100
100
0.00
39.8
44.7
90.0
40.1
46.5
94.0
45.2
51.7
92.0
42.5
48.
92.5
30
93.6
97.3
97.7
0.8
54.2
80.5
56.2
53.7
74.4
56.5
BIVA
96.4
97.0
98.7
98.6
1.9
70.5
67.8
53.2
60.1
63.0
61.9
69.2
0.00
100
72.1
70.5
49.0
62.1
EvchooatNGT (e11 HWST Joud
CIPAR10 (H0/ SUHN JouO
CIRARD (e11 Sibii loutt
Thed Phatire Dalo
Rish ccR Mines
aut paao
LSGG cc8 spus3 IVVE polec
Duma (28-15
(a)
(b)
(c)
Figure 3: Plots of the ROC curves on the OOD detection performance of various hierarchical VAEs. (a)~(b): ROC curves on FNSST (in) / MNIST (out) and CIFAR10 (in) / SVHN (out) with the same score function LCR>² (c): ROC curves on CIFARIO (in) / SVHN (out) with various score functions (CCR and LCRada). "M1" denotes for the AUROC value.
1000. All experiments are performed on PC with an NVIDIA RTX 3090 GPU and the our code implemented with PyTorch [53]. More implementation details can be found in Appendix FF
4.2 Quantitative Comparisons
Following the experimental settings in Sec. 4.1 results in in Tab. [ From the results, we can find that our method with the LLR score function is comparable with those non-ensemble completely unsupervised methods in FashionMNISTMMIISTT and significantly outperform them in CIFAR LO/SVHN. We emphasize that, without utilizing the labels of in in-distribution samples [5] 6. 8 9 38 51 or the prior knowledge collected from OOD samples 33,, our method can still achieve competitive performance with these methods.
Overall Comparisons:
we exhibit the experimental
Effectiveness of LLRada; Focused on the comparison between LCR> and LLR exhibited in Tab. 2 and Fig. 3(c) when the performance of C is sensitive to the selection of we can find that the performance of LLR ada can approach the best performance achieved by CLR>> with the optimal k as shown in the right part of Tab. Tf (CIFAR///II
Furthermore, when the performance of LCR> >k is stable, the developed LCR can still achieve comparable OOD detection performance, and Fig. 3(c] The experimental results above demonstrate the adaptability of our developed LLR
as shown in the left part Tab. 2 [FaashionMIIST/MMNN
Tarne SoStarMMS
Traired Pastiontints
Hermel lige
Narrekes Lay
Hormatoedd Line
2
14
BIVA
(b) Ours
(c) BIVA
(d) Ours
Figure 4: Empirical densities under the score function LCR>² on FashionMNIST (in)MNIST (out) and CIFARIO (in)/VVH (out) dataset pairs.
8

---

Zhe
Zug
the
Poy
The For Fay Thy
OST
Cst
9
9
5
5
3
3
3
(a) FashionMNIST (in)
(b)
MNIST (out)
7
Ourt
BAW
HIAL
USKE
(c) KMNIST (out)
(d) DotMNIST (out)
Figure 5: Comparisons of reconstructions with 3-layer hierarchical VAΣs trained on MNSHIO where the leftmost column in each subfigure is the input æ and the column noted with Σy means generation from the partial generative model pa (0(2) z>*) with & E 1,2].
5
1
2
2
4
7
2
4
5
7
2
L/
0
(a) OurSSFashioMNIST
(b) Ours/MNIST
(c) HVAIFAshionMMNIST
(d) HVAE/MNIST
10
5
50
5
O
IVS
10 55
(e) Ours/CIFARIO (in)
(f) OUNN (out)
(g) HVAE/CIFARIO (in)
(h) HVAE/SVIN (out)
Figure 6: Comparisons the degree of "posterior collapse" in 5-layer hierarchical VAEs. For each
subfigure, the 1st row is the input image x and the ith row is generated from po (x/==))).
Effectiveness of Informative Hierarchical VAE: Taking the same LLR the score function. we compare the performance of informative hicrarchical VAE with other hicrarchical VAEs in Tab. From the results, alleviating "posterior collapse" with informative hierarchical VAE for OOD detection.
find that our model outperforms others, indicating the effectiveness of
To evaluate the degree of "posterior collapse", we use the ROC curves in Fig. 3 and the empirical den- sities in Fig. compare the performance of LCR> scores based on the top-level latent variables of these VAEs. The ROC results Fig. 3 demonstrate the superiority of the informative hierarchical VAE, confirming that our model can provide more expressive higher-level latent representations for OOD detection. The empirical densities in Fig. 4 show that ø2 learned by our model on the CIFAR10 (in)/S VHN (out) pairs owns better separability than those learned by BIVA.
4.3
Qualitative Analysis
Mcaningful Semantic Space Learned by Informative Hierarchical VAE; Following the same procedure as Fig. 2 we visualize more reconstructed samples on various benchmarks in Fig. 5 From the visualized results, for both in-distribution and OOD samples, we can find that the quality of the reconstructions generated from Po (x) 2 >0) is surprisedly high, indicating that these reconstructions are almost dominated by the low-level features, which potentially explains the previous problematic phenomenon that these methods based on single-layer likelihood will assign higher likelihood scores for OOD samples and fail on OOD detection. Focused on the reconstructions generated by po po(2|2>2) we can find that the developed informative hierarchical VAE can provide more realistic and clear reconstructed samples for both in-distribution and OOD inputs, indicating that our model can learn a more meaningful high-level latent semantic space than other models. Furthermore, based on providing higher-quality reconstruction for OOD samples, the gap between the metric scores of

---

in-distribution and OOD samples in informative hierarchical VAE tend to be larger than other models, leading to a better OOD performance shown in Tab. 3
Alleviating "Posterior Collapse" with Informative Hierarchical VAE: As discussed in Sec. 3.1 "posterior collapse" will cause the higher-level latent variables to become uninformative. Considering the developed informative hierarchical VAE shares the same network structure with the basic HVAE, in this part, we focus on evaluating whether our model can alleviate "posterior collapse" in higher layers when the network depth becomes deeper. As shown in Fig. for both in-distribution data and OOD data samples, the overall quality of the reconstructions generated by our model is significantly higher than those generated by the basic HVAE. Specifically, for FashionMNIST (in)/MNIST (out), the reconstructions generated by po >3>) and po xx4))))))))))))) of HVAE are almost the same, indicating that its posterior described by (x)
( (x) tend to collapse to a prior distribution about T-shirts. On the contrary, the reconstructions generated by the our model are still realistic, where the reconstructions of MINST (out) samples generated by (o(=>>3(r) or (=(=>4] (=(22) preserve the semantic structural information learned form FashionMNIST (in), explaining the underlying reason why our model can achieve better OOD detection performance. Similar conclusions can be achieved by the experimental results on CIFARIO (in)/SVHN (out) as shown in Fig.
Conclusion
In this paper, after presenting thorough analysis of "posterior collapse", we develop novel informative hierarchical VAE to extract more expressive hierarchical latent representations by alle- viating "posterior collapse". Then we theoretically explain why "posterior collapse" will limit the performance of existing hierarchical VAEs, and develop a novel Adaptive Likelihood Ratio score function for unsupervised OOD detection. Experiments demonstrate the effectiveness of method, whose main thought can be borrowed other hierarchical VAEs to improving their performance on downstream tasks relied on the hierarchy of latent representations.
6
Acknowledgment
This research is supported by the National Research Foundation, Singapore under its Industry Alignment Fund Pre-positioning (IAF-PP) Funding Initiative and Competitive Research Programme (Grant No. SBF-CCRP23-201--000 expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore. Additionally, Tongliang Liu is partially supported by Australian Research Council Projects DP180103424, DE-110101473, IC-190100031, DP-220102 and FT-2201003 18.
Any opinions, findings and conclusions or recommendations
Xiaobo Xia is supported by Australian Research Council Projects DE- DE-19010.473.
References
[1] Jie Ren, Peter Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark A. DePristo, Joshua V. Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-distribttoon detection. In Advances in Neural Information Processing Systems, pages 14680-14691, 2019.
[2] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adver- sarial examples. In International Conference Learning Representations, 2015.
[3] Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. Conference on Computer Vision and Pateemn Recognition, pages 427-436, 2015.
[4] Hongxin Wei, Lue Tao, Renchunzi Xie, Lei Feng, and Bo An. Open-sampling: Exploring out-of-distribution data for re-balancing long-tailed datasets. In International Conference on Machine Learning. PMLR, 2022.
[5] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and dittr--distribution examples neural networks. International Conference on Learning Representations, 2017.
[6] Alexander A. Alemi, Ian Fischer, and Joshua V. Dillon. Uncertainty the variational informa- tion bottleneck. CoRR, abs/1807.009900 2018.
10

---

[7] Zhuo Huang, Chao Xue, Bo Han, Jian Yang, and Chen Gong. Universal semi-supervised learning. In Advances in Neural Information Processing Systems, pages 26714-26725, 2021.
[8] Shiyu Liang, Yixuan Li, and R Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In International Conference on Learning Representations, 2018.
[9] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting
samples and adversarial attacks. In Advances in Neural Information Processing Systems, pages 7167-7177, 2018.
[10] Yen-Chang Hsu, Yilin Shen, Hongxia Jin, and Zsolt Kira. Generalized ODIN: distribution image without learning from out-of-distribution data. In Conference on Computer Vision and Puttern Recognition, pages 10948-10957, 2020.
detecting out-of-
[11] Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in Neural Information Processing Systems, pages 21464-21475, 2020.
[12] Yiyou Sun, Chuan Guo, and Yixuan Li. React: fut-of-distribution detection with rectified activations. In Advances in Neural Information Processing Systems, pages 144-157, 2021.
[13] Hongxin Wei, Lue Tao, Renchunzi Xie, and Bo An. Open-set label noise can improve robustness against inherent label noise. In Advances in Neural Information Processing Systems, 2021.
[14] Ramneet Kaur, Susmit Jha, Anirban Roy, Sangdon Park, Edgar Dobriban, Oleg Sokolsky, and Insup Lee. idecode: In-distribution equivariance for conformal -iitt---iitiitttion detection. In AAAI, pages 7104-7114, 2022.
[15] Zhuo Huang, Xiaobo Xia, Li Shen, Bo Han, Mingming Gong, Chen Gong, and Tongliang Liu. Harnessing out-of-distribution examples via augmenting content and style. arXiv preprint 22Xiv:220..03162, 2022.
[16] Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In International Conference Machine Learning, 2022.
[17] Diederik P. Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolu- tions. In Advances Neural Information Processing Systems, pages 10236-10245, 2018.
[18] Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. Pixelcn+++: Improving the pixelenn with discretized logistic mixture likelihood and other modifications. In International Conference on Learning Representations, 2017.
[19] Aäron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Koray Kavukcuoglu, Oriol Vinyals, and Alex Graves. Conditional image generation with pixelenn decoders. In Advances in Neural Information Processing Systems, pages 4790-4798, 2016.
[20] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In International Conference Learning Representations, 2014.
[21] Xiaobo Xia. Wenhao Yang. Jie Ren, Yewen Li, Yibing Zhan, Bo Han, and Tongliang Liu. Plural- istic image completion with probabilistic mixture-of-expprts. arXiv preprint 07Xiv:2205.09086, 2022.
[22] Chaojie Wang, Hao Zhang, Bo Chen, Dongsheng Wang, Zhengjue Wang, and Mingyuan Zhou. Deep relational topic modeling via graph poisson gamma belief network. In Advances in Neural Information Processing Systems, 2020.
[23] Chaojic Wang. Bo Chen, Zhibin Duan, Wenchao Chen, Hao Zhang, and Mingyuan Zhou. Generative text convolutional neural network for hierarchical document representation learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.
[24] Hyunsun Choi and Eric Jang. Generative ensembles for robust anomaly detection. CoRR, abs/1810.01392, 2018.
11

---

[25] Eric Т. Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Görür, and Balaji Lakshmi- narayanan. Do deep generative models know what they don't know? In International Conference on Learning Reprexentations, 2019.
[26] Alireza Shafaei, Mark Schmidt, and James J. Little. Does your model know the digit 6 is not cat? A less biased evaluation of "outlier" detectors. CoRR, 1et/1809904222 2018.
[27] Jakob D Drachmann Havtorn, Jes Frellsen, Soren Hauberg, and Lars Maaløe. Hierarchical vaes know what they don't know. In International Conference on Machine Learning, pages 4117-4128, 2021.
[28] Dan Hendrycks, Mantas Mazeika, and Thomas G. Dietterich. Deep anomaly detection with outlier exposure. In International Conference on Learning Representations, 2019.
[29] Lars Maalée, Marco Fraccaro, Valentin Liévin, and Ole Winther. BIVA: A very deep hierarchy of latent variables for generative modeling. In Advances in Neural Information Processing Systems, pages 6548-6558 2019.
[30] Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances Neural Information Processing Systems, pages 3738 3746, 2016.
[31] Arash Vahdat and Jan Kautz. NVAE: A deep hierarchical variational autoencoder. In Advances in Neural Information Processing Systems, pages 19667-19679, 2020.
[32] Zhisheng Xiao, Qing Yan, and Yali Amit. Likelihood regret: An out-of-distribution detection score for variational auto-encoder. In Advances in Neural Information Processing Systems, pages 20685-20696. 2020.
[33] Joan Serrà, David Álvarez, Vicenç Gómez, Olga Slizovskaia, José F. Núñez, and Jordi Luque. Input complexity and out-of-distributin detection with likelihood-based generative models. In International Conference on Learning Representations, 2020.
[34] Adji B. Dieng, Yoon Kim, Alexander M. Rush, and David M. Blei. Avoiding latent variable collapse with generative skip models. In International Conference on Artificial Intelligence and Statistics, pages 2397-2405, 2019.
[35] Thomas M Cover. Elements of information theory. John Wiley & Sons, 1999.
[36] Eric T. Nalisnick, Akihiro Matsukawa, Yee Whye Tch, Dilan Görür, and Balaji Lakshmi- narayanan. Do deep generative models know what they don't 't know? In International Conference on Learning Representations, 2019.
[37] Irina Higgins, Loic Matthey, Arka Pal, Christopher P. Burgess, Xavier Glorot, Matthew M. Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual con- cepts with a constrained variational framework. In International Conference on Learning Representations, 2017.
[38] Saikiran Bulusu, Bhavya Kailkhura, Bo Li, Pramod K Varshney, and Dawn Song. Anomalous example detection in deep learning: A survey. IEEE Access, 8:132330 111133001123477... 2020.
[39] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017.
[40] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient- based learning applicd to document recognition. Proceedings of the IEEE, (6(11):227--23 2324, 1998.
[41] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[42] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
[43] Tarin Clanuwat, Mikel Iober-, Asanobu Kitamoto, Alex Lamb, Kazuaki Yamamoto, and David Ha. Deep learning for classical japanese literature. CoRR, abs/1812.01718, 2018.
12

---

[44] Yaroslav Bulatov. notMNIST dataset. http://yaroslawvvb www.ssss..aa.oooooo.....oo...o.. cosssppo.com/211/099/
notmnist- dataset. html
[45] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 133066666; 2015.
[46] Yann LeCun, Fu Jie Huang, and Leon Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In Conference on Computer Vision and Pattern Recognition, 2004.
[47] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In International Conference on Computer Vision (ICCV), 2015.
[48] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE Transactions on Puttern Analysis and Machine Intelligence, 2017.
[49] Maria-Elema Nilsback and Andrew Zisserman. Automated flower classification over large number of classes. Indian Conference on Computer Vision, Graphics and Image Processing, 2008.
[50] Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Leamed-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, October 2007.
[51] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. 2017.
[52] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Interna- tional Conference on Learning Representations, 2015.
[53] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Z. Yang. Zachary De Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, pages 8024-8035, 2019.
[54] Yuhta Takida, Wei-Hsiang Liao, Toshimitsu Uesaka, Shusuke Takahashi, and Yuki Mitsu- fuji. Preventing posterior collapse induced by oversmoothing in gaussian VAE. CoRR, abs/2102.08663, 2021.
[55] Dihong Jiang, Sun Sun, and Yaoliang Yu. Revisiting flow generative models for out-of- distribution detection. In International Conference on Learning Representations, 2021.
[56] Lukas Bossard, Matthieu Guillaumin, and Lue Van Gool. Food-106 mining discriminative components with random forests. In European Conference on Computer Vision, 2014.
[57] Ya Le and Xuan S. Yang. Tiny imagenet visual recognition challenge. 2015.
13

---

Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper's
contributions and scope? [Yes] See Abstract
(b) Did you describe the limitations of your work? [Yes] See Appendix H
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
2. If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results? [Yes]
(b) Did you include complete proofs of all theoretical results? [Yes] See Appendix and Appendix B
3. If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi- mental results (either in the supplemental material or URL)? [Yes] See supplemen- tal material
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4.1 and Appendix F
(c) Did you report error bars (e-g., with respect the random seed after running experi- ments multiple times)? [Yes] See Appendix G
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 4.1 and Appendix
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) your work uses existing assets, did you cite the creators? [Yes] See supplemental material
(b) Did you mention the license of the assets? [Yes] See supplemental material
(c) Did you include any assets either in the supplemental material URL? [Yes] See supplemental material
(d) Did you discuss whether and how consent was obtained from people whose data you're 're using/curating? [N/A]
(c) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
5. If you used crowdsourcing conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, applicable? [N/A]
(b) Did you describe any potential participant risks, with links Institutional Review Board (IRB) approvals, if applicable? [N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
14


Reviews:
[{"review_id": "dtG_FJqqbpr", "reviewer": "Reviewer_4FiY", "summary": "This paper presents a hierarchical VAE (HVAE) for out-of-distribution (OOD) detection. Authors investigate the 'posterior collapse' problem with HVAE models and propose a solution to mitigate the by increasing the mutual information between the input and latent representations. Finally, an adaptive likelihood ratio-based measure is proposed for the HVAE models to detect OOD samples. The proposed approach is evaluated on benchmark datasets and the proposed approach outperforms related variants. ", "questions": "Please address the comments in the weaknesses section, especially the novelty of the proposed approach with respect to existing approaches to preventing posterior collapse.", "limitations": "No", "rating": 6, "confidence": 5, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1. Authors systematically explored the 'posterior collapse' problem with HVAE models. An interesting mitigation strategy is proposed by increasing the mutual information between the input and latent representations. \n\n2. An adaptive likelihood ratio-based measure is proposed to distinguish the OOD sample using all layers of HVAE.\n\n3. The draft is clearly written and easy to follow.\n\n4. Authors experimentally evaluated various components of the approach justifying their contribution toward the final performance. \n\n\nWeaknesses:\n\n1. There are other approaches to prevent posterior collapse such as bidirectional inference [20] or oversmoothing VAE loss function. How does the proposed approach compare with these approaches and what is the fundamental difference? [20]  also considers skip connections. \nTakida et al., \"Preventing Posterior Collapse Induced by Oversmoothing in Gaussian VAE\"  \n\n2. In table 1, the approaches are not cited. \n\n3. Experiments are limited. Authors are encouraged to compare the results against the more recent state of the art such as \n\na. Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in Neural Information Processing Systems, 2020.\n\nb. Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distributional shifts in the wild, ArXiv, abs/2110.00218, 2021\n\nc. Kaur, Ramneet, Susmit Jha, Anirban Roy, Sangdon Park, Edgar Dobriban, Oleg Sokolsky, and Insup Lee. \"iDECODe: In-distribution equivariance for conformal out-of-distribution detection.\" AAAI (2022).\n", "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": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "a_p5KW5sIR7", "reviewer": "Reviewer_9EQd", "summary": "The paper aims to detect OOD samples (unsupervisedly) with hierarchical VAEs. The main idea is based on the likelihood ratio in [1], with some interesting modifications. Firstly, the paper demonstrates that alleviating posterior collapse in hierarchical VAEs can help the performance of OOD detection using likelihood ratio. Then the paper proposes a modified training objective that upweights the mutual information between data $x$ and higher level latent variables, which enforces higher level latent variables to contain information about $x$ and hence prevents higher level latent variables to collapse to prior. The paper also proposes a new score that eliminates the need to tune the hyper-parameter $k$ in previous likelihood ratio method. \n\n[1] Hierarchical VAEs Know What They Don't Know", "questions": "1. How does the modification in training objective affect the performance of VAE, e.g., reconstruction, test likelihood, sample quality? We want the VAE to be versatile, not just a tool to detect OOD samples.\n\n2. If we alleviate the posterior collapse with simpler approaches, such as simply downweighting the KL term or using some warm-up scheme, can we obtain hierarchical VAEs that do better in OOD detection?\n\n3. In section 3.4, as well as appendix C, if we can use the ration of $R$, where $R$ is the partial generative model's log likelihood, why don't we just automatically pick k with the largest $R$-ratio?\n\n4. In Figure 2, I don't quite understand why the partial reconstructions for $p_{\\theta}(x|z_{>3})$ and $p_{\\theta}(x|z_{>4})$ have absolutely no variation. Assuming $z_{>3}$ has been collapsed into prior, then $q(z_{>3}|x) \\approx p(z_{>3})$. As a result,  sampling $z_{>3}$ from posterior $q(z_{>3}|x)$ and $z_{<3}$ from prior $p(z_{<3}|z_{>3})$ (which is what a partial generative model does) is essentially sampling the whole $z$ from prior. Then the resulting reconstruction should just be some generated samples from the VAE, which should be diverse. But here they are the same. Does the posterior collapse to a single point?", "limitations": "The authors have adequately addressed the limitations and potential negative societal impact of their work", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths: \n\n1.One thing I particularly like about the paper is that the proposed method is based on solid motivations. The paper clearly demonstrate the impact of posterior collapse to OOD detection in hierarchical VAEs, and then proposes method to alleviate posterior collapse. This makes the  main structure of the paper easy to follow. \n\n2. The proposed method is simple yet effective. Upweighting the MI between $x$ and $z$ can certainly alleviate posterior collapse, but the magic only happens when it is combined with the analysis on the relationship between posterior collapse and OOD detection.\n\n3. Comprehensive and strong experimental results.\n\nLimitations:\n\n1. Since the method is based on previous likelihood ratio idea, in order to make the paper self-contained, more details of the previous method should be given. In particular, section 3.2 should give a more detailed introduction to [1]. The motivation and intuitive explanation should be provided.\n\n2. Section 3.4 is not very clear to me. Some explanations in the appendix should be moved to the main text.\n\n[1] Hierarchical VAEs Know What They Don't Know", "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": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "LMbD-6Fe4ft", "reviewer": "Reviewer_1sqv", "summary": "The paper investigates the problem on \"posterior collapse\" in hierarchical variational autoencoders (HVAE), and provides a theoretical explanation for why this occurs during training based on the ELBO lower bound. It further discusses why posterior collapse can affect the OOD detection performance of the HVAE model. Based on these insights, the paper proposes to enhance the connection (dependence) between the input an its multilayer stochastic latent representations based on an informative HVAE training objective. It also proposes an adaptive likelihood ratio score for detecting OOD inputs, which enhances the separation in in-distribution and OOD inputs, and does not depend on the specific choice of higher-level latent layer representations used. ", "questions": "While the paper is technically strong, it is a bit hard to follow and there are some logical jumps that are not obvious. Overall, the presentation of ideas could be improved.\n\n1. It is mentioned that the proposed method is completely unsupervised, i.e., it does not require labels for the in-distribution data, nor does it require auxiliary OOD data for the detection algorithm. The proposed method is different from many conventional OOD detection methods in that it does not depend on a classification model (DNN) for its scoring. In this sense, it is more like an anomaly detection method.\nCan the authors comment on whether the proposed method can be improved by utilizing the class labels (if available) by modeling the class-conditional distributions of $x$?  \n\n1. The paper does not discuss a number of prior works on OOD detection in section 2. These include methods not based on deep generative models such as maximum softmax probability [1], Generalized ODIN [2], Deep Mahalanobis [3], Energy-based [4], ReAct [5] etc.\n\n1. On line 89, it is mentioned that likelihood methods based on generative models always assign a higher likelihood to OOD inputs compared to ID inputs. While this happens in some cases, it is not always true.\n\n1. In equation (3), it should be clarified that $z_{L+1} := x$ as a special case. Otherwise the dependence on $x$ is not clear in the second term. \n\n1. Please provide a discussion on the log-likelihood ratio score in Eqn. (5).\n\n1. On line 161, it should be $q_\\phi$ and not $q_\\theta$.\n\n1. On line 185, it is mentioned that the entropy of the marginal distribution on $x$ is a positive constant. This does not have to be the case for continuous $x \\in \\mathbb{R}^d$. If so, is the lower bound on the mutual information correct?\n\n1. The informative loss proposed in Eqn. (8) and its lower bound could be discussed in more detail. \n\n1. It is not obvious how the authors arrive at the proposed adaptive log-likelihood score. Please provide some intuition about why this is formulated as a weighted difference of log-likelihood ratios. Could this be arrived at in a more principled way? Why does it enhance the separation between ID and OOD inputs?\n\n1.  Minor: On lines 241 - 243, it is mentioned that the metrics are threshold independent, but the `FPR80` metric does depend on the threshold.\n\n1.  The paper compares with different categories of OOD detection methods, but some of them are not defined in the main paper. This makes it a big vague to read the tables and figures. \n\n1. In Table 1, why is the AUPRC not reported? This metric is sometimes more effective is capturing the separation between the OOD and in-distribution scores, especially at low FPR. \n\n1. In Table 1, it is not clear why some of the baseline methods are missing for the CIFAR10 / SVHN datasets. The format is a bit confusing to follow. \n\n1. In Table 2, why is SVHN used as the OOD dataset for FashionMNIST, whereas MNIST is used as the OOD dataset in Table 1? More complete results could be provided in the Appendix. \n\n1. In Figure 3, could the authors also report the area under the ROC curves, maybe as part of the legend. \n\n\n### References\n\n[1] Hendrycks, Dan, and Kevin Gimpel. \"A baseline for detecting misclassified and out-of-distribution examples in neural networks.\" arXiv preprint arXiv:1610.02136 (2016).\n\n[2] Hsu, Yen-Chang, et al. \"Generalized odin: Detecting out-of-distribution image without learning from out-of-distribution data.\" Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020.\n\n[3] Lee, Kimin, et al. \"A simple unified framework for detecting out-of-distribution samples and adversarial attacks.\" Advances in neural information processing systems 31 (2018).\n\n[4] Liu, Weitang, et al. \"Energy-based out-of-distribution detection.\" Advances in Neural Information Processing Systems 33 (2020): 21464-21475.\n\n[5] Sun, Yiyou, Chuan Guo, and Yixuan Li. \"React: Out-of-distribution detection with rectified activations.\" Advances in Neural Information Processing Systems 34 (2021): 144-157.\n\n", "limitations": "The discussion of limitations and broader impact in Appendix H and I is adequate. ", "rating": 7, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\nThe paper addresses an important problem of posterior collapse observed in hierarchical VAEs, which significantly limits the ability of the model to be used for OOD detection. The motivation and background on posterior collapse based on mutual information is interesting, and there is adequate discussion of related work on the problem. Building on the insights, the paper proposes a novel training objective (informative HVAE) which alleviates the issue of  posterior collapse by enhancing the dependence between the input and the higher level latent variables. The experiments are fairly extensive and compare the OOD detection performance of the proposed method with a number of baselines from different categories of OOD detection. \n\nWeaknesses:\n\n- The technical details are hard to follow in some places and lacks enough discussion. For instance, the likelihood-ratio score in Eq. (6) and its approximation are not discussed clearly. Same comment for the informative HVAE loss in Eqs. (8) and (9). \n\n- The paper compares with several baselines, but they are not clearly defined in the main paper (please questions on the experiments). \n\n- In the experiments, only two in-distribution datasets are evaluated, while it is common to evaluate on more ID/OOD dataset pairs. Some additional results, including an ablation study on the adaptive log-likelihood score, could be provided in the appendix to make the evaluation stronger.\n\n- A number of typos and grammatical issues, which could be easily fixed by proof-reading. \n", "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": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "Flv0ymK2q-q", "reviewer": "Reviewer_jV8d", "summary": "The work studies OOD in hierarchical VAEs (HVAE). It connects the earlier observations that HVAEs may yield higher likelihood for OOD samples to the so-called “posterior collapse”, where higher-level latent variables degenerate to the (conditional) prior and hence becomes uninformative w.r.t. the input sample. To alleviate this issue, the work promotes increased mutual information between the input and the higher-level latents. It further develops an OOD score based on a weighted difference of the log-likelihood ratio between subsequent slices in the hierarchy of the latent variables.\nExperiments demonstrate improved OOD accuracy on two benchmarks. The proposed OOD criterion is shown to be more stable than the layer-specific scores (which implicitly require the index of the layer as a hyperparamter).\n\n**A post-rebuttal note.**\nI thank the authors for their elaboration and I appreciate the effort. I increase my score, since my main concerns have been resolved. Nevertheless, I encourage the authors to improve clarity in the main text, as well as to include the computational considerations entailed by the approach (as provided in the response below) in the final revision.", "questions": "- What is the OOD accuracy with the vanilla VAE loss (i.e. without the informative loss), but with the adaptive criterion? \n- Testing the approach on MNIST and CIFAR is great, but what about more natural images (e.g. ImageNet)?\n- How does the computational footprint change specifically w.r.t. the baseline?\n", "limitations": "The limitations in Sec. H are a bit unspecific (\"additional computational burden\"). The broader impact in Sec. I is perhaps a bit more technical than it should be. ", "rating": 7, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Pros:**\n- the narrative that OOD accuracy in hierarchical VAEs is connected to the posterior collapse issue is compelling and interesting to read.\n- the work appears technically sound and the arguments are appropriately formalised. \n- the proposed OOD score does not have any hyperparameters, but nevertheless appears competitive w.r.t. parametric alternatives.\n- the empirical results are strong and support the main claims.\n\n\n**Cons:**\n\nWhile the OOD is the focus of this work, the approach leads to increased in-domain likelihood overall, in some cases rather substantially so (c.f. Tab. 4 in Appendix);\n\nBoth the proposed training and the adaptive OOD score may be a suboptimal choice. For example, on FashionMNIST->MNIST the likelihood regret approach has a somewhat superior OOD accuracy.\n\nComparisons could have been a bit more extensive (only 2 training sets). Tab. 3 and 4 in the appendix provide more results, but those are not compared to previous non-VAE and more recent works (e.g. [A])\n\nThe idea behind the proposed score seems to be mainly intuition-based and lacks theoretical backing. The explanation in Appendix C does not provide further theoretical insights.\n\n[A] Revisiting Flow Generative Models for Group-wise Out-of-Distribution Detection\n\n**Typos:**\n- l. 70 “inference”\n- l. 100 “PixelCNN”\n- l. 206,213 “ration”\n- l. 310 “still” redundant\n- l. 311 “preserve”\n\n**Other comments:**\n- Tab. 2 left should probably read “FashionMNIST(in)/MNIST(out)”\n- The exposition could be improved (e.g. l. 95 “at the cost of bringing heavy burdens”). It is not always clear in notation, if it is a definition or an implied equality (e.g. l. 120,188).\n- The acronyms used in Tab. 1 are not all self-explanatory, nor is it very clear which previous works specifically they come from. Please make it clearer in the revision.\n", "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": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}]

Author rebuttal:

Decision: Accept