Hochschild homology, and a persistent approach via connectivity digraphs

We introduce a persistent Hochschild homology framework for directed graphs. Hochschild homology groups of (path algebras of) directed graphs vanish in degree $i\geq 2$. To extend them to higher degrees, we introduce the notion of connectivity digraphs and analyse two main examples; the first, arising from Atkin's $q$-connectivity, and the second, here called $n$-path digraphs, generalising the classical notion of line graphs. Based on a categorical setting for persistent homology, we propose a stable pipeline for computing persistent Hochschild homology groups. This pipeline is also amenable to other homology theories; for this reason, we complement our work with a survey on homology theories of digraphs.


Introduction
Directed graphs, or digraphs, organise a multitude of mathematical objects and physical phenomena, in particular where an inherent directionality plays a considerable rôle.Prominent examples motivating this paper come from structural brain networks, i.e., (directed) networks modelling the synaptic connectivity in the brain; here, the pre-and post-synaptic signal propagation induces directions between neurons.This type of application in neuroscience has particularly ignited the interest in applied topology and topological data analysis (TDA), together with the subsequent development of computational tools [54,61].For an application in classifying network (brain) dynamics, see the recent work [23].One of the main techniques adopted in TDA is persistent homology (PH), which has been employed not just in neuroscience and neuroimaging [16,20,48,50,51,67], but also in fields like endoscopy analysis [28], angiography [6], pulmonary diseases [10], finance [31], fingerprint classification [30], image classification [25], to name a few.Based on a robust mathematical theory and being stable with respect to small noise perturbations [22], persistent homology has provided a novel qualitative and quantitative way to study complex data (in the form of either point clouds, time series or connectivity networks) via the associated (directed) graphs.
In concrete applications, the classical persistence homology pipeline takes as input a filtered family of undirected graphs; in order to extend it to the directed framework, one needs suitable (co-)homology theories of directed graphs.In a primal approach, the pipeline would then be the following: one starts by constructing suitable simplicial complexes (the directed flag complex [56,61]) associated to the digraphs, computes (most often homological) features of the simplicial complexes, and finally uses these, or derived features, for subsequent network analysis.The implementation of the described pipeline is usually possible, thanks to existing softwares and algorithms allowing to carry on the homological computations; e.g., the software Flagser [54] has a persistence implementation with directed flag complexes (when the edges of the graphs are assigned some weighting).We review the construction of the directed flag complex in Section 2.Even if the directed flag complexes are constructed using coherently oriented cliques in the digraphs, the computation of the associated homology groups reduces to simplicial homology.This has the effect that the associated topological invariants forget some information carried in the directions of the edges; to see it, we present two basic homotopy equivalent spaces induced by different digraphs.Besides the directed flag complex approach, many other homology theories of digraphs have been used.In Section 2 we review some of them.Among others, we give a review of the recently developed path homology [38] -see Section 2.2 and [17] for a comparison with the directed flag complex of random graphs.We note here that the pitfall of path homology is that, beyond dimension 2, path homology groups are difficult to compute.
A third remarkable approach uses Hochschild homology (HH), a homology theory of associative algebras introduced by Hochschild [44] cf.Section 2.3.There is a standard and coherent way of associating to a directed graph an associative algebra, called the path algebra.Then, application of Hochschild homology to path algebras of digraphs provides additional homological invariants.However, in Section 3.2, we show that all the described approaches cannot tell apart further simple examples of different digraphs.This then begs the question about what an appropriate homology theory for digraphs should be, and how to incorporate the directed combinatorics in the theory and applications.The aim of this paper is to show that Hochschild homology of path algebras is able to capture part of the combinatorial information.Path algebras, in fact, naturally arise from the combinatorics of the directed paths in the digraphs, and Hochschild homology is able to coherently capture such information.If the digraph has an oriented cycle, the path algebra is automatically infinite-dimensional.In the case of acyclic digraphs instead, the dimensions of the Hochschild homology groups, seen as vector spaces over a base field, can be laid down in a simple combinatorial formula.However, also the Hochschild homology of digraphs has some shortcomings.First, the digraph is assumed to be acyclic, which rarely is the case in real networks.Second, the Hochschild homology groups vanish beyond degree 1, and one retrieves no information beyond dimension 1 of the digraph itself.
To remedy the issues raised above, we propose in this paper the following approach: a persistent homology framework applied to a filtered family of digraphs taking into account higher orders of intrinsic connectivities.The main points of the paper follow the scheme below: From digraphs to connectivity digraphs.With the twofold aim of providing and extending persistent homology pipelines to higher degrees, and of capturing combinatorial information intrinsic in the directed structure of the digraphs, in this work we introduce the notion of a connectivity digraph -cf.Definition 3.3.For a digraph G, a connectivity graph associated to G is a graph, possibly directed, constructed by using the combinatorics of G.For example, connectivity graphs can be described by edges, paths, sets of edges, or more generally cliques, together with their incidence relations.In Section 3 we present two new connectivity structures for simplices.The directed q-analysis extended from the work of Atkin [2] connects simplices σ and τ, both of dimension ≥ q, if the is a q-dimensional face α such that d i (σ) ← α → d j (τ), where d i is an extended face map (see Definition 3.9).The n-path digraph connects n-simplices σ and τ if there is an (n − 1)-simplex α such that d i (σ) = α = d j (τ) with i < j, where d i is the standard face map.Both the above connectivity relations define connectivity digraphs.
Hochschild homology for acyclic graphs.Application of homologies (simplicial homology, path homology, Hochschild homology) to connectivity digraphs extends the family of homological invariants of digraphs to each n ∈ N. In particular, applying Hochschild homology on connectivity digraphs enables us to admit Hochschild homology groups from degree 1 to n, where n now refers to the dimension of simplices appearing in our connectivity digraphs.A convenient computation of the dimension of Hochschild homology only applies when restricting to acyclic digraphs.In general, this fails to be true, also for our connectivity digraphs.To be able to compute Hochschild-related invariants for general digraphs, we define the Hochschild characteristic (Definition 2.29) which adds to the acyclic formula the component coming from the vector space generated by the simple cycles in the digraph.
Stable persistent Hochschild homology.In the case of acyclic digraphs the transformation from the category of digraphs, through connectivity structures, into finite Hochschild homology vector spaces is functorial.Then, for a given filtration of digraphs, one can apply the usual pipeline to get persistent Hochschild homology groups of digraphs.The categorical framework developed by Bergomi and Vertechi [8] provides immediately the needed abstract stability theorems.For a filtration F in the category Digraph 0 of digraphs without oriented cycles, the persistent Hochschild pipeline can be illustrated as the following composition of functors: where C is any functorial construction of connectivity digraphs -cf.Section 4.1 and 4.2.
Computational HH and K-theory into applied topology toolbox.As far as the authors know, this work is the first in bringing invariants from Hochschild homology into the realm of TDA, to be used as featurisations of common data objects.Natural extensions would be using cyclic homology theories and K-theoretic methods.Previous work has focused on computing the K-theory of the category of zig-zag persistence modules [33].In a subsequent work we plan to investigate the extension in this K-theoretic directions as well.
We hope with this work to raise the interest of current developments in applied topology and persistence to focus more on trying to bring unexplored tools from theoretical algebraic topology and K-theory into the applied setting.Based on our work, we believe that a following recipe is useful.First, a fruitful combination of data and invariants needs to be found.For us, this was the combinatorics of digraphs and the path algebras they generate.Standard simplicial persistence is very much made for finite metric spaces, which we feel is not a natural pairing for digraphs as combinatorial objects without any regard on metric issues.Second, the invariant needs to be computable.In our case, this comes from the known combinatorial formula for the dimensions of Hochschild homologies.Going further, one needs to focus algebraic derivations on proving similar results when these are not yet existing.Third, the main lesson from persistence theory are the stability results.Any new tool in the applied topology toolbox should take into account that small variations in the input data need to be bounded at the level of algebraic invariants and featurisations.As said above, our pipeline satisfies certain stability guarantees.
We finish with some perspective on the apparent simplicity of digraphs.Even though graphs and digraphs are simple objects to describe and many concepts in graph theory are rather easy and intuitive to handle, it is the immense possibilities of putting together vertices and edges that gives rise to the actual complexity of graphs/digraphs.One then needs to find an appropriate balance between the objects described and complexity and information content of the invariants attached to them.As a fourth point in the recipe of the previous paragraph, in applications some level of interpretability of the invariants is desired.In standard persistence it is easy to give a geometric meaning to the generators of a barcode.In the case of Hochschild homology it is still maintainable to understand how the information of directed paths is captured.The question of interpretability is of course conditioned on the application domain.For example, in medical applications the outcomes of TDA analyses should have some meaning to, say, prognosis and diagnosis.In machine learning applications topological/algebraic invariants can be accepted more as a black box featurisations.

Organisation of the paper
We start in Section 1 with recalling basic notions about directed graphs, simplicial complexes and homology theory.In Section 2, we give an overview of the most employed homology theories of directed graphs: the homology of the directed flag complexes, path homology, Hochschild homology, and homology of categories.In Section 3, we introduce the connectivity digraphs.We analyse the q-connectivity digraphs first, and then the n-path digraphs.Connectivity digraphs are then used in Section 4 for the Hochschild homology pipeline.

Conventions
Calligraphic font, as G, is used to denote finite graphs (both directed and undirected).All base rings are assumed to be unital and commutative, and algebras are assumed to be unital and associative.Unless otherwise stated, R denotes a ring, K is an algebraically closed field, A is a unital associative R-algebra, V is a vector space over K, and all tensor products ⊗ are assumed to be over the base ring R or base field K. General references for graph theory, category theory, and algebraic topology are [66], [55], and [43], respectively.

Graphs and complexes
In this section we review and fix some basic notions related to graphs and simplicial complexes, needed in the follow-up.

The category of digraphs
The relation E is the set of edges between vertices and we denote the edges by pairs {v, w}.We are interested in graphs with oriented edges: The subset E is the set of directed edges and we denote edges by ordered pairs (v, w).
In this work, unless otherwise specified, graphs and digraphs will always be finite, hence the sets V and E are finite.Note that the definition above defines simple (di)graphs without loops: there are no edges of the form {v, v} nor (v, v) and there is only one edge between any pair of vertices.In the case of digraphs, edges are unique ordered pairs (v, w), and we allow reciprocal edges (v, w) and (w, v) in E. We use the same symbol G for denoting both an (undirected) graph and a digraph.In the rest of the paper we will mainly deal with digraphs, and we will always make clear whether we are referring to a graph or a directed graph.Definition 1.2.A graph is complete if for every pair of vertices v and w there is an edge {v, w}.A digraph is complete if for every pair of vertices v and w there are both edges (v, w) and (w, v).
Directed graphs come equipped with source and target maps s, t : E → V.For an edge e = (v, w), the function s maps e to its source, s(e) = v, and t to its target, t(e) = w.Sometimes, when we want to specify the source and target maps, we denote a digraph as G = (V, E, s, t).
Graphs and digraphs have natural notions of morphisms between them; we spell it out in the case of digraphs.
Observe that, by Definition 1.3, a morphism of digraphs sends directed edges to directed edges and it does not allow to collapse them.One can also consider functions φ : V 1 → V 2 on the vertices such that either φ(v) = φ(w) or (φ(v), φ(w)) ∈ E 2 ; we refer to these maps as maps of digraphs.Finite digraphs and edge preserving morphisms of digraphs form a category that we denote by Digraph.
Remark 1.4.A morphism of digraphs from G 1 to G 2 sends complete subgraphs of G 1 to complete subgraphs of G 2 , hence cliques to cliques.Indeed, otherwise a morphism would collapse at least one of the edges in the clique, which is not allowed.
One can consider also more restrictive morphisms, namely morphisms of digraphs that are also injective (as functions of vertices).We will refer to these morphisms as regular morphims of digraphs and denote the resulting category of digraphs (possibly with loops) and regular morphisms by RegDigraph.
Remark 1.5.Both the categories Digraph and RegDigraph have an initial object1 ∅, the empty digraph.Note that this is not a terminal object.
An oriented cycle in a directed graph G is an embedding into G of the coherently oriented cyclic digraph C n on n vertices -cf. Figure 1.In the follow-up, we might need to work with categories of digraphs without oriented cycles; we use the following notation: Notation 1.6.We denote by Digraph 0 the subcategory of Digraph consisting of finite directed graphs without oriented cycles.
A standard construction in graph theory is the so called edge graph, or line graph, L(G) of a graph G.This is defined as the graph consisting of all the edges of G as vertices, with connections described by the incidence relations.The construction generalizes to the case of digraphs -see, for instance, [42]: Definition 1.7.The line digraph of a directed graph G = (V, E, s, t) is the directed graph L(G) whose vertices are the edges of G and two vertices p and q in L(G) corresponding to the edges e p = (s(e p ), t(e p )) and e q = (s(e q ), t(e q )) in G are connected by a directed edge (p, q) ∈ E(L(G)) if t(e p ) = s(e q ).
where G 2 has no edges.On the other hand, a morphism of digraphs sends edges to edges and collapsing is not allowed; therefore, either both G 1 and G 2 have no edges -hence, the induced morphism between the associated line digraphs is the trivial morphism ∅ → ∅ -or φ induces a morphism of digraphs L(φ) : L(G 1 ) → L(G 2 ) between the associated (non-empty) line digraphs.It is now straightforward to check that compositions and identities are preserved, hence L is a functor.
We will use a standard procedure for obtaining directed acyclic graphs out of a digraph.
Definition 1.9.A strongly connected component in a digraph G is an induced subgraph G such that for any two vertices x and y in G there are paths x → y and y → x in G .
The strongly connected components are the equivalence classes of the relation of being strongly connected on the vertices of G, i.e. having directed paths between any ordered pair of vertices.The ensuing partition then enables to construct the quotient graph without directed cycles.
Definition 1.10.The condensation c(G) of digraph G has as its vertices the strongly connected components of G. Two vertices X and Y have a directed edge (X, Y) in c(G) if there is an edge (x, y) in G for some x ∈ X and y ∈ Y.
Remark 1.11.The condensation c(G) of a digraph G does not have oriented cycles.
In particular, if G has the structure of a preorder, i.e. a reflexive and transitive relation, the condensation is a canonical way of obtaining its underlying partial order [64,Proposition 8.13].Observe that taking the condensation of a digraph is not functorial; in fact, it may lead to maps G → * , where * is the one-point graph.However, in the theory of Alexandroff and finite topological spaces preorders and partial orders are in bijection with topological spaces and spaces with T 0 separation, respectively.In this context, the condensation is a homotopy equivalence [4].

Simplicial complexes and homology theories
We recall here the definition of simplicial complexes; Definition 1.12.An (abstract) simplicial complex on a vertex set V is a collection K of non-empty finite subsets σ ⊆ V that is closed under taking non-empty subsets: if σ ∈ K and τ ⊆ σ is non-empty then τ ∈ K.The subsets are called simplices of K.
The following list records notations related to simplices and simplicial complexes used in this paper.

Notation
Definition σ ∈ K σ is a simplex in a simplicial complex K. K q the set of simplices of K with dimension greater than or equal to q. Vert(K) or V(K), Vert(σ) The sets of vertices of K and σ, respectively.
The dimension of K, the dimension of its highest dimensional simplex.τ ⊆ σ, τ → σ Face of σ.Faces are simplices.We use the convention that every simplex is a face of itself.Proper face has dimension strictly less than the dimension of the simplex.
Analogously to morphisms of graphs, we can define morphisms of simplicial complexes: (Abstract) simplicial complexes and simplicial maps form the category of simplicial complexes, that we denote by SCpx.In this work we focus on homological invariants of directed graphs, and more precisely, on homology groups of digraphs.Homology groups are topological invariants of simplicial complexes.We assume that the reader is familiar with homology theories and we refer to [43,57] for comprehensive introductions.For setting the notations we briefly sketch here the main definition.We fix a commutative ring R.
Chain complexes and morphisms of chain complexes over R form a category Ch(R), or more concisely Ch.For a simplicial complex K and a commutative ring R, there is a standard way to construct a chain complex (C, ∂) by considering, for each n ∈ N, the free R-module generated by the n-simplices of K.The construction gives a functor from the category SCpx of simpicial complexes to the category Ch.Furthermore, for a chain complex (C, ∂), the degree n homology H n (C) of (C, ∂) is defined as the quotient If we want to indicate the coefficients R over which we are computing homology we write H n (C; R).
The construction gives functors from the category of chain complexes Ch to the category Mod R of R-modules; hence, by composition, funtors from the category SCpx to Mod R .In the next section we briefly recall how to construct, starting with a digraph, suitable simplicial complexes (flag complexes or path complexes) and homology groups of digraphs.

Homology theories of digraphs
In this section we survey some of the most prominent homology theories of directed graphs.We start in Section 2.1 by recalling the definition of flag complexes and associated simplicial homology, then in Section 2.2 we review the path complexes and path homology, as introduced by Grigor'yan et al. [38].In Section 2.2, we provide a more detailed account on the Hochschild homology of a digraph, as of more relevance to us.Finally, in Section 2.4, we sketch some variations to these constructions, as has appeared in the literature.

Homology of flag complexes
Homology groups of undirected graphs can be defined as the simplicial homology groups of their underlying topological spaces; in fact, graphs can be seen as 1-dimensional simplicial complexes, and one can directly apply the approach of Section 1.2.We first start with describing this naive approach, and then we see how to generalize it by means of the so-called flag complexes.
For a digraph G = (E, V) and a fixed commutative ring R, consider the chain complex where E R is the free R-module generated by the edges E and V R is the free R-module generated by the vertices V of G.The boundary maps ∂ i are all 0, except for ∂ 1 ; this acts on the basis edges in E R as and is extended to the whole R-module E R by R-linearity.The homology groups of a digraph defined this way are usually referred to as the ordinary homology groups of graphs.
Remark 2.1.The ordinary homology groups of graphs are trivial in every degree i ≥ 2.
The 0-th homology group of G describes the set of connected components.The 1-st homology group is isomorphic to the kernel of the only non-trivial map ∂ 1 , and counts the cycles of G; its rank can be entirely described in terms of numbers of vertices, edges and connected components of the digraph G -see for instance [26,Theorem 1.9.6].A prominent approach to generate higher dimensional homology groups is to construct, out of a graph G, the so-called flag (also known as clique) complexes [1,18,45]; these provide natural invariants of graphs and have been generalized to digraphs [56,61], as we now recall.
We first need to introduce the ordered simplicial complexes.A set S, endowed with a linear order of its elements, will be called an ordered set.Definition 2.2.An ordered simplicial complex Σ on a vertex set V is a non-empty family of finite ordered subsets σ ⊆ V with the property that, if σ belongs to Σ then every ordered subset τ of σ (ordered with the natural order induced by σ) belongs to Σ.
When dealing with directed graphs, we need ordered cliques (as opposed to unordered cliques -cf.Definition 1.2.Definition 2.3.An ordered k-clique of a directed graph G is a totally ordered k-tuple (v 1 , ..., v k ) of vertices of G with the property that, for every i < j, the pair (v i , v j ) is an ordered edge of G.
We can now extend the construction of flag complexes to directed graphs.Definition 2.4.Let G = (V, E) be a directed graph.The directed flag complex of G is the ordered simplicial complex dFl(G) on V whose k-simplices are all the ordered (k + 1)-cliques of G.
We can again construct a chain complex.Let C n (dFl(G); R) be the R-module freely generated by all the n-simplices of dFl(G).There are well-defined face maps for j = 0, . . ., n.The j-th face map d j , as an operator applied to the simplex [v 0 , . . ., v n ] in C n (dFl(G); R) is defined by cancelling the j-th vertex: Face maps uniquely identify the faces of a simplex.In fact, let σ = [v 0 , . . ., v n ] be an n-simplex of the flag complex dFl(G); then, the faces d j [v 0 , . . ., v n ] are (n − 1)-simplices of dFl(G).Each face map d j uniquely identifies the j-th (n − 1)-face of σ as the face opposite to the vertex v j .For example, if [v 0 , v 1 , v 2 ] is an ordered 3-clique in a digraph G, represented below as an ordered simplex σ of the associated directed flag complex dFl(G), Remark 2.5.The construction of flag complexes can be promoted to a functor from directed graphs to ordered simplicial complexes.Namely, if φ : G 1 → G 2 is a morphism of digraphs, then it sends ordered cliques of G 1 to ordered cliques of G 2 .This induces a simplicial morphism The (simplicial) homology groups with coefficients in R of a directed graph G are defined as the homology groups of the associated directed flag complex, and for each n ∈ N it can be seen as a composition of functors

Digraph
where Mod R is the category of R-modules.
Example 2.6.Fix as base ring the ring of integers Z.Consider the square-shaped digraph G on the vertices 0, 1, 2, 3 and set of edges described as in the following picture: As we only have ordered 2-cliques, the associated flag complex is the square itself, i.e. an ordered simplicial complex with four vertices and four edges.It has homology groups By adding to G also the edge (0, 3), we get the ordered 3-cliques (0, 1, 3) and (0, 2, 3); the corresponding flag complex is then the full square: The first homology group H 1 (dFl(G); Z) is now 0, whereas the 0-th homology group describing the number of connected components is again isomorphic to Z.
Remark 2.7.From Example 2.6 we see that some information from the orientations of the edges is lost.In fact, even though the simplices are constructed from the ordered cliques, the homology groups are defined as the homology groups of the (geometric realization of the) directed flag complex, which forgets some information about the directionalities.As an additional illustrative example, consider the digraphs in Figure 2.They have isomorphic ordinary homology groups, as well as isomorphic homology groups of the associated directed flag complexes.Therefore, for constructing homology theories of digraphs more sensitive to the directionalities, one might need to incorporate the directed combinatorics in the definition of the homology groups.This is partially achieved with the homology theories recalled in the next subsections.

Path homology
Path homology can be considered as a homology theory of directed graphs, explicitly constructed from the edges of the digraphs.It was introduced in [36,38], and it has nowadays many developments.We recall its definition, following the first works on the subject.Definition 2.8.Let V be a finite set.For p ∈ N, an elementary p-path on V is an ordered sequence i 0 . . .i p of p + 1 elements of V.
Let K be a field (this assumption may be relaxed, but for the sake of reference, we use here the same assumptions as in [36]).The vector space over K consisting of formal linear combinations of elementary p-paths is denoted by Λ p (V), or simply by Λ p .The basis element of Λ p (V) corresponding to the elementary p-path i 0 . . .i p is denoted by e i 0 ...i p and the elements of Λ p (V) are called paths.The linear maps ∂(e i 0 ...i p ) := ∑ p q=0 (−1) q e i 0 ... i q ...i p define the boundary operator Definition 2.9.[38, Definition 3.1] A path complex over V is a non-empty collection P of elementary paths on V with the property that if i 0 . . .i p belongs to P, then also i 0 . . .i p−1 and i 1 . . .i p belong to P. The paths in P are called allowed.
For a path complex P on a set V, the vector space A p (P) spanned by all the allowed p-paths from P is a subspace of Λ p .Define the subspace Ω p (P) of A p (P) as The elements of Ω p (P) are called the ∂-invariant paths of P. Then the boundary operator ∂ restricts to a boundary operator on Ω p (P) [38,Section 3.2], and provides a chain complex (Ω n (P), ∂).
Definition 2.10.The path homology groups PH n (P) of the path complex P are the homology groups of the chain complex (Ω n (P), ∂).
To every directed graph there is an associated path complex [38,Ex. 3.3] The set of allowed p-paths on G is denoted by P p (G); note that P 0 (G) = V, and P 1 (G) = E.Then, the union P(G) := n P n (G) is a path complex.In particular, if G is a digraph, then the path homology of G is defined as the path homology of the path complex P(G), after restricting to the ∂-invariant paths.Remark 2.11.It has been shown that path homology satisfies nice functorial properties: for a morphism of digraphs f : between the associated path homology groups [37,Theorem 2.10].Furthermore, it has been shown that path homology satisfies Künneth formulas [40] and analogous properties to the classical Eilenberg-Steenrod axioms [34].
The following example illustrates a computation of the path homology groups of the same digraph as in Example 2.6.
Example 2.12.We return to the the square-shaped digraph G = (V, E) on the vertices 0, 1, 2, 3 introduced in Example 2.6.The path complex P(G) associated to G is the complex with elementary allowed paths as depicted below: All the other P n are empty.As the edge (0, 3) does not belong to G, the paths e 013 and e 023 are not ∂-invariant.However, the linear combination e 013 − e 023 would be, as The associated path homology of G is then PH 0 (P(G)) ∼ = K and it is 0 in higher dimensions.This can be shown by direct computation from the chain complex (Ω n (P), ∂), or by using the fact that the square digraph is contractible [37,Example 3.13].Observe that if we add the edge (0, 3) to G the spaces Ω 1 and Ω 2 become Ω 1 = e 01 , e 02 , e 13 , e 23 , e 03 and Ω 2 = e 013 , e 023 , but the path homology groups do not change.
Despite being a very interesting theory, path homology is not easily computable in higher degrees.As far as the authors know, there is no efficient algorithm for computing path homology groups in degree i ≥ 2; for an algorithm in degree 1, see for instance [24].

Hochschild homology of path algebras
Hochschild (co-)homology, introduced by Hochschild [44], is a natural invariant of associative, not necessarily commutative, unital algebras.An investigation of this homology theory is beyond the purposes of this work, and we refer to [53] for a general and comprehensive overview on the subject.To each digraph G, we associate an algebra RG, called the path algebra -see Definition 2.20.The path algebra is associative and, for finite digraphs, also unital.Therefore, Hochschild homology groups of RG give (algebraic) invariants of digraphs.Goal of this section is to review some properties of Hochschild (co-)homology, and to introduce a new characteristic of digraphs (Definition 2.29).

Hochschild homology
We first recall the definition of Hochschild homology, following [53, Section 1.1].For a commutative ring R, let A be an associative unital R-algebra; for example, A can be a polynomial algebra over R. For a bimodule2 M over A, let C n (A, M) be the R-module C n (A, M) := M ⊗ A ⊗n defined as the tensor product of M and n copies of A (all the tensor products being over R).The boundary operator, classically denoted by b, is the R-linear map b : In the formula, for simplicity of notation, we have dropped the tensor products.The map b is a boundary operator [53, Lemma 1.1.2]and the pair (C * (A, M), b) is a chain complex, called the Hochschild complex.Definition 2.13.The Hochschild homology groups HH * (A, M) of an associative unital algebra A with coefficients in a bimodule M are the homology groups of the Hochschild complex.
When M is the bimodule A itself, we use a simpler notation: Notation 2.14.The Hochschild homology groups of an associative unital algebra A with coefficients in A are denoted by HH * (A).
For illustration, we provide some elementary computations; for further details see [53].
Example 2.15.Let M = A = R be a commutative ring.Then, we have In fact, as tensor products are computed over R and R ⊗ R R ∼ = R, the chain complex C * (R, R) is a copy of R in each degree, and the boundary operator b is either the identity or the zero map, depending on the parity of n.The computation follows.
Example 2.16.Let M = A be an associative algebra.Then, where [A, A] denotes the commutator submodule generated by all the [a, a ] = aa − a a.In fact, for a ⊗ a ∈ C 1 (A, A), we have b(a ⊗ a ) = aa − a a.In particular, if A is commutative, then we obtain HH 0 (A) ∼ = A, and for A non-commutative HH 0 (A) coincides with its center.
We recall that if A is unital and commutative, then the module of Kähler differentials Ω 1 (A) is the A-module generated by all the formal differentials da, with a ∈ A, which are R-linear, i.e., d(λa + µb) = λda + µdb for all a, b ∈ A and λ, µ ∈ R, and satisfy the additional product condition d(ab) = adb + bda for all a, b ∈ A. Then the first Hochschild homology group of A is isomorphic to Ω 1 (A) over the ring R ([53, Definition 1.1.9& Proposition 1.1.10]).Analogously, in higher degrees, the n-th Hochschild homology HH n (A) of A is related to the module of n-forms ([53, Section 1.3]).
Example 2.17.Let A = K[X] be the polynomial algebra over a field K.As A is a commutative algebra, then HH 0 (A) ∼ = A. The first Hochschild homology group is isomorphic to the ideal (X) of A. In fact, by [53,Proposition 1.1.10]it is isomorphic to the module of Kähler differentials Ω 1 (A), and this latter is generated by X.All its higher Hochschild homology groups are zero.
Remark 2.18.Note that the Hochschild homology groups HH * (A, M) depend on the choice of the ground ring.Non-isomorphic ground rings can lead to different computations -see for example [53,Section 1.1.18].
A dual cohomological theory can be easily derived.In fact, the Hochschild cohomology groups HH * (A, M) of an associative algebra A with coefficients in M can be defined as the homology groups of the cochain complex Hom R (C n (A, M)) = Hom R (A ⊗n , M) -cf.[41,53]. in Hochschild homology by sending the element (m, a 1 , . . ., a n ) ∈ C n (A, M) to the element ( f (m), a 1 , . . ., a n ) ∈ C n (A, M ); the differential b clearly commutes with it and induces the required homomorphism of homology groups.Similarly, if M = A and ϕ : A → A is an R-algebra homomorphism, then ϕ extends to the tensor products giving a map (a 0 , . . ., a n ) → (g(a 0 ), . . ., g(a n )) and providing a morphism of chain complexes C * (A, A) → C * (A , A ); hence, a homomorphism of Hochschild homology groups.
We note here that the functoriality with respect to R-algebra homomorphisms does not extend to Hochschild cohomology -see, for instance, [53, Section 1.5.5].This lack of functoriality is the reason why we will focus on Hochschild homology, rather than cohomology.

Hochschild homology of path algebras
In this subsection we apply Hochschild homology to certain algebras associated to digraphs.All results and proofs provided here are classical, and we claim no originality.For computational purposes, we also restrict to the case in which the base ring R is an (algebraically closed) field K; we can think of K as the field of complex numbers.
Let G = (V, E, s, t) be a (finite) directed graph.By a path in G we mean a sequence γ = (e 1 , . . ., e n ) of composable edges e i in G such that s(e i+1 ) = t(e i ).The number n is the length of the path.For any vertex v of G, we also consider the trivial path e v of length 0 at the vertex v.
Definition 2.20.The path algebra KG associated to the digraph G is the K-vector space with a basis consisting of all possible paths in G, and the multiplication being defined on two basis paths γ = (e 1 , . . ., e n ), γ = (e 1 , . . ., e p ) by the formula γγ = (e 1 , . . ., e n , e 1 , . . ., e p ) if s(e 1 ) = t(e n ) 0 otherwise .
The following lemma is easily derived from the definition: Lemma 2.21.The path algebra KG associated to a digraph G is an associative algebra over K, and has a unit if the digraph is finite.
Proof.Let γ, γ , γ be paths in G.Then, by definition of product of paths, both (γγ )γ and γ(γ γ ) are given as concatenation of paths if they are all compatible, and are both 0 otherwise (by bilinearity).Since the algebra KG is defined as a vector space generated by the possible paths in G, this is enough to show its associativity.
If the digraph G is finite, then the element is a unit.In fact, if γ = (e 1 , . . ., e n ) is a path of G, then e s(e 1 ) γ = γ and γe t(e n ) = γ, where e s(e 1 ) and e t(e n ) are the constant paths at s(e 1 ) and t(e n ), respectively.All the other products with paths of type e v , for v a vertex of G, are zero; hence we have eγ = e s(e 1 ) γ = γ, and γe = γe te n = γ.
The path algebra KG is generated (as an algebra over K) by all the paths of length at most 1, and the unit is the sum of all trivial paths.More precisely, it has the structure of a graded vector space with grading induced by the length of paths [9].Observe that all trivial paths e v , with v ∈ V(G), are idempotents of KG, as (e v ) 2 = e v e v = e v .Furthermore, if v and w are distinct vertices of G, then e v e w = 0.
We will be interested in digraphs without oriented cycles.In fact, we have the following: Proposition 2.22.The path algebra KG is of finite dimension 3 if, and only if, G is finite and has no oriented cycles.
Proof.The path algebra KG is generated by the paths of length at most one, this number being bounded by the number of all vertices and edges of G.
To prove the statement, it is enough to show that the number of paths of G is finite if, and only if, G is finite and has no oriented cycles.Assume first that G is finite without oriented cycles.Then the number of paths of length l in G is bounded by |E(G)| l .If the number of paths of G is infinite, then there is a path of arbitrary large length.In particular, there exists a path γ with length greater than the number of vertices of G.This leads to a contradiction, because there exists a vertex v of G encountered twice by γ, hence an oriented cycle.Conversely, any infinite graph, or any oriented cycle of G, gives infinitely many paths.
We proceed with some elementary examples of path algebras: Example 2.23.The simplest graphs to consider are given by the graph G 0 with a single vertex v, the directed graph G 1 with a vertex v and a loop e at v, and the digraph G 2 with two vertices v 0 , v 1 and a directed edge e 1 = (v 0 , v 1 ) between them.The associated path algebras are given by the base field K, the polynomial ring K[X], and by the ring of upper triangular (2 × 2)matrices.More generally, if I n is the graph illustrated in Figure 3, then the path algebra KI n is isomorphic to the ring of upper triangular (n × n)-matrices.An isomorphism can be described by sending the trivial path e v i to the entry (i, i), and edge (v i , v i+1 ) to the entry (i, i + 1).
Observe that the map assigning to a digraph its path algebra is functorial: Remark 2.24.The assignment G → KG associating the path algebra KG to a digraph G extends to a functor from the category of directed graphs to the category K-Alg of associative K-algebras.
To see this, we first observe that a morphism of digraphs sends distinct vertices to distinct vertices and, for consecutive edges, it preserves sources and targets.Hence, a morphism of digraphs sends paths to paths, induces a K-linear map between the vector spaces, and preserves the composition of paths.As a consequence, the induced map between the associated path algebras uniquely extends by linearity to a K-algebra homomorphism.Hochschild homology of associative path algebras is functorial -see Remark 2.19.Then, the composition describes the Hochschild homology of the path algebra of a (finite) digraph as a functor on the category Digraph with values in the category Vect of vector spaces over K.
Computations of Hochschild (co-)homology groups may be difficult for arbitrary associative algebras, but when A is the path algebra KG of a directed graph, computations are easier and reflect the combinatorial properties of the digraph G. First, it is a standard fact that the path algebra associated to a digraph is a hereditary algebra, i.e., all submodules of its projective modules are projective.In fact, modules over a path algebra have a standard resolution of length 1 [9, Proposition 1.4.1], and as a consequence the Hochschild homology groups HH * (A) of the path algebra A vanish in degree ≥ 2. In degrees 0 and 1, the computation is due to Happel [41] (see also [60,Proposition 4.4]): Theorem 2.25.If G = (V(G), E(G), s, t) is a connected directed graph without oriented cycles and K is an algebraically closed field, then where A = KG is the path algebra of G, n = |V(G)| is the number of vertices of G and e t(e) Ae s(e) is the subspace of A generated by all the possible paths from s(e) to t(e) in G.
In general, for infinite digraphs, or digraphs admitting cycles, this computation can not be used and the first Hochschild homology group is of infinite rank.
Example 2.26.Let G be the digraph with a vertex v and the single directed edge (a loop) (v, v).The path algebra KG is isomorphic to the polynomial algebra K[X].This is a commutative algebra over K, hence by Example 2.17, we get which is not finite over K.
In concrete applications, one avoids the case of digraphs with paths of infinite length by restricting to some special classes of acyclic directed subgraphs.In such restricted context, we observe that Hochschild homology can be seen as a functor with values in the category of (graded) vector spaces of finite dimension: Remark 2.27.Theorem 2.25 implies that, when restricting to digraphs without oriented cycles, the associated Hochschild (co-)homology groups are vector spaces of finite dimension.Let Digraph 0 be the subcategory of Digraph consisting of finite digraphs without oriented cycles and induced morphisms of digraphs.Then, the composition in Eq. ( 4) induces the composition of functors Digraph 0 where now the target category FinVect is the category of finite-dimensional vector spaces over K.

We give a concrete example:
Example 2.28.Let φ : G 1 → G 2 be the regular morphism of digraphs illustrated in Figure 4, and defined by sending v i to the vertex w i , for i = 0, 1, 2. The morphism φ sends paths of G 1 to paths of G 2 of the same length, thus inducing by K-linearity an homomorphism of vector spaces φ * : KG 1 → KG 2 .In terms of basis elements, the trivial path e v i is sent to the trivial path e w i , whereas the basis elements corresponding to the 1-paths (v 0 , v 1 ), (v 0 , v 2 ), and (v 1 , v 2 ) are sent to those of KG 2 corresponding to (w 0 , w 1 ), (w 0 , w 2 ), and (w 1 , w 2 ).The tensor product operations are clearly compatible.As in Remark 2.27, we get morphisms hence induced maps between the Hochschild (co-)chain complexes.By applying the functors Hom(−, KG − ) to the minimal projective resolutions of KG 1 and KG 2 , we get a diagram of short exact sequences (for such a computation, see [41]) where the maps are induced by identification of paths of length 0 (central map) and of the paths (v 0 , v 1 ), (v 0 , v 2 ), (v 1 , v 2 ), and (v 0 , v 1 , v 2 ) with the respective ones in G 2 (rightmost map).Focusing on the first Hochschild homology groups HH 1 (KG 1 ) ∼ = K 2 and HH 1 (KG 2 ) ∼ = K 5 , this roughly describes the functoriality of Hochschild homology by means of the paths in the digraphs; the first Hochschild homology groups being obtained as alternating sums of the vector spaces appearing in the horizontal diagrams of the short exact sequences.
In general, descriptions of the Hochschild homology groups are not easy.In this work, we use the computation of Theorem 2.25 as handleable.In order not to loose the information captured by the number of cycles, we will also consider the following characteristic measure: Definition 2.29.Let G = (V(G), E(G), s, t) be a digraph, and A = KG the path algebra of G over a field k.The Hochschild characteristic of G is defined as dim k e t(e) Ae s(e)

  + C(G)
where n = |V(G)| and C(G) is the number of simple oriented cycles in G, i.e. cycles with only the first and last vertices being equal.
Note that the Hochschild characteristic agrees with the Euler characteristic of the Hochschild chain complex associated to the path algebra kG, if G has no oriented cycles and k is algebraically closed.The definition of Hochschild characteristic extends then to any field.We conclude with an illustrative example.
Example 2.30.We apply the Hochschild homology computation of Theorem 2.25 to the square digraph G of Example 2.6 and Example 2.12.The Hochschild homology group in degree 0 is isomorphic to K, whereas the dimension of HH 1 (KG) is 1.The computation in degree 1 changes if we add to G the edge (0, 3), giving dim K HH 1 (KG) = 4.

A view towards other approaches
We conclude this survey section by reviewing some generalizations and other approaches to (co-)homology theories of digraphs; the literature on the subject is very rich, and this survey is far from being exhaustive.
• A generalization of the homology of directed graphs as the homology of the associated flag complex (see Section 2.1) is given by the homology of the so-called flag tournaplex [32].
In fact, when a directed graph has no reciprocal edges the associated flag tournaplex is isomorphic to the flag complex of the underlying undirected graph.The flag tournaplex of a digraph has been employed as a classifier in [32], combined with directionality invariants and persistent homology methods.
• The theory of path homology for digraphs, as developed in [38], has been further extended to ring coefficients [52] and to multigraphs and quivers [39] or to more general path algebras, e.g., to the realm of differential algebras [62].It has also a cohomological counterpart [35].This has also been extended to a persistent path homology approachsee for instance [24].
• Hochschild homology can be endowed with an additional differential of degree 1, usually denoted by B, turning it into a mixed complex [46].The additional differential B leads to the construction of the so-called cyclic homology, and to its variations negative cyclic homology and periodic cyclic homology of algebras -see also [53].Therefore, application of such homology theories to the path algebra of a digraph may lead to other invariants, extending the approach surveyed in Section 2.3.2.
• Ordinary homology groups of digraphs, and the Hochschild homology groups of the associated path algebras, have natural generalizations to the categorical framework.One way to do so is by replacing the path algebra of Definition 2.20 with a suitable (freely generated) category Path(G), called the path category -see also the discussion below.In a similar fashion, instead of constructing the path algebra or the path category, one can associate to a directed graph other mathematical objects, for example the so-called path posets P(G).First introduced by Turner and Wagner [65], the path poset has been recently used to define new combinatorial cohomologies of digraphs [14,15], and that can be generalized to arbitrary monotone properties of graphs [13].This approach seems to be related to other topological/combinatorial invariants of simplicial complexes [12].
• Among other approaches, sheaf homology has been used with some applications to the Max-Flow Min-Cut theorem [49], as well as a directed approach to algebraic topology built upon cohomology of small categories with coefficients in natural systems as in [5] and [27] and in the references therein.
We can illustrate these various approaches in the following (non-commutative) diagram where we synthetically show the construction of homology theories of digraphs as representations of the category DiGraph.Note that path homology does not appear in the picture because it is not yet known if it factors through simplicial complexes/algebras/posets/categories.We wish to spend a few more words on the path category and related homology theories, as these are close to the Hochschild homology of path algebras.The path category Path(G) associated to a directed graph G is the category freely generated by the paths of G.There is a forgetful functor from the category Cat of small categories and functors to the category of quivers (thought of as directed graphs with loops and multiple edges).Such forgetful functor has a left adjoint, the functor sending a quiver to the free category on that quiver (see e.g., [55, Section II.7]).As each directed graph is, in particular, also a quiver, one gets a functor Free : DiGraph → Cat (5) from the category of digraphs to the category of small categories.It is easy to see that Free(G) is in fact the path category Path(G).Then, the functor in (5) allows one to use homology theories of categories for obtaining new invariants of digraphs.The naive idea of directly computing the homology groups of the category Path(G) (with constant coefficients), would not give new information due to the following (see [21,Ex. 4.3]): However, more interesting homology theories arise when considering the homology of categories with coefficients in functors [29,App. 2].In this framework, one considers the homology groups of Path(G) with twisted coefficients in the same spirit as in usual homology of topological spaces but with local coefficients (see also [59,Section 1]).Remarkably, this point of view has been used in node embedding and community detection problems [47].

Connectivity structures and digraphs
As outlined in Section 2, homology theories of digraphs are flexible and versatile tools, able to capture various topological information from the input graphs.However, as we will show with examples in Section 3.2, these homology theories might miss some combinatorial information inherent in the digraph structure.Therefore, with the aim of capturing both the topology and combinatorics of digraphs, in this section we will study some special cases of connectivity digraphs, i.e., digraphs constructed by using some combinatorial information of G.For example, connectivity digraphs can be described by edges, paths, sets of edges, or cliques, together with their incidence relations.
We will focus on two closely related simplicial connectivity approaches and show that they capture the combinatorial information described by edges and ordered cliques in a digraph.The first one, developed by the second author in [63] and briefly recalled in Section 3.3, generalizes the classical q-connectivity analysis [2,3] to the context of ordered simplicial complexes.This construction is based on ordered cliques sharing q-faces respecting a chosen directionality condition.The connectivity digraphs constructed have the additional structure of a preordered set (Definition 3.10).Then in Section 3.4, we investigate the particular case of connectivity digraphs built with ordered cliques and codimension 1 incidence relations.The connectivity digraph structure is induced from a total order of simplicial face maps.This choice is shown to generalize the notion of line digraphs (going from the combinatorics of edges to the combinatorics of higher simplices), giving what we call here the n-path digraphs -cf.Definition 3.15.

Connectivity digraphs
Goal of this subsection is to introduce the concept of connectivity digraphs.For a digraph G, a connectivity digraph associated to G is meant to encapsulate some combinatorial information of G.In order to make it formal, we start with the notion of a connectivity structure.Definition 3.1.A connectivity structure is a triple (G, F, A) consisting of a digraph G, and a nonempty family F of subgraphs of G together with a {0, 1}-valued function A : F × F → {0, 1}.
Note that there are no additional requirements on the map A; roughly, a connectivity structure is a way to encode the connectivity properties of families of subsets of G, all at once.Remark 3.2.For a given connectivity structure (G, F, A) there is an associated well-defined digraph E F G (possibly with self-loops) constructed as follows: the set of vertices of E F G is the family F, and for We can now give the formal definition of connectivity digraphs.

Definition 3.3. A connectivity digraph is the directed graph E F G associated to a connectivity structure (G, F, A).
A morphism of connectivity structures (G, Connectivity structures and morphisms of connectivity structures form a category where compositions are induced by compositions of morphisms of digraphs.It is also easy to see that the map which associates to a connectivity structure (G, F, A) the connectivity digraph E F G is functorial with respect to morphisms of connectivity structures.
The context of connectivity structures is quite general.Different connectivity structures can encode various combinatorial information of digraphs.Our main motivation for introducing connectivity structures is that the associated connectivity digraphs provide domains for the homology theories described in Section 2, and then one can extend the class of digraph invariants.
We remark here that a definition similar to Definition 3.3 has previously appeared in [39,Section 6] in the form of a connectivity multigraph of a CW-complex, and meant to extend Atkin's connectivity graphs (see Section 3.3): the vertices of the multigraph are the n-cells and two vertices are adjacent if the corresponding cells share a face.This graph is given the structure of a directed graph by first numbering all the cells, and then using this enumeration for describing the directions of the edges.Our construction of connectivity digraphs, and our two main examples of simplicial connectivities provided in Section 3.3 and Section 3.4, do not require a predetermined enumeration of the vertices, making the definition of connectivity digraphs more intrinsic.We also give a more immediate recipe for connectivity digraphs; in fact, Definition 3.1 essentially provides the adjacency matrices.

Motivating examples
We start by motivating our combinatorial constructions, provided in Section 3.3 and Section 3.4, with some examples.Specifically we construct non-isomorphic digraphs, such that all the homology theories introduced in Section 2 fail to distinguish them.Then, we will see that the same homology theories, applied to the connectivity digraphs, are able to distinguish themsee Example 3.28 and Example 3.29, proving that encoding the combinatorics is quite helpful.The two digraphs are not isomorphic.For example, the total degree of the vertex 2 in G 1 is 4 with out-degree 1, but there are no vertices of out-degree 1 and total degree 4 in G 2 .First, observe that the directed flag complexes associated to G 1 and G 2 are both contractible.Hence, the associated simplicial homology groups are isomorphic.
In the case of the Hochschild homology of the path algebras, as both graphs are acyclic, we can use Theorem 2.25.This gives us isomorphic K-vector spaces in all degrees (with both dim K HH 1 (KG 1 ) and dim K HH 1 (KG 2 ) equal to 7).
Remarkably, the same homology theories can distinguish the associated line digraphs -the line digraphs having 2 and 1 connected components, respectively -suggesting that the directed combinatorics plays an important role.We give another example: Example 3.5.Consider the following digraphs with reciprocal edges: The associated directed flag complexes in both cases are topologically 2-spheres, hence their homology groups are isomorphic.A computation similar to the one in the previous example shows that the associated path homologies are also isomorphic.The Hochschild homology groups of the path algebras associated to the graphs S 1 and S 2 are also isomorphic (in degree 1 of infinite dimension over K, both digraphs having oriented cycle).
Motivated by these examples, we proceed with investigating two examples of (simplicial) connectivity digraphs.

q-connectivity
Our first connectivity structure is an extension of Atkin's Q-analysis [2] as developed in [63].We briefly summarise this theory as needed for the purposes of this paper, and guide the reader to the previous references for more in-depth expositions.The essential idea in Atkin's work is the generalisation of edge path connectivity of a simplicial complex to sequences of connected simplices through sharing of faces of certain dimension.Definition 3.6.Let K be a simplicial complex.Two simplices σ and τ of K are q-near, if they share a q-face.Two simplices σ and τ of K are q-connected, if there is a sequence of simplices in such that any two consecutive ones are q-near.The sequence of simplices is called a q-connection between σ and τ.
Similarly to the property of being path connected, we say that the complex K is q-connected if any two simplices in K of dimension greater than or equal to q are q-connected.The notion of q-connectivity is an equivalence relation on the set K q of simplices of dimension q and higher, for 0 ≤ q ≤ dim(K).
The aim of Q-analysis is to associate a simplicial complex with its q-connectivity equivalence classes, or its q-connected components.Note that if a simplex σ is maximal in K with respect to inclusion and dim(σ) = q, then σ is q-connected only to itself; hence every maximal q-simplex generates its own equivalence class.For each q the equivalence classes encode the connectivity information of the q-upper skeleton of K.A related notion was introduced in [58] to study community structures in networks.Definition 3.7.Let G be a graph and n ≥ 2 a natural number.Two n-cliques in G are connected if there is a sequence of n-cliques of G such that any two consecutive cliques share n − 1 vertices.A n-clique community of G is a maximal set of pairwise connected n-cliques.
The n-cliques of a graph are in correspondence with the (n − 1)-simplices in the associated flag complex.The n-clique communities are obtained from the Q-analytical information of the flag complex.Note that we can put the n-cliques as vertices of a graph with edges between vertices if the associated cliques share n − 1 vertices.This leads us to define our first connectivity graph.
Definition 3.8.The q-graph of a simplicial complex K has as its vertices the simplices in K q and edges between pairs of q-near simplices.
Standard Q-analysis as outlined above fails to take into account directionality in the case of digraphs and directed flag complexes.Consider the cycle and star digraphs in the figure below.As undirected graphs, or 1-dimensional simplicial complexes, they are indistinguishable by q-connectivity information: both contain one component so they are 0-connected, and the maximal 1-simplices each form their own 1-connected components in both cases.We therefore introduce a refined version of Q-analysis that is sensitive to the directionality of simplices, or directed cliques in directed graphs.We do this by imposing directions through face maps.
Definition 3.9.Let σ be an n-simplex.We denote by d i the face map The face map d i now makes sense in any dimension since it always removes the vertex at position min{i, dim(v)}.The reason to modify the standard face map in this fashion is due to the fact q-connectivity looks at all the simplices of dimension q and higher.Definition 3.10.For an ordered simplicial complex K, let (σ, τ) be an ordered pair of simplices σ ∈ K s and τ ∈ K t , where s, t ≥ q.Let ( d i , d j ) be an ordered pair of the iand j-face maps.Then (σ, τ) is q-near along ( d i , d j ) if either of the following conditions is true: such that any two consecutive ones are q-near along ( d i , d j ).The sequence of simplices is called a q-connection along ( d i , d j ) between σ and τ.We simply write this connection as (σα 1 α 2 . . .α n τ).
We will call the above connection (q, d i , d j )-connection, when the choices of q and directions d i and d j are made, and similarly we say (q, d i , d j )-near.
The directed (q, d i , d j )-connectivity is a preorder on the set of directed cliques K q .By the classical Alexandroff correspondence, preorders and topological spaces are in bijection [4].The (q, d i , d j )-preorders thus endow a directed graph with a collection of new topological spaces.Up to homotopy it is enough to study partial orders obtained by condensing the preorders (Definition 1.10 and the discussion after).The homotopy types of partial orders can then be studied through their order complexes, i.e. taking the nerve.
As our main connectivity digraph stemming from q-connectivity we take the Hasse diagram form of the (q, d i , d j )-connectivity preorder.Definition 3.11.For an ordered simplicial complex K the vertices in the (q, d i , d j )-digraph, or simply q-digraph, are the simplices in K q , and for two vertices σ and τ there is a directed edge (σ, τ) when the pair (σ, τ) is (q, d i , d j )-near.
As an illustrative example we see that our new connectivity digraph can be used to distinguish prior Example 3.5; we refer the reader to [63] for a more detailed investigations of these connectivity digraphs.
The connectivity digraphs are different between the spheres.Passing to condensations and order complexes of the associated (1, d 1 , d 2 )-preorders, the homotopy type of the left sphere is a wedge of circles S 1 ∨ S 1 , while that of the right sphere is S 1 .The q-connectivity therefore assigns the underlying digraphs with new homotopy types that distinguish them.

The n-path digraph
Our second example of connectivity digraphs is given by the n-path digraphs {P G (n) } n∈N .These are defined as the digraphs with the ordered (n + 1)-cliques of G as vertices, and with directed edges given by their incidence relations (see Definition 3.15).The construction is a generalization of the line digraph (Definition 1.7); furthermore, we will show that it can be promoted to an endofunctor on the category of digraphs Digraph -cf.Theorem 3.22.
Let n be a positive natural number and let G be a directed graph.We start by rephrasing the concept of q-graph of Definition 3.8, in the specific case in which the simplicial complex K is the directed flag complex of a digraph G, the simplices have all the same fixed dimension, and the relation is the 1-codimensional q-nearness.Definition 3.13.Let G be a digraph and let dFl(G) be its associated directed flag complex.The n-path graph G (n) associated to G is the graph whose vertices are the n-simplices of dFl(G), and such that two vertices σ and τ are connected by an edge whenever σ and τ share a common (n − 1)-face.
Remark 3.14.Note that Definition 3.13 gives the underlying graph for the n-clique communities (Definition 3.7).The name n-path graph is then justified by the fact that simple paths in G (n) correspond to ordered (n + 1)-cliques of G, consecutively connected by common ordered ncliques.If G is a digraph, then the 1-path graph G (1) associated to G is nothing but the line graph L(G) of the underlying undirected graph associated to G -cf. Definition 1.7.
Let G be a digraph, n be a natural number and dFl(G) be the associated directed flag complex.Based on Definition 3.13, we now define the n-path digraphs as the connectivity digraphs on the set of ordered (n + 1)-cliques with their incidence relations.The digraph structure is induced from the total order on {0, . . ., n} which induces a total order on the associated face maps.Definition 3.15.For n ≥ 1, the n-path digraph P G (n) associated to G is the directed graph with the n-simplices of dFl(G) as vertices.For vertices σ and τ, there is a directed edge (σ, τ) if, and only if, there is an (n − 1)-simplex α of dFl(G) and some i, j ∈ {0, . . ., n} such that d i (σ) = α = d j (τ), with i < j.
When n = 0, we set the 0-th path digraph P G (0) to be the digraph G.
We investigate some properties of the n-path digraphs; first, note that these path digraphs generalize the notion of line digraphs: Proposition 3.16.When n = 1, the 1-path digraph P G (1) is isomorphic to the line digraph L(G) of G.
Proof.When n = 1, the vertices of P G (1) are the edges of G.The face map d 1 applied to an edge e of G, gives the source of e: d 1 (e) = s(e).Analogously, we have the relation d 0 (e) = t(e).Consequently, two edges e and f of G are connected in P G (1)  Proof.For n ≥ 3, if C n is the cyclic digraph on n vertices with all the edges coherently oriented, then the cone Cone(C n ) has 2-simplices based at the edges of C n .For each edge We have seen that, for every m, the m-path digraph can be an oriented cycle.Cycles of ordered n-cliques have a rigid structure, as each subsequent element in the sequence is determined by the preceding one, and by the face maps: Remark 3.19.Let σ and σ be two n-simplices of dFl(G), and assume d i (σ) = d j (σ ) for i < j, and n > 0. If σ = [v 0 , . . ., v n ], denote by σ[h] the h-entry v h of σ.Then we have Proof.We proceed by contradiction.Assume P G (n) has an oriented cycle γ given by n-simplices set Hom Digraph (G 1 , G 2 ) of morphisms of digraphs between G 1 and G 2 is also empty.By Remark 2.5 we also have an induced function between the sets of ordered (n + 1)-cliques of G 1 and G 2 , that preserves the relative order of the faces.This function may not be surjective (there might be cliques that are not images of any clique in G 1 ) nor injective (as it may send different cliques to the same one).For a morphism of digraphs φ : G 1 → G 2 , we have gotten a function P (n) (φ) between the sets of vertices of the associated n-path digraphs.We now want to promote it to a morphism of n-path digraphs.To this end, let c, c be two ordered (n + 1)-cliques of G 1 , and let σ c and σ c be the associated n-simplices in dFl(G 1 ).It may happen that P (n) (φ) sends both σ c and σ c to the same simplex of dFl(G 2 ).However, observe that if σ c and σ c share an (n − 1)-face τ, and are sent to the same n-simplex of dFl(G 2 ), then the ordered (n + 1)-cliques c, c share the face τ such that there exists an index i with d i (σ c ) = d i (σ c ) = τ (as the linear ordering should be preserved).Therefore, if σ c and σ c are collapsed to the same vertex of P G (n) 2 , then σ c and σ c represent two non-adjacent vertices of P G (n) 1 .Furthermore, the relative incidence relations are preserved, and the morphism of digraphs φ : G 1 → G 2 induces a function P (n) (φ) such that (P (n) To conclude, it is now easy to see that P (n) of the identity is the identity and that, if φ 1 and φ 2 are morphisms of digraphs, then P (n) (φ 1 • φ 2 ) = P (n) (φ 1 ) • P (n) (φ 2 ).This shows that P (n) is an endofunctor of the category Digraph.
By Proposition 3.20, we get also the functoriality when restricting to acyclic digraphs: Proposition 3.23.The funtor P (n) restricts to a functor DiGraph 0 → DiGraph 0 on the category of finite digraphs without oriented cycles.Remark 3.24.The idea behind Definition 3.15 corresponds to the intuition that flows in a directed graph follow the direction of the edges, from the source to the target.As we have remarked in Lemma 3.16, the source and target of a directed edge are given by the face maps d 1 and d 0 , respectively.The condition i < j in the construction of the path digraph follows and generalizes this principle to the higher simplices as well.This condition can be relaxed to i ≤ j, which has the effect that the path digraphs might have reciprocal edges, and therefore oriented cycles.
As described in Section 2.1, one of the possible approaches to an homology theory of digraphs is given by the ordinary homology of the associated directed flag complexes; recall that this is constructed by using the set of ordered cliques in a digraph.When applied to 1-path digraphs, we have the following consequence: Remark 3.25.Let G be a digraph without oriented cycles.Then, the directed flag complex dFl(P G (1) (G)) = dFl(L(G)) of the 1-path digraph has simplices of dimension at most 1.
The above remark is not true for n-path digraphs.For example, it is easy to see that the 2-path digraphs may contain 3-cliques, and as a consequence the associated directed flag complexes can possibly be of dimension at least 2: Then, G contains three ordered cliques (corresponding to the simplices [0, 1, 2], [1,2,3] and [1,4,2].The boundary relations show that the associated 2-path digraph is the ordered clique on three vertices, and the associated directed flag complex is a 2-simplex. In the case of q-connectivity the homotopy types of the connectivity digraphs can be studied through the order complex construction, recall Example 3.12.Analogously, it is then natural to ask what is the dimension of the directed flag complex of an n-path digraph, and what is its homotopy type: Question 3.27.For a given digraph G, what is the homotopy type of the directed flag complex associated to P G (n) , or to the relaxed n-path digraph of Remark 3.24?What are the distributions of the associated Betti numbers like?
A partial answer to this is given in [63] when G is the 1-skeleton of so called pseudomanifold; for example, the Cone(C n ) in Figure 5  1 is the following: • •

• •
with two connected components.Again, all the homology theories described in Section 2 can now distinguish the two digraphs representing 2-spheres.

Persistent Hochschild homology of digraphs
The goal of this section is to introduce a persistent homology framework for Hochschild homology of directed graphs, using connectivity digraphs as an intermediate step.The reason why we restrict our analysis to Hochshild homology is simple.As observed in Remark 2.7, the ordinary homology of (the directed flag complex associated to) a directed graph loses some information given by the directionality.On the other hand, path homology groups in degree 0 and 1 are strictly related to the homology of the directed flag complex, and in degrees i ≥ 2 are of difficult computation.One of the disadvantages of Hochschild homology for digraphs is that it is trivial in degrees i ≥ 2. The use of connectivity digraphs is meant to solve this issue.We first show that the npath digraphs introduced in Section 3.4 allow us to construct a persistent homology functorially in the case of acyclic digraphs.We then extend the persistence pipeline to general digraphs; we lose functoriality but we obtain a new persistence descriptor for digraphs.

Persistent Hochschild homology of acyclic digraphs
In this subsection we mainly follow [8], where an abstract categorical framework in which to develop persistent homology theories has been introduced.In this framework, one replaces filtrations of topological spaces with filtrations in an arbitrary category (for us, the category of directed graphs) and the homology functors with any functor with values in a regular ranked category (for us, Hochschild homology over a field K), compare with [8, Table 1].
We start by considering the poset (R, ≤) of real numbers with the induced natural partial order ≤.The poset (R, ≤) can be seen as a category in a standard way, as every poset can be seen as a category: the category P associated to a poset P = (S, ≤) has the set S as a collection of objects and a (unique) morphism x → y for any x ≤ y.A morphism of posets is then a functor between them, equivalently an order-preserving map of posets.
In persistent homology applications, one usually considers diagrams of spaces indexed by the natural numbers, or more generally by the real numbers.These diagrams are referred to as filtrations: Definition 4.1.A (real-indexed) filtration in a category C is a functor F : (R, ≤) → C. Remark 4.2.Following [8] we will always consider tame filtrations.Essentially, a filtration F is tame if there is a finite sequence {t i } i∈N such that F (a) → F (b) may fail to be an isomorphism only if a < t i ≤ b for some i.The concept of tameness extends to subposets of (R, ≤).
Example 4.3.Let {G n } n∈N be a family of digraphs, with G n → G n+1 a morphism of digraphs for each n ∈ N.Then, the family {G n } n∈N yields a filtration (N, ≤) → Digraph; if we assume G n to be without oriented cycles, the filtration takes values in Digraph 0 .Observe that if {G n } n∈N is a family of subgraphs of a given directed graph G, then by Remark 4.2 the resulting filtration is tame.
Let F be a filtration in Digraph 0 .In the following discussion, we restrict to the n-path digraph functor P G (n) , but everything is the same by replacing P G (n) with any functorial construction of connectivity digraphs.By Theorem 3.22, composition with the n-path digraph functor P G (n) induces, for each n in N, a filtration in Digraph 0 ; by Proposition 3.20, the n-path digraph of a digraph without oriented cycles does not have oriented cycles.We then get the following composition of functors: We get an immediate stability theorem, in fact an isometry theorem, between our Hochschild homology valued filtrations and their persistence diagrams.Let d FinVect (F , G) be the interleaving distance between two filtrations F , G : (R, ≤) → FinVect and let d(DF , DG) be the bottleneck distance between the associated persistence diagrams.Theorem 4.8.Let F , G : (R, ≤) → Digraph 0 be two filtrations of digraphs.Then, where DF and DG represent the persistence diagrams associated to F and G.The theorem says that the persistent Hochschild homology groups associated to a filtration of digraphs are stable, one of the required properties in persistent homology applications.We refer to this as persistent Hochschild homology.Note that in the terminology of [11] we have introduced a generalised persistence along with a hard stability theorem: the map from persistence modules to discrete invariants is 1-Lipschitz.This still leaves open the (very hard) problem of proving a stable persistent Hochschild homology pipeline starting from the space of (acyclic) digraphs.The main obstacle here lies in the difficulty of having an appropriate metric for digraphs that behaves well with filtrations.
Note that persistent Hochschild homology does not behave as the usual persistent homology; in fact, we have the following: Remark 4.9.Consider an edge weighted directed graph G, and consider the filtration induced by sorting the weights in an increasing order -the first digraph in the sequence being the spanning subgraph on the vertices of G.Then, generators in persistent Hochschild homology applied to such filtration always persist until ∞.Therefore we cannot talk about births and deaths as is usually done in the context of barcodes.

−→ Ab
involving the homology of directed flag complexes, or the path homology functors.For n = 0, these compositions yield the usual persistence homology in the first case, and the persistent path homology introduced in [19], in the second.Henceforth, composition with the higher connectivity digraphs allows us to extend the usual classical pipelines.

A persistent Hochschild homology pipeline for directed graphs
As seen in the previous section, Hochschild homology gives rise to a persistence function when considering directed graphs without oriented cycles; however, this approach fails with graphs having oriented cycles, due to Proposition 2.22.We now introduce a persistence-like framework for Hochschild homology that extends our set-up to the whole category Digraph.
Our pipeline proceeds as follows: 3. The resulting digraphs EF t can in general have oriented cycles.We therefore consider the condensation c(EF t ) (Definition 1.10).

By
Note that the process lands in the category of finite vector spaces, but the composition is not functorial anymore; we refer to the discussion after Remark 1.11.
Remark 4.10.Observe that taking the condensation of a digraph and the connectivity digraphs do not commute.In particular, killing the cycles in the condensation process may kill also ordered cliques; this is the reason why we first apply E and then the condensation c.
We demonstrate our persistent Hochschild homology pipeline, by applying it to the filtrations of the following digraphs: • Random Erdös-Rényi (ER) digraph with probability 0.5 for directed edges between any pair of vertices.We make it randomly edge weighted by replacing each non-zero entry of the adjacency matrix with a value sampled uniformly from [0, 1).
• Random necklace digraph, as represented in Figure 6.Similarly, to make it random we first construct the associated adjacency matrix, which has ones on the first upper and lower diagonals, and we then replace these with a value sampled uniformly from [0, 1).In both examples, we take the digraph filtration induced by the random entries of the associated adjacency matrices: at a filtration value t we take the digraph induced by keeping only edges whose weight is ≤ t.The digraphs we used had 20 vertices, so were represented by 20 × 20 adjacency matrices.Figure 7 shows the persistent Hochschild characteristics for the random Erdös-Rényi and necklace digraphs, and for their associated 1-path digraphs.Figure 8 shows the results for qgraphs with (q, d i , d j ) equal to (q, d 0 , d q+1 ) for q ∈ {1, 2, 3, 4} for the random Erdös-Rényi, and (0, d 0 , d 1 ) for the necklace digraph.
As observed in Remark 4.9, generators in persistent Hochschild homology always persist until ∞, and therefore the associated Betti curves yield monotone functions.Experiments involving the persistent Hochschild characteristics of random ER digraphs, and more structured necklace digraphs -cf. Figure 7 -show instead that the associated curves are not monotone.This is caused by the condensation step in the pipeline introduced in this section.Condensation also has the effect of reducing the number of edges and paths in the graph, a number that is correlated to the first Hochschild homology group -cf.Theorem 2.25.The effect of condensation is seen in the plots as zig-zagging; particularly large positive jumps correspond to large cyclic components being killed.
Note that a common feature in all plots is that the early parts of the filtrations are dominated by the connected components.This occurs until a certain saturation point in which more structured graphs appear and the number of edges, paths, and of oriented cycles, is more prominent.It is interesting to note that this saturation point is reached very soon when dealing with random digraphs and much later for the necklace digraphs.Essentially this is observed in the plots when the value of X HH drops to negative.The plots for ER q-digraphs also begin slightly positive before more paths begin to dominate dropping the values very negatively.Exception is the ER (4,0,5)-digraph: due to the required high-dimensional connecting faces the digraphs are predominantly rather empty of edges and dominated by connected components.
When oriented cycles are more likely to be created with long paths, the variations in X HH are stronger.Compare this effect on the persistent Hochschild characteristics of random ER digraphs and of necklace digraphs in Figure 7. Necklace digraphs, perturbed with addition of white noise, present small cycles, so that the persistent Hochschild characteristics is changing almost linearly.Changing the associated connectivity digraph may change completely the behaviour of X HH .Note the change in the persistent Hochschild characteristics associated to the line digraphs of the same random and necklace digraphs.
Finally, we remark that the X HH of the q-digraphs in Figure 8 show drastically larger values compared to Figure 7. Recall that these digraphs have as vertices all the simplices of dimension ≥ q.The simplicial face inclusions are also always near resulting in edges (Definition 3.10).Therefore the q-digraphs are larger and more dominated by paths along the filtration.This is particularly visible in the plot for ER (2,0,3)-digraph.As already mentioned, the pipeline we have introduced uses the condensation of a digraph to kill the oriented cycles.By producing acyclic digraphs, this also has an effect in the computational efficiency since many graph algorithms, for example finding paths, have lower complexity; this was taken advantage of in [63] in computing q-connected pathways of simplices.Other approaches are possible, for example in [47, Algorithm 1] a Berger and Shor algorithm [7] has been used for the same task.Using condensation leads to our pipeline not being functorial,

Figure 2 :
Figure 2: Two possible directed configurations for pentagon graph.
Remark 2.19.The Hochschild homology construction is functorial in both the bimodule M and the algebra A, and for M = A, Hochschild homology is a covariant functor from the category of associative R-algebras to the category of R-modules [53, Section 1.1.4].More precisely, a bimodule homomorphism f : M → M induces a map f * : HH * (A, M) → HH * (A, M )

Figure 3 :
Figure 3: The linear n-graph I n .

Proposition 2 . 31 .
The classifying space |N(Path(G))| of the path category of a directed graph G has the homotopy type of the geometric realization |G| of the digraph G.

Proposition 3 . 18 .
where the indices i are taken modulo n).Then, it is easy to check that the associated 2-path digraph is isomorphic to C n .The result generalizes by induction to every m: let Cone m (G) denote the m-th iterated cone of G, i.e.Cone m := Cone • • • • • Cone, m times.Then, we have the following: Let C n be the coherently oriented cyclic digraph on n vertices, with n ≥ 3. Then,P (m) Cone m (C n ) ∼ = C n ,the m-path digraph of the m-th cone Cone m (C n ) of C n is isomorphic (as a directed graph) to C n .

Example 3 . 26 .
Consider the digraph G on five vertices with directed edges as follows:

Example 3 . 28 .Example 3 . 29 .
is an example of a directed 2-pseudomanifold.In this case the directed flag complexes of the connectivity digraphs we have considered are 1dimensional.The digraph in Example 3.26 does not have the structure of a 2-pseudomanifold: there is a "singular" edge (1,2) to which three different 2-simplices are attached.We conclude the section with examples showing that the digraphs of Example 3.4 and Example 3.5 can now be distinguished by using the homology groups associated to the 2-path digraphs: Consider the digraphs G 1 and G 2 illustrated in Example 3.4.The associated 2path digraph P G (2) 1 -cf.Example 3.21 -has two connected components, whereas the 2-path digraph P G (2) 2 has one connected component.Then all the homology theories described in Section 2 can now distinguish the two digraphs.Consider the digraphs S 1 and S 2 of Example 3.5.The associated 2-path digraph P S (2)
Similarly, as for Hochschild homology, we can consider compositions

Figure 8 :Question 4 . 11 .
Figure 8: Persistent Hochschild characteristics.Left: condensed q-digraphs of a random Erdös-Rényi.Right: condensed q-digraph of a random necklace digraph.The choices for (q, d i , d j ) are shown in the figures.Both digraphs had 20 vertices.

Digraph → Digraph which
sends a digraph G to its line digraph L(G).First, note that the line digraph L(G) of a digraph G is the empty digraph ∅ if, and only if, G has no edges.As by Remark 1.5, ∅ is an initial but not a terminal object in the category Digraph, the functoriality may fail for morphisms ∂(e 013 − e 023 ) = e 13 − e 03 + e 01 − e 23 + e 03 − e 02 = e 13 + e 01 − e 23 − e 02 .Therefore, if K is a field, then Ω 0 = e 0 , e 1 , e 2 , e 3 , Ω 1 = e 01 , e 02 , e 13 , e 23 and Ω 2 = e 013 − e 023 .
Remark 1.11, c(EF t ) does not have oriented cycles.Hence, we compute the Hochschild characteristic X HH (c(EF t )) = dim k HH 0 (A) − dim k HH 1 (A), where A is the associated path algebra.Note that dim k HH 0 (A) agrees with the number of connected components and dim k HH 1 (A) with the formula 1 − n + ∑ e∈E(G) dim k e t(e) Ae s(e) of Theorem 2.25.As the digraph c(EF t ) does not have oriented cycles, this is exactly the characteristic introduced in Definition 2.29.