Introduction
Deep neural networks (DNNs) are often criticized as "black boxes" due to the opacity of their internal decision-making processes. While these models achieve state-of-the-art performance, our understanding of their decision boundaries—the mathematical "fences" separating different classes—remains limited. Understanding these boundaries is critical for safety-sensitive applications like autonomous driving, where minor input perturbations near a boundary can lead to catastrophic misclassifications.
The primary challenge in analyzing these boundaries is the high dimensionality of the input space. Finding samples that are both realistic and sit precisely on the boundary is difficult. While adversarial examples approach the boundary, they are not designed to reside on it or represent its global geometric characteristics. This paper introduces DeepDIG (Deep Decision boundary Instance Generation), a framework designed to generate "borderline instances" to quantify boundary complexity.
The DeepDIG Framework
DeepDIG employs a three-stage pipeline to locate precise points on the decision boundary between a source class ($s$) and a target class ($t$):
- Initial Targeted Attack: Using an autoencoder-based method, the system generates an adversarial version of a source image ($\hat{x}_t$) that the DNN misclassifies as the target class.
- Reverse Attack: A "reverse" attack is performed on $\hat{x}_t$ to move it back toward the source class, resulting in a point $\hat{x}_s$ on the opposite side of the boundary.
- Borderline Refinement: A binary search is conducted along the trajectory between $\hat{x}_s$ and $\hat{x}_t$ to find the "middle" point $\hat{x}_{s/t}$ where the model is perfectly uncertain (i.e., the probability of class $s$ equals the probability of class $t$).
Quantifying Boundary Complexity
To characterize the geometry of the discovered boundaries, the authors introduce two primary metrics:
- Input space Decision boundary Complexity (IDC): This measures the "oscillation" of a model's classification along a path between borderline instances. A jagged, complex boundary results in high oscillation.
- Embedding space Decision boundary Complexity (EDC): This measures the linear separability of classes within the model's internal learned representations.
Experimental Evaluation
The framework was evaluated using standard image benchmarks—MNIST, FashionMNIST, and CIFAR10—across various architectures, including Fully Connected Networks (FCNs), standard CNNs, and deeper models like ResNet and GoogleNet.
DeepDIG demonstrated a significantly higher success rate in finding borderline instances compared to baseline methods. On FashionMNIST, DeepDIG achieved a 98.9% success rate, whereas baselines often fell below 35%. Furthermore, the generated borderline instances were of higher visual quality, appearing as realistic "hybrids" of two classes rather than noisy or "sloppy" images.
Key Insights and Results
- Adversarial Examples vs. Borderline Instances: Unlike standard adversarial examples, DeepDIG’s refinement process ensures samples sit exactly on the boundary, enabling precise geometric analysis.
- Consistency of Complexity: There is a strong correlation between complexity in the raw input space (IDC) and the embedding space (EDC). Convoluted internal representations directly lead to more complex boundaries in the input space.
- Architecture Comparison: Interestingly, CNNs often create more complex decision boundaries than FCNs for the same task. While CNNs are more accurate, their feature extraction process can result in a more "jagged" and potentially less robust decision surface.
- Linear Separability Paradox: While a DNN's test set is typically >99% linearly separable in the embedding space, the borderline instances generated by DeepDIG are not. This highlights the "weak points" where the model's linear logic fails.
Conclusion and Future Work
DeepDIG provides a robust tool for peering into the "black box" of DNNs by characterizing their decision boundaries. Future research may focus on integrating the pipeline into a single end-to-end optimization process or extending the framework to discrete data types like text. Additionally, using these borderline instances during training could help "smooth" decision boundaries, potentially enhancing model robustness against adversarial attacks.
Summary updated