{'fraction_non_alphanumeric': 0.04112744765905549, 'fraction_numerical': 0.010569821803645234, 'mean_word_length': 4.246830193150847, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bayesian Topological Learning for Classifying the Structure of Biological Networks

Actin cytoskeleton networks generate local topological signatures due to the natural variations in the number, size, and shape of holes of the networks. Persistent homology is a method that explores these topological properties of data and summarizes them as persistence diagrams. In this work, we analyze and classify these filament networks by transforming them into persistence diagrams whose variability is quantified via a Bayesian framework on the space of persistence diagrams. The proposed generalized Bayesian framework adopts an independent and identically distributed cluster point process characterization of persistence diagrams and relies on a substitution likelihood argument. This framework provides the flexibility to estimate the posterior cardinality distribution of points in a persistence diagram and the posterior spatial distribution simultaneously. We present a closed form of the posteriors under the assumption of Gaussian mixtures and binomials for prior intensity and cardinality respectively. Using this posterior calculation, we implement a Bayes factor algorithm to classify the actin filament networks and benchmark it against several state-of-the-art classification methods.

While there are several methods present in the literature to compute PDs, we choose geometric complexes that are typically used for applications of persistent homology to data analysis; see [Edelsbrunner and Harer, 2010] and references therein. The homological features in PDs have no intrinsic order, implying that they are sets as opposed to vectors. Due to this, the utilization of PDs in machine learning algorithms is not straightforward. Some researchers map the PDs into Hilbert spaces to adopt traditional machine learning tools (see e.g., [Di Fabio and Ferri, 2015,Turner et al., 2014, Adams et al., 2017, Bubenik, 2015, Reininghaus et al., 2015). Direct use of PDs for statistical inference and classification has been developed by several authors such as [Maroulas et al., 2019, Maroulas et al., 2020, Marchese and Maroulas, 2018, Bobrowski et al., 2017, Fasy et al., 2014, Mileyko et al., 2011, Robinson and Turner, 2017; and [Bubenik, 2018].
In this paper, we quantify the variability of PDs through a novel Bayesian framework by considering PDs as a collection of points distributed on a pertinent domain space, where the distribution of the number of points is also an important feature. This setting leads us to view a PD through the lens of an independent and identically distributed (i.i.d.) cluster point process (PP) ( [Daley and Vere-Jones, 1988]). An i.i.d. cluster PP consists of points that are i.i.d. according to a probability density but have an arbitrary cardinality distribution. For example, an i.i.d. cluster PP is reduced to the classical Poisson PP if the points in a PD are spatially distributed according to a Poisson distribution. The study in [Maroulas et al., 2020] implicitly estimates the cardinality of a PD by integrating the intensity of a Poisson PP. The framework of [Maroulas et al., 2020] also yields that the variance is equal to the mean and leads to an estimation of cardinality with high variance whenever the number of points in a PD is high. However, modeling PDs as i.i.d. cluster PPs allows us to estimate the intensity and the cardinality component of the distribution simultaneously. This is very critical as the importance of cardinality in PDs has been underlined in problems related to statistics and machine learning [Fasy et al., 2014, Kerber et al., 2017.
Our Bayesian framework quantifies prior uncertainty with given intensity and cardinality for an i.i.d. cluster PP. The likelihood in our model represents the level of belief that observed diagrams are representative of the entire population and is defined through marked point processes (MPPs). A central idea of this paper is to develop posterior distributions of the spatial configuration of points on persistence diagrams and their associated number instead of the point clouds in the data generating space. The persistence diagrams summarize their topology which in turn is employed in the classification algorithm. By viewing point clouds through their topological descriptors, the proposed framework can reveal essential shape peculiarities latent in the point clouds. Our Bayesian method adopts a substitution likelihood technique by Jeffreys in [Jeffreys, 1961] instead of considering the full likelihood for the point cloud. Due to the nature of PDs, an observed PD contains points that correspond to the latent topology in the underlying data as well as points that solely arise due to noise in the data. Our Bayesian model addresses instances of noise by means of an i.i.d. cluster PP. In particular, we are able to quantify the uncertainty with an estimated intensity and cardinality using the i.i.d. cluster PP. This framework estimates the posterior cardinality and intensity simultaneously, which provides a complete knowledge of the posterior distribution.
Another key contribution of this paper is the derivation of a closed form of the posterior in-tensity, which relies on Gaussian mixture densities for prior intensities and a closed form for the posterior cardinality, which uses binomial priors. The direct benefits of this closed form solution of the posterior distribution are two-fold: (i) it demonstrates the computational tractability of the proposed Bayesian model and (ii) it provides a means to develop a robust classification scheme through Bayes' factors. Another computational benefit of these closed forms is the quantification of the intensity of the unexpected PP by means of an exponential density. The exponential density is an ideal choice because (i) it gives a natural intuition of the unexpected (noise) features, and (ii) it provides a more computationally automatic approach as we only need to modify one parameter. This Bayesian paradigm provides a method for the classification of actin filament networks in plant cells that captures their distinguishing topological features.
Overall, the contributions of this work are: This paper is organized as follows. Section 2 provides a brief overview of PDs and PPs. In Section 3, we establish the Bayesian framework for PDs and provide the update formulas for intensity and cardinality. Then Subsection 3.1 introduces a closed form representation of the posterior intensity and cardinality utilizing Gaussian mixture models and binomial distributions respectively. Detailed demonstrations of this closed form estimation are presented in Subsection 3.2. To assess the capability of our Bayesian method, we investigate a problem of classifying filament networks of plant cells in Section 4. Finally, we end with the conclusion in Section 5. We delegate all of the proofs, as well as some definitions, lemmas, and notations required for the proofs to the supplementary materials.

Preliminaries
We begin by discussing the necessary background for generating Bayesian models for PDs. In Subsection 2.1, we briefly review simplicial complexes, the building blocks for constructing PDs. Pertinent definitions, theorems, and some basic facts about i.i.d. cluster point processes (PPs) are discussed in Subsection 2.2 .

Persistence Diagrams
Definition 2.1. The convex hull of a finite set of points Definition 2.3. A k-simplex is the convex hull of an affinely independent point set of cardinality k + 1. The convex hull of a nonempty subset of the k points in a k + 1 simplex is called a face of a simplex.
Definition 2.4. A simplicial complex σ is a collection of simplices such that for every set A in σ and every nonempty set B ⊂ A, we have that B is in σ.
Definition 2.5. The Vietoris-Rips complex for threshold > 0, denoted VR( ), is the abstract simplicial complex determined in the following way: a k-simplex with vertices given by k + 1 points in X is included in V R( ) whenever /2 balls placed at the points all have pairwise intersections.
Formally, for each homological dimension, a PD is a multiset of points (b, d), where b is the radius in the Vietoris-Rips complex at which a homological feature is born and d is the radius at which it dies. To facilitate visualization and preserve the geometric information, we apply the linear transformation (b, p) = T (b, d) = (b, d − b) to each point in the diagram. We refer to the resulting coordinates as birth (b) and persistence (p), respectively, in W := {(b, p) ∈ R 2 | b, p ≥ 0} and call this transformed PD a tilted representation ( Fig. 2 (d)). Hereafter whenever we refer to PDs, we imply their tilted representations. Intuitively, the homological features represented in a PD are connected components or holes of different dimensions. For example, a 0-dimensional homological feature is a connected component, a 1-dimensional feature is a loop, and a 2-dimensional feature is a void. An example of the evolution of the Vietoris-Rips complex and a corresponding PD is given in Fig. 2.

I.I.D. Cluster Point Processes
This section contains basic definitions and fundamental theorems related to i.i.d. cluster PPs. Detailed treatments of i.i.d. cluster PPs can be found in [Daley and Vere-Jones, 1988] and references therein. Throughout this section, we let X be a Polish space and X be its Borel σ−algebra.
Definition 2.6. A finite point process ({ρ n }, {P n (•)}) consists of a cardinality distribution ρ n with ∞ n=0 ρ n = 1 and a symmetric probability measure P n on X n , where X 0 is the trivial σ-algebra.
To sample from a PP, first one draws an integer n from the cardinality distribution ρ n . Then the n points (x 1 , . . . , x n ) are spatially distributed according to a draw from P n . Since PPs model unordered collections of points, we need to ensure that P n assigns equal weights to all n ! permutations of (x 1 , . . . , x n ). The requirement in Def. 2.6 that P n is symmetric guarantees this. A natural way to work with random collections of points is the Janossy measure, which combines the cardinality and spatial distributions, while disregarding the order of the points.
Definition 2.8. An i.i.d. cluster PP Ψ is a finite PP on the space (X, X ) which has points that: (i) are located in X = R d , (ii) have a cardinality distribution ρ n with ∞ n=0 ρ n = 1, and (iii) are distributed according to some common probability measure F (·) on the Borel set X .
We consider Janossy measures for the point process Ψ, J Ψ n , that admit densities j n with respect to a reference measure on X due to their intuitive interpretation. In particular, for an i.i.d. cluster PP Ψ, if F (A) = A f (x)dx for any A ∈ X n , then j n (x 1 , . . . , x n ) = ρ n n!f (x 1 ) · · · f (x n ) determines the probability density of finding the n points at their respective locations according to F . The n! term gives the number of ways the points could be at these positions. For a finite intensity measure Λ on X that admits the density λ, we also have f (x) = λ(x) Λ(X) . The intensity is the point process analog of the first order moment of a random variable. Precisely, the intensity density λ(x) is the density of the expected number of points per unit volume at x. Hereafter, we sufficiently characterize our i.i.d. cluster PPs with intensity and cardinality measures. Next, we define the marked PP, which provides a formulation for the likelihood model used in our Bayesian setting. Let M be a Polish space that represents the mark space, and let its Borel σ− algebra be M.  (m i |x π(i) ), where S n is the set of all permutations of (1, . . . , n). Otherwise, the density can be taken as 0.

Bayesian Inference
Considering a sample PD from an i.i.d. cluster process, we define a generalized Bayes' theorem for PDs. First, we consider the underlying prior uncertainty of a PD D X as generated by an i.i.d.
cluster PP D X with intensity λ D X and cardinality ρ D X . The cardinality distribution ρ D X (n) is defined as the probability, P (|D X | = n), of the number of elements in the PP D X to be n, where | · | denotes the cardinality of a PD. Due to the nature of PDs, we may encounter two scenarios for any point x in D X . We accommodate these two possibilities by means of a probability function α(x). In particular, the scenario of observing x happens with probability α(x), and otherwise with probability 1 − α(x). Next, we establish the likelihood model by employing the theory of marked PPs. For a marked PP, the intensity (spatial) joint probability density is computed using a stochastic kernel. More specifically, (x, m) ∈ X × X M implies that the points m(x i ) ∈ m are marks of x i ∈ x that are drawn independently from a stochastic kernel : X × X M → R + ∪ {0}. This kernel, in turn, provides the conditional density (m|x), which is nonzero only if the cardinalities of x and m are equal as discussed in Remark 1. On the other hand, the cardinality likelihood is obtained by the conditional distribution of the observed PD D Y given that there are n points in D X . This cardinality likelihood incorporates the prior intensity and cardinality distribution, the stochastic kernel , and the distribution of the topological noise in the observed data. In order to fully describe the structure of PDs, we must define one last PP that models the topological noise in the observed data. Intuitively, this PP consists of the points in the observed diagram that fail to associate with the prior. We define this as an i.i.d. cluster PP D Y U with intensity λ D Y U and cardinality ρ D Y U . Fig. 3 gives a visual representation to illustrate the contribution of the prior and the observations to the spatial and the cardinality distributions of the Bayesian framework. For this we superimpose two PDs: one is a sample from the prior and the other is the observed PD (see Fig. 3 (a)). Any point x in D X is equipped with a probability of being observed and not being observed, which we present using blue and brown respectively in Fig. 3 and denote them as D X O (observed) and D X V (vanished), respectively. Presumably, any point x ∈ D X O has an association with one feature y in the observed PD D Y , and we call those features in D Y as D Y O . This implies that for any possible configuration, the number of points in D X O will be the same as D Y O and we use blue to represent that. Also, there can be features in the observed PD D Y that are generated from noise or unanticipated geometry in the prior D X , and we denote them as D Y U and call them unexpected features (presented as red in Fig. 3). Fig. 3 (b) shows different possible scenarios for the relationship of the prior to the data likelihood for the cardinality distribution. As any point in D X V has no association with features in the observed PD D Y , the case of having all the points in D X V indicates that in the observed PD we encounter only the unexpected D Y U (the first bar in Fig. 3 (b)). As some points of D Y are more likely to be marks than others, we illustrate these instances with different levels for the blue parts of the cardinality bars. The last two bars demonstrate the cases where all of the points in D Y are expected to be marks of the prior features; this is encountered in the presence of very low noise in data. Fig. 3 (c) and (d) show different possible scenarios for the relationship of the prior to the data likelihood for the spatial distribution. We use boxes of corresponding colors to highlight the decomposition of the PP D X into D X O and D X V , and D Y into D Y O and D Y U . For example, the observed D X O and vanished D X V features are presented as triangles inside of blue and brown boxes respectively in Fig. 3 (c) and (d). All associations between points D X O and D Y O together constitute the marked PP which admits a stochastic kernel (y|x). This indicates that the point x may have any point y ∈ D Y as its mark, but intuitively some marks should be more likely than others. In Fig. 3 (c) and (d) we give examples of these different associations, which are indicated by pairs inside of the blue box. Finally, the unexpected features in D Y U are presented as dots inside of red boxes in Fig. 3 (c) and (d). Finally, the posterior intensity and cardinality are given in the theorem below, whose proof is delegated to Section 6.2 in the supplementary materials.
Theorem 3.1. For a random PD, denote the prior intensity and cardinality by λ D X and ρ D X , respectively. Suppose α(x) is the probability of observing a prior feature, and D X O and D X V are two instances of observed and vanished features in the prior respectively. If (y|x) is the stochastic kernel that links D Y O with D X O , and λ D Y U and ρ D Y U are the intensity and cardinality of D Y U respectively, then for a set of independent samples of PDs D Y 1:m = {D Y 1 , · · · , D Ym } from D Y with cardinalities K 1 , · · · , K m , we have the following posterior intensity and cardinality: where dx is a linear functional, P n i is the permutation coefficient, and the sum in In the posterior intensity expression given in Eqn. (1), the two terms reflect the decomposition of the prior intensity. Due to the arbitrary cardinality distribution assumption for i.i.d. cluster point processes, the two terms are also weighted by two factors B(∅) and B(y) respectively. The first term is for the vanished features D X V , where the intensity is weighted by 1 − α(x) and B(∅). The factor B(∅) is encountered since there is no y ∈ D Y i to represent the vanished features D X V . The second term in Eqn. (1) corresponds to the observed part D X O and is weighted by α(x) and B(y). The factor B(y) depends on specific y ∈ D Y i to account for the associations between the features in D X O and those in D Y i . To be more precise, if x ∈ D X is observed, it can be associated with any of the y ∈ D Y i and the remaining points of D Y i , defined as D Y i \ y, are considered to either be observed from the rest of the features in D X or originated as unexpected features D Y U .
The posterior cardinality is given in Eqn.
(2). The associated likelihood is given as the sum from k = 0 to K i , where K i is the number of features in D Y i . This provides the likelihood of each observed PD D Y i given that there are n points in D X . In particular, for k = 0, the cardinality term for the unexpected feature reduces to ρ D Y U (K i ) and the intensity term for the vanished feature reduces to (λ D X [1 − α]) n . This implies that if the observed PD consists only of unexpected features then all of the points in the prior are most likely to have vanished. As the value of k increases, contributions from the unexpected features and vanished features decrease, indicating the presence of more associations between prior and observed features through the marked point

Closed Form of Posterior Estimation
Next, we present a closed form solution to the posterior intensity and cardinality equation of Thm. 3.1 by considering a Gaussian mixture density for the prior intensity and a binomial distribution for the prior cardinality. Below we specify the necessary components of Thm. 3.1 to derive these closed forms. (M1) The expressions for the prior intensity λ D X and cardinality ρ D X are: where N is the number of components, µ D X is the mean, and σ D X I is the covariance matrix of the Gaussian mixture. Since PDs are modeled as point processes on the space W not on R 2 , the Gaussian densities are restricted to W as N * (z; υ, σI) := N (z; υ, σI)1 W (z), with mean v and covariance matrix σI, and 1 W is the indicator function of W. N 0 ∈ N is the maximum number of points in the prior PP and ρ x ∈ [0, 1] is the probability of one point to fall in the space W.
(M2) The likelihood function (y|x), which is the stochastic kernel of the marked i.i.d. cluster PP where σ D Y O is the covariance coefficient that quantifies the level of confidence in the observations. (M3) The i.i.d. cluster PP D Y U , consisting of the unexpected features in the observation, has intensity λ D Y U and cardinality ρ D Y U . The intensity for D Y U takes the form µ D Y U controls the rate of decay away from the origin. This distribution for λ D Y U considers points closer to the origin more likely to be unexpected features. Points close to the origin in PDs are often created either from the spacing between the point clouds due to sampling or from the presence of noise in the data. Typically points with higher persistence or higher birth represent significant topological signatures, so for our analysis we count them as less likely to be unexpected. The cardinality distribution is where M 0 ∈ N is the maximum number of points in the PP D Y U and ρ y ∈ [0, 1] is the probability of one point to fall in the space W.
, and α is fixed. Then the posterior intensity and cardinality of Thm. 3.1 are given by: where Γ a,b D Y i (τ ), B(∅), and B(y) are as in Thm. 3.1 with We present the proof in Section 6.3 of the supplementary materials. One can see that the intensity estimation in Eqn. (8) is in the form of a Gaussian mixture, and hence it is obtained from a conjugate family of priors. However, we do not observe a similar property for the cardinality estimation. A detailed example of these estimations is provided in Section 3.2. The cardinality distribution in Eqn. (9) is computed for infinitely many values of n, which is unattainable. Hence, for the practical application, we must truncate n at some N max such that N max is sufficiently larger than the number of points in the prior PP. Without loss of generality, we can choose N max = N 0 .

Sensitivity Analysis
We present the following example to (i) illustrate the estimation of the posterior using Eqns. (8) and (9), and (ii) examine the effects on the choice of prior intensity and prior cardinality on the posterior distributions. To reproduce these results, the interested reader may download our Rpackage BayesTDA. We consider point clouds generated from a polar curve that contains two inner loops (see Fig. 5 (a)) and focus on 1-dimensional features in their corresponding PDs as they are the important homological features of this shape.

Parameters for (M1)
Prior    The observed PDs are generated from point clouds sampled uniformly from the polar curve and perturbed by varying levels of Gaussian noise with variances 0.001I 2 (Fig. 5 (a)), 0.005I 2 (Fig.  6 (a)), and 0.01I 2 (Fig. 7 (a)) which are considered in Case-1, Case-2, and Case-3 respectively. Consequently, their PDs exhibit distinctive characteristics such as four prominent features with high persistence and very few spurious features, four prominent features with medium persistence and several spurious features, and three prominent features with medium persistence and many spurious features.

Cases Parameters for (M2) Parameters for
We commence by defining an i.i.d cluster PP with two types of prior intensities and cardinalities: (i) informative and (ii) uninformative. The prior intensities are modeled by a Gaussian mixture as discussed in (M1). Due to the symmetric nature of the polar curve, in a noiseless scenario, the corresponding PD includes one longer and one shorter persistence point, each with multiplicity 2. Hence we use two Gaussian components weighted by 2 for the informative intensity (II) (see Figs. 5, 6-7 (b)). To present the intensity maps uniformly throughout this example, we divide the intensities by their corresponding maxima. This ensures all intensities are on a scale from 0 to 1. The informative cardinality (IC) is determined by using a discrete distribution with the highest probability at cardinality 4 (see Figs. 5, 6-7 (d)). On the other hand for the uninformative intensity (UI), we use one Gaussian component, and for the uninformative cardinality (UC) we use a discrete uniform distribution (see Figs. 5, 6-7 (c) and (g) respectively). We present the list of parameters used to define the prior PP in Table 1. We examine the cases below. Case-1: The point cloud considered here is shown in Fig. 5 (a). The 1-dimensional features in the corresponding PD are presented as black triangles overlaid on the posterior intensity plots. We examine the posterior intensity and cardinality for four different combinations of priors -(a) (II, IC), (b) (UI, IC), (c) (II, UC), and (d) (UI, UC). As the PD consists of a very low number of spurious features, we observe that the posterior computed from any combination of the four predicts the existence and position of all 1-dimensional features accurately (Fig. 5 (e), (f), (h), and (i)). The uninformative prior cardinality also produces very low variance in the posterior cardinality estimation. Since both of the posterior intensity and cardinality estimations are accurate, for the sake of space, we avoid presenting the sensitivity analysis for this case.
Furthermore, for this case we present a comparison between the cardinality statistics given by using i.i.d. cluster point process characterization of the PD presented herein and a Poisson point process framework presented in [Maroulas et al., 2020] that estimates the number of homological features by integrating the estimated posterior intensity. As discussed earlier, the Poisson PP framework approximates the cardinality as a Poisson distribution, and consequently this estimation produces higher variability as the number of points increases. However, the i.i.d. cluster PP characterization leads to accurate estimation of the cardinality with tighter variance (see Fig. 4).

Case-2:
We consider all of the priors as in Case-1. The point cloud used for this case (Fig. 6 (a)) is more perturbed around the polar curve than Case-1 (Gaussian noise with variance 0.005I 2 ). The associated PD, presented as black triangles overlaid on the posterior intensity plots, exhibits more spurious features. The parameters used for this case are listed in Table 2. First, we estimate the posterior intensity and cardinality for all four combinations using the same parameters as in Case-1, and the results are presented in Fig. 6 (e), (f), (h), and (i). For the combinations (II, IC) and (UI, IC) of priors, the posterior intensity and cardinality can accurately estimate the holes with different variance levels. However, due to the presence of several spurious features the other two combinations, (II, UC) and (UI, UC), slightly overestimate the cardinality. Next, to illustrate the effect of observed data on the posterior, we adjust two parameters, the variance of the likelihood σ D Y O and the decay parameter of the unexpected features, µ D Y U . Recall that the intensity density of the PP D Y U , consisting of the unexpected features in the observation, is exponential (Eqn. (6)), where µ D Y U controls the rate of decay away from the origin. We present the updated posteriors from the two combinations of priors (II, UC) and (UI, UC). By decreasing the variance of the likelihood σ D Y O , the posterior intensities rely more on the observed features in the PD (see Fig.  6 (k) and (l)). On the other hand, by adjusting the decay parameter, we enable our model to recognize the presence of several spurious features in PD. This improves the estimation of posterior cardinality, which is evident in Fig. 6 (k) and (l).

Case-3:
In this case we consider the point cloud ( Fig. 7 (a)), which is very noisy (Gaussian noise with variance 0.01I 2 ). Due to the noise level, we encounter only three points with medium prominent persistence, and there are many spurious features. All the priors are the same as in Case-1 and Case-2. The associated PD is presented as black triangles overlaid on the posterior intensity plots. The parameters used for this case are listed in Table 2. First, we estimate the posterior intensity and cardinality for all four combinations using the same parameters as in Case-1, and the results are presented in Fig. 7 (e), (f), (h), and (i). For the combinations (II, IC) and (UI, IC) of priors, the posterior intensity and cardinality can accurately estimate the position and number of 1dimensional features with different variance levels. Due to the presence of several spurious features, the other two combinations (II, UC) and (UI, UC) overestimate the cardinality distribution. Also, in the latter case the posterior intensity estimates the location of the hole with higher variance and is skewed towards the noise features. Next, to illustrate the effect of the observed features on the posterior, we adjust two parameters, the variance of the likelihood σ D Y O and the unexpected feature cardinality parameter ρ y in the posterior estimation for the two combinations (II, UC) and (UI, UC). By decreasing σ D Y O we notice that the posterior intensities rely more on the observed features in the PD (see Fig. 7 (k) and (l)). On the other hand by increasing ρ y the model is able to identify that there are more spurious features in this PD than that of Case-1 and Case-2. This improves the estimation of posterior cardinality, which is evident in Fig. 7 (k) and (l).

Classification of Actin Filament Networks
In this section, we classify 150 actin filament networks in plant cells. Such filaments are key in the study of intracellular transportation in plant cells, as these bundles and networks make up the actin cytoskeleton, which determines the structure of the cell and enables cellular motion. We examine the classification scheme using three classes of filament networks designated by their respective protein binding numbers (see Fig. 8 (a)-(c) for examples). Higher numbers of cross-linking proteins produce thicker actin cables ( [Tang et al., 2014]), and in turn, indicate local geometric signatures. However, the differences are not always notable due to the presence of noise in the data. To bypass this, we explore these networks by means of their respective PDs as they distill salient information about the network patterns with respect to connectedness and empty space (holes), i.e. we can differentiate between filament networks by examining their homological features. In particular, we focus on classifying simulated image networks generated at the Abel Research Group with the number of cross-linking proteins N = 825, 1650, and 3300, which are denoted as C 1 , C 2 , and C 3 , respectively. The networks consist of the coordinates for the actin filaments and were created using the AFINES stochastic simulation framework introduced in [Freedman et al., 2018,Freedman et al., 2017, which models the assembly of the actin cytoskeleton. The value of each parameter in the simulation process is chosen to mimic real actin filaments. From the viewpoint of topology, class C 2 and class C 3 contain more prominent holes than class C 1 . Also, their respective PDs have different cardinalities. Hence, this topological aspect yields an important contrast between these three classes. To capture these differences we employ the following Bayes factor classification approach by relying on the closed form estimation of posterior distributions discussed in Section 3.1. A PD D that needs to be classified is a sample from an i.i.d. cluster point process D with intensity λ D and cardinality ρ D and its probability density has the form p D (D) = ρ D (|D|) d∈D λ D (d). For a training set Q Y k := D Y k 1:n for k = 1, · · · , K from K classes of random diagrams D Y k , we obtain the posterior intensities from the Bayesian framework using Proposition 3.1. The posterior probability density of D given the training set Q Y k is given by and consequently, the Bayes factor is obtained by the ratio The final assignment of the class of D is obtained by a majority voting scheme. PDs with 1-dimensional features (see Fig. 8 (d)-(f) for an example of each class) were created for each actin network through Rips filtration as discussed in Section 2.1, which were then used as input for the Bayes factor classification scheme of Eqn. 10. The number of 1-dimensional features in the dataset is large and the posterior estimation for this dataset is not computationally attainable. To mitigate this issue, we subsample the dataset to reduce the size of it. Precisely, our subsampled dataset consists of 25 points from each of the PDs obtained from the 150 synthetic filament networks. We found that taking more than 25 points from each of the PDs did not improve the classification, and typically led to a very expensive computational scheme. The corresponding PDs of these network filaments do not show any discernible pattern, and consequently, we adopt a data-driven scheme for classification using an uninformative flat prior. Table 3 summarizes the choices of parameters for the model. One intuitive interpretation of the unexpected features is that they represent the presence of noise in the dataset, consequently they often have very short persistence. On the other hand, the dataset of filament networks routinely consists of several incomplete loops (see Fig. 8), which imply that points with late birth and short persistence are expected from the underlying topology. Since we use 10-fold cross validation to estimate the model's accuracy, the posterior is calculated using the training set for each fold and each class. Then for each instance, we assign the class by using the majority voting scheme. We compute the resulting area under the receiver operating characteristic (ROC) curves (AUCs) and the results are listed in Table 4. The AUC across 10-folds was 0.925.

Comparison with Other Methods
We compared our method with several other machine learning algorithms to benchmark against them. We mainly pursued two avenues -(i) features selected using TDA methodology, and (ii) features selected using non-TDA methodology. Two other TDA methods which provide topological summaries and we compare our method with are persistence landscapes (Pls) [Bubenik, 2015] and persistence images (PIs) [Adams et al., 2017]. These summaries have been widely implemented as they are amenable to the existing machine learning methodologies. The main theme of these summaries is the extraction of a pertinent feature vector and implement a classifier trained using machine learning algorithms. Here we input these topological summaries as features for three different optimized classification algorithms: random forest (RF), support vector machine (SVM), and neural network (NN).
We considered a vector of 2500 values at which the PLs of order 1, 2, and 3 are evaluated, and found that the third order PL to be the most efficient summary for this classification task. In order to compute the PIs, we discretize the domain space into a 50 × 50 grid with a spread of 0.1. The linear ramp function is used to produce weights for computing PIs. We explore the classification problem using PIs with and without incorporating the linear weights and found that the PIs without any weights provide better accuracy than those with weights. This is justified as the linear ramp function assigns more weights to the higher persistence points leaving the local features to be insignificant. We optimally tune the parameters of SVM using a grid search. Precisely, the parameter γ of the radial basis kernel, that is the inverse of the standard deviation of the kernel, was optimally selected from a range of 0.1 to 1 with a spread of 0.1. In order to choose the optimal parameters for NN, we performed an extensive grid search for all parameters. However, we found that out of all the parameters, the only two that can potentially improve the classification accuracy are the number of hidden layers and the maximum number of iterations. The optimal performance was achieved for PLs with 20 layers and maximum iterations of 10 and for PIs with 3 layers and maximum iterations of 200. For the RF algorithm we employ 500 trees. Additionally, we compare our method with machine learning algorithms where the features are selected using a non-TDA method. As the filament networks pose a very definite spatial structure, we found the most useful method to extract the feature is the Raster images [Hijmans, 2019]. In particular, the raster image represents data by using a grid with a value assigned for each pixel. The assigned value can reflect a wide variety of information. In our analysis, we discretize the domain of a filament network into 2500 grid cells identified by 50 rows and 50 columns, and then count the number the points of each grid cell. This approach not only converts each filament network into a raster image which in turn is used as input to machine learning algorithms but also captures the definite spatial structures such as the presence of empty space and connectedness in a very efficient manner. We present an example in Fig. 10. The parameters for the machine learning algorithms are tuned in a similar fashion, i.e., the parameters are optimally tuned using a grid search. The optimal performance for NN was achieved with 5 layers and maximum iterations of 200. The results of this comparison are in Table 4, which showcases that our method outperforms the other methods.

Conclusion
This paper has proposed a generalized Bayesian framework for PDs by modeling them as i.i.d. cluster point processes. Our framework provides a probabilistic descriptor of the diagrams by simultaneously estimating the cardinality and spatial distributions. It is noteworthy that our Bayesian model directly employs PDs, which are topological summaries of data, for defining a substitution likelihood rather than using the entire point cloud. This deviates from a strict Bayesian model, as we consider the statistics of PDs rather than the underlying datasets used to create them; however, our paradigm incorporates prior knowledge and observed data summaries to create posterior distributions, analogous to the notion of substitution likelihood in [Jeffreys, 1961]. Indeed, the idea of utilizing topological summaries of point clouds in place of the actual point clouds proves to be a powerful tool with applications in wide-ranging fields. This process incorporates topological descriptors of point clouds, which simultaneously decipher essential shape peculiarities and avoid unnecessarily complex geometric features.
We derive closed forms of the posterior for realistic implementation, using Gaussian mixtures for the prior intensity and binomials for the prior cardinality. A detailed example showcases the posterior intensities and cardinalities for various interesting instances created by varying parameters within the model. This example exhibits our method's ability to recover the underlying PD. Thus, the Bayesian inference developed here opens up new avenues for machine learning algorithms and data analysis techniques to be applied directly to the space of PDs. Indeed, we derive a classification algorithm and successfully apply it to filament network data, while we compare our method with other TDA and machine learning approaches successfully.

Probability Generating Functional
To calculate the posterior distributions for the Bayesian analysis, the probability generating functional (PGFL) is used. The PGFL is a point process analogue of the probability generating function (PGF) of random variables. Intuitively, the point process can be characterized by the functional derivatives of the PGFL ( [Moyal, 1962]).
Definition 6.2. Let Ψ be a finite PP on X and H be the Banach space of all bounded measurable complex valued functions ζ on X. For a symmetric function, ζ(x) = ζ(x 1 ) · · · ζ(x n ) and x = (x 1 , · · · , x n ) ∈ X, the PGFL of Ψ is given by The first expression shows the analogy of the PGFL with the PGF, as it is the expectation of the product n j=1 ζ(x j ). Hence, if ζ(x i ) = x, a constant real non-negative number for all x i , then G[ζ] takes the form of a PGF g N (x) = ∞ n=0 p N (n)x n , where p N (n) is the probability distribution of a random N ∈ N 0 = {0, 1, 2, · · · }.
Remark 2. For an i.i.d. cluster process Ψ the PGFL has the form ( [Daley and Vere-Jones, 1988]): where g N is the PGF of the cardinality N , ζ has the same form as in Def. 6.2, and f is the probability density discussed after Def. 2.8 in the main paper.
Next, we define the PGFL for bivariate and conditional point processes as they will enable us to formulate necessary measures for the Bayesian framework. We consider the bivariate point process (Ψ, Ψ M ) on the product space (X × M, X × M), where X and M are Polish spaces, and X and M are their Borel σ-algebras respectively. For a symmetric measurable complex valued function η on M, the variate PGFL will be the expectation of the product n j=1 ζ(x j ) k i=1 η(m i ). Consequently, we obtain For ease of notation we write dm = dm 1 . . . dm k and dx = dx 1 . . . dx n . The marked PP (Ψ, Ψ M ) as defined in Def. 2.9 in the main paper is a bivariate PP which is composed of bijections between points of X and M. So, the process has a Janossy measure J D i X of the i.i.d. cluster point process D X , we have intensity λ D X = 1 m m i=1 λ D X i and cardinality ρ D X = 1 m m i=1 ρ D X i . Hence without loss of generality, So it is sufficient to compute λ D X i |D Y i and ρ D X i |D Y i for fixed i. From Eqn. (3) we have, The second expression is achieved by using the PGFL with respect to J D Y i |D X K i obtained by Eqn. (4). Now, to understand the conditional PP D Y i |D X we need to consider the augmented space W = W ∪ {∆} where ∆ is a dummy set that will be used for labeling points in D Y U ( [Maroulas et al., 2020]). Therefore the random set H = {(x, y) ∈ (D X O , D Y O )}∪{(∆, y) | y ∈ D Y U } is a marked i.i.d. cluster PP on W × W. The independence condition in Def. 2.9 for marks in W thus leads to G[η|D X ] = G[η|x 1 ] · · · G[η|x n ] G[η|∆]. As D Y U is an i.i.d. cluster PP and has no association with D X , from Eqn. (2) we get G[η|∆] = S(f D Y U [η]), where S is the PGF of the cardinality distribution of D Y U . To be consistent with the probability α(x) defined earlier, our Bayesian model deals with two scenarios: either a feature x will not appear in D Y i with probability (1 − α(x)) or each D Y i contains draws from (y|x) associated to a single sample x of D X with probability α(x). Also, by using the fact that Janossy densities j 1 (x) = (x|y i ) and j n = 0 for n = 1 and using the linearity of the integral, we get G[η|x j ] = 1 − α(x j ) + α(x j ) M η(y) (y|x j )dy. Hence Eqn. (11) leads to G[η, ζ] = S(f D Y U [η])L(λ D X [ζ(1 − α + α g )]).
Here, we denote g (x j ) = M η(y) (y|x j )dy and λ D X [ζ] = X ζ(x)λ D X (x)dx for simplicity of notation. Also, L is the PGF associated to the PGFL G[ζ(1 − α + α g )]. Notice that we have the PGFL G as a product of two PGFs. This format helps us to find the functional derivatives in an efficient way so that we obtain the PGFL of the conditional PP D X |D Y i as in Eqn. (9). Hence, by using linearity of integral and chain rule of functional derivatives (Eqn. (7)), we obtain For simplifying notation we denote by e the elementary symmetric function. If ζ ≡ z is a constant function, then we obtain the PGF of the posterior cardinality distribution as We derive the cardinality expression first by utilizing the well-known property of the PGF that the probability distribution can be recovered by means of derivatives and by applying the product rule in (7) for acquiring the n-th derivative as As S and L are the PGFs of the number of points in D Y U and D X respectively, by utilizing wellknown properties of the PGF we can write where P is the permutation coefficient. Elementary computation thus leads Eqn. (15) to the desired form of posterior cardinality as in Eqn.
(2). As is proved in [Moyal, 1962], the intensity density λ of a PP can be obtained by differentiating the corresponding probability generating functional G, i.e., λ(x) = δG [1; x], where δG [1; x] is the functional derivative in the direction of x (see Def. 6.3). Generally speaking, one obtains the intensity for a general PP through λ(x) = lim h→1 δG[h; x], but the preceding identity suffices for our purposes since we only consider PPs for which Eqn. (13) is defined for all bounded h. Hence, we find the required derivative of Eqn. (13) as Similarly, using Eqn. (16) gives the format of the posterior intensity λ D X |D Y 1:m and this completes the proof.