Addressing caveats of neural persistence with deep graph persistence
Authors: Leander Girrbach
Anders Christensen
Ole Winther
Zeynep Akata
A. Sophia Koepke
Venue: Accepted by TMLR ()

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. Code is available at  https://github.com/ExplainableML/Deep-Graph-Persistence.

Published in Transactions on Machine Learning Research (11/2023)
Addressing caveats of neural persistence with deep graph persistence
Leander Girrbach*
leander. hanadrr-irracccheeuuituueeennnn
University of Tübingen, Tübingen AT Center
Anders Christensen"
andchri@dta.com dk
Technical University of Denmark University of Tübingen, Tubingen AI Center
Ole Winther
obwi@dtu.
Technical University of Denmark
University of Copenhagen
Copenhagen University Hospital
FindZebra
Zeynep Akata Universily of Tübingen, Tübingen Al Center
A. Sophia Koepke
University of Tübingen, Tübingen AT Center
Reviewed on OpenReview: // net/ forum? id- oyfRWeoUJY
Abstract
Neural Persistence is prominent measure for quantifying neural network complexity, pro- posed 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 per- sistence. Whilst this captures useful information for lincar classifiers, we find that no relevant spatial structure is present in later layers of deep neural networks, making nen- ral 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 proposc an extension of the filtration underlying neural persistence to the whole neural network instead of single layers, which is equiv- alent to calculating neural persistence on one particular matrix. This yields our deep graph persistence measure, which implicitly incorporates persistent paths through the net- work and alleviates veraance-related issues through standardisation. Code available at http://htb....eeeaaaaaaaaaaaaaap
1 Introduction
Analysing deep neural networks to gain better understanding of their inner workings is crucial, given their now ubiquitous use and practical success for a wide varicty of applications. However, this is notoriously difficult problem. For instance, neural networks often generalise well, although they are overparameterised [Zhang et al. 2017)- This observation clashes with intuitions from classical learning theory. Both the training process, which is a stochastic process influenced by minibatches and modifications of gradient-basee weight updates due the chosen optimisor, c.g. Adam (Kngma & Ba 2015), and the computations performed by
Denotes equal contribution.

---

Published in Transactions on Machine Learning Research (11/2023)
trained neural network are very complex and not easily accessible to theoretical analysis Goodfellow &
Vinyals 2015 Choromanska et al. 2015 Hoffer et al. 2017).
Topological Data Analysis (TDA) has recently gained popularity for analysing machine learning models, and in particular deep learning models. TDA investigates data in terms of its scale-invariant topological properties, which are robust to perturbations (Cohen-Steiner et al. (007). This a desirable property in the presence of noise. In particular, Persistent Homology (PH) provides means of separating essential topological structures from noise in data. We refer to (Pun et al., 2022) for overview of the field, as detailed introduction to TDA and PH is out of the scope of this work.
Recent works consider neural networks as weighted graphs, allowing analysis with tools from TDA developed for such data structures (Rieck 2023 This is possible by considering the intermediate feature activations as vertices, and parameters as edges. The corresponding network weights are then interpreted as edge weights. Using this perspective, Rieck ct al. (2019) define neural persistence, a popular measure of neural network complexity, which is calculated on the weights of trained neural networks, i.e. the edges of the computational graph. Neural persistence does not consider the data and intermediate or output activations. Nevertheless, Rieck et al.] show that neural persistence can be employed an early stopping criterion in place of a validation set. We wish to comprehend which aspects of neural networks are measured by inspection tools such as neural persistence. This helps understanding the limitations and developing new applications for the methods used for model assessment. In addition, unresolved problems that require further theoretical justification can be exposed. In this paper, we attempt to conduct such an analysis for neural persistence.
Our results suggest. that neural persistence is closely linked to the variance of weights and is better suited to analyse linear classifiers than deep feod-forward neural networks (DNNs). As the possibility of applying TDA for analysing DNNs is highly desirable, we propose to modify the complexity measure and introduce deep graph persistence (DGP) which extends neural persistence to also capture inter-layer dependencies. The proposed extension alleviates certain undesirable properties of neural persistence, and makes DGP applicable in the downstream task of covariate shift detection. This task has been tackled by an earlier extension of neural persistence, called lopological uncertainty (Lacombe et al. 2021). Our results indicate our proposed extension to be better suited for detecting image corruptions.
To summarise, our contributions are as follows: (1) We identify the variance of weights and spatial con- centration of large weights as important factors that impact neural persistence. (2) We observe that later layers in deep feed-forward networks do not exhibit relevant spatial structure and demonstrate that this effectively reduces neural persistence to a surrogate measure of the variance of weights (3) We introduce deep graph persistence, a modification of neural persistence, which takes the full network into account and reduces dependency on weight variance, making it better suited for deep networks.
2 Related work
Topological data analysis has recently gained popularity in the context of machine learning (Carrière et al.
2019 Holer et al.
2017
2019: Hu et al. 2019
Khrulkov & Oseledets 2018 Kwitt et al.
2015 Moor et al.
b
Ramamurthy et al. 2019 Rieck et al. 2019 Rieck, 2023 Royer et al.) 2020
Zhao & Wang 2019
Keinnnghauss et al. 2015 Stolz et al. 2017 Rieck 2023 von Rohrscheidt & Rieck 2022 Birdal et al. 2021
Hajij et al.) 2023). For a recent, in-depth overview of the field we refer to (Zia et al. 2023 Topological
features have been used as inputs to machine learning frameworks, or to constrain the training of models. For
instance, topological features were extracted from leukaemia data to predict the risk of relapse Chulián al.
relapse/Chuliãn
(023) and to improve the classification of fibrosis in myeloproliferative neoplasms Ryou et al. [2023 and persistence landscapes were incorporated into topological layers in image classification (Kim et al. 2020 Additionally, McCuire et al. (2023) studied the learnt internal representations for topological feature input. Different to this, Moor el al. 2020b all const rain the training to preserve topological structures of the input in the low-dimessional representations of an autoencoder, and Chen et al. (2019) introduce a penalty on the topologiaal complexity of the learnt classifier itself. Recently, He al. (2023) proposed a topology-aware loss for instance segmentation which uses persistence barcodes for the predicted segmentation and for the ground truth, aiming at maximising the persistence of topologcaa features that are consistent with the ground truth.
2

---

Published in Transactions on Machine Learning Research (11/2023)
Another prominent line of work uses TDA to analyse neural networks, either by considering the hidden activations in trained neural networks, or by examining the network weights. Corneanu et al. (2020) Gebbart et al. (2019): Ballester et al. (2022) interpret hidden units as points in a point cloud and employ TDA methods
to analyse them. For example, Corneamu et al. 2020) use the correlation of activations for different imputs as
a distance metric and observe linear correspondence between persistent homology metrics and generalisation performance. Naïtzat et al. (2020) find that learning success related to the simplification of the topological structure of the input data in the hidden representations of trained networks. In contrast, [hheeler et al.] (2021) propose to quantify topological properties of learnt representations. To facilitate model inspection or understand finetuning of word embeddings, Rathore et al. (202 2023) introduce visualisation tools for leartt representations based on TDA. Chauban & Kaul (2022) formulate a topological measure that links test accuracy to the hidden representalions in language models. Different to those works, we analyse the structure in the weights of trained neural networks.
Several complexity measures for the weights of DNNs have been proposed, c.g. by considering the weights as weighted stratified graphs RRieck el. al. 2019), or analysing the learnt filter weights in convolutional neural networks (Gabrielsson & Carlsson 2019). Birdal et al. (2021) also consider network weights and analyse the network's ' intrinsic dimension, linking it to genoralisation error. Gencralisation has also been shown to be
directly linked to a model's loss landscape (Horol et al. 2022 Rieck et al. (2099) introduce neural persistence, a complexity measure for DNNs based on the weights of trained networks applicable as an early stopping criterion. Rieck et al. (2019) Zhang et al. (2023) also show that topological properties can be useful for distinguishing models trained using different regularisers. [acombe et al. (2021) extends neural persistence to take concrete input data into account, enabling out-of-distribution detection. Balwani & Krzyston (2022)
use neural persistence to derive bounds the number of units that may be pruned from trained neural networks. In this work we perform in-depth analysis of neural persistence, confirming favourable properties of neural persistence for linear classifiers that is shown to not extend to DNNs. Watanabe & Yamana (0021
2022) leverage persistent homology to detect overfitting in trained neural networks by considering subgraphs spanning across two layers. Different to this, we consider the global shape in network weights by proposing deep graph persislence which extends neural persistence to a complexity measure for DNNs. As our analysis shows that neural persistence is best applied to linear classifiers, we focus on creating a filtration that only implicitly incorporates intermediate nodes. This leads us to propose a filtration that is special case of persistence diagrams of (Ø A)-connected interactions due to Liu et al. (2020). In this case, instead of evaluating how neurons directly connected by linear transforms interact, we evaluate how input features interact with output units. Thereby, we reduce the layer-wise averaging of neural persistence to computing the neural persistence of a single summary matrix that contains minimum weight values on maximum paths from input units to output units.
3 Understanding neural persistence
In this section, we aim at providing a deeper understanding of neural persistence, which was introduced by Ricck et al.] (2019). In particular, we identify variance of weights and spatial concentration of large weights as important factors that impact neural persistence. We formalise these insights by deriving tighter bounds neural persistence in terms of max-over-row and max-over-column values of weight matrices.
Neural persistence is defined for undirected weighted graphs, and is used to compute the neural persistence for a layer. Before stating the definition of neural persistence, we recall the definition of complete bipartite graphs.
Definition 3.1 (Bipartite graph). A graph G = (V,E) is called bipartite if vertices V can be scparated into two disjoint subsets A, B with V = AUB B and An = 0, and all edges e E E are of the form e = (a,b) b) with a E A and b E B, i.e. every edge connects a vertex in to one in B.
Definition 3.2 (Complete bipartite). G is a complete bipartäte graph if edges between all vertices in and all vertices in B exist.
Remark 3.3. Note that any matrix W E Raxm can be interpreted as the adjacency matrix of an undirected weighted complete bipartite graph. In this case, rows and columns correspond to vertices in A and B, respectively. The matrix entries then resemble edge weights between all vertices in A and B.
3

---

