- Rating
- 2
- Confidence
- 4
- Informativeness
- 2
- Presentation
- 3
- Soundness
- 2
Read review
Paper summary
This paper proposes a method called SITN for detecting out-of-distribution (OOD) data. It uses continuous normalizing flows trained on in-distribution (ID) data to map observations into a latent space. The method calculates two statistics: an Anderson–Darling test to check for deviations from a standard normal distribution, and a power spectrum-based test to check for specific correlations between coordinates. These are combined using empirical quantiles. A separate calibration step then sets the detection threshold based on a desired false positive rate. Experiments compare SITN to several existing methods on standard OOD detection and image corruption tasks.
Critical strengths
The method is relatively simple and easy to interpret. The two statistics analyze different properties of the latent representation and the experiments show they respond to different types of errors. Importantly, the method does not need OoD examples to train or calibrate. The experimental results are good in several cases. For instance, on CIFAR-10 → SVHN, SITN achieves a score of 0.946, while the DoSE method only gets 0.802. On CIFAR-10-C, SITN averages 0.85 compared to 0.78 for DoSE. These results suggest that looking at latent statistics is a useful alternative to just using likelihoods.
The comparison experiments are fair because they use the same underlying generative models, which helps to understand the contribution of the detection method. The supplement baselines and visualizations of where the method fails are also helpful.
Critical weaknesses
1. Lack of novelty compared to related work. Testing observations against a reference distribution has been done before. Specifically, the paper does not discuss Wang et al. (2020), which uses white-noise tests for single-sample detection, or KLODS, which uses latent factorization. Since SITN seems similar to these approaches, its novelty is unclear to me.
2. Unclear contribution of combining statistics. While combining an Anderson–Darling and a spectral statistic might be useful, the paper does not clearly explain what this combination adds beyond the individual methods, either theoretically or in the experiments. Direct comparisons with the closest existing methods are needed to prove the contribution is significant.
3. Mathematical mistake in the theoretical analysis. If i'm not wrong, there are some erreors in the Type II error analysis in Appendix K.4. Equation 10 does does not necessarily define a valid probability density. For example, if we set specific parameters , (identity flow), the formula produces a value that grows to infinirt as goes to infinity, meaning it cannot be a probability measure. Because of this, Lemma K.7 does not hold as stated. Moreover, the jump from Equation 14 to 15 is unjustified to me. The fact that a statistic is "scale invariant" does not mean its distribution remains unchanged when conditioned on another statistic (like Anderson–Darling) that is affected by scaling. These mathematical errors invalidate the theoretical derivation of the Type II error limits. While the algorithm and experiments might still work, the theory needs major correction.
4. Theoretical motivation is too much wide. The theory assumes an exact invertible flow, meaning the ID distribution matches a Gaussian latent distribution. However, even if the latent distributions are different, the AD and spectral tests might not see the difference. For example, if one take a normal distribution and flip the sign of its first coordinate (), the new distribution is not Gaussian, but a simple sign flip does not change the Anderson–Darling or power spectrum values. Is this example shows that the theory does not prove the method can detect all types of deviations ? The paper should clarify exactly what the method can and cannot detect.
5. Overstated conclusions. The results show performance varies a lot. In Appendix J.3, SITN gets a low score (0.572) on CIFAR-10 to CIFAR-100 and 0.690 on CIFAR-10 to Tiny ImageNet. This suggests the method struggles with semantic shifts (which is quite expected...) Also, comparing against discriminative models is tricky because those models have labels at their disposition, which is an advantage. The paper should explain these limitations more carefully. Similarly, the claim that the method is not biased by image complexity relies on a weak correlation with image compression size in just one experiment. This only supports a narrow conclusion.
6. Evaluation metrics and reliability. Figure 12 shows calibration, but the main tables only report AUROC. Since the goal is to control false positives, reporting detection rates at specific low rates (like 1% or 5%) is vital. A high AUROC does not guarantee good performance at low false positive rates. Also, the current guarantees include an estimation error term, so they are not exact. Furthermore, the reported confidence intervals only measure uncertainty from the test samples. They do not account for the variability that happens when training the flow model repeadly.
-
Wang, Z., Dai, B., Wipf, D. P., & Zhu, J. (2020). Further Analysis of Outlier Detection with Deep Generative Models. Advances in Neural Information Processing Systems (NeurIPS).
-
Zhang, Y., Pan, J., Liu, W., Chen, Z., Li, K., Wang, J., Liu, Z., & Wei, H. (2024). Kullback-Leibler Divergence-Based Out-of-Distribution Detection With Flow-Based Generative Models. IEEE Transactions on Knowledge and Data Engineering, 36(4), 1683–1697. Published online in 2023.
-
Jiang, D., Sun, S., & Yu, Y. (2022). Revisiting Flow Generative Models for Group-wise Out-of-Distribution Detection. International Conference on Learning Representations (ICLR).
Questions for authors
- How does SITN differ from the white-noise testing of Wang et al. or the latent-factorization of KLODS? Could you provide a comparison using similar models and data if time/ressources allows it?
- Could you fix the definition in Equation 10, and the resulting Lemma K.7, and the logical bridge between Equations 14 and 15. I'm interested to know what valid theoretical conclusion about Type II error remains after these corrections?
- What detection rates does SITN achieve at 1% and 5% TNR ? Also, please could you clarifiy if the data used for calibration is completely separate from the data used to select the final model checkpoint ?
4 comments
Results comparing to discriminative methods and image complexity analysis
We agree and in fact already discuss the caveats of comparing to discriminative methods in a dedicated section (J.1) in the appendix.
Semantic OOD detection is discussed in section J.3. SITN performs best among generative methods and even outperforms discriminative methods in some dataset pairings (CIFAR->SVHN, CIFAR->MNIST). Moreover, as discussed and highlighted by the reviewer, discriminative methods have an unfair advantage in this setting given their access to class labels.
Regarding the analysis of image complexity, we follow the same methodology using compression size as the original work by Serrà et al. that established the complexity bias. Furthermore, this is not the only evidence presented in the paper. The analysis in Section 5.3 and further visualisations of the 150 samples with highest OOD scores for each method in the appendix provide another stark illustration of the complexity bias in likelihood-based methods.
Evaluation metrics and reliability
Thank you for the recommendation. We have amended the manuscript with an additional appendix (Appendix L) showing actual FPR on ID test data as well as TPR across thresholds calibrated to FPRs between 0.001 and 0.1 on validation data for the different CIFAR-10 dataset pairings. SITN scores were calibrated as described in the paper, while the rest of the methods do not require validation data to be split and were calibrated directly on the full validation set through their empirical CDF. SITN consistently shows higher TPRs across thresholds.
The finite-sample slack in Corollary K.2 is to be expected. It is not generally possible for finite sample estimates to be guaranteed to exactly recover a population statistic.
Regarding the confidence intervals, we compare methods on the same, fixed flow model. This is a different situation than comparing different, separately trained models where training variability could obscure performance comparisons. Furthermore, results are consistent across models that were trained for experiments with different (ID) datasets.
For simplicity, the same validation data was used in our experiments for selection of the checkpoint and calibration. Empirical calibration curves in the appendix show that this did not have an effect in practice.
Thank you for your detailed rebuttal as it is answersing most of my question. But i prefer to keep my score at 2 for the following reasons :
-First, I may be not understanding something, but even for the identity flow, the expression in the eq. 10 seems to grow in the tails for an Std Gaussian and some values of (such as ?). I'm therefore still unsure whether it defines a density measure probability and how lemma K7 follows from that.
-Second, if I'm correct, the validation data were used for both chosing the checkpoint and the calibration phase to get the FPR95 scores but you suppose that the model is fixed indepentely from the calibration set
Thank you for engaging with our rebuttal.
Does Eq (10) define a normalised density with the identity flow map and ?
We found a couple of typos in the equation that are now fixed. In particular, there was a factor of missing from the denominator in the exponential, and it should have read instead of inside the exponential. This will always result in a normalised PDF, including the case suggested by the reviewer. This can be seen from a change of measure argument, noting that the two Jacobian determinants will cancel out, and then simplifying the resulting product of exponentials.
Same data for early stopping checkpoint selection and calibration?
Using the same data for early stopping and calibration is not a prescribed step in our method; one is not obliged to do this. Nevertheless, we have included a new Corollary K.3 that shows a logarithmic correction factor can be incurred if one does wish to do this.
Thank you for your thorough feedback. We are glad you liked the simplicity of our method and found the paper easy to follow.
Discussion and differentiation from additional related work
Thank you for sharing these additional references, we have included them in the related work discussion of the updated manuscript.
While the work by Wang et al. superficially resembles the independence-testing component of SITN, the two methods differ fundamentally. First, their approach assesses the prediction residuals of autoregressive models in the data (or VAE reconstruction-error) space. SITN, on the other hand, uses CNFs to map samples to the latent space, where (as discussed in Section 3.1) OOD samples manifest as deviations from the Gaussian noise prior. Furthermore, while Wang et al. only test the white noise property (via a lag-based Box-Pierce test) of their constructed sequences, SITN exploits the factorised Gaussian noise prior to simultaneously test both dimensional independence (globally in the frequency domain) and marginal normality. As Appendix A demonstrates, these two components have strong complementary value.
KLODS is motivated from a group OOD detection setting. The idea is to fit a high-dimensional Gaussian distribution to the latent representations of multiple samples, i.e. N(μ~,Σ~) where μ~ and Σ~ are the mean vector and covariance matrix across samples. A KL divergence between the fitted Gaussian and the prior is then used as OOD score. To apply this to a single sample, one splits the latent representations along the channel dimension and treats that like individual samples. Furthermore, estimation of the sample covariance matrix requires the number of channels in the latent representation to exceed the spatial dimensions (C>H×W); otherwise, the sample covariance matrix is singular. The authors work around this by using only the latents from the last scale in Glow, but the method could not be applied to single samples using standard CNF latents as in SITN. SITN, on the other hand, is natively a single-sample method that leverages the complete factorisation of the noise prior. Instead of fitting a multivariate Gaussian across samples, SITN directly performs a goodness of fit test across the elements of a single latent representation. Moreover, through the Gaussian fit, KLODS only captures first- and second-order moments (mean μ~ and linear pairwise pixel covariance Σ~ across channels in the single-sample case) whereas SITN's AD component is also sensitive to higher-order shape distortions, skewness, heavy tails.
Value of combining statistics
We provide theoretical justification and motivation for the individual statistics and their combination in section 3.2 of the manuscript. The two statistics have different purposes; they allow us to check for normality and independence, respectively.
Empirical evidence that these statistics have complementary value is presented in Section 5.4 (Ablations) and further in Appendix A. Their combination in SITN is superior to using either of the statistics individually.
Theoretical analysis
Equation (10) is correct, as ∥X∥22 is in the superscript of the exponential. We have changed the typesetting of this Equation in the updated submission to make this clearer. We have also simplified the derivation around Equations (14)-(15), removing the incorrect conditional probability step in the process. The overall conclusions remain the same.
Captured types of deviations
We do not claim that our method can detect all types of dependence. In fact, we specifically acknowledge prior work that showed that no statistical test can do so comprehensively in Section 3.2. As explained, our method specifically tests for two properties of the Gaussian prior: marginal normality and autocorrelation. We have added a new dedicated limitations section where we reiterate this.