[Paper Review] Understanding Deep Neural Networks Using Topological Data Analysis
This paper proposes using Topological Data Analysis (TDA) to interpret the decision-making process of deep neural networks like VGG16 by analyzing activation values across layers. By applying the Mapper algorithm to high-dimensional activation data, the study identifies topological clusters of correct and incorrect classifications, revealing that misclassifications stem from distinct visual patterns—such as cages, glare, shadows, or camouflage—enabling targeted model improvement through specialized learners or data augmentation.
Deep neural networks (DNN) are black box algorithms. They are trained using a gradient descent back propagation technique which trains weights in each layer for the sole goal of minimizing training error. Hence, the resulting weights cannot be directly explained. Using Topological Data Analysis (TDA) we can get an insight on how the neural network is thinking, specifically by analyzing the activation values of validation images as they pass through each layer.
Motivation & Objective
- To understand the internal reasoning of deep neural networks like VGG16, which are typically black-box models.
- To identify why certain images are misclassified by analyzing the topological structure of activation values across layers.
- To use TDA to group images with similar misclassification patterns and link them to specific visual features (e.g., cages, glare, shadows).
- To develop actionable insights for improving model accuracy by training specialized learners or augmenting training data based on identified failure patterns.
- To enhance prediction confidence by detecting image properties that trigger unreliable predictions, such as uniform backgrounds or problematic lighting.
Proposed method
- Collected activation values from the 13th convolutional layer and 3rd fully connected layer of VGG16 for 5,000 cat and dog images.
- Applied Ayasdi’s commercial implementation of the Mapper algorithm to reduce high-dimensional activation data into 2D topological models using PCA lenses and variance-normalized Euclidean distance.
- Used resolution=50 and gain=3 to control model granularity and connectivity, coloring nodes by classification accuracy (red=correct, blue=incorrect).
- Built an Adaptive Dashboard with JavaScript to interactively explore clusters, toggle through images, and compare predictions with ground truth.
- Extended analysis to raw pixel data (5,000 features per image) to identify misclassification clusters before activation processing, labeling images as 'problematic' if accuracy <40% and seen ≥3 times.
- Used topological clustering to detect four distinct groups of misclassified images, each linked to specific visual artifacts (e.g., cluttered backgrounds, glare, camouflage, shadows).
Experimental results
Research questions
- RQ1What topological patterns in activation values correlate with correct versus incorrect classifications in VGG16?
- RQ2Can TDA reveal distinct failure modes in deep neural networks based on visual features like cages, glare, or shadows?
- RQ3How can topological clustering of activation data inform the design of specialized models for specific misclassification patterns?
- RQ4Can identifying clusters of problematic images improve prediction confidence or guide targeted data augmentation?
- RQ5To what extent do visual artifacts such as uniform backgrounds or low saturation influence the reliability of VGG16’s predictions?
Key findings
- The topological model revealed a dense blue cluster in the middle with poor classification accuracy, primarily containing images of cougars and panthers in cages, which were misclassified as apes.
- The top-left red cluster consisted of high-accuracy predictions for Persian cats with plain backgrounds, indicating that uniform backgrounds increase model confidence and accuracy.
- Heat map analysis confirmed that VGG16 focused on the cage structure rather than the animal in misclassified cage images, explaining the false primate labels.
- When analyzing raw pixel data, four distinct clusters of misclassified images emerged, each associated with a unique visual artifact: cluttered backgrounds, glare, camouflage (chameleons vs. green lizards), and shadows/low saturation.
- Images with glare were frequently misclassified as car fenders, suggesting the model learned spurious correlations from limited training examples of shiny objects.
- The study demonstrated that topological clustering of misclassification patterns enables the design of specialized learners or targeted data augmentation, such as adding more cage or glare images to improve robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.