Published in Transactions on Machine Learning Research (11/2023)
Rieck et al. assert that neural persistence can be defined in terms of the maximum spanning tree (MST) of complete bipartite graph instead of persistent homology.
Definition 3.4 (Neural persistence). Tet W E [0; 1jaxm be matrix with rows, columns, and entries bounded below by 0 and above by 1. Throughout this paper, we denote entries in W with row index and column index j as Wi.- As in Remark 3.3 W can be interpreted as the adjacency matrix of an undirected weighted complete bipartite graph Gw = (Vw, Ew). Let MST(Gw) (Vw, EMST(Gw)))) with FMST(GW) C Ew be the unique maximum spanning tree of Gw- In general, uniqueness not guaranteed, but can be achieved by infinitesimal perturbations. Then, let MST be the set of weights for edges contained in the MST, i.e.
MST == (Wow (v,0') E EMST(GW))
(1)
The neural persistence NP, (W) is defined as
NPP(W)=
1+
(1 w-wppp #EMST" (Gw)
E
(2)
and subsequently neural persistence for an entire neural network is defined as the average neural persistence across all individual layers. Weights, which can have arbitrary values, are mapped to the range [0; 1] by taking the absolute value and dividing by the largest absolute weight value in the neural network. Thus, for the remainder of this paper, we assume that all weights are in the range [0; 1]. Also, we abbreviate neural persistence "NP".
Normalised neural persistence. To make NP values of matrices with different sizes comparable, Rieck et al. propose to divide NP by the theoretical upper bound (n + m 1) (see Theorem 1 in (Rieck et al. 2019 This normalisation maps NP values to the range [0; We use this normalisation and p = in all experiments, both the experiments concerning NP (Section 4 and also the experiments concerning DGP (Definition 5.1 and Appendix H.2 For caveats of this normalisation, refer to Appendix C
Bounds on neural persistence. Defining NP in terms of the MST of a complete bipartite graph provides the interesting insight that the NP value closely related to max-over-rows and max-over-columm values the matrix. This characterisation provides intuitions about properties of weight matrices that influence NP. These intuitions are formalised in Theorem 3.5 as bounds on NP which are lighter than the bounds given in Theorem 2 in (Rieck et al. 2
Theorem 3.5. Let Gw (Vw, Ew) be a weighted complete bipartite graph as in Definition 3.4 with edge weights given by W and Vw AUB, An B = 0. To simplify notation, we define
D (1 max W.. W..
vb B,
(3)
V. = (1 max Wa,))²
Va E A.
(4)
BEB
Using these shortcuts, we define
L = Σ
P
Σ
L
(5)
DEB
acA A
U: [B
BBAl+
Σ Φ + Σ
Va
(6)
DE
aEd
where
B+A:= = (be B Va E A: bb argmax W W.,b
(7)
VEB
ByA B can be thought of as the set of columns whose mazimal element does not coincide with the marimal element in any of W.
4

---

Published in Transactions on Machine Learning Research (11/2023)
Then, the following inequalities hold:
0 o NP,
(n ((+mm) m)².
(8)
Proof (sketch). For the lower bound, using properties of spanning trees, we construct bijection between vertices V (with one vertex excluded) and edges in MST(Gw). Each vertex is mapped to an edge that is connected to v. Using this bijection, we can bound the weight of each edge in the MST by the maximum weight of any edge connected to the respective vertex. Since maximum weights of edges connected to vertices correspond to max-over-rows and max-ovcr-column valucs, we obtain the formulation of L. For the upper bound, we observe that all max-over-rows and max-over columun values are necessarily included MST (Gw). However, in some cases max-over-rowe values and max-over-columm. values coincide. Therefore, this observation leaves some values in MST (Gw) undetermined. For these, we choose the value that maximises NP, ie. O, to obtain upper bound.
The detailed proof is provided in Appendix A and we also show in Appendix B.1 that the lower bound is generally tight and the upper bound tightens with increasing spatial concentration of large weights.
Variance and spatial concentration of weights as factors that impact neural persistence. The bounds on NP derived in Thcorem 3.5 mostly depend on max-over-columns and max-over-rows values in W. Thus, they identify additional factors that impact NP, in particular the variance and spatial concentration of weights. The spatial structure of a matrix captures whether large entries concentrate on particular rows columns, only certain combinations of rows and columns. This intuition does not depend on any particular ordering of rows or columns because permuting them does not change whether large entries concentrate on some rows (or columns). However, detecting spatial concentration is a difficult problem in practice, because we need to simultaneously quantify what a large weight is, Le. how much larger a weight is than the expected weight value, and how skewed the distribution of deviations of expected weight values in rows or columns is from the barycenter of the row- or column-wise wise weight distributions. In Appendix E we discuss an attempt how to measure spatial concentration by sorting rows or columns by their mean value and then caleulating sortedness metric (Mannila 1985) for the whole matrix. We then also discuss how to artificially construct matrices with a pre-defined level of spatial concentration. In Section E in contrast, we avoid quantifying spatial concentration explicitly, and instead rely on random permutation of weights, which destroys any spatial concentration that may have been present. In the following, we explain how the dcrived bounds identify these particular properties as factors that impact NP.
The lower bound L is tighter when the variance of weights is smaller. In this case, it is more likely that the actual weight in the MST chosen for any vertex is close to the maximum weight connected to When mean weight values and variances of weights are highly correlated, which is the case in praclise, NP increases with lower variance. The reason is that the lower variance causes the expected maximum value of a sample to be closer to the expected value, meaning the max-over-rows and max-over-columns values will also decrease together with lower mean and variance.
The upper bound U tighter when BBal is smaller. This is the case when large weights are concentrated on edges connected to few even a single vertex, i.e. when there is relevant spatial concentration of large weights on certain rows columns. In the extreme case, all edges with maximum weight for any vertex in A are connected to the same vertex b E B. Then, we know that edges with maximum weight, i.e. max- over-columns values, for all vertices in B \ {b} will be part of the MST. In this case, we have equality of NP, = U. Also, when large weights are concentraled on fewer rows or columns, max-over-rows and max-over-columns values will generally be lower, resulting in higher NP values.
4
Experimental analysis of neural persistence
4.1 Experimental setup
To study NP of neural networks and validate our insights practisc, we train a larg set of models. Namely, we train DNNs with exhaustive combinations of the following hyperparameters: Number of layers E (2,33 3,44, 4). hidden size (50, 100, 250, 650), and activation function (tanh, relu). However, we do not apply dropout
5

---

Published in Transactions on Machine Learning Research (11/2023)
0.15
EMNIST
Fashion-MNIST
MNIST
NP A to null model
0.90
0.85
0.10
X 0.80
e Re
dpp
4o 060
0.75
0.05
0.70
-5.5
-5.0
-5.25-5.00-447
-4.50 -4.25 log (Variance)
EMNIST
Fashion- -NNIST
MNIST
(a) Effect of randomly permuting weights in trained lin- ear classifiers. Large changes in NP (NPA) indicate the presence of spatial concentration of large weights. For each dataset, we train 20 models (see Section [.1), which are fully characterised by the learned weight matrix.
(b) Relationship of log-variance of weights and NP con- ditioned on the respective dataset for linear classifiers. All models were trained for 10 epochs. The relation- ship almost perfectly linear. Linear regression fits give R² = 99% for all datasets.
Analysing the relation between neural persistence and spatial concentration (left) and variance of weights in linear classifiers.
Figure 1:
or batch normalisation. Note, that in our terminology a "layer" refers to a linear transform, ie. weight matrix.
2015 with the same hyperparameters as Rieck et al. i.e. with learning rate of 0.003, no weight decay, B1 0.9, 32 0.999, and 10-* Each model is trained for 40 epochs with batch size 32, and we keep a chockpoint after every quarter epoch. We train models on three datasets, namely MNIST (LeCun et al. 1998), EMNIST (Cohen et al. 2017), and Fashion-MNIST (Xiao et al. 2017). For EMNIST, we use the balanced setting. Rieck et al. do not train models on EMNIST, but we decide to include this dataset, because it is more challenging as contains more classes, namely 49 instead of 10 in the case of MNIST and Fashion-MNIST. For cach combination of hyperparamotors and datasot, we Irain 20 models, each with different initialisation and minibatch trajectory. If not stated otherwise, we analyse the models after training for 40 epochs. Additionally, we train 20 linear classifiers (perceptrons) for each dataset using the same hyperparameters (optimizer, batch size, number of epochs) for deep models.
We use the Adam optimizer (Kingma & Ba
4.2 Neural persistence for linear classifiers
NP is defined for individual layers in Definition 3.4
Generalisation to deeper networks is achieved by averaging NP values across different layers. Here, we first analyse NP for models with only one layer, i.e. for linear classifiers. In this case, there are no effects of averaging or different matrix sizcs.
For linear classifiers, we show the presence of spatial structure trained models. Furthermore, we demonstrate the correspondence of NP and variance, after controlling for spatial structure. We find that both factors, variance of weights and spatial structure of large weights, vary in trained linear classifiers. Therefore, because these two factors can already explain a significant amount of the variation of NP values according to our insights in Section 3 NP is likely to exhaust its full capabilities in the case of linear classifiers.
Spatial structure. We demonstrate that weights of trained linear classifiers exhibit spatial structure in the following way: We compare the NP of actual weight matrices to suitable null models. As null models, we choose randomly shuffled weight matricos, i.c. we take actual weight matrices of trained lincar classifiers and randomly reassign row and column indices of individual weight values without changing the set of weights present in the matrix. This intervention destroys any spatial structure in the weights, but preserves properties that are independent of the spatial distribution, such as variance.
Figure Ta shows that weight matrices of linear classifiers trained on all datasets used in this paper, namely MNIST, EMNIST and Fashion-MNISTT exhibit relevant spatial concentration of large weights. Random permutation of weights Icads to large changes in NP values. For comparison, the mean absolute deviation of NP from the mean for different initialisations is generally less than 0.02. In addition, we conduct two- sample Kolmogorov-Smirno (KS-) tests to test if the distribution of neural persistence values of the layer
6

---

Published in Transactions on Machine Learning Research (11/2023)
without permutation is different from the distribution of neural persistence values after permutation. Indeed, all KS-tests reject the null hypothesis that neural persistence values with and without permutation are identically distributed with p-values < 10-6. Changes resulting from random permutation are smallest for models trained on Fashion-MNIST. Possibly, visual structures in Fashion-MNIST data, i.c. clothes, are more complex and spatially distributed compared to characters or digits in MNIST and EMNIST which means that more different input features will receive large weights.
Variance of weights. Having established the presence of spatial concentration of large weights in weight matrices of trained linear classifiers, analyse the relationship of NP and the variance of weights. Figure Lb shows that a linear relationship between NP and the variance of weights can be observed for trained linear classifiers. In particular, the R22 score of a linear regression fit. is Rs 99% for all datasets. This is expected, since all else being equal, the dataset is the only factor that impacts the spatial concentration of large weights in linear classifiers. Recall that in linear classifiers, large weights identify important features in the input data. Therefore, multiple linear classifiers trained on the same dataset will generally assign large weights to the same entries in the weight matrix. Eliminating this factor by separating models trained on different datasets in the analysis leaves variance as the only factor identified in Section 3 that impacts NP.
4.3 Neural persistence for deep neural networks
In Section 4.2 we established that trained linear classifiers exhibit spatial concentration of large weights and that, conditioned on the spatial concentration of large weights, NP responds linearly to changes in variance of weights. Naturally, we are interested in whether this extends to DNNs Motivated by our theoretical analysis, we analyse the impact of the variance of weights and the spatial concentration of large weights on NP. In particular, we find that no relevant spatial structures is present in later layers of DNNs, and therefore NP corresponds roughly linearly to the variance of weights, as effects of spatial structure become irrelevant.
Spatial structure. To analyse the spatial structure in DNNs, we repeat the permutation experiment from Section 4.2 where we shuffic entries in weight matrices and compare the resulting NP values to NP values for the original weight matrices of trained neural networks. The resulting changes in NP values are visualised confirming that irrespective of the dataset or number of layers, the NP values of later layers in the network are insensitive to the random permutation of entries. The changes in NP values are mostly less than 0.02, which is a good bound for the variation of NP values resulting from different initialisations and minibatch trajectories. Additionally, we run KS-tests for each hyperparameter combination (i.e. activation function, number of layers, hidden size, datasct) and layer in the respective network to test if the neural persistence values with and without permulation are distributed differently. This results in total of 216 tests. The KS-tests fail to reject the null hypothesis that the neural persistence values with and without permutation are identically distributed (p-value > 0.05) for all layers not connected to the input features. For the first layer that connected to the input features, the KS-tests reject the null hypothesis in 21 of cases for EMNIST, in 24 cases for Fashion-MNIST, and in 24 cases for MNIST. These results are in agreement with Figure? 2 These findings indicate the absence of any spatial structure in the large weights of trained neural networks that is relevant for NP in later layers of trained neural networks.
in Figure 2
24
Variance of weights. Unlike spatial structure, dif- ferences in the variance of trained weights also ex- ist in the case of DNNs. Therefore, our results so lar suggest that, in the absence of relevant spatial structure, the variance of weights becomes the main factor that corresponds to changes in NP. Indeed, in Figure g- we again observe roughly linear cor- respondence of NP with the log-transformed global variance of all weights in the trained network.
EMNIST
Fashion-
MNIST
0.7
0.8-
0.8
0.7-
0.6
0.7-
0.6-
0.6
0.5
-7 -6 -5 log (Variance)
-7 -6 -5 log (Variance)
-7 -6 -5 log (Variance)
As is the case for linear classifiers, matrix sizes influ- ence the effective NP values. However, the matrix sizes that influence the final NP value depend on the dataset (input and output layer), the hidden size,
Figure 3: Roughly linear correspondence of log- variance of weights and NP for DNNs (3 or 4 layers, hidden size E (250, 650)).
7

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
0.12
0.10
NP NPA to null model
0.08
0.06
0.04
0.02
2
3
2
3
2
3
Layer Index
Layer Index
Layer Index
Figure 2: Effect of randomly permuting weights in weight matrices in trained DNNs. Large changes in NP
indicate the presence spatial concentration of large weights. We factorise the results by dataset and index of the layer for which neural persistence is computed.
and the number of layers. Therefore, we only include DNNs with 3 or 4 layers and hidden size e {250, 650) in Figure 3 Additional supporting results are provided in Appendix H.1
The absence of spatial structure in layers that are located later in the network along with the strong cor- respondence of NP with the variance of weights naturally raises questions about the additional information provided by NP that goes beyond the variance of weights. We argue that little additional information is provided: Rieck et al. suggest to use the growth of NP values for early stopping. This is very useful in cases where validation data is available. Therefore, compare the variance early stopping criterion to NP.
we show that using the variance of weights in place of NP as early stopping criterion yields similar results: Using the variance as criterion leads to training for more epochs on average compared to NP, with small increase in the resulting test set accuracy. Additionally, we find that the variance weights yields similar results as NP in distinguishing models trained with different hyperparameters, c.g. dropout or batch normalisation. Further details given in Appendix H.3
In Appendix H.2
5
An improved complexity measure for deep feed-forward neural networks
Our analysis in Sections 3 and 4.2 demonstrated that the variance of the weights dominates the neural persistence measure. Moreover, variance proves to be equally effective as the computationally demanding NP when used as an early stopping criterion.
In this section, we introduce our deep graph persistence (DGP) measure with the intention of reducing the dependency the variance of network weights, and instead increasing dependency the network structure. Our DGP alters the filtration used in the calculation of neural persistence. This addresses underlying issues in neural persistence, and we show that DGP compares favourably to related methods on the downstream task of covariate shift detection.
5.1 Definition of DGP
Our proposed DGP measure addresses two caveats of neural persistence: (1) Neural persistence of layer is highly correlated with the variance of the respective weight matrix; (2) Neural persistence of network is computed by averaging layer-wise values.
To address the first caveat, we standardise the weight matrices in each layer before normalisation. This mitigates effects of layer imbalances (Du et al. 2018), iee. all weights appearing very small because one entry in a particular layer very large. We standardise the weights by subtracting the layer mean p and dividing by the standard deviation of of weights in the same layer:
W
(9)
8

---

Published in Transactions on Machine Learning Research (11/2023)
We then follow the normalisation procedure of neural persistence by taking the absolute values of the normalised weights W i.j and dividing by the largest resulting value in the network W max- We can then define the set W == W//l//W max = N.",...N'") indexed in descending order. Here, N is the cardinality of the set W G, i.e. the number of parameters in the full network.
To address the second caveat, we consider the whole computational graph at once when computing DGP similar to (Liu et al. 2020) and (Gebhart et al. 2019). This allows including structural properties be- tween layers which is different from the averaging over individual layers in neural persistence. The filtration proposed by Rieck et al.] for neural persistence is computed layer-wise, and within each layer nodes are considered as independent components. Specifically, they include an edge in the calculation of neural per- sistence, i.c. in the MST, in the order defined by docreasing magnitude whenever it creates a new connectod component consisting of input nodes and output nodes of the respective layer. We extend this intuition to the entire neural network instead of treating layers independently. We add edges to the computational edge creates a new connected component of
graph sorted by decreasing (absolute) magnitude. Whenever input and output nodes of the full neural network, we include this edge. Finally, we compute DGP similar to neural persistence, but by using the previously described set of edges for the full neural network, instead of using edges from individual layers only. Note, that this intuition corresponds to the filtration induced by definition of (Ø = A)-connected by Liu et al.] (2020) (Definition in their paper). The Kruskal algorithm used to construct the MST also keeps track of the connected compouents, just like (o X)-connected does. However, the dcfinition of (Ø- A)-connected is broader, as the filtration is also applied to other layers than the input layer and considers connected components with more than one element. We point out that this is different from our approach, because in our case singleton connected components dies once it is merged with another connected component. In summary, the Peature-interactoon approach of Liu et al. provide another motivation to extend NP to capture interactions between all layers.
In essence, we adapt the calculation of neural persistence to involve just the input nodes Vn and output nodes Vout of G in way that respects persistent paths through the entire network. Mathematically, this is equivalent to calculating the MST of complete bipartite graph G (V.E), with the set of vertices V = Vin Vout representing the input and output nodes of G and a set of edges E between these nodes.
In order to assign weights to the edges in É, we turn to the full network graph G = E). For any choice of imput node Vin and output node b e Vout we consider the set of directed paths Pas (following the computational direction of the network) from to b. Each path Pas contains L edges, where L is the
number of hidden layers in the network, and the edges are in different layers. Let 0 : E + We denote the mapping that returns the edge weight of any edge (a, b) E F. We can now define Q F. - We to compute the edge weight of any edge (ā, b) E E as
((a,b) = max min H(u, v).
(10)
PePa (u,0)Ep
Thus, O assigns the filtration threshold to (ā, for which there exists at least one directed path between a and b in the full network graph G. The resulting persistence diagram for DGP is calculated from the MST of the bipartite graph corresponding
S = ((a
(11)
Different to neural persistence, this approach encodes information about connectivity the full network. Finally, we can define the DGP measure in an analogous fashion to neural persistence:
Definition 5.1 (Deep graph persistence). Let S E |V: be summarisation matrix with Vial rows, |Vouel columns, and entries given by O. The deep graph persistence DGP, p of the full netw G is defined as
(G), == 1+ Σ
(1 w)P
(12)
wEMST (
9

---

Published in Transactions on Machine Learning Research (11/2023)
This formulation requires calculating the MST for just single matrix S rather than for every layer. Fur- thermore, 5 has a fixed dimensionality regardless of architectural choices, such as layer sizes, and it can be efficiently constructed by dynamic programming (see Algorithm [ in Appendix H Concretely, the com- putational complexity for constructing S is O . o dd),, where L is the number of linear transforms in the network, o is the number of output units, and d is an upper bound for the number of input units and the hidden size. The computational complexity of calculating the MST of S using Kruskal's algorithm is O(V2. log V), where V is the number of input features plus the number of output units.
We show in Appendix H.4 that DGP indeed does not exhibit the correspondence to the variance of weights that we observed for NP. Also, we check if DGP yields a better carly stopping criterion than NP or the variance of weights. However, our results in Appendix H..2 are negative. There is no relevant practical differ- ence between NP and DGP when used as early stopping criterion. Since Rieck et al.] only provide empirical, and no theoretical, justification for why NP can be used as early stopping criterion, we conclude from our findings that assessing generalisation or even convergence only from a model's paramcters without using any data remains difficult. While related methods also try to avoid labelled data as early stopping crilerion, they always require access to information based on model computations, such gradients (Mahsereci et al. 2017 Forouzesh & Thiran 2021 or node activations [Corncanu et al. 2020
Therefore, in the following, we focus on the utility for downstream applications which we see as a more fruitful direction for applying methods related to NP.
5.2 Sample-weighted deep graph persistence for covariate shift detection
Lacombe et al. (2021) have shown the usefulness of the neural persistence approach for covariate shift detec- tion by including individual data samples in the calculations of Topological Uncertainly (TU). Concretely, TU uses the same method as NP, namely calculating the 0-order persistence diagrams of individual layers
(i.c. the MST of the corresponding bipartite graph) and then averaging scores across layers. In contrast to NP, TU is applied to the activation graph (defined below) of a neural network (Gebhart et al. 2019
To use our proposed deep graph persistence in downstream tasks that require access to data, we introduce the notion of sample-weighted deep graph persistence. For this, we calculate DGP on weights multiplied with the incoming activation that is obtained when applying the network to a given sample, instead of the static weights of the trained model. In the following, we formally define hample-weightee deep graph persistence.
Definition 5.2 (Activation graph). For a neural network G, the activation graph is defined as the input- induced weighted graph G(x) obtained as follows. For an edge connecting an input node of layer E with an output node of layer & in G, the edge weight is given by the activation value of the input node multiplied by the corresponding element in the weight matrix, i.c. W sf. Following Lacombe et al. (2021) 1 we use the absolute value [W,, =f1-
Definition 5.3 SSample-weighted deep graph persistence). For a neural network G and a sample æ, we first obtain the activation graph G(x). We then calculate the summarisation matrix S(x) using the edge values of the activation graph instead of the edge weights of the non-sample weighted computational graph.
We use our seiple-weighted DGP for the detection of covariate shifts, i.e. shifts in the feature distribution in relation to the training or in-domain data. This task was also considered in TU (Lacombe et al. 2021 which can be considered as an application of NP. We show that modifying neural persistence to mitigate its identified caveats improves performance of derived methods in downstream applications. To compare DGP and TU, we build on work by Rabanser et al. (2019), who have established a method to detect covariate and label shifts by leveraging representations from trained neural networks.
The method proposed by Rabanser et al. 2019 attempts to detect if batch of data samples contains out-of-domain data by comparing it to in-domain data. The method assumes the availability of (a limited amount of) in-domain data. Concretely, their proposed method first extracts representations of the in-domain and test data from trained neural network. This results in two fcature matrices Felean E Redd and Frest E IR' mxd where n is the number of in-domain datapoints, m is the number of test datapoints (here, we assume m), and d is the number of features in the representation extracted from the trained model.
Method.
10

---

Published in Transactions on Machine Learning Research (11/2023)
For each feature dimension i E {l,...,d] d), two-sample Kolmogorov-Smimmon (KS) test is conducted to test the hypothesis that the feature values in feature dimension i are sampled from the same underlying distribution in Frest and Felean Using Bonferroni correction when d tests are performed, the null hypothesis, namely that the underlying distributions are equal, is rejected at a confidence level of 95% if the p-value of the KS test is smaller than 0.05 3- Rabanser et al. conclude that Frest contains out-of-domain datapoints if at least one of the d tests fails.
In order to use deep graph persistence and TU in this setting, use the weights in the MST used for caleulating the DGP value (Definition 5.1 or the NP value (Definition 3.4b. This is equivalent to using the persistence diagram used for calculating DGP (or NP). To ensure consistency with the persistence diagram formulation (see (Lacombe et al. 2021 Sec. 2.2)), the set of weights in the MST is sorted by weight magnitude and represented as a vector. For a network with &o input nodes and с output nodes corresponding to the c classes, this representation yields feature vectors of dimension k 1. The -1 is due to the MST containing one edge less than there are nodes in the graph. Following Lacombe ct al. (2021). we calculate the differences to class-wise mean representation. Class-wise mean representations are defined representation for sample I; (of k given samples) extracted from the trained model, i.e. the sorted set of weights in the MST of a layer in the activation graph. Let 1 the number of samples with class j and yi the class of F,, Then, the class-wise mean representation Jy is defined as
follows: Let f(x:)) be a
Mj Σ 8ly f(:)).
(13)
Given & labeled training samples {x,, Vim........ (in our case, I 1000) and feature extraction function f: I2 + Rd that extracts MST weights (or other representations such as the vector of softmax outputs) the difference of the representation of a sample Ptest to the mean representation of class j is given by
(y( = [If - M;
(14)
where 1 is the number of training samples in class j. Lacombe et al. 2021 use the difference to the mean representations only of the predicted class for sample Ftest as a scalar score (averaged across layers). However, we find that using the c-dimensional vector which contains the differences to mean representations for training samples of all classes as done in (Hensel et al. 2023 to be more effective for both TU and DGP:
A (Itest)= = (A1 (Itest)
(2(et)))
Ac(Frest))
(15)
Baselines. We compare DGP to three baselines for covariate shift detection. Softmax outputs of the model are used by the seminal work of Rabanser et al. (2019). Topological Uncertainty (TU) (Lacombe et al. 2021) effectively calculates NP on the activation graph (Gebhart et al. 2019). The recently proposed MAGDiff (Hensel et al. 2023) uses the complete final layer of the activation graph for sample x as extracted represenlation f(x) to detect corrupted images. TU and MAGDifT do not use features directly, but their difference to the mean features of training samples grouped by classes. We compare to TU, as it directly uses neural persistence, and we also incorporate other methods basclines. We use the evaluation protocol proposed by Rabanser et al.)
Setup. To evaluate the different methods on the covariate shift detection task, we train MLP models on MNIST, MasSionnMNISTT and CIFAR-10. For each dataset, we train models with all combinations of hidden size E {100, 650) and number of layers E {2,4] For each hyperparameter combination, we train 5 models with different initialisations. Hyperparameters and training setup are as described in Section
Evaluation. Covariate shifts are simulated on synthetic data by artificially corrupting in-domain data with added noise or other augmentations proposed by Rabanser et al. (2019). In our evaluation, corrupt images from MNIST, FaShion-MNIST and CIFAR-10 by adding Gaussian noise (i.c. noise sampled from a Gaussian distribution), uniform noise (ie noise sampled from a uniform distribution), applying input dropout (i.e. changing the colour or brightness of pixels to black), or applying Gaussian blur to images. All corruptions are applied in varying strengths. Details regarding the strength of corruptions are in Appendix G
We report the detection ratio (in percent) which measures the frequency of detecting corrupted samples for each method. Specifically, it captures how often each method returns feature representations which make
11

---

Published in Transactions on Machine Learning Research (11/2023)
Dataset
CIFAR-10 1-
MNNIST
MNIST
7
Corruption
GB
GN
PD
UN
GB
GN
PD
UN
GB
GN
PD
UN
Softmax
2.22
2.84
4.76
1.97
1.76
5.78
5.55
3.04
2.11
15.30
19.67
7.44
TU
1.32
3.66
16.31
1.34
*1.44
1.79
7.55
1.54
1.63
5.07
*17.03
2.27
MAGDiF
1.83
5.24
9.86
1.56
1.52
3.42
7.07
2.16
2.39
8,48
19.49
4.60
DGP (Ours)
*1.23
*9.18
*26.17
$2.53
1.44
*4.10
*12.76
#2.87
*1.91
$25.79
14.90
*16.96
20
Softmax
4.56
6.71
14.31
3.79
4.00
16.44
14.33
9.20
4.14
32.60
36.94
20.17
TU
*3.17
10.91
20.67
3.12
*3.04
4.22
18.28
3.45
3.85
13.85
*31.02
6.54
MAGDif
5,11
14.48
22.
3.62
3.20
10.51
17.83
5.78
5.47
20.72
36.14
12.98
DGP (Ous)
2.84
#22.65
$43.51
*8.41
2.92
*12.53
$25.74
*8.75
$4.92
*43.57
28.44
#32.56
50
Softmax
6.16
10.26
23.53
3.24
4.37
28.64
23.31
17.42
4.20
48,69
51.30
32,00
TU
4.11
20.08
44.14
4.91
*3.59
7.20
29.82
4.08
6.34
24.02
*46.74
12.28
MAGDHI
9.38
25.51
35.95
6,80
3.30
19.49
29.31
11.13
8.24
35.22
50.58
23.70
DGP (Ours)
$1.61
*36.33
*60.49
*16.57
3.09
#225.78
$39.72
$18.84
*9.71
*62.13
43,20
$48.92
100
Softmax
11.84
18.91
36.57
5.28
9.61
43.06
35.44
28.97
7.23
65.03
66.84
47.75
TU
8.79
31.31
58.81
9.98
*7.08
16.07
43:47
8.53
12.35
37.17
*62.33
21.31
MAGDHI
17.79
38.49
50.47
13:35
5.96
32.84
42.70
21.07
15.55
51.31
65.96
38.59
DGP (Ours)
*10.78
$50.91
*79.88
$27.70
6.48
$40.74
#54.41
$31.78
*20.16
*79.21
58.14
*64.71
200
Softmax
18.77
27.71
48.20
8.37
16.29
56.78
46.94
41.12
10.60
79.23
78.90
61.45
TU
15.90
42.90
71.13
16.81
12.55
26.72
56.61
16.05
19.38
50.64
*75.64
31.92
MAGDII
27.58
50.97
63.80
20.76
10.45
45,90
55.58
32.82
23.15
65.83
78.13
52.32
DGP (Ours)
*19.67
*64.36
*89.39
#39.16
*13.11
#55.58
*67.51
$45.22
#30.19
#91.08
71.58
*78.71
Table 1: Covariate shift detection results for various corruptions and datasets. Scores are given in percent, i.c. in the range (0; 100). GB means Gaussian blur, GN means Gaussian noise (i.e. noise sampled from a Gaussian distribution), PD means pixel dropout, and UN means uniform noise. Bold entries denote the best result among methods for each combination of n, dataset and corruption type. With the asterisk, we mark whether DGP or TU achieves better score for the respective combination.
the KS tests reject the hypothesis that the underlying feature distributions are equal for in-domain and corrupted images. A score of 100 means that 100% of samples with corrupted images have been detected.
Results. Tn Table [ we show covariate shift detection ratios on the CIFAR-10, Fashion-MNIST, and MNIST datasets for Gaussian blur, Gaussian noise, pixel dropout, and uniform noise. Interestingly, however, DGP does not manage to detect more subtle image transformations, such as rotation and zoom, equally well as the baselines, so here we focus on noise-type corruptions and leave exploring other types of shifts future work. Also in Table D we show results for different features extraction methods and number of samples used for the detection. We observe that DGP performs better than baselines on most combinations of datasets and corruptions, i.e. DGP detects corruptions more often and needs fewer samples to detect corruptions. DGP gives particularly strong results on CIFAR-10. There, DGP surpasses the baselines on all corruption types except for Gaussian blur, where it still performs better than TU. Results on MNIST are similar. On MNIST, DGP stronger for Gaussian blur delection for larger sample sizes, but fails to detect pixel dropout similar to the baselines. Results on Fashion- the baselines on detecting uniform noise for larger sample sizes, and Softmax remains superior on detecting Gaussian noise and Gaussian blur, but with small margin. In both cases, DGP performs better than TU.
are more mixed. Here, DGP only performs better than
DGP yields improvements over TU for all corruptions and datasets with the exception of detecting pixel dropout on MNIST and Gaussian blur on Fashion-MNIST, where DGP is outperformed by TU. The difference in these cases is relatively small compared to the improvements DGP achieves in other settings.
5.3 Ablation study sample-weightes deep graph persistence
In Table 2 show the effect of different components in the calculation of DGP on the covariate shift detection performance. In particular, we analysc the impact of standardising layers by substracting the layer-wise mean and of dividing by the layer-wise standard deviation. "TU (+ norm)" refers to TU, but removing mean and standard deviation of layers of the activation graph before calculating representations. "DGP (-norm)" refers to DGP, but without the removal of mcan and standard deviation before constructing the matrix S. Due to the high computational cost of calculating TU for many samples, we provide results for the MNIST dataset only. Table 2 shows that both modifications, i.e. removing the averaging of layer-
12

---

Published in Transactions on Machine Learning Research (11/2023)
20
50
100
Corruption
GB
GN
PD
UN
GB
GN
PD
UN
GB
GN
PD
UN
TU
3.85
13.85
31.02
6.54
6.34
24.02
46.74
12.28
12.35
37.17
62.33
21.31
TU (+ norm)
4.94
40.55
28.51
28.34
9.31
57.44
43.40
43.23
18.48
75.06
58.26
57.80
DGP (- -norm)
3.66
35.15
27.72
22.46
5.15
51.78
41.15
35.70
11.26
67.71
55.95
49.74
DGP
4.92
43.57
28.44
32.56
9.71
62.13
43.20
48.92
20.16
79.21
58.14
64.71
Table 2: Ablation results on MNIST. Scores are corruption detection ratios (in %). "norm" " denotes applying
layer-wise standardisation The full table with results for n = 10 and n 200 in Appendix HH.6
wise scores (DGP (- norm)) and standardisation (TU (+ norm)), already improve performance individually. Standardisation alone generally leads to stronger performance than DGP without standardisation. Together, they yield further albeit smaller improvements. Note, that again we observe a weaker performance of DGP for pixel dropout. In summary, this suggests that our proposed modifications indeed target properties of NP that so far impede its usefulness for ream lasks.
6 Conclusion
In this work, thoroughly analysed the neural persistence measure and found both theoretically and empirically that the variance of weights and spatial concentration of large weights main factors that impact neural persistence. We compared the behaviour of neural persistence for linear classifiers and for deep feed-forward neural networks. For trained linear classifiers, we observed that the variance of weights varies for different independent training runs and that the spatial concentration or large weights varies for different datasets. However, we find that later layers in deep feed-forward neural networks do not exhibit relevant spatial structure. We conclude that neural persistence is more relevant metric for linear classifiers than for deep feed-forward neural networks, because in the latter case we find neural persistence to provide little information beyond the variance of weights. As neural persistence is more costly to compute than the variance of weights without yielding additional insights, we hypothesise that reformulation or different application of neural persistence is necessary for deep neural networks. This leads us to propose deep graph persistence as an extension of noural persistence. Deep graph persistonce directly addresses the caveats of neural persistence. Finally, we demonstrate the utility deep graph persistence for covariate shift detection, which permits direct comparison to previous work in applying topological methods in downstream tasks.
Acknowledgements
This work was supported by DFG project number 276693517, BMBF FKZ: 011S18039A, ERC (853489- DEXIM), EXC number 2064/1 project number 390727645. Ole Winther is supported by the Novo Nordisk Foundation (NNF200C0062606) and the Pioneer Centre for AI, DNRF grant number P1, Anders Christensen thanks the ELLIS PhD program for support.
References
Rubén Ballester, Xavier Arnal Clemente, Carles Casacuberta, Mcysam Madadi, Ciprian A. Corneanu, and Sergio Escalera. Towards explaining the generalization gap in neural networks using topological data analysis. arXiv preprint orXiv:2203.1200 12330, 2022.
Aishwarya Balwani and Jakob Krzyston. Zeroth-order topological insights into iterative magnitude pruning. In ICML Workshop on Topological, Algebracc and Geometric Learning, 2022.
Tolga Birdal, Aaron Lou, Leonidas J Guibas, and Umut Simsekli. Intrinsic dimension, persistent homology and generalization in neural networks. In NeurIPS, 2021.
Mathicu Carrière, Fródéric Chazal, Yuichi Tke, Théo Lacombe, Martin Royer, and Yuhci Umoda. Perslay: A neural network layer for persistence diagrams and new graph topological signatures. In International Conference on Artificial Intelligence and Stalistics, 2019.
13

---

Published in Transactions on Machine Learning Research (11/2023)
Jatin Chauhan and Manohar Kaul. Bertops: Studying bert representations under topological lens. In International Joint Conference on Newral Networks, 2022.
Chao Chen, Xiuyan Ni, Qinxun Bai, and Yusu Wang. A topological regularizer for classifiers via persistent homology. In International Conference on Artificial Intelligence and Statistics, 2019.
Anna Choromanska, Mikael Henaff, Michaël Mathieu, Gérard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015.
Salvador Chulián, Bernadette J Stolz, Álvaro Cartinez-Rubio, Cristina Blázquez Goñi, Juan F Ro- dríguez Gutiérrez, Teresa Caballero Velázquez, Águeda Molinos Quintana, Manuel Ramírez Orellana, Ana Castillo Robleda, José Luis Fuster Soler, et al. The shape of cancer relapse: Topological data analysis predicts recurrence in paediatric acute lymphoblastic leukaemia. PLOS Computational Biology, 2023.
Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre Van Schaik. Emnist: Extending mnist handwritten letters. In International joint conference neural networks, 2017.
David Cohen-Steiner, Herbert Edelsbrunner, and John Harer. Stability of persistence diagrams. Discret. Comput. Geom., 2007.
Ciprian A. Corneanu, Sergio Escalera, and Aleix M. Martínez. Computing the testing error without a testing set. In CVPR, 2020.
Narsingh Deo. Graph theory with applications to engineering and computer science. Prentice-Hall, Englewood Cliffs, N.J., 1974.
Simon S. Du, Wei Hu, and Jason D. Lee, Algorithmic regularization in learning deep homogeneous models: Layers are automatically balanced. In NewrIPS, 2018.
Vladimir Estivill-Castro. Generating nearly sorted sequences the of measures of disorder. In The Australasian Theory Symposium, 2004.
Mahsa Forouzesh and Patrick Thiran. Disparity between batches as a signal for early stopping. In ECML PKDD, 2021.
Rickard Brüel Gabrielsson and Gunnar Carlsson. Exposition and interpretation of the topology of neural networks. In IEEE International Conference On Machine Learning And Applications, 2019.
Thomas Gebhart, Paul Schrater, and Alan Hylton. Characterizing the shape of activation space in deep neural networks. In ICML, 2019.
Tan J. Goodfellow and Oriol Vinyals. Qualitatively characterizing neural network optimization problems. ICLR, 2015.
Mustafa Hajij, Ghada Zamzmi, Theodore Papamarkou, Nina Miolane, Aldo Guzmán-Sáénn Sáénz, Karthikeyan Natesan Ramamurthy, Tolga Birdal, Tamal K Dey, Soham Mukherjee, Shreyas N Samaga, et al. Topological deep learning: Going beyond graph data. arXiv preprint arXix:2066.00 200022060 2023.
Hongliang He, Jun Wang, Pengxu Wei, Fan Xu, Xiangyang Ji, Chang Liu, and Jie Chen. Toposeg: Topology- aware nuclear instance segmentation. In ICCV, 2023.
Felix Hensel, Charles Arnal, Mathieu Carrière, Théo Lacombe, Hiroaki Kurihara, Yuichi Tke, and Frédéric Chazal. Magdiff: Covariate data set shift detection via activation graphs deep neural networks. arXiv preprint arXiv:2305. 13271, 2023.
Christoph Hofer, Roland Kwitt, Mare Nicthammer, and Andrcas Uhl. Deep lcarning with topological signa- tures. In NewrIPS, 2017.
Christoph Hofer, Roland Kwitt, Mare Niethammer, and Mandar Dixit. Connectivity-optiiizdd representa- tion learning via persistent homology. In ICML, 2019.
14

---

Published in Transactions on Machine Learning Research (11/2023)
Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. In NewrIPS, 2017.
Stefan Horoi, Jessie Huang, Bastian Rieck, Guillaume Lajoie, Guy Wolf, and Smita Krishnaswamy. Exploring the geometry and topology of neural network loss landscapes. In International Symposium on Intelligent Data Analysis, 2022.
Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen. Toppeogg deep image segmentation. In Newr/PS, 2019.
Maurice Kendall. A new measure of rank correlation. Biometrika, 1938.
Valentin Khrulkov and Ivan Oseledets. Geometry score: A method for comparing generative adversarial networks. In ICML, 2018.
Kwangho Kim, Jisu Kim, Manzil Zaheer, Joon Kim, Frédéric Chazal, and Larry Wasserman. Pllay: Efficient topological layer based on persistent landscapes. In NeurIPS, 2020.
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
Roland Kwitt, Stefan Huber, Mare Niethammer, Weili Lin, and Ulrich Bauer. Statistical topological data analysis kernel perspective. In NewrIPS, 2015.
Théo Lacombe, Yuichi Tke, Mathieu Carrière, Frédéric Chazal, Marc Glisse, and Yuhei Umeda. Topological uncertainty: Monitoring trained neural networks through persistence of activation graphs. In IJCAI, 2021.
Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient- learning applied to docu- ment recognition. Proc. IEEE, 1998.
Zirui Liu, Qingquan Song, Kaixiong Zhou, Ting- Hsiang Wang, Ying Shan, and Xia Hu. Towards interaction detection using topological analysis on neural networks. In NewrIPS, 2020.
Maren Mahsereci, Lukas Balles, Christoph Lassner, and Philipp Hennig. Early stopping without validation 09580, 2017.
set. arXiv preprint
Heikki Mannila. Mcasures of presortedness and optimal sorting algorithms. IEEE Trans. Computers, 1985.
Sarah McGuire, Shane Jackson, Tegan Emerson, and Henry Kvinge. Do neural networks trained with topological features learn different internal representations? In NewrIPS Workshop on Symmetry and Geomelry in Neurul Representattons, 2023.
Michael Moor, Max Horn, Karsten Borgwardt, and Bastian Rieck. Challenging euclidean topological au- toencoders. In NeurIPS Workshop on TDA & Beyond, 2020a.
Michael Moor, Max Horn, Bastian Rieck, and Karsten Borgwardt. Topological autoencoders. In ICML, 2020b.
Gregory Naitzat, Andrey Zhitnikov, and Lek-Heng Lim. Topology of deep neural networks. JMLR, 2020.
John A. Nelder and R. Mead. simplex method for function minimization. Comput. J., 1965.
Chi Seng Pun, Si Xian Lee, and Kelin Xia. Persistent-hooollg--beed machine learning: survey and a comparative study. Artif. Intell. Rev., 2022.
Stephan Rabanser, Stephan Günnemann, and Zachary C. Lipton. Failing loudly; An empirical study of methods for detecting dataset shift. In NewrIPS, 2019.
Karthikeyan Natesan Ramamurthy, Kush Varshncy, and Krishnan Mody. Topological data analysis of deci- sion boundaries with application to model selection. In ICML, 2019.
Archit Rathore, Nithin Chalapathi, Sourabh Palande, and Bei Wang. Topoact: Visually exploring the shape of activations in deep learning. Comput. Graph. Forum, 2021.
15

---

Published in Transactions on Machine Learning Research (11/2023)
Archit Rathore, Yichu Zhou, Vivek Srikumar, and Bei Wang. Topobert: Exploring the topology of fine-tuned word representations. Information. Visualization, 2023.
Jan Reininghaus, Stefan Huber, Ulrich Bauer, and Roland Kwitt. A stable multi-scale kernel for topological machine learning. In CVPR, 2015.
Bastian Rieck. On the expressivity of persistent homology in graph learning. ar preprint
arXiv:2302.088 09826, 2023.
Bastian Rieck, Matteo Togninalli, Christian Bock, Michael Moor, Max Horn, Thomas Gumbsch, and Karsten M. Borgwardt. Neural persistence: A complexity measure for deep neural networks using al- gebraic lopology. In ICLR, 2019.
Martin Royer, Frédéric Chazal, Clément Levrard, Yuichi Ikk, and Yuhei Umeda. Atol: Mcasure vectorization for automatic topologically-orientee learning. In International Conference on Artificial Intelligence and Statistics, 2020.
Hosuk Ryou, Korsuk Sirimukunwatrana, Alan Aberdeen, Gillian Grindstaff, Bernadette Stolz, Helen Byrne, Heather A Harrington, Nikolaos Sousos, Anna L Godfrey, Claire N Harrison, et al. Continuous indexing of fibrosis (cif): Improving the assessment and classification of mpn patients. Leukemia, 2023.
Bernadette Stolz, Heather Harrington, and Mason A Porter. Persistent homology of time-dependent functional networks constructed from coupled time series. Choos: An Interdisciplinary Journal of Nonlin- Science, 2017.
Julius von Rohrscheidt and Bastian Rieck. TOAST: topological algorithm for singularity tracking. arXiv preprint Xiv: 00066, 2022.
Satoru Watanabe and Hayato Yamana. Overfitting measurement of deep neural networks using no data. In International Conference on Data Science and Advanced Analytics, 2021.
Satoru Watanabe and Hayato Yamana. Overfitting measurement of convolutional neural networks using trained network weights. International Journal of Data Science and Anolytics, 2022.
Matthew Wheeler, Jose Bouza, and Peter Bubeník. Activation landscapes as a topological summary of neural network performance. In IEEE International Conference on Big Data, 2021.
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv: 100:1700.07777 2017.
Ben Zhang, Zhetong Dong, Junsong Zhang, and Hongwei Lin. Functional network: A novel framework for interpretability of deep neural networks. Neurocomputing, 2023.
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017.
Qi Zhao and Yusu Wang. Learning metrics for persistence-based summaries and applications for graph classification. In NewrIPS, 2019.
Ali Zia, Abdelwahed Khamis, James Nichols, Zeeshan Hayder, Vivien Rolland, and Lars Petersson. Topo- logical deep learning: A review of an emerging paradigm. arXiv preprint arXiv:2302.088% 2023.
16

---

Published in Transactions on Machine Learning Research (11/2023)
A Proof of Theorem 3.5
Before we give the full argument proving the bounds in Theorem 3.5 we recall relevant definitions from graph theory.
Definition A.1 (Spanning tree). A spanning tree of an undirected graph G = (V, E) is a connected acyclic
subgraph of G that contains every vertex (Sections 3-7 in (Deo 1974))
Remark A.2. A relevant property of spanning trees, and trees in general, is that for all vertices e, e/, there is a unique path from v to e' (Theorem 3-1 in (Deo 1974
Definition A.3 (Maximum spanning tree). The maximum spanning tree MST(G) of a weighted graph G= (V, is a spanning tree with maximal (summed) edge weights (Theorem 3-16 in (Deo) 1974). If all weight values are unique, which we assume here, the maximum spanning tree is unique as well. We denote the maximum spanning tree by MST(G) = (V, EMST).
Remark A.4. The maximum spanning tree MST(G) of graph G, and any tree in general, contains exactly - - edges (Theorem 3-3 in Deo 1974)).
Definition A.5 (Rooted tree). A rooted tree is a tree where exactly one vertex u E V is singled out and called "root" (Section 3-5 in (Deo 1974 Any (unrooted) tree can be turned into a rooted tree by picking an arbitrary vertex as root.
Definition A.6 (Arborescence). An arborescence is a rooted tree with directed edges, where all edges point away from the root (Section 9-6 in (Deo 1974)).
Remark A.7. An inductive argument over the path length shows that any (undirected) rooted tree can be turned into an arborescence by inducing the natural orientation on edges away from the root.
To see this, consider a node where the unique path from the root u to has length I, i.e. contains I edges. The case 1 1 is clear, because the respective edges are directed from the root to its neighbours. Now, consider the case 1 > 1. Then, there is a node v' on the path from u to & which is a neighbour of v, i.e. the path length from u to v' is 1. By the induction hypothesis, the path from u to e' is directed and points away from the root. Similarly, the induction step is completed as the path from v' to v is directed and points from o' to v. In conclusion, we see that any subtree with maximal path length can be turned into an arborescence (since the choice of is unrestricted), and thus the same is true for the entire tree.
Remark A.8. In an arborescence, every vertex except for the root u has in-degree one, i.c. exactly one (directed) edge points towards v. The root u has in-degree zero, i.e. no (directed) edge points lowards u (Theorem 9-2 in Deo 1974
A.8 we get bijection & : VT \ {u} + ET that maps every non-root vertex to its unique incoming edge. &o is well defined because of Remark A.8 Also, yp is injective, because every edge e E Er has one and only one vertex that points to. Finally, is surjective, because for every edge e E ET there is a vertex that e points to.
Remark A.9. Let T= = (Vr, Er) be a rooted tree with root E Vy. Through Remark
Remark A.10. Let T = (Vr, ET) be a rooted tree with root u E Vr and weighted edges. Let 1b ET R be the function that assigns weights to edges of T, i.c. vp maps edges to their corresponding weights. Then, we can extend yp from Remark A.9 Lo Pu: VT \ {u) + RR which maps vertex v E Vr \ (u) to the weight of the unique edges e, E Er that points towards v, i.e. & = vo..
Definition A.11 (Bipartite graph). Repeated from Definition 3.1 A graph G G (V, is called bipartite if vertices V can be separated in two disjoint subsets A, B with AUB B and An B = 0, so that all edges e eET E. have form e == (a,b) b) with a E A and b E B, i.e. every edge connects a vertex in A to a vertex in B (p. 168 in Deo 1)
Definition A.12 (Complete bipartite). Repeated from Definition 3.2 G is called complete bipartite if edges between all vertices in A and all vertices in B exist, i.c. E is the Cartesian Product of A and B (p. 192 in 1974)). )
Deo
Remark A.13. Any matrix W can be interpreted as the adjacency matrix of an undirected weighted complete bipartite graph. In this case, rows and columns correspond to vertices in and B, respectively. Entries of W correspond to edge weights between all vertices in A and B. Given matrix W, we denote the graph induced by W as Gw (Vw, Fw).
17

---

Published in Transactions on Machine Learning Research (11/2023)
Now, have gathered all preliminaries to give proof for Theorem 3.5 For completeness, repeat
Theorem 3.5 with additional explanations:
Theorem A.14. Let Gw = (Vw, Fw) a biportile weighted graph induced by matric W E [0; 1jaim in Definition 3.4 Edge weights of Gw are given by entries of W. We assume uniqueness of entries in W, which may not be the case in general, but con be achieved by infinitesimal perturbalions. Nole, that neural persistence (see Definition 3.4) is continuous, therefore infinitesimal perturbations also only have in infistessiaal impact on neural persistence. According Remark A.13 Gw is bipartite and thas we denote the parts as Vw AUD B with AnB 0. We define
=
Σ (1 max Wabb)*
+ Σ(1
max W Wa,))
(16)
aEA
be
BEB
aEA
and
U
BB BŞAl+ Σ
(1-
max
W.
Σ
(1
max W. Wa,s)
(17)
aEd
BEB
BEBAA
aEA
where
= Va A:b4 argmaxye Wo,
(18)
B&A can thought of as the set of columns whose maximal element does not coincide wilh the maximal element in any row of W.
Then, the following incqualitics hold:
0 L s S (n m)²
(19)
In the following, we first give proof for the lower bound, then for the upper bound.
Lower bound. We first prove the lower bound L < NW) (0 < L is clear). Let MST(GW) (Vw, EMST(GG)) be the maximum spanning tree of Gw- According to Definition 3.4 neural persistence is calculated from the weights of all edges in MST(Gw).
First, we equip the maximum spanning tree MST(Gw) with arborescence structure. According to Defini- tion A.5 we choose an arbitrary vertex E Vw root to make MST(Gw) rooted tree. Then, we obtain arborescence structure MST(Gw) in Remark A.7 Note that this only requires arbitrary choice of the root, but no particular assumptions on the maximum spanning tree or Gw in general. Instead, we are exploiting general properties of spanning trees.
Having introduced arborescence structure, according to Remark A.10 we have a bijection Pu Vw \ {u} + [0, 1] from vertices (without the root) to edge weights. Note that in our case, we can assume edge weights be range [0; 1], because Gw is induced from W and we assume that W has entries bounded below by and above by 1.
Because &o and, assuming uniqueness of entries in W. thus also & is bijection, it follows that the image of Pu is identical to the set of weights of edges in the maximum spanning tree, i.e.
im im = (vb(e)
FMSTIGw))
(20)
where Fw - [o, 1] is the function that assigns weights edges of Gw, i.c. v maps edges their corresponding weights. As direct consequence, we can rewrite the definition of neural persistence in terms of Pme: namely
(1+ Σ
NP,(W) = 1+
(1 -1- (u-p(()))p)) vEVwi(u)
(21)
18

---

Published in Transactions on Machine Learning Research (11/2023)
Also note that the number of edges in MST(GW), which is |Vel - according to Remark A.4 matches the size of Vw \ {u}. For any vertex E Vw (u), the value of (v,(1) (v) is bounded from above by the maximum value of any edge connected to v. The reason is that (ww is defined as 4w == s o and maps a non-root
vertex to an edge connected to u. For example, assume V E A, i.. v corresponds to a row in W. Then,
(w( S max Wr.6.
(22)
BEB
because the weights of edges connected to are given by the entries in the row of W corresponding to Furthermore, it follows that
1
(1- max BEB
max W
$ (1 (el-pwlle (u))²
(w))
(23)
The same argument holds for vertices in B, which correspond to columns of W, and thus for all vertices Vw \ {u}. For the root u, again by definition of W, we get
(1-max W w.b BEB
1
(24)
which corresponds to the constant offset in the definition of neural persistence. Here, assume E A, but the same argument can be made when b E B.
In summary, we see that all additive terms in the definition of L are bounded by a corresponding additive term in the definition NP,(W), and so it follows that L NP,(W..
Upper bound. To prove the upper bound NPp(W) S U, we adopt the filtration perspective detailed by Rieck et al. (2019); We traverse all edges sorted by weight in reversed order, i.e. from largest weight to smallest. Whenever the introduction of edge connects two previously disconnected components, the edge is saved. The resulting saved edges are the same as the edges that appear in the maximum spanning tree, iee EMSTIGW)
From this perspective we observe that for every vertex v E Vw the maximum spanning tree necessarily contains the edge connected v with maximum weight. The reason is that, when traversing edges descending order sorted by weight, the first odge e connocted to any vertex v is the edge connected to v with largest. weight. Because we have not encountered another edge connected to v before, is not connected to any other vertex. Instead, at this point is isolated connected component. Thus, by definition of neural persistence, e appears in the calculation of neural persistence.
However, this does not suflice to describe the full maximum spanning tree, because some edges may have maximal weight for both vertices connected by the edge. This is captured by the definition of U: The right-most term,
Ci- BEB
aEA
captures all edges with maximal weight connected to vertices in A. The middle term,
Σ (1-mm (1-max max W Wa,) aEA
be B
captures all edges that have maximal weight for a vertex in B but are not maximal for any vertex in A. These weights are necessarily part of the maximum spanning tree.
The last term, B \ Byal captures all remaining edges and the constant offset. We do not make any assumptions about them and give them the value that maximiscs neural persistence, i.. 0. Since we have |A| + [B] = |wrl and |B] [Bxl| |B B4A), the numbers of additive terms in U and the definition of neural persistence match.
Finally, the incquality U < (n + m) holds, because here by definition terms of form (1 w) are bounded by 1 and the sum in the definition of U contains exactly n + terms.
19

---

Published in Transactions on Machine Learning Research (11/2023)
max(rows)
bj
62
b3
01
0.5
0.1
0.8
0.8
A
02
0.7
1.0
0.1
1.0
ag
0.2
0.8
0.0
0.8
max(cols)
0.7
1.
0.8
Table 3: Example to illustrate the derived bounds on neural persistence. Bold values are entries of W that appear in the calculation of neural persistence (but not necessarily in the calculation of the bounds). According to max-over-rows values and max-over-columns values, Byd = {b1} and we have 0.45, U 1.47 and NP2(W) 2 1.29.
Example. We provide an example for the calculation of bounds in Table demonstration purposes, as practise matrices are much larger.
3 Note, that this is purely for
L is derived by combining the maximum value in each row and the maximum value in each column of W. In the example, the multiset (i.e. the set which may contain multiple instances of the same element) of weights used to calculate I, is {0.8, 1.0, 0.8, 0.8, 1.0, 0.7). U is derived from I. by replacing duplicates with O. Accordingly, the multiset of weights used to calculate U is {0.8, 1.0, 0.8, 0.7] and B BAA = {b2, by}, because the weight that is maximal in the column corresponding to b2 is also maximal in the row corresponding to a2, and likewise the weight that maximal in the column corresponding to by is maximal in the row corresponding to d1-
B Empirical validation of bounds and implications for neural persistence
B.1
Tightness of bounds
Here, we evaluate how tight the bounds derived in Theorem 3.5 are using synthetic data. In particular, we sample matrices W with entries sampled iid from truncated Pareto distributions and then control for the spatial concentration of large weights using the method described in Appendix E.1 Sampling from truncated Pareto distributions allows to obtain matrices with neural persistence values that exhaust the full range of possible values, i.e. the interval [0; 1]. Furthernore, truncated Pareto distributions are good model for the distribution of absolute, normalised weights found in trained deep feed-forward neural networks (see Appendix D
For the resulting matrices, we calculate the respective values of neural persistence, the lower bound and the upper bound U. Additionally, we compute the sortedness sortedness(W) (see Appendix F.2 for all matrices show that the upper bound is tighter when sortedness(W) is larger.
Concretely, sample 10 000 different matrices with the following parameters:
Parameter b of truncated Pareto distributions is sampled form a Beta distribution with parameters = and 3 = 2, scaled by factor 60. This means that b == 60x,, x ~ Beta(l, Sampling values in this way generates matrices whose neural persistence values exhausts the full range of possible values.
Noise level where log(s) is uniformly sampled from the interval [-10, 0). We explain the relation- ship between noise level s and the resulting sortedness value sortedness(W) in Appendix E.3 This explanation also motivates our sampling range.
The number of rows and number of columns sampled uniformly but independently between 50 and 500, Le.. the minimum number of rows (or columns) is 50, and the maximum number of rows (or
20

---

Published in Transactions on Machine Learning Research (11/2023)
Absolute error
Relative error
Mean
Max.
Mean
Max.
Lower bound
0.004
0.043
01.04%
75.44%
Upper bound
0.021
0.441
13. 18%
1302.40%
Table 4: Absolute and relative errors of the upper bound and lower bound estimated on 000 synthetic matrices. We report mean and maximum deviation from the actual neural persistence value.
1.0
1.0
Upper Bounds
Sortedness (for Upper Bound)
Lower Bounds
0.8
0.8
Neural Persistence
Value of Bound
0.6
0,0
0.4
#
0.2
0.2
0.0
0.0
0.0
0.2
0.4
0.6
0.8
1.0
Neural Persistence (NP)
Figure 4: Tightness of bounds on neural persistence in Theorem to upper bounds, and values below the diagonal correspond to lower bounds. Additionally, indicate the sortedness of matrices for upper bounds by colour to demonstrate that the upper bound tightens with increasing spatial concentration of large weights. The diagonal is shown as an orange line. Lower bounds are plotted as cyan (blue) circles, and upper bounds are plotted as crosses. sortedness value of 0.0 means random dispersion of large entries, and a sortedness value of 1.0 means perfect concentration of large entries on bottom rows.
3.5 Values above the diagonal correspond
columns) is 500. Matrices are not necessarily square, iee. the number of rows and the number of columns of matrix can differ.
Results are in Figure Values above the diagonal correspond to values of the upper bound, and values below the diagonal correspond to values of the lower bound. We plot values of the upper bound in different colours showing the sortedness value sortedness(W) of the matrix W the upper bound is calculated from. This illustrates that the upper bound tighter when sortedness is larger. Also, we show the diagonal as an orange line and values corresponding to lower bounds as cyan (blue) circles. To additionally separate values corresponding to upper bounds, we plot them as crosses.
Figure 4 shows that the lower bound is generally tight. Only in the vicinity of 0, ie. for very small neural persistence values, the tightness of the lower bounds seems to slacken. Contrarily, the upper bound only becomes tight for neural persistence values greater than 0.5. For lower neural persistence values, the bound is only light when sortedness(W) W) is close to 1, i.e. for matrices with high spatial concentration of large weights. Note, however, that in practise for trained models, we mostly encounter neural persistence values greater than 0.5. Therefore, we do consider the upper bound not being tight when neural persistence is small be a problem. Furthermore, our insights do not rely directly on the tightness of bounds, but provide theoretical insights into which factors impact neural persistence.
21

---

Published in Transactions on Machine Learning Research (11/2023)
Matrix Size: 50
1.00
Neural Persistence
Sortedness
0.75
0.0
0.50
0.2
0.4
0.25
0.6
0.8
0.00
Matrix Size: 100
1.00
Neural Persistence
0.75
0.50
0.25
0.00
Matrix Size: 250
1.00
Neural Persistence
0.75
0.50
0.25
0.00
-9
8
-7
6
5
4
-3
log (Variance)
Figure 5: Analysing the neural persistence of synthetic weights matrices when varying the variance and spatial concentration of large weights. We observe approximately linear correspondence of neural persistence with log-variance and spatial concentration of large weights. The R² score of a linear regression fit is around 89% for both samples from truncated Pareto distributions and samples from truncated normal distributions. "Sortedness" is proxy measure for the spatial concentration of large weights. A sortedness value of means random spatial dispersion, 1 means that the matrix entries are perfectly sorted.
B.2 Variance and spatial concentration of large weights as factors that impact neural persistence
We empirically validate the insights obtained from the bounds neural persistence 33.5 Namely, we claim that variance of weights and spatial concentration of large weights are main factors that impact neural persistence. Also, recall that with weights, we always refer to weights mapped to the range [0; 1] by first taking absolute values and then dividing by the largest absolute weight value.
For our evaluation, we use synthetic, i.c. randomly sampled, weight matrices. For these synthetic matrices, we control the variance of weights and the spatial concentration of large weights. Varying these factors, all else being equal, allows to investigate their relationship to neural persistence in controlled way.
22

---

Published in Transactions on Machine Learning Research (11/2023)
We calculate the neural persistence value, the variance, and the sortedness value sortedness(W) (sce Ap- pendix F.2 for all generated matrice Ws.
In particular, we sample matrices according to the following parameters:
Entrics are sampled iid from truncated Pareto distributions and truncated Normal distributions, so that entries are within the range [0; 1]. The type of distribution is sampled randomly for every ma- trix. Truncated Pareto distributions have one parameter 6 > 0, and truncated normal distributions similarly have a single parameter a, which we set to & for convenience. We sample b from Beta distribution with parameters a = 1 and 3 = 2 scaled by factor 60, i.e. b = 60z, ~ Beta(1, 2). This gives distributions with different variances to exhaust the full range of neural persistence values.
The noise level 8 of the noisy sorting process described in Appendix E. that controls the spatial concentration of large weights is sampled as follows: We sample log(s) uniformly between -10 and and then apply exp to get a value between and 1. The change of sortedness(W) (W) is faster for sortedness values close 0 (see Appendix E.3), therefore sampling uniformly on a log-scale gives a better distribution of resulting sortedness values.
For each number of rows and columns in (50, 100, 250), where the number of rows is always equal to the number of columns, we sample 2000 matrices randomly according to the parameters described above. Note, that in this case it is necessary to treat matrices with different sizes separately, because we observe that the neural persistence value also depends on the matrix size (see Appendix C Showing results for different matrix sizes confirms the generality of our observation and proves that is not an artifact of a particular set of parameters.
Figure 3 shows that neural persistence increases monotonically with decreasing variance, i.c. lower variance (and in this case also mean weight value) results in larger neural persistence. The increase of neural per- sistence with decreasing variance is approximately linear when log-transforming the variance. Likewise, for fixed variance, neural persistence increases monotonically with sortedness. Fitting a linear regression model which maps the log-variance and sortedness to neural persistence achieves a coefficient of determination R2 as 89% for all matrix sizes. The R² score measures the proportion of variance neural persistence that is predictable from log-variance and sortedness. Therefore, this result means that a significant amount of the variance in neural persistence can be explained from variance of weights and sortedness.
In summary, these observations confirm strong relationship between the variance and spatial concentration of weights and neural persistence.
C Normalised neural persistence depends on matrix size
Here, we provide empirical evidence that the normalisation of neural persistence to the range [0, 1] as proposed by Rieck et al. (2019) does not achieve comparability of values calculated for different matrix shapes. Recall that the neural persistence of asserted by Theorem 1 in (Rieck et al. 2019). This bound is used to normalise neural persistence values to the interval [0; 1], with the aim of comparing neural persistence values calculated for matrices of different sizes. However, we find that even this definition of normalised neural persistence tends to decrease with increasing matrix size. In other words, using the thcoretical upper bound for normalisation docs not lead comparability between matrix sizes.
m matrix with entries in [0; 1] is bounded by (n + m 1)². This is
However, this is not theoretical issue: in (Rieck et al. 2019) shows that, for any matrix size, matrix can be constructed whosc neural persistence is equal to the upper bound. The theoretical upper bound is a limiting case of ever more positive-skewed distributions of normalised absolute weights. It is reached when all edges except for one have weight 0, and the remaining odge has weight Therefore, maximum neural persistence is approached by having increasingly skewed distributions of weights. However, when fixing certain distribution of weights, increasing the matrix size leads to decrease of neural persistence.
The constructive proof of the bounds on neural persistence (Theorem
23

---

Published in Transactions on Machine Learning Research (11/2023)
Trunc. Pareto (b 1)
Trunc. Pareto
Trunc. Pareto 10)
50
0.5
150
0.10
0.20
Num. Rows
250
0.08
0.4
0.15
350
0.06
450
0.10
0.3
0.04
0.05
Trunc. Pareto (b 20)
Trunc. Pareto (b 30)
Trunc. Pareto 60)
50
0.93
150
0.75
0.84
Num. Rows
0.92
250
0.82
0.70
0.91
350
0.80
450
0.65
0.78
0.89
0.76
50
150
250
350
450
50
150
250
350
450
50
150
23
J50
Num. Columns
Num. Columns
Num. Columns
Figure Expected normalisod neural persistence for different matrix sizes and Truncated Parcto distri-
butions with varying parameter b. The expected normalised neural persistence decreases with increasing matrix size (darker is lower). Note that heatmaps have different scales. Our aim is to show the trend, not to compare values for different distributions.
Trunc. Normal (o² = 0.5)
Uniform
50
0.14
0.10
150
0.12
Num. Rows
250
0.10
0.08
350
0.06
450
0.04
0.04
50
150
Num. Columns
Num. Columns
Figure 7: Expected normalised neural persistence for different matrix sizes and Truncated Normal distribu- tions with parameter x² = well as Uniform distribution. The expected normalisod neural persistence decreases with increasing matrix size (darker lower). Note that heatmaps have different scales. Our aim is to show the trend, not to compare values for different distributions.
We demonstrate this in the following way: For given n, m which specify the matrix size and distribution P defined the unit interval, sample matrices of size compute the mean normalised neural persistence from all sampled matrices.
with entries sampled iid from P. Then, we
In particular, we demonstrate the trend by sampling weights from a Uniform Distribution, a Truncated Normal Distribution with = 0.5, and Truncated Pareto Distributions with increasing parameter b. The Uniform Distribution and the extremely skewed Truncated Parcto Distribution with parameter 60 represent different extrema that may be encountered. Therefore, showing that the claimed trend holds for both distributions affirms its generality.
24

---

Published in Transactions on Machine Learning Research (11/2023)
Results for Truncated Pareto distributions in Figure 6 Results for the Truncated Normal distribution and the Uniform distribution are in Figure 7 The trend that normalised neural persistence decreases with increasing matrix size, i.e. larger number of rows or columns, is visible for all distributions. Note, that concrete neural persistence values differ for each distribution, but here we are only interested in the trend.
For a theoretical justification, consider the argument used to derive bounds Theorem 3.5 (sep Appendix There is a bijection between vertices (excluding one arbitrary root) and the edges in the maximum spanning tree that are used for calculating neural persistence. In other words, tree by picking for each vertex exactly one edge connected to the vertex. Assume now that the rank of all selected edges, when sorting edges connected to vertex by weight in decreasing order, is bounded by k. k could be constant or growing very slowly with matrix size. This is a reasonable assumption, because for most vertices, the selected edge has rank 1. Assume further that edge weights are sampled iid from some distribution defined on the unit. interval. Then, for any <> 0, the probability of any value larger than 1 - being withing the top largest values increases monotonically with matrix size. The reason is that, due iid sampling, values in each row and column constitute themselves an iid sample. By increasing the matrix size, we increase the sample size and thereby the probability of sampling value close to the maximum, i.e. 1. Note that larger weight values lead to lower neural persistence.
construct the maximum spanning
D Distribution of weights in trained neural networks
Here, we quantify the distribution of weights actually encountered in the models trained as described in Section [111] Our concrete aim is to make our experiments in Appendix as faithful real data possible. The main finding in this section is that normalised absolute weight values in trained neural networks are best modelled by truncated Pareto distributions and truncated Normal distributions. In consequence, we use these two families of distributions whenever we sample synthetic matrices.
Method We propose the following method for analysing weight distributions: Given a weight matrix W e [0; 1]mxm, we fit parameters of distributions defined on the unit interval by minimising the negative log- likelihood of weights in W. This means that for a given family of univariate distributions with parameters 0, we minimize
C= - log P(W.5 (0) = Σ log P(W.. 0).
(25)
Weight matrices W are obtained from the weight matrices in trained neural networks by first taking absolute values of all entries and then dividing each entry by the globally maximal absolute weight value in the entire neural network, i.c. applying the same normalisation that is applied to calculate neural persistence values.
Since we use various distributions where no closed-form solution for argming L exists, we use black-box optimiser to find optimal parameters. Concretely, we use the Nelder-Mead method (Nelder & Mead 1965) im- plemented in scipy- optimize minimize. Using a black-box optimizer is fcasible, because we only consider families of distributions with at most two parameters, which means that fitting parameters is computation- ally relatively cheap. Also, in our case all parameters are constrained to positive values. We realise this constraint by optimizing the fog-transformed value of the parameters which is unconstrained in I, and apply exp after optimisation.
A Anecdotally, it is well known that trained neural networks tend to have very skewed distributions of weight magnitudes with few large weights and most weights being close to O. Therefore, expecting skewed distribu- tions of weights, we consider the following families of distributions and fit their parameters for every weight matrix of all trained models:
Beta distribution with parameters 0 and 8 >>> O
Truncated Exponential distribution with parameter À >>0 0
Truncated Normal distribution with parameter a > 0 (location is fixed to 0)
Truncated Pareto distribution with parameter b >>
25

---

Published in Transactions on Machine Learning Research (11/2023)
Note, that all truncated distributions are truncated in way to be defined the unit interval. For Beta dis- tributions, this is the case by definition. Therefore, our analysis is limited by the four families of distributions that we consider. However, we the Beta distributions is very flexible and therefore strong baseline when comparing to the three truncated distributions, which are biased towards modelling skewed distributions.
Results. First, we analyse which distributions are best models of weights in trained neural nerkorks. For each weight matrix, we compare the negative log-likelihood C of entries achieved by the optimised parameters. We assume that the distribution whose optimal fit to the weights yields the lowest negative log- ligliikl is the best model of the entries found in the respective matrix. Note, that we do not take the numbers of parameters into account and only compare log-likelihoods. Also, it may be the case that for some matrices the optimiser fails or does not find optimal values. However, given that we analyse around 5000 matrices in total, this does not obscure the (clear) trends visible in our results.
In Figure X we show the relative win rates of cach distribution family for models trained on different datasets and with different numbers of layers. We also show results for each layer separalely, but aggregate over hidden sizes and different activation functions. We define the win rate as the ratio of considered matrices where the respective family of distributions achieves lowest negative log- ligliielihood. This means that the win rates sum to one for the four considered familics of distributions.
The general trend is that weights of deeper models and in later layers of all models are better modelled by truncated Pareto distributions. However, especially for models trained on EMNIST and Fashion-MNIST, weights in the first layer, i.c. the layer connected to imputs, are best modelled by truncated normal dis- tributions. The relatively high number of winning truncated normal distributions in the final layer of one layer models is mostly due to models with tanh activation function. Perhaps surprisingly, Beta distributions rarely yield best negative log-likelihood which confirus our initial hypothesis about distributions of weight magnitudes being very skewed.
Next, we are interested in the values of fitted parameters of truncated Pareto distributions and truncated normal distributions. Through this, we can assess how skewed distributions actually are and if there are any perceivable trends. Figure shows the distributions of optimal values for the parameter of truncated Pareto distributions. We distinguish between models with different numbers of layers trained on different datasets, and show results for each layer individually. However, we aggregate over models with different hidden sizes and activation functions. In all cases, the main trend is that later layers have a less skewed distribution of weight magnitudes (lower value of b). We hypothesise that in the first layer, some features receive very high weights (and in fact it can be shown that concentration of large weights on fewer features monotonically increases during training), whereas later layers are more densely and also more evenly connected. The obsorved trend confirmed when looking at optimal parameters of truncated normal distributions (sce Figure 10 Here, values of parameter a are higher in later layers, indicating less skewed distributions.
E
Manipulating the spatial concentration of large entries in matrices
E.1
Noisy sorting process
Here, we explain how to obtain matrices with controlled spatial concentration of large weights. The core of the method is to reorder entries of a matrix W so that they correspond to a non-perfect sorting of the entries. This is achieved by constructing a permutation я of entries that sorts a perturbed matrix W Wnnise- Then, we apply the permutation to W to reorder entries. We denote the result of applying the permutation to W as W
6, Wnoise is given by W + 8 6, where 8 E R4 is a scalar parameter that determines the noise level. e has the same dimension, i.e number of rows and columns, as W. Each entry 6, of is sampled iid from a standard normal distribution, i.c. GJ ~ NN 1) Vi,j. Due to reparametrization, this means that s is equal to the standard deviation of the added noise. Also note, that W Wnoise has the same dimension, i.c. number of rows and columns, as W.
26

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
1,0
Win Rate (#1 Llaaerss
0.4
0.2
1.0
Distributions
Beta
Win Rate (#1 Layyers 2)
Trunc. Pareto
Trunc. Normal
Trunc. Exponential
0.4
0.2
1.0
Win Rate (# Layers 33
0.4
0.2
0
1
2
3
Layer Index
Layer Index
Layer Index
Figure 8: Ratios of weight matrices where different families distributions achieve highest log-likelibll likelikoihodd of normalised entries after fitting parameters. We show results for different. datasets and models factorised by number of layers the model and weight matrices factorized by position in the model.
27

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
40
35
30
Parameter b
20
15-
10
5-
0
40
35
Parometer
20
15-
10
5
0
40
35
30
Parameter
15
10
5-
0-
Layer Index
Layer Index
Layer Index
Figure 9: Optimal values of parameter b for truncated Pareto distributions shown for models with different number of layers trained on different datasets. We show values for each layer separately, but aggregate values for models with different hidden sizes and activation functions. We observe that later layers generally have lower value of b, which indicates less skewed distributions.
28

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
0.4
Parameter o
0.2
Parameter a
0.3
0.2
0.3
Parameter
0.1
Layer Index
Layer Index
Layer Index
Figure 10: Optimal values of parameter a for truncated normal distributions shown for models with different
number of layers trained on different datasets. We show values for each layer separately, but aggregate values for models with different hidden sizes and activation functions. We observe that later layers generally have higher value of a, which indicates less skewed distributions.
29

---

Published in Transactions on Machine Learning Research (11/2023)
Next, we formally describe how to derive First, define two total orders matrices W. We denote the index set of W, i.e. the set of all (row, column) index pairs that specify positions in W, as I. Note that I is also the index set of W noise-
Definition E.1 (Total order on matrix entries from indices). Let 1 = (i,j) E I and 1' = (i'5") E I two pairs of (row, column) indices that specify positions of entrics in W. Then, define the relation Sindex as
I Sindex I' + ((st)v(>>\Njs))
(26)
In other words, an index pair I == that has lower row index as I' or the same row index but lower column index. Clearly, this is a total order on the index set of W.
(i. precedes another index pair -'= (f',J") if I indexes an entry of W
Definition E.2 (Total order on matrix entries from values). Let == = (i,5) E and I' = (L'j)) E I two pairs of (row, column) indices that specify positions of entries in W. Then, define the relation Svalue as
I value I'
W Wnoise ji S W Wonis .''
(27)
In other words, an index pair I= (i.j) precedes another index pair I' = (f',3" indexes an entry of W that has lower value as the entry indexed by l'.
If we assume uniqueness of values of entries of W and W Wosise which in general is not the case but can be achieved by infinitesimal perturbations, both Sindex and Svalue are strict total orders. Then, it is well know fact that finite totally ordered sets of size & can be indexed by the first k natural numbers. In other words, for both Sindex and Svalue, bijection I - Najz exists that maps I (ordered according to the respective relation) to the first k natural numbers. We denote the bijection induced by Sindex as (index: and the bijection induced by Svalue as bvalue-
Now, we define æ as a bijection
T:I (1, r> (fratue o ((i.ex)((iij)).
(28)
Then, applying π to W, iee changing entries of W according to the permutation w, yields an approximately sorted matrix W Wsort. W Wrort is only approximately sorted, bocause the order induced by Svalue when using values Wnoiee does not fully coincide with the order induced by Svalue when using values W for sorting due the added Gaussian noise.
From this consideration, it is clear that the scalar noise paramcter controls the deviation of Wooise from perfectly sorted matrix. Depending the noise parameter 8, large values of W concentrate towards the bottom rows of W In the case of s = 0, Worrt is perfectly sorted. For large s, W... W is more like random permutation of W.
E.2 Sortedness criterion
Here, we formally describe our sortedness criterion that we use to measure the spatial concentration of large weights in any given matrix W. We denote the criterion as sortedness(W). The criterion measures the number of inversions needed to sort the matrix W. This was proposed as a useful measure of the sortedness of arrays in (Mannila| 1985). As underlying order on matrix entries we again use Sindex (sce Definition E.1
and Svalue (see Delinition E.2 from Appendix E.1 However, as values used for comparison in the defimition
of Svalue we use entries in W. i.c. the argument of sortedness, not Wnoise-
The number of inversions is formally defined the cardinality [Inv] of the set Inv II x I that is defined as
Inv = ((i..)) (1, E x I (1,5) Sindex (1'3') A (7' 5') Svalue (i.j)
(29)
This means that all tuples of index pairs ((t,j), (')) are included in Inv where the order induced by indices does not correspond to the order induced by values.
To project score values into the range [0; 1], we normalise by the maximum size of Inv. The maximum size of Inv is [I((Z-11) Also, we substract the normalised score from 1 in order to get measure of ascending
2
30

---

Published in Transactions on Machine Learning Research (11/2023)
sortedness, not descending sortedness. Based on these considerations, define metric P which measures the spatial concentration of large entries on bottom rows in matrices as
R(W) def
2- LLnv
(30)
[ (2 -1)
According to Estivill-Castro (2004), Ω is closely related to the Kendall rank correlation cocfficient (Kendall otherwise known Kendall's l's First, we define the complement of Inv, namely
1938
Ninv def ((0.5). e II (i,5) Sindex (f,5') (i,j) Svalue (i',5)}
(31)
with the properly, that
Inv U Ninv = (((i.)))((.))) EI x (1,5) Sindex (f'
(32)
and thus
N [Z| ([Z) 1) Inv]
(33)
These definitions allow redefine Q
2 |Ivv|
[ ([Z 1)
2 Inv
2 [|inv]]
((W) = 1 [Z]. ((Z)
(34)
[ - [ 1)
[ ([Z) -1)
ZI 1)
Thus, transforming Q, we have
4 N
Ninvv [ (Z 1) [Z] [ - [ [ 1) ([Ninv| [Tnvl) (35)
2 ([Ninv] + [Inv|)
2
20(W) 1
1
which corresponds exactly to the definition of the Kendall rank correlation coefficient when comparing to an array perfectly sorted in ascending order. Since efficient implementations for calculating the Kendall rank correlation coefficient exist, we define our sortedness measure sortedness(W)) as
sortedness (W) def 2N(W) -
(36)
and use the SciPy implementation scipy.stats.e .endalllatn to compute sortedness(W).
In practise, an (approximate) correspondence of Sindex and Svalue cannot be expected in arbitrary matrices, even if they exhibit spatial concentration of large weights. In particular, matrices may exhibit spatial con- centration large entries in cortain rows, cortain columns, or both. Therefore, when calculating sortedness for arbitrary matrices, we first permute rows and columns, so that they are sorted asceuding order by mean value (over rows or columns, respectively). Furthermore, we compute sortedness using Sindex for W, its transpose WT and also using order matrix entries Ediagonal in place of Sindex: that is induced by diagonals follows:
Definition E.3 (Total order on matrix entries from diagonals). Let I (1.j) E I and I' (V'j') E I two pairs of (row, column) indices that specify positions of entries in W. Then, define the relation Sdiagonal as
Sindex I' < (' ('
<
(37)
In other words, index pair I (i.j) precedes another index pair = j') if I indexes entry of W that lies on diagonal (from top right to bottom left) that is more to the left more to the top of the entry in W specified by F'. Clearly, this is total order on the index set of W.
This definition accounts for cases where large entries concentrate primarily on an intersoction of some columns and rows. Finally, we the maximum of these three values the uct sortedness value.
31

---

Published in Transactions on Machine Learning Research (11/2023)
E.3 Relationship between the noisy sorting process and the sortedness criterion
In this section, we analyse the relationship of the noisy sorting process described in Appendix B1 and the sortedness criterion described in Appendix E.2 On the one hand, we use the noisy sorting process to generate synthetic matrices with controlled spatial concentration of large weights on the bottom rows. On the other hand, we use the sortedness criterion, denoted as (W)) to measure spatial concentration of large weights in matrices.
First, we note that the sortedness(W) is an empirical measure that can be applied to any matrix W. Contrarily, the noise level s that parametrises the noisy sorting process cannot be recovered without knowing the original matrix before the sorting process. Therefore, the noisy sorting process does not directly yield an empirical criterion to assess the spatial concentration of large weights in arbitrary matrices. This answers the question why we do not simply use the noise level 8 that paramel the noisy sorting process as measure of spatial concentration in the empirical validation part of Section 3
In order understand the relationship between the noisy sorting process and the sortedness measure devel- oped in Appendix E.2 we make the following observation about Q defined in (34 (WW) can be seen as a (normalised) sum of indicator variables, namely whether any index pair (i.j) E I x
j. is not in the set Inv. Therefore, by linearity of expectation, the expected value of 1 - ((W) is equal to the probability of any such index pair (i,j) being an element of Inv. In consequence, we have to describe this probability.
For this analysis, we assume that entries of W are sampled iid from some probability distribution P defined on the unit interval, i.e with support on [0; 1]. We define the random variable as the absolute difference between two values sampled from P. For example, the expected value of 8 is defined
E[5] = Ex || - vl 1 1.
(38)
Remember from Appendix E.1 that Wnoise is obtained from W by adding clement-wise Gaussian noise with mean 0 and variance x² to W. For any index pair ((i.j), (i',)") E I x I, let eig. ~ ~N(0, s) be the respective random noise values. For simplicity, we denote == (i and l' = (f'j"). Note, that in this
scenario, we assume I Sindex < I' and Wa, < Wey. Then, with high probability, we have
1 - [-[[[())] = Pr((I,J) E Tnv] = Pr[W + Fij > We + ( Pr[(ers -vr - (We Wey) > 0].
(39)
Unfortunately, we have no prior knowledge about the distribution of 5 and therefore can not evaluate this probability. One practical option is to make the simplifying assumptions that 8 is normally distributed with mean μaa and variance o3, which we can estimate from the entries in W. In this case, the quantity (Ea.j - Ex))) (We.s - W(y) is a sum of three Gaussian random variables, and is accordingly distributed N[ Ms, 2s² + oz). Now, we can evaluate Pr[(erj c (Wy,3' Wi > 0] as
Pr[(Er. - - - (Wr - Wo,)) > 0 = 1b 20 (0) = - 20,2.* (ps),
where T 1002 is the cumulative distribution function of a normal distribution with mean i and variance o². Recalling the definition of the cumulative distribution function of normal distributions, namely
1 + crf
T 00,20*03 (1s) 2
V2
20 220
we get the following relationship:
E[s) = crf
148
V2 225 +
which we can solve for when we want to generate matrices with a specific sortodness value. Note, that reality 8 will generally not be distributed according to a normal distribution. Therefore, this way of finding suitable values of 8 will be biased and possibly inaccurate.
32

---

Published in Transactions on Machine Learning Research (11/2023)
F Algorithm for calculating the summary matrix for deep graph persistence
In Algorithm D we show pseudocode for calculating the summary matrix S needed for deep graph persistence (sce Definition 5.1p. Note, that the syntax is inspired by numpy code. This includes the broadcasting semantics for calculating element-wiss wise minima combinations of entries.
The intuition of Algorithm I is as follows: We iterate through weight matrices from output units towards the input units. At the end of each iteration, S holds the minimum weight. on the maximum path from each imput (to the current layer) to each output unit of the network. Entries of S are updated by first caleulating whether the weight from an input is smaller than the path from its target unit to the respective output unit. Then, for each combination of input unit (of the current layer) and output unit, the maximun path is the maximum path from the input unit to the output unit via any target unit in the current layer.
Data: ordered list of weight matrices W
Result: sunmary matrix S W + (everse(W))
/* Go from output units towards imputs */
S < (op(W,)) for w W do
** Remove first weight matrix and save in S */
Sexpanded < eeppaddddins(SS
dimss( (S.
Insert axis for broadcasting semantics
Wexpanded +
expand dims(w, 2)
/* Insert axis for broadcasting semantics */
S - elementwise minimum( (extmmmmmmxxxaeedd Wexpanded)
Jllemettise_mminnnnn($$
/* Minimum of all combinations of
weights in matrix and paths to output units +/
8 + max along_ aSis(S,2) 2) /* Maximum path between each input unit and output unit */
end
return S
Algorithm 1: Algorithm for calculating the summary matrix for deep graph persistence
G Technical details of image corruptions
Here, we describe in detail how we apply corruptions to images in order to create synthetic data for the covariate shift detection evaluation in Section 5.2 We evaluate four types of corruption, namely Gaussian blur, Gaussian noise, pixel dropout, and uniform noise. In the case Gaussian noise and uniform noise, feature values are clipped between 0 and 1, to avoid illegal values, which are trivial to detect as corrupted. For cach type of corruption, we evaluate six levels of corruption intensity. For Gaussian noise and uniform noise, the corruption intensity is defined by multiplying standard normal uniform noise with factor For Gaussian blur, the corruption intensity is defined by the standard deviation and the kernel size of blurring. For pixel dropout, the corruption intensity is defined by the dropout probability p.
To set parameters of corruptions, we use the same parameters as Hensel et al. (023) for Gaussian blur and Gaussian noise. Additionally, we use the same multipliers for Gaussian noise and for uniform noise. For pixel dropout, we use custom values. An overview over parameters is given in Table 5
Additionally, we create samples with varying ratio d of corrupted samples, while all other images in the sample are non-corrupted. We include corrupted image ratios of 8 E {0.25, 0.75). In samples with less corrupted images, it is less likely that the KS test will reject the null hypothesis, therefore such samples are harder to detect by the method evaluated in this work.
H Additional results
H.1 Correspondence of variance and neural persistence for deep neural networks with different hyperparameters
Here, we demonstrate the approximately linear correspondence of neural persistence and log-transformed variance of normalised weights for all deep neural networks (see Section 4.1). For each combination of hyperparameters, train 20 models with different initialisation and minibatch trajectories. This leads to
33

---

Published in Transactions on Machine Learning Research (11/2023)
Intensity Tevel
Corruption
II
III
IV
V
VI
MNIST
0.35
0.4
0.5
0.6
0.7
0.8
Gaussian blur
(3, 3)
(3, 3)
(3, 3)
(3, 3)
(3, 3)
(3,
Gaussian/ /nniform noise Pixel dropout
26
40
55
70
86
100
255
255
255
255
255
255
P
0.1
0.2
0.3
0.4
0.5
0.6
Fashion-MNIST
0.35
0.4
0.5
0.6
0.7
0.8
Gaussian blur
K
(3, 3)
(3, 3)
(3, 3)
(3, 3)
(3, 3)
(3, 3)
Gaussian Gaausiaan/unffrmm noise Pixel dropout
30
10
50
255
255
255
255
255
255
p
0.1
0.2
0.3
0.4
0.5
0.6
CIFAR-10
1.0
2.0
3.0
4.0
5.0
6.0
Gaussian blur
(3, 3)
(3, 5)
(5, 5)
(5, 7)
(7, 7)
(9, 9)
Caussian/unin uniform noise
30
60
85
100
120
140
Pixel dropout
0.1
0.2
0.3
0.4
0.5
0.6
Table 5: Overview of paramcter values for the various image corruptions across datasets and intensity levels used for creating synthetic data for the evaluation of covariance shift detection in Section 5.2
20 different models after training for 40 epochs, and models generally have different variance of weights and neural persistence values. However, we show that there is an approximately linear correspondence wetw the log-transe log-transformed variance and the neural persistence value. In Figure 11 we show results for models with relu activation function, and in Figure 12 we show results for models with tanh activation function. In each case, we show separate plots for models with different numbers of layers and trained on different datasets. Within each plot, we distinguish models with different hidden size by colours.
All plots agree with our observation that neural persistence corresponds approximately linearly to log- transformed variance. This can be seen from the resulting linear trajectories, each consisting of 20 points corresponding to the model variants with different initialisation and minibatch trajectory. Furthermore, visual analysis is complemented by R² scores of linear regression fits, which we report in Table 6 All R² scores are close to 100%, which indicates that the log-transformed variance can explain a significant amount of variation neural persistence values.
In summary, these results suggest that in the case of DNNs, neural persistence becomes a surrogate measure of the variance of weights.
H.2 Variance and deep graph persistence as early stopping criteria
Rieck et al. 2019 suggest to use the growth of neural persistence values as an early stopping criterion. This is very useful in cases where no validation data available. Therefore, we compare the variance and deep graph persistence as early stopping criterion neural persistence.
Concretely, evaluate numbers of warm-up epochs (referred to "burn-in" epochs in (Rieck al. 2019
from 0 to 25 and use patience values between 1 and 10. We use Algorithm 2 in (Rieck et al. 2019) for calculating early stopping epochs from a maximum of 40 training epochs. Like (Rieck et al. evaluate the model every quarter epoch.
2019 we
Table shows that using the variance carly stopping critcrion, on average, stops around 2 epochs later than using neural persistence or the validation error as carly stopping criterion. However, this actually leads to slight expected increase of test set accuracy, both compared to neural persistence and to the validation
34

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
0.70
0.80
0.68
Neural Persistence (# Layers
0.70
0.66
0.75
0.64
0.65
0.70
0.60
0.55
0.58
0.65
0.56
0.50
-6.5
-6.0
-5.5
-5.0
-4.5
-7.0
-6.5
-6.0
-5.5
-5.6
-5.4
-5.2
-5.0
Neural Persistence (#1 Laayers 21
0.80
Hidden Size
0.675
0.70
100
0.650
0.75
250
0.625
0.65
650
0.70
0.600
0.575
0.65
0.550
0.525
0.60
0.500
5.5
5.0
4.5
6.5
5.0
5.4
5..2
5..0
Neural Persistence (#1 Layerrs 33
0.85
0.75
0.85
0.80
0.70
0.80
0.75
0.65
0.70
0.75
0,60
0.65
0.70
0.55
0.60
0.65
0.50
0.45
0.60
-7
-6.0
-5.5
-5.0
-4.5
log (Varlance)
log (Variance)
(Varlance)
Figure 11: Roughly linear correspondence of log-variance of weights and neural persistence for models with ReLU activation function. Results are factorised by dataset (columns), number of layers (rows) and hidden size (colour).
35

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNIST
MNIST
0.675
0.650
0,700
Neural Persistence (# Layers
0.650
0.625
0.675
0.625
0.650
0.575
0.600
0.625
0.550
0.575
0.600
0.525
0.550
0.575
0.500
0.525
0.550
0.475
0.500
-5.4
-5.2
-5.0
-4.8
-4.6
-5.6
-5.4
-5.2
-5.0
-4.8
-5.4
-5.2
-5.0
-4.8
0.75
Neural Persistence (#F LLayerr 2)
0.750
Hidden Size
0.675
0.725
100
0.650
0.700
250
0.625
650
0.65
0.675
0.600
0.650
0.60
0.575
0.625
0.550
0.600
0.50
0.525
5.50
5.25
5.00
4.75
6.00
5.75
5.50
5.25
5.00
-5.5
55.0
4.5
0.700
0.750
Neural Porsistence Layeess
0.725
0,700
0.65
0.650
0.675
0.625
0.600
0.625
0.55
0.575
0.600
0.550
0.575
0.525
0.550
-5.3
-5.0
4..5
6.00
55.75 -5.50 -5.25 5.00 log (Varlance)
-4.75
-5.5
-5.0
-..5
log (Varlancee
log (Variance)
Figure 12: Roughly linear correspondence of log-variance of weights and neural persistence for models with tanh activation function. Results are factorised by dataset. (columns), number layers (rows) and hidden size (colour).
36

---

Published in Transactions on Machine Learning Research (11/2023)
Dataset
FMNIST
Fashion-MNIST
MNIST
Activation
relu
tanh
relu
tanh
relu
tanh
# Layers
Hidden Size
50
98.63
99.21
98.52
98.37
97.87
97.42
100
97.56
99.03
97.98
93.27
96.95
99.10
250
99.23
99.52
99.01
97.68
98.93
98.83
650
98.68
99.68
99.39
99.39
98.82
98.93
50
96.44
99.39
97.72
98.87
98.24
98.47
100
98.83
99.06
99.40
98.67
98.91
99.01
2
250
99.57
98.88
99.34
99.02
99.48
98.37
650
99.47
99.85
99.40
99.50
99.58
99.30
50
98.30
97.65
98.50
98.19
98.94
99.01
100
98.16
99.15
99.52
98.04
99.09
99.26
3
250
97.11
99.54
98.52
99.51
99.69
99.54
650
98.67
99.73
98.64
99.61
99.36
99.72
Table 6: R² score linear regression fits when treating the log-transformed variance of weights as inde- pendent variable and the neural persistence value as dependent variable. We show results for each model architecture, accordingly the lincar regression is fitted on 20 datapoints that represent the different runs with different initialisation and minibatch trajectory. All values close to 1 (here scaled by factor 100 for better readability), which suggests excellent fit of the linear regression.
error. Also note that the difference in test set accuracy between neural persistence and variance is lower than the difference between neural persistence or variance and using the validation error early stopping criterion. This shows that using the variance of weights can indeed be used as a less costly replacement of neural persistence as early stopping criterion, with a small expected increase in training time.
Similarly, Table shows that using deep graph persistence as early stopping criterion does not yield notably different results compared to using neural persistence or the variance of weights as early stopping criterion. Averaged over all models and early stopping setting (i.e. number of warm-up epochs and patience), deep graph persistence stops earlier than neural persistence and variance of weights, but reaches slightly lower accuracy. However, given the generally small differences in accuracy, this does not constitute qualitative difference.
Finally, in Figure 13 we show meal in the style of Figure in (Rieck et al. 2019). These particular results where obtained from 20 MLPs with 3 layers, 250 hidden units, and relu activation function trained on Fashion-MNIST. While we have made attempts to reproduce the results of Ricck al. (2019) by contacting the authors, following their suggestions, and using their code to calculate neural persistence, were unable
to do so. We hypothesise that differences between our results and those presented in (Rieck et al. 2019 are due to differences in the trained models, for example different hyperparameter choices.
Our conclusion from these findings is that whether the generalisation capabilities of model can be assessed from the parameters alone, iee. without using any data, remains unclear.
H.3 Variance and regularisers
We demonstrate that variance yiclds similar results compared to neural persistence for distinguishing deep leed-forward neural networks trained using different regularisers, namely dropout, batch normalisation, or no regulariser. To this end, we replicate the results from Section 4.1 in (Rieck et al. 2019). We train models using the same hyperparameters (3 layers, 650 hidden units, relu activation function) as Rieck et al. (2019) using no regulariser, batch normalisation, or dropout (p= 0.5) on the MNIST dataset. For each setting we train 30 models with different initialisations and minibatch trajectories.
37

---

Published in Transactions on Machine Learning Research (11/2023)
NP vs. Val. Acc.
Var. vs. Val. Acc.
DGP vs. Val. Acc.
24
2.5
2.5
20
0.0
0.0
0.0
16
Burn-In: b
2.5
-.5
-2.5
12
5500
-5.0
-5.0
-7.5
-7.5
-7.5
10.0
10.00
-10.0
12.5
12.5
12.55
24
0.4
0.4
0.4
20
16
0.2
0.2
0.2
Burn-In
12
0.0
0.2
-02
00.2
-0.4
-0.4
00.4
8
12
16
20
24
12
16
20
24
0
4
12 16 20
24
Patience g
Patience g
Patience
Differences between using accuracy on the validation set and neural persistence, variance, and deep graph persistence as early stopping criteria. The bottom row shows differences in test set accuracy at the point of early stopping, and the top row shows differences the numbers of epochs. Numbers are read "value for first metrie" minus "value for second metric".
Figure 13:
EMNIST
Fashion-MNIST MNIST
A Apoch (NP, val)
-0.91
0.68
1.76
A Apooch (NP, var)
-2.33
-1.31
-1.60
A epoch amoch(var, (var, val)
1.43
1.99
3.35
A accuracy (NP, val)
0.190
0.032
0.033
accuracy NP, var) -0.014
-0.019
-0.002
A accuracy (var, val) 0.204
0.050
0.034
Table 7: Differences number of trained epochs when using validation error, neural persistence, or the variance of weights as early stopping criterion. Aepoch refers the difference in number of trained epochs. Ancouracy refers to the difference in test set accuracy at the point of stopping. A positive difference means that the corresponding value for the first argument is higher. Note that accuracy is given in %, iee. takes values in [0; 100].
38

---

Published in Transactions on Machine Learning Research (11/2023)
EMNIST
Fashion-MNISTT
MNIST
Epoch difference
epoch (DGP, val)
-1.945
0.711
-0.490
epoch (DGP, var)
-3.376
-1.28
-3.348
epoch (DGP, NP)
-1.037
0.032
-2.245
Test accuracy difference
A accuracy (DGP, val)
0.189
0.034
0.027
accuracy (DGP, var) -0.015
-0.017
-0.007
accuracy (DGP, NP)
-0.002
0.002
-0.006
Table 8: Diffcrences in number of training epochs when using validation crror ("val"), noural persistence ("NP"), or variance ("var") as early slopping criterion compared to using deep graph persistence (*DGP") as early stopping criterion. Aepochs refers to the difference number of training epochs. Auccuracy refers to the difference test set accuracy at the point of stopping. A positive difference means that the corresponding value for the first argument is higher. Note that accuracy is given in %, i.c. takes values in [0; 100].
0.625
0.012
0.600
0.011
Neural Persistence
0.575
0.010
0.550
Variance
0.009
0.525
0.008
0.500
0.007
0.475
0.006
0.450
Dropout=0.5
Batch Normalisation No Regulariser
Dropout=0.5 Batch Normalisation No Regulariser
Figure 14: Left: Replication Figure 3 in (Rieck et al. 2019). Neural persistence can distinguish models trained on MNIST using different regularisers. Right: Using variance of weights instead of neural persistence yields very similar results. Note, that results for variance of weights are vertically flipped compared to neural persistence, because higher neural persistence corresponds to lower variance of weights.
0.80
0.005
Neural Persistence
0.75
0.004
Variance
0.70
0.003
0.65
0.002
0.60
0.001
Dropout-0.5
Batch Normalisation No Regulariser
Dropout=0.5 Batch Normalisation No Regulariser
Figure 15: Using neural persistence or variance weights fails to distinguish models trained on Fashion- MNIST using different regularisers. However, distributions for variance of weights and neural persistence are again similar up vertical flipping.
39

---

Published in Transactions on Machine Learning Research (11/2023)
0.6
Hidden Size
50
0.3
0.5
100
Proportion
DOP
250
0.2
0.4
650
0.14
0.3
-7.5
-7.0
-6.5
66.0
55.5
-5.0
-4.5
-1
-1
log (variance)
:(variance, DGP)
r(variance, NP)
(a) Correspondence of log-transformed variance of weights and deep graph persistence values in trained models for EMNIST. Unlike neural persistence, there is no linear correspondence of deep graph persistence and the variance of weights and no clear other sys- tematic trend seems present.
(b) Distribution of Kendall's 7 between variance of weights and deep graph persistence values over train- ing (right) and neural persistence values over training (left). While neural persistence and the variance of weights are highly correlated in most cases, there is clear trend regarding strong correlation of deep graph persistence and variance of weights.
Figure 16: DGP does not correspond linearly to the variance of weights.
Then, compute the neural persistence and variance of normalised weights for each model. Figure 14 shows that the distribution of variances differs between models trained with different hyperparameters, Results for neural persistence are the similar. On the one hand, this reproduces the results in (Rieck et al. 2019 but confirms that variance behaves similar to noural persistence in this regard as well.
Finally, however, we want mention that we believe that these results are actually an artifact of this particular dataset, namely MNIST. Figure [5 shows the corresponding results for models trained on the Fashion-MNIST dataset. Here, we do not see any clear distinction between distributions of variances neural persistence values for different datasets.
H.4 Dependence of deep graph persistence variance.
We verify that deep graph persistence does not correlate strongly with the variance of weights of neural networks unlike neural persistence. Similar to the analysis in Section 4.2. analyse the relation between deep graph persistence and the log-transformed global variance of all weights in a trained network.
In Figure 16b we show the distribution of correlation coefficients (Kendall T) of deep graph persistence and variance and of neural persistence and variance during training. While in the vast majority of cases neural persistence and variance evolve similarly during training, the distribution of correlation coefficients is generally flat. This suggests that there no systematic co-evolution of deep graph persistence and the variance of weights during training.
In Figure 16a
show that there are no visible trends regarding correspondence of deep graph persistence and variance in trained neural networks. Here, use the same set of models that used in Section 4 Also, we evaluate models after training for 40 epochs. Therefore, we conclude that unlike neural persistence, deep graph persistence cannot be roplaced by only considering the variance of weights.
H.5 Additional results for deep graph persistence on covariate shift detection
In Figure 17 show the detection ratios of all methods in a visual manner for the three different datasets. Here, the corruption is Gaussian noise. Figure 17 shows that deep graph persistence outperforms the basclines with a particularly large margin on CIFAR-10, which is the most realistic of the three datasets. On Fashion- MNIST, the distance to the softmax baseline is small, however. In Figure [8] we show how the different feature extraction methods are affected by only having a certain ratio 8 of test samples (from the CIFAR- 10 data) being corrupted (by Gaussian noise). In Table and Figure 17] detection ratios for the different corruption ratios aggregated. Figure shows that batches containing fewer corrupted images are harder
40

---

Published in Transactions on Machine Learning Research (11/2023)
CIFAR-10
Fashion-MNIST
MNIST
Method
Ratio of detocted batches
0.8
TU
MAGDiff
Softmax
0.6
DGP (Ours)
0.4
0.2
0.0
10
10a
10
10a
10
10a #Test Samples/Batch
#'esst Samples/Batch
#Test Samples/Batch
Figure 17: Corruption detection ratios for different sample sizes and feature extraction methods shown for different datasets. Here, the corruption is Gaussian noise.
5 = 0.25
6 = 0.5
6 = 1.0
Method
Ratio detected batchos
0.8
TU
MAGDiff
Softmax
DGP (Ours)
0.0
10a
102
10a
10a
10a
#'Test Samples/Batch
#Test Samples/Batch
#Test Samples/Bater Batchhh
Figure 18: Corruption detection ratios CIFAR-10 10 for different sample sizes and feature extraction methods for different ratios of corrupted test batches (e.g. 5 0.25 means that 25% of images in the test batch are corrupted, while all other images are unaltered.) The corruption used is Gaussian noise.
to detect, as expected. But for 5 0.25, from certain sample size on, the detection ratio of deep graph persistence increases rapidly, while that of baselines does not increase as fast. For higher values of 6, all methods can detect corrupted batches given a sufficiently large sample size n.
H.6 Full results of deep graph persistence ablation on MNIST
In Table g we report full results of our ablation study for deep graph persistence on MNIST. In the main part, we only reported sample sizes n E (20,50, 100). Here, we additionally report results for sample sizes 10 and 200. These results do not provide additional information that not visible for the sample sizes reported in the main part.
H.7 Deep graph persistence yields calibrated detection scores
In Table 10 we show that both TU and deep graph persistence yield calibrated detection scores for detecting corrupted images. Specifically, we show that false detection rates, i.e. returning that a batch of images contains corrupted samples when actually all are not corrupted, small. This important verify that high true detection rates are not simply caused by too high sensitivity spurious differences in feature distributions Following Hensel et al. (2023), we take false detection rate of 5% upper threshold for
41

---

Published in Transactions on Machine Learning Research (11/2023)
TU
TU (+ norm)
DGP (- norm)
DGP
71
10
GB
1.63
1.93
1.66
1.91
GN
5.07
23.41
18.82
25.79
PD
17.03
15.43
14.05
14.90
UN
2.27
14.46
9.81
16.96
20
GB
3.85
4.94
3.66
4.92
GN
13.85
40.55
35.15
43.57
PD
31.02
28.51
27.72
28.44
UN
6.54
28.34
22.46
32.56
50
GB
6.34
9.31
5.15
9.71
GN
24.02
57.44
51.78
62.13
PD
46.74
43.40
41.15
43.20
UN
12.28
43.23
35.70
48.92
100
GB
12.35
18.48
11.26
20.16
GN
37.17
75.06
67.71
79.21
PD
62.33
58.26
55.95
58.14
UN
21.31
57.80
49.74
64.71
200
GB 19.38
28.45
19.80
30.19
GN
50.64
86.74
81.76
91.08
PD 75.64
71.39
68.24
71.58
UN
31.92
70.79
63.27
78.71
Table 9: Full ablation results for modifications of neural persistence made to obtain deep graph persistence.
"+ norm" denotes whether layer-wise standardisation is applied. Scores are detection ratios on MNIST reported as percentages range [0, 100).
Method
CIFAR-10
MaShion-MNIST
MNIST
10
TU
1.04
1.23
1.09
DGP (Ours)
0.89
1.15
1.09
20
TU
1.89
2.25
1.97
DGP (Ours)
1.55
2.09
1.98
50
TU
1.17
1.28
1.31
DGP (Ours)
0.98
1.25
1.19
100
TU
1.12
1.29
1.13
DGP (Ours)
1.00
1.30
1.05
200
TU
0.56
0.62
0.58
DGP (Ours)
0.47
0.62
0.56
Table 10: False detection rates for TU and deep graph persistence on different datasets. Numbers are reported in percent, ie. in [0; 100). All scores are 5% which means that methods only rarely mistakenly return that a batch of images contains contains corrupted samples when in reality all images are not corrupted.
well-calibrated delection scores. Numbers in Table 10 clearly indicate that false positive rates for both TU and deep graph persistence are well below 5%. Therefore, we can be confident that deep graph persistence actually captures differences in distribution between corrupted and non-corrupted images.
42


Reviews:
[{"review_id": "kPk4n7K4Mp", "reviewer": "Reviewer_2V1F", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Overall I feel positive about this work. I think it presents interesting and convincing ideas, and is quite well-written and easy to read. To my opinion it is a useful contribution to the TDA community. I still have a few comments that I would like the authors to answer / discuss though.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "In this article, the authors demonstrate that the neural persistence (NP), which is a common tool for characterizing neural networks, is actually bounded by the network weight variance and spatial organization. Then they demonstrate that while NP varies a lot between these bounds for linear classifiers, this is not true for deep neural networks, where it is mostly correlated to the weight variance. Thus they propose to extend the NP definition to the whole network instead of averaging across layers, and show empirically that this new NP definition allows for better separation between models on shift detection experiments.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "+++ Section 4.2: why not running statistical tests and providing p-values (instead of showing box plots) for studying the effect of randomly shuffling weights, since there is a null model? This would be more convincing than displaying NP \\Delta values that are not as compelling.\n\n+++ Section 5.1: what is the computational cost for computing Equation (10)? It would be great to provide pseudo code and complexity analysis for DGP, since one of the advantages of the other methods (which average layers) is that they are at least quite fast to compute, so it would nice to show that the additional computational cost for DGP is not too large.  \n\n+++ Section 5.2: what is the rationale for representing persistence diagrams with vectors of sorted weights? Is it a stable representation (i.e., is the Euclidean distance between these representations upper bounded by the bottleneck distance between the diagrams themselves)?\n\n+++ Appendix A: I would like to see more explanations for Remark A.7 as it is a bit vague for now. The way it is currently stated makes the derivation of Equation (20) quite unclear. \n\nTypos:\n\np4: \"we choose the value that maximises NP, i.e., 0\": shouldn't it be 1?\np5: \"U is tighter when $B_{\\not\\sim A}$\" is smaller\": shouldn't it be \"|B\\B_{\\not\\sim A}|\"?\np5: \"we have equality of NP_p(W) = U\": shouldn't it be \"(U^p-1)^{1/p}\"?", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "ZmBwgNpm5D", "reviewer": "Reviewer_zwz9", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "While I am not an expert in the neural persistence literature, I find the work to be extremely valuable and timely. Identifying the limitations of a prior top-tier paper, both empirically and theoretically, is a relatively rare sight in deep learning research, and I applaud the authors for making such a result possible! The proposed modifications are sensible and lead to improvements on the regimes studied. I would recommend acceptance even in the current form of the work.\n\nMy main concern is centered around the downstream impact of the novel graph persistence measure. As mentioned in the paper, one of the 'selling points' of neural persistence is its valuable ability to early-stop without a validation set; however, the results in this paper to that end turn out to be negative. While there is appropriate referencing around this result, I would have appreciated a more deeper (empirical or theoretical) analysis on why the deep graph persistence measure was unable to serve as a better proxy for early stopping. In my opinion, such a result, or any other additional result indicating how a downstream neural network practitioner could make effective use of this function, would be highly appreciated.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The authors study the neural persistence framework, which previously proposed to exploit TDA principles to assess neural network complexity. In spite of neural persistence's influence, the authors unearth the key factors steering the persistence measure, finding them to correspond to the variance of the weights in the shallow layers of the model. Hence, it is concluded that the neural persistence as presented is limited, and a more global variant of it, dubbed \"graph persistence\" is proposed. Theory and experiments supplement the value of the graph persistence measure.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "See the second paragraph in 'Strengths and Weaknesses'.", "broader_impact_concerns": "No concerns.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "wiUnYqdLJ9", "reviewer": "Reviewer_KwHa", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "The primary strength of the paper is that it is operating on sound\nmathematical principles and providing a well-justified critique of an\nexisting method. The analysis proceeds carefully and in an overall sound\nfashion; care is taken to motivate the individual steps and intermediate results.\n\nAt the same time, the current write-up is suffering from issues of\n**clarity**, at least in the expository sense: while the materials\ndiscussed are without a doubt highly relevant, there is the question of\nwhy so much time is spent discussing the shortcomings of neural\npersistence, when it would be easier to just 'pitch' the modified\nversion and use that in lieu of the original version. Moreover, the\nexperimental setup, as far as this reviewer can tell, does not follow\nthe original paper on [neural\npersistence](https://openreview.net/forum?id=ByxkijC5FQ). A connection\nto the scenarios outlined by Rieck et al. would be most desirable,\nthough, since it would make it easier for non-expert readers to\nunderstand the novel claims.\n", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The contributions of this paper are two-fold:\n\nFirst, [Neural Persistence](https://openreview.net/forum?id=ByxkijC5FQ),\na topology-driven measure for assessing the topological complexity of\nfully-connected neural networks, is analysed and compared to the\nvariance of *neural network weights*. The implication of this is that,\nas the neural network becomes deeper, the changes in neural persistence\nare rather driven by the *variance* of the weights as opposed to any\nstructure in the weights themselves. This is shown to imply a linear\nrelationship between the variance of weights and neural persistence.\nInterestingly, these findings do *not* translate to deeper neural\nnetworks.\n\nSecond, the paper introduces a way to address the shortcomings of neural\npersistence. This is achieved by generalising the approach of neural\npersistence to deep neural networks, taking into account _all_ weights\nas opposed to the weights of only a single layer. This extension is\nshown to result in a method that is more aligned with the complexity of\nthe neural network representation, and is overall less susceptible to\nmere changes in the variance.\n", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "- The discussion on 'measure' in the sense of 'measure theory' (footnote 1) strikes me as redundant. Consider removing it.\n\n- When discussing *topological uncertainty* for the first time, please\n  add a citation.\n\n- Please comment briefly on why the work of 'Liu et al. (2020)' is not\n  suitable as a replacement of the proposed method. It seems that this\n  work would also enable the experiments proposed in the paper at hand.\n\n- Some of the citations to 'Rieck et al. (2019)' strike me as redundant,\n  in particular when they appear in close sucession. For instance, in\n  the Section 3, there are numerous sentences that end with such\n  a citation. Consider rephrasing some of these sentences.\n\n- In Definition 3.2, please add 'graph' (instead of just saying\n  'Complete bipartite').\n\n- Please comment briefly on whether higher-order topological features\n  considered for each layer would address some of the problems\n  mentioned in this work. This would substantially increase our\n  knowledge on the utility of per-layer scores of the complexity of\n  neural networks.\n\n- Please expand on the idea of spatial structure in a matrix.\n  I understand the gist of it, but it seems like a non-standard\n  definition that, moreover, is susceptible to permutations (in the\n  sense that the indexing of features, which is somewhat arbitrary)\n  seems to matter.\n\n- Please comment briefly on whether a single-layer network can be\n  considered *linear*; are you not making use of non-linear activation\n  functions, which influence weights? \n\n- When presenting the results in Section 4.3, consider using the\n  visualisations employed by Rieck et al., to make the results directly\n  comparable.\n\n- Personally, I would prefer showing Section 5 much *earlier* in the\n  paper and present one **joint** section for experiments that serve to\n  show their improvements.\n\n- Consider rephrasing the discussion on computational complexity for the\n  new measure. Since this entails finding a set of weights across *all*\n  layers, a more detailed complexity would be appreciated.\n\n## Minor issues\n\n- 'analogue fashion' --> 'analogous fashion'\n\n- Please check the references for consistency, in particular when it\n  comes to capitalisation of proper names like MNIST.\n\n## Summary\n\nOverall, this paper has the potential to substantially impact the\nliterature in the nascent field of topological machine learning.\nI believe that additional rephrasing to **improve the clarity** are\nsufficient to turn this into a great publication.\n", "broader_impact_concerns": "There are no broader impact concerns to be raised by this work.\n", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: In this paper the authors consider neural persistence, a network complexity measure rooted in topological data analysis, and show that it is highly correlated with the variance of the network's weights on shallow layers. The authors propose deep graph persistence, a more global version of of neural persistence, which better measures network complexity. No major concerns were raised by the reviewers, and all the minor issues raised by reviewers were satisfactorily addressed by the authors in the rebuttal. I thus recommend acceptance.
Decision: Accept (poster)