Abstract
Deep learning models are often characterized as "black boxes" due to the complex, high-dimensional transformations they perform. This research explores the internal geometry of the "feature space"—the mathematical landscape of the last hidden layer where classification occurs. By developing a framework to analyze decision boundaries and the convex hulls of training data, this study reveals a fundamental "geometric flip": while testing images appear close to decision boundaries in pixel space, they are significantly closer to the training data's convex hull in the feature space. These findings offer a new perspective on model robustness, the nature of extrapolation in neural networks, and the mechanics of adversarial attacks.
Introduction
Despite the success of deep learning in computer vision, our understanding of the manifolds models create remains limited. In the pixel space, images are easily manipulated; tiny changes can cross a decision boundary and cause misclassification. However, the model's internal representation—the feature space—operates under different geometric rules. This paper addresses three critical challenges: understanding adversarial vulnerability, defining the limits of model extrapolation, and improving the interpretability of high-dimensional feature representations.
Methodology
The study focuses on the last hidden layer of a trained convolutional neural network (CNN), specifically a ResNet-like architecture trained on the CIFAR-10 dataset. This layer is chosen for its low dimensionality (64 features) and high degree of class separation.
To bridge the gap between pixel and feature spaces, the author employs several technical innovations:
- Inverse Mapping via Homotopy: Since neural networks are not naturally reversible, a homotopy algorithm is used to solve an optimization problem, finding the pixel-space image that corresponds to a specific coordinate in the feature space.
- Convex Hull Analysis: The "convex hull"—the smallest envelope containing all training points—is calculated in the feature space. The distances from testing and adversarial samples to this hull are then measured.
- Visualization: To render 64-dimensional paths in 2D, a two-point equidistant projection is utilized, preserving the relative distances between a point and two reference control points.
Key Insights: The Geometric Flip
The core discovery of this research is the "Geometric Flip." In the pixel space, images are typically far from the training data but close to decision boundaries. In the feature space, the opposite occurs: images maintain a healthy margin from decision boundaries but reside very close to the convex hull of the training set.
This leads to several critical observations:
- Extrapolation is Universal: Every testing sample in the study was found to lie outside the training set's convex hull. This confirms that image classification is fundamentally an act of extrapolation rather than interpolation.
- Adversarial "Hiding": Adversarial attacks do not merely push an image across a boundary; they move the representation closer to the training hull in feature space. This suggests that adversarial examples trick models by making inputs look more like "familiar" training data internally, even if they appear as noise to humans.
- Ambiguity Metrics: The author proposes that the difference between the distance to the nearest decision boundary and the distance to the training hull can serve as a formal metric for model ambiguity.
Key Results
The semantic meaningfulness of the feature space is demonstrated through projection. When a test image is projected onto the training convex hull in feature space, 78% of the "supporting" training images share the same label as the test image. In contrast, this semantic alignment drops to only 27% in the pixel space.
Furthermore, the study found that over 68% of testing samples fall within "learned regions"—spheres of guaranteed classification centered around training points. Adversarial examples, however, were found to be extremely close to decision boundaries in feature space, with distances as small as 0.0001, highlighting the fragility of the model's margins when targeted by optimization-based attacks.
Limitations and Future Work
While these results provide a clearer map of the model's "mind," the study is currently limited to the last hidden layer. Future research is required to determine how these geometric properties evolve through earlier layers of the network. Additionally, the computational cost of the inverse mapping optimization remains high, and further testing on high-resolution datasets like ImageNet is necessary to see if these geometric trends scale with increased dimensionality.
Summary updated