Abstract
Neural Persistence is a prominent measure for quantifying neural network complexity, proposed in the emerging field of topological data analysis in deep learning. In this work, however, we find both theoretically and empirically that the variance of network weights and spatial concentration of large weights are the main factors that impact neural persistence. Whilst this captures useful information for linear classifiers, we find that no relevant spatial structure is present in later layers of deep neural networks, making neural persistence roughly equivalent to the variance of weights. Additionally, the proposed averaging procedure across layers for deep neural networks does not consider interaction between layers. Based on our analysis, we propose an extension of the filtration underlying neural persistence to the whole neural network instead of single layers, which is equivalent to calculating neural persistence on one particular matrix. This yields our deep graph persistence measure, which implicitly incorporates persistent paths through the network and alleviates variance-related issues through standardisation.
Introduction
Deep neural networks are often characterized as "black boxes" due to their complex, non-linear internal representations. To address this, researchers have increasingly turned to Topological Data Analysis (TDA). A prominent metric in this domain is Neural Persistence (NP), which constructs a filtration (a sequence of nested graphs) from network weights to measure the persistence of topological features. While NP has gained popularity as a tool for measuring network complexity, this paper identifies critical caveats that limit its effectiveness in deep architectures.
The Variance Trap in Neural Persistence
The authors identify two major limitations in the standard application of Neural Persistence. First, in deep layers, the spatial structure of weights becomes increasingly disorganized. As a result, NP collapses into a proxy for simple weight variance. The authors demonstrate that in deep layers, NP has an $R^2$ score of nearly 99% with the log-variance of weights, meaning it adds little information beyond basic statistical moments.
Second, standard NP calculates values for each layer independently and then averages them. This "layer isolation" ignores the global flow of information through the network, failing to capture how features in early layers interact with final classifications.
Deep Graph Persistence (DGP)
To overcome these limitations, the authors propose Deep Graph Persistence (DGP), which introduces two primary innovations:
- Weight Standardization: DGP standardizes weights in each layer (subtracting the mean and dividing by the standard deviation) before topological calculations. This "decouples" the structural organization from the sheer magnitude of the weights, forcing the metric to look at the organization of the network rather than just its scale.
- Global Path Filtration: Instead of treating layers as silos, DGP treats the entire network as a single directed graph. It computes a "summary matrix" where entries represent the bottleneck weight of the strongest path between input and output neurons. By analyzing the Maximum Spanning Tree (MST) of this global matrix, DGP captures holistic information flow.
For tasks like detecting covariate shift, the authors use Sample-weighted DGP, applying these calculations to the "activation graph"—the product of weights and actual neuron firings for specific inputs.
Experimental Evaluation
The researchers validated DGP across several benchmarks, including MNIST, EMNIST, Fashion-MNIST, and CIFAR-10. While NP does capture some structure beyond a random null model, its utility is hampered by its dependence on variance.
In covariate shift experiments on CIFAR-10, DGP significantly outperformed baselines. For instance, with Gaussian noise at a sample size of $n=100$, DGP achieved a detection ratio of ~51%, compared to only ~19% for standard Softmax outputs. Furthermore, DGP maintained a low false positive rate (below 5%), indicating high calibration.
Conclusion
This work reveals that Neural Persistence, while effective for linear models where weights have clear spatial meaning, often becomes a redundant measure of variance in deep networks. By introducing standardization and global path analysis, Deep Graph Persistence provides a more robust topological metric for understanding deep neural architectures. Future work remains to optimize DGP for massive architectures like Transformers and to improve its sensitivity to subtle semantic shifts like image rotations.
Summary updated