Dimensionality-Induced Information Loss of Outliers in Deep Neural Networks

Kazuki Uematsu, Kosuke Haruki, Taiji Suzuki, Mitsuhiro Kimura, Takahiro Takimoto, Hideyuki Nakagawa

Abstract

Deep Neural Networks (DNNs) are notoriously overconfident when encountering out-of-distribution (OOD) samples. This research investigates the internal mechanics of this phenomenon, identifying a "transition layer" where feature dimensionality collapses. We demonstrate that DNN weights act as high-dimensional filters that preserve in-distribution (ID) signals while effectively "deleting" the unique features of outliers. This dimensionality-induced information loss leaves behind only "dataset bias," leading to biased and overconfident misclassifications. Based on these insights, a dimensionality-aware projection method is proposed that significantly improves OOD detection performance.

Introduction

The ability for a machine learning model to recognize when it is being presented with unfamiliar data—the "I don't know" problem—is critical for safety-sensitive applications like autonomous driving and medical diagnostics. While many empirical methods for OOD detection exist, the specific layer-wise mechanics of how a network decides a sample is foreign have remained opaque. This paper provides a reductionistic explanation: DNNs are essentially high-dimensional sieves that accidentally filter out the identifying information of outliers as they pass through the network's layers.

The Geometry of Information Filtering

The core challenge in OOD detection is that networks often assign high confidence to incorrect classes for outliers. The authors found that this is due to the low-rank nature of DNN weight matrices. For ID samples, the data aligns with these weights, and information is preserved. For OOD samples, the data does not align with the learned subspace, causing the weights to act as a filter that eliminates the outlier's unique features.

Figure 1: Geometric representation of how low-rank weights filter OOD information. ID samples align with the weight subspace, preserving features, while OOD samples are projected out, leaving only dataset bias.

As illustrated in Figure 1, the projection of ID samples ($x_{ID}$) through the weight matrix $W$ maintains the signal necessary for an appropriate prediction. However, for OOD samples ($x_{OOD}$), the unique features are lost during projection. The remaining signal is dominated by "dataset bias"—the average characteristics of the training data—which traps the network into making a biased, overconfident prediction based on the "leftovers" of the original input.

The Transition Layer and Dimensionality Collapse

By analyzing the "layer dependence" of features using metrics like Stable Rank ($R_F$) and Centered Kernel Alignment (CKA), the researchers identified a specific "transition layer" where the effective dimensionality of data drops sharply. This collapse typically occurs just after the deepest pooling layer in architectures like VGG and ResNet.

Figure 2: Stable rank across layers for VGG-13. A sharp drop in dimensionality (stable rank) is observed at the transition layer (dashed line), where the network begins to aggressively compress information.

Figure 2 shows the stable rank of weight matrices and tied covariances across layers. The dashed vertical line marks the transition point where the network's low-dimensional weights begin to aggressively filter information. This is the specific point inside the DNN where ID and OOD samples truly part ways. Furthermore, OOD samples were found to be much more sensitive to noise in early layers; because the network hasn't learned to "denoise" these foreign patterns, noise propagates and disrupts the final representation far more than it does for familiar data.

Results and Methodology

The authors leveraged these insights to create a dimensionality-aware projection method. By performing a Singular Value Decomposition (SVD) on weight matrices and removing irrelevant singular vectors, they created a detector that focuses only on the dimensions the network actually cares about.

In experiments using CIFAR-10 as the ID dataset and MNIST/SVHN as OOD datasets, this method consistently outperformed standard baselines. For a VGG-13 model, the projection method achieved an AUROC of 0.978 for detecting MNIST outliers, significantly beating standard feature-based (0.936) and probability-based (0.927) methods. Beyond accuracy, this approach is computationally efficient, as it avoids the need to store and invert large covariance matrices required by methods like Mahalanobis distance.

Conclusion and Future Work

This study reveals that the overconfidence of deep networks on outliers is a fundamental byproduct of how they learn to compress information into low-dimensional subspaces. While the "transition layer" behavior is universal across common architectures, its exact location varies, and its effectiveness can decrease in datasets with a very high number of classes (e.g., CIFAR-100). Future research will explore automated ways to identify these transition points and investigate the link between data complexity and dimensionality-induced separation to build more robust AI systems.

Summary updated

BibTeX
@inproceedings{uematsu2024dimensionality,
  author = {Kazuki Uematsu and Kosuke Haruki and Taiji Suzuki and Mitsuhiro Kimura and Takahiro Takimoto and Hideyuki Nakagawa},
  title = {{Dimensionality-Induced Information Loss of Outliers in Deep Neural Networks}},
  booktitle = {ECML/PKDD},
  year = {2024},
}
Figure