Scoville, N., and K. Yegnesh. (2009) “Cosheaf Theoretical Constructions in Networks and Persistent Homology,”
International Mathematics Research Notices, Vol. 2009, Article ID rnn999, 11 pages.
doi:10.1093/imrn/rnn999
Cosheaf Theoretical Constructions in Networks and Persistent Homology
Nicholas A. Scoville
1
and Karthik Yegnesh2
1 Ursinus
College, 601 E. Main Street, Department of Mathematics and Computer Science,
Collegeville, PA 19426 and 2 Methacton High School, 1005 Kriebel Mill Rd, Eagleville, PA 19403
Correspondence to be sent to: nscoville@ursinus.edu
In this paper, we study data flows in directed networks with a hierarchical recurrent structure from a cosheaf
theoretical perspective. We utilize the visual parametrization of directed recurrent programs provided in persistence
diagrams for cosheaf theoretical constructions. In considering cosheaves on persistence diagrams, we link global network
structure and local recurrent process data. An application of homology to analyze data transfer errors in recurrent
processes within a hierarchical framework is established. Additionally, we generalize certain aspects of persistent
homology to accommodate a homological description of network malfunctions. Our persistent homological analogs is
further developed in a general categorical setting, which naturally gives rise to relations between recurrent subprocess
representation and the homological description of data flow errors, permitting a statistical study that would not
otherwise arise. Our results indicate that the interplay between cosheaves and persistent homology has fruitful
applications in data flow analysis in networks. The link between topological network trends provided by persistent
homology and the real information association yielded by cosheaves creates the framework for a more thorough study of
data flows.
1 Introduction
Applications of (co)sheaves and sheaf cohomology to network analysis have recently emerged in the burgeoning
field of topological data analysis from the works of Ghrist [7] and Curry [5]. The motivation is that sheaves
provide a link between local and global data associated to portions of a topological space, enabling one to
study data flow. A fruitful application of (co)sheaves is sheaf cohomology, or dually cosheaf homology. This has
previously been used in network analysis with an information-theoretic incentive [7] to study information flow
via network coding sheaves.
Additionally, persistent homology has surfaced as a powerful computational and algebraic tool in topological
data analysis to study the emergence and disappearance of topological features across filtrations of a topological
space. Its applications and uses are wide ranging. See for example [1, 4, 6] and the recent book [8]. A particularly
useful construction in persistent homology is that of a persistence diagram, which provides a visual depiction of
the lifetime of topological features in the extended real half plane.
In this paper, we consider a cosheaf theoretical approach to analyzing data flow in hierarchical recurrent
networks (HRN). HRNs have a variety of applications ranging from speech recognition [9] to image classification
[10].
Given a HRN, its recurrent subprocesses can be considered as directed 1-cycles, enabling a visual description
−−−→
of their lifetime via persistence diagrams. This motivates the construction of precosheaves Open(Dgm1 ) →
Finvectk (see Section 2) to associate vector space representations of the data flow in recurrent subprograms to
their visualization in a persistence diagram. This will be discussed in Section 4. We create general homological
constructions from Čech complexes to describe data flow errors in recurrent network subprocesses. Building from
this, we find analogs to constructions in persistent homology adapted towards data flow errors. To smoothen
these notions towards the end, we establish a general categorical setting which naturally gives rise to relations
between recurrent subprocess representations and the homological description of data flow errors.
The paper is organized as follows. Section 2 provides an introduction and brief background on cosheaves
and persistent homology in the context of HRNs, and establishes the representation of data in HRNs which
will be used throughout the paper. Section 3 gives a formalization of data flow control processes in HRNs
Received 1 Month 20XX; Revised 11 Month 20XX; Accepted 21 Month 20XX
Communicated by A. Editor
c The Author 2009. Published by Oxford University Press. All rights reserved. For permissions,
2
N. Scoville and K. Yegnesh
and considers data flow errors. Section 4 gives a cosheaf theoretical construction of the notions in the previous
sections and develops an application of homology to study data flow errors, as well as an algorithmic construction
of generalized persistence based on results from Section 3. Section 5 discusses homological analysis of data flow
malfunctions in the case of higher multiplicity persistence diagrams representing parallel systems. Section 6
serves to smoothen the integration of our cosheaf theoretic development of recurrent processes and data flow
in a more general categorical framework. We conclude in Section 7 with a discussion of applications and future
work.
2
Preliminaries
In this section, we establish the terminology and notation used throughout the body of the paper. We refer the
reader to [5, 2, 3, 8] for the basics of cosheaf theory and homology.
2.1
Cosheaves
Definition 2.1. Let X be a topological space and J an abelian category. A J-valued precosheaf F on X
is a covariant functor F : Open(X) → J from the category of open subsets of X to J. If U ⊂ X, an element
x ∈ F (U ) is a cosection of F over U . For a pair of embedded open subsets V ⊂ U ⊂ X, the induced map on
the inclusion F (V ) → F (U ) is called the corestriction map. A precosheaf
F
L
Ton X is aLcosheaf if for any open
UL
⊂ X and any open cover {Ui } of U , the following sequence is exact: i F ( i Ui ) → i F (Ui ) → F (U ) → 0.
If i F (Ui ) → F (U ) is surjective, then F is an epi-precosheaf.
More generally, a precosheaf F on a site C is a covariant functor F : S
C → Set satisfying the cosheaf
condition requiring that F takes covers to colimits. That is, for a covering U = Ui given by the Grothendieck
topology on C, we have:
!
a
a
F (×U Ui ) →
F (Ui ) .
F ' lim
−→
i
i
Let Finvectk denote the category of finite vector spaces over a field k. Throughout the paper, we will consider
precosheaves G : Open(Dgm1 ) → Finvectk , with Dgm1 being a persistence diagram parametrizing directed 1cycles in a hierarchical recurrent network (see Section 2.4). We will use varying categorical constructions in later
sections but with a similar motivation.
2.2
Cech Homology
Definition 2.2. Let X be a topological space and U = {Ui } an open cover of X, and F L
a precosheaf of abelian
groups on X. The group of Čech k-chains associated to U is the group Ck (U , F ) = i F (U0,1,...,k ), where
Tk
U0,1,...,k = i=0 Ui .
Equipped with differentials ∂k : Ck (U ; F ) → Ck−1 (U ; F ), we obtain a Čech complex C∗ (U ; F ) = 0 →
Ck (U ; F ) → Ck−1 (U ; F ) → . . . → C0 (U ; F ) → 0. We denote the nth Čech homology group associated to F
and covering U by Ȟn (U ; F ).
Consider the augmentation α : Č0 (U ; F ) → F (X). We have an induced map α∗ : Ȟ0 (U ; F ) → F (X). If
F is a cosheaf, then it is a standard result that α∗ is an isomorphism [2]. If F is an epi-precosheaf, then α∗ is
surjective.
2.3
Persistent Homology Preliminaries in the Context of HRNs
Let X be a directed HRN and φ : X → R a discrete function on X. Denote Xn as the subnetwork Xn ⊂ X
consisting of {K ∈ X : φ(K) ≤ n}. Clearly, we have a filtration X0 ⊂ X1 ⊂ . . . Xk = X for k maximal in im(φ).
Definition 2.3. Let ω = {(i, j) ∈ R2 : i < j} ∪ {(i, ∞)} be the extended real half-plane. Points (i, j) ∈ ω with
j < ∞ are called proper and points with j = ∞ are called points at infinity. For (i, j) a proper point, the inclusion
→
−
→
−
∗
ψi,j : Xi → Xj induces a morphism of directed homology groups ψi,j
: H k (Xi ) → H k (Xj ) for k ∈ N.
→
−
∗
We define the k th persistent directed homology group given some proper point (i, j) as H i,j = im(ψi,j
).
Given a directed HRN X with a filtration by φ : X → R, we can obtain a description of the emergence
→
−
and disappearance of H classes representing recurrent subprograms via persistence diagrams. This leads to the
following definition.
Cosheaf Theoretical Constructions and Persistent Homology
3
−−−→
Definition 2.4. The k th directed persistence diagram Dgmk is the multiset over Z∞ × Z∞ including all
→
−
proper/points at infinity (i, j) parametrizing H k classes in X filtered by φ.
−−−→
The majority of the paper will take the multiplicity µ(pn ) for pn = (i, j) ∈ Dgmk to be 1 and k = 1. We
also initially impose for simplicity that all points pn have equal abcissas to convey the hierarchical structure of
the directed recurrent network. Section 5 considers more complicated persistence diagrams.
2.4 Representation of HRN Data Flow
We now establish a representation of data flow within subprocesses of a HRN in the category FinVectk . This
representation provides a well-behaved target category for cosheaves on persistence diagrams in Section 3.
Let λ be a directed HRN, and λn = {v1 , v2 , ..., vk } be equipped with direction {ei : vi → vi+1 } where ek
is the nth recurrent subprocess in λ. We assume that each vi ∈ λn has a predetermined maximum information
capacity σi .
To each vi ∈ λn , we assign a vector space λni over a field k such that dim(λni ) ≤ σi . Additionally, each directed
edge ei is equipped with a linear map φi : λni → λni+1 , with each φi a dim(λni ) × (dim(λni+1 ) + m) matrix for a
fixed m ∈ N across λn .This constitutes a representation Q : λ → Finvectk , with bounded dimension of each λi
guaranteed by the data threshold σi .
Lk
We endow λn with a graded structure λn = i=1 λni with sums ranging over nodes in the recurrent
Lm Lk
subprocess. To account for multiple data flow iterations within λn , we give the bigrading λn = i=1 j=1 λni,j
for i and j the nodes per iteration and the number of iterations, respectively. Continuing in the same manner,
m,k,p
L
the data flow in the entirety of λ can be viewed as a trigraded object in Finvectk I.e. λ =
λni,j where p
j=1,i=1,n=1
is the number of subprocesses in λ. We thus obtain the commutative diagram (we omit obvious sub/superscripts
on φ):
λn1,1
α
/ ...
α
/ λn
1,j−1
φ
..
.
φ
..
.
φ
λni−1,1
λni,1
φ
α
/ ...
α
α
/ ...
α
/ λn
i,j−1
φ
..
.
φ
λnm,1
α
/ λn
i−1,j
φ
/ ...
α
/ λn
/ ...
α
/ λn
1,k
φ
..
.
φ
α
/ ...
α
/ λn
i−1,k
φ
/ λn
i,j
α
n
βm,j−1
φ
α
/ ...
α
φ
..
.
φ
α
α
φ
/ λn
i−1,j−1
φ
..
.
/ λn
1,j
L
φ
..
.
φ
α
/ λn
i,k
φ
..
.
φ
m,j−1
α
/ λn
m,j
φ
α
/ ...
α
/ λn
m,k
n
where αi,j
: λni,j → λni,j+1 links iterations j and j + 1.
n
Furthermore, suppose there is a map βm,q
: λnm,q → λn1,q+1 for each m, q, n within subprocess parameters
n
n
n
n
such that α0,q = βm,q ◦ φm−1,q ◦ φm−2,q ◦ . . . ◦ φn0,q . That is, each vertical rectangle commutes.
We are now equipped to create a rigorous notion of data flow control within and between subprocesses
λn ⊂ λ in a category theoretic sense. This will be carried out in the next section and used as motivation for
results in Sections 4 and 5.
3 Data Flow Control and Errors
Let λn ⊂ FinVectk equipped with indexing functor H : λn → N × N be the graded category formed by the
diagram of a λn subprocess. Let P : λn → Tr be a covariant additive functor valued in the category of truth
4
N. Scoville and K. Yegnesh
values with logical disjunction ⊗ as the monoidal operation and partial order > > ⊥. The definition of P varies
with the position of objects in λn . For m > 1,
n
>
deg(λnm,q ) ≥ σm,q
n
P(λm,q ) =
⊥
else
If P(λnm,q ) = >, then all morphisms φni,q : λni,q → λni+1,q for i ≥ m must be bijective to respect nodal data
capacity in λn . This is implied through the additive nature of P. Observe the diagram induced by P in Tr
excluding the top row for which m = 1:
n
θ2,1
L (α)
/ ...
L (α)
/ θn
2,j−1
L (α)
L (α)
/ θn
2,j
/ ...
L (α)
/ θn
2,k
L (φ)
..
.
L (φ)
..
.
L (φ)
..
.
L (φ)
..
.
L (φ)
L (φ)
L (φ)
L (φ)
L (α)
n
/ ...
θi−1,1
n
θi,1
L (α)
/ ...
L (α)
/ θn
i−1,j−1
L (φ)
L (α)
L (α)
/ θn
L (φ)
L (α)
i,j−1
L (φ)
..
.
L (φ)
..
.
L (φ)
n
θm,1
L (α)
L (α)
/ θn
/ ...
i−1,j
/ θn
i,j
/ ...
L (α)
/ θn
m,j−1
L (α)
/ ...
L (α)
L (φ)
/ θn
i,k
L (φ)
..
.
L (φ)
..
.
L (φ)
L (α)
/ θn
i−1,k
L (α)
L (φ)
/ θn
m,j
L (α)
L (φ)
/ ...
L (α)
/ θn
m,k
Let N
us take the disjunctive grading (since P is additive the original grading is preserved) across a column
q
n
n
n
n
= i=2 θi,j
, 2 ≤ q ≤ m. Indeed, it is easy to see that θq,j
= > implies θp,j
= > for all p ≥ q.
j: θq,j
n
Now, let us assume that each subprocess λ has a predetermined desired data output quantity ψ n ∈ N. For
m = 1,
>
deg(λnm,q ) ≥ ψ n
n
P(λm,q ) =
⊥
else
n
Then P(λnm,q ) = > causes an immediate data transition from λn into λn+1 . Since ψ n ≥ σm,q
must hold,
n
the inclusion of the first N
row of the induced diagram on λ also makes sense in the disjunctive grading. The
k
n
smallest k ∈ N such that j=2 θ1,j
= > is the number of columns (iterations) in λn .
We now consider the possibility of a data transition malfunction in subprograms of λ. In the same context as
the rest of this section, this is given by a premature data release from λn → λn+1 . We can view this as a tensor
n
n
n
n
n
δ1,j
⊗ θ1,j
for 1 ≤ j ≤ k. Then δ acts as a potential data flow command overrider. That is, δ1,j
⊗ θ1,j
> θ1,j
n
n
n
n+1
means that δ1,j has overridden the data flow dictation of θ1,j and the flow λ → λ
is early.
n
n
n
n
cn denote
Call a subprogram λ faulty if δ1,j ⊗ θ1,j > θ1,j for some j ∈ N. For a faulty program, let λ
n
its experimental data yield, that is, the data output it produced being affected by δ1,j . Clearly, we have an
s
cn . Let λn∗ = λn /λ
cn be the quotient. Furthermore, let λes = Lm,k
epimorphism πn : λn → λ
k σi,j /λs . Call
i=1,j=1
i,j
a subprogram λs able if dim(λes ) ≥ dim(λn∗ ) for some s ≥ n. Intuitively this means that λs has the ability to
cn denote
compensate for lack of data output from previous faulty programs. As with a faulty program, let λ
n
s
n
c
the experimental data yield of λ . Instead of being affected by δ1,j , λ potentially yields higher dimensional
data to account for losses in faulty sub processes. Thus, we have an epimorphism πs : λbs → λs with λs∗ = λbs /λs
denoting the quotient.
4
Cosheaf Theoretical Constructions
We now give a cosheaf theoretical construction of the concepts discussed in Sections 2.4 and 3. Let
−−−→
−−−→
G : Open(Dgm1 ) → FinVectk be a precosheaf. As noted at the end of Section 2.3, we require that all pi ∈ Dgm1
have equal abcissas and multiplicity µ(pi ) = 1. We relax these conditions in section 5.
Cosheaf Theoretical Constructions and Persistent Homology
5
−−−→
Define the costalk Gpn for pn = (i, j) ∈ Dgm1 to be the λs subprogram parametrized by (i, j). We give the
−−−→
−−−→
opposite ordering of points in Dgm1 , namely pn > pr if and only if r < n. Then G (U ) where U ⊂ Dgm1 is defined
−−−→
to be Gpn for n minimal across all pj ∈ Dgm1 . We have G (∅) = 0 by convention.
Unfortunately, an arbitrary open cover of G need not yield a cosheaf, as the following Proposition shows.
−−−→
Proposition 4.1. Let U ={Ui } be an arbitrary open cover of Dgm1 . Then G is not necessarily a cosheaf.
Proof . Suppose we have a cover U = Ui ∪ Uj such that G (Ui ∩ Uj ) = 0. Additionally, suppose that both Ui
and
L Uj contain points with non-trivial stalks. In order for G to be a cosheaf, we must have an isomorphism
i,j G (Ui ) ' G (U ). However, G (U ) is determined by Gpm for some pm ∈ U , which must be in at least one of
Ui , Uj . Without loss of generality, suppose pm ∈ Ui . The bijection will not hold since G (Uj ) is nontrivial. The
same argument holds if pm ∈ Ui ∩ Uj .
Although G is not a cosheaf, we show via propositions 4.2 and 4.4 that several desirable properties still
hold, enabling us to obtain a homological description of data flow errors.
cn for G (U ) = λn . Let G1∗ denote the error
Let Gb be the experimental precosheaf with Gb(U ) : U 7−→ λ
precosheaf of G with
G (U )/Gb(U )
if G (U ) is faulty
∗
G1 (U ) =
0
otherwise
Also, define G2∗ as
G2∗ (U )
=
Gb(U )/G (U )
0
if G (U ) is able
otherwise
The basic idea is that G1∗ records margins of data flow error in faulty subprocesses but ignores surplus data
yield from able programs, while G2∗ catches the extent of extra data output from able programs but ignores
faulty subprocesses.
Note that the constructions of Gn∗ for n ∈ {1, 2} is a cosheaf-theoretical analogue to the notions of data flow
errors and fixes in faulty and able programs, respectively.
Proposition 4.2. The error precosheaf Gn∗ is an epi-precosheaf for n = 1, 2.
L ∗
−−−→
Proof . Since the costalk Gn∗p for maximal pj determines Gn∗ (U ) for any U ⊂ Dgm1 , the map
i Gn (Ui ) →
j
∗
∗
Gn (U ) is the projection onto the summand Gn (Uj ) for Uj the smallest open set containing pj .
We now formulate an application of homology to analyze network malfunctions described in Section 3.
−−−→
−−−→
Remark 4.3. Let U = {Ui } be a filtered open covering of Dgm1 with Um ⊂ Um−1 ⊂ ... ⊂ U0 = Dgm1 and pk ∈ Ur
if and only if r ≤ k. From now on, U will denote this specific covering throughout the paper.
Proposition 4.4. Consider the Čech complex
Č∗ (U ; Gn∗ ) = 0 → Ck (U ; Gn∗ ) → Ck−1 (U ; Gn∗ ) → . . . → C0 (U ; Gn∗ ) → 0.
Then
a) U0,1,...k = Uk .
−−−→
b) Č0 (U ; Gn∗ ) = Gn∗ (Dgm1 ).
−−−→
c) Ȟ0 (U ; Gn∗ ) ' Gn∗ (Dgm1 ).
Proof . The claim of a) is obvious. To see b), we apply a) to obtain Č0 (U ; Gn∗ ) = Gn∗p0 . From the reverse
−−−→
ordering of points we have that p0 has the maximum ordinate and thus determines Gn∗ (Dgm1 ). Finally
−−−→
for c), Proposition 4.2 implies that Ȟ0 (U ; Gn∗ ) → G ∗ (Dgm1 ) is epic in FinVectk , so dim(Ȟ0 (U ; Gn∗ )) ≥
−
−
−
→
−−−→
dim(Gn∗ (Dgm1 )). The definition of Ȟ0 coupled with b) yields that Ȟ0 (U ; Gn∗ ) = Gn∗ (Dgm1 )/im(∂0 ), so
−−−→
dim(Ȟ0 (U ; Gn∗ )) ≤ dim(Gn∗ (Dgm1 )) and the result follows.
6
N. Scoville and K. Yegnesh
Remark 4.5. Proposition 4.4c) shows that Ȟ0 (U ; Gn∗ ) yields the error/fix present in the final subprocess λf ⊂ λ.
Also, note that the results of Proposition 4.4 do not hold for all open covers since Gn∗ is not a cosheaf.
Instead of delving further into Čech Homology directly, we use Čech complexes for a different homological
construction relying on the above implications in the context of error and fix margins.
Let T [n] : Ch∗+,− (FinVectk ) → Ch∗+,− (FinVectk ) be a translation endofunctor shifting the grading (across
N) of a chain complex down n indices. Let C∗ (U ; Gn∗ )p denote the Čech complex for which Ct (U ; Gn∗ ) = 0 for
all t 6= p, and ϕpn : T [1]C∗ (U ; Gn∗ )p → C∗ (U ; Gn∗ )p−1 be the projection map. That is,
0
0
/ ...
/ ...
/0
/ Cp (U ; Gn∗ )
ϕp
n
/ Cp−1 (U ; Gn∗ )
/0
/0
/ ...
/0
/0
/ ...
/0
We are interested in ker(ϕpn ) ' Cp (U ; Gn∗ )/Cp−1 (U ; Gn∗ ), since ϕpn is epimorphic and we are working in
FinVectk . This is precisely the margin of deficit or surplus (depending on the value of n) contributed by λp .
Particularly, we desire a homological description for constructions in the next section. Clearly,
ker(ϕpn )
k=p
p
Hk (Cone(ϕn )) =
0
else
It is also clear that Ȟ0 (U ; Gn∗ ) ' H0 (Cone(ϕ0n )). Now the emergence of homology in Cone(ϕpn ) indicates
the birth of a network error for n = 1 and an error fix for n = 2. To move toward a generalization of aspects of
persistent homology with the notion of homology as an indicator of network error lifetime, we require a more
functorial description of Cone(ϕpn ).
0
Let C∗ (U ; Gn∗ ) be the category of chain complexes with at most one non-trivial term corresponding
to Gn∗ induced by U . It admits a directed structure given by morphisms ϕpn : Cp (U ; Gn∗ ) → Cp−1 (U ; Gn∗ ).
We also give the translation T [n]. Nontrivial morphisms occur when the domain and codomain agree on
0
the index of the non trivial term or one is sufficiently shifted. Let C∗ (U ; Gn∗ )→ be its arrow category.
0
0
with a
Then C∗ (U ; Gn∗ )→ inherits a directed structure from C∗ (U ; Gn∗ ). Namely, morphisms ϕkn and ϕk−1
n
0
0
∗ →
(U
;
G
)
.
The
previous
notions
in
C
domain/codomain agreement in C∗ (U ; Gn∗ ) are linked with π : ϕkn → ϕk−1
∗
n
n
0
arise more naturally if we view the mapping cone as a functor Cone : C∗ (U ; Gn∗ )→ → Chn+,− (FinVectk ), with
Cone(ϕkn ) = 0 → . . . → D(ϕkn ) → C(ϕkn ) → . . . → 0 with D the domain, C the codomain.
A morphism π : ϕkn → ϕk−1
induces a chain map π ∗ : Cone(ϕkn ) → Cone(ϕk−1
n
n ). The sequences
j
H∗ (Cone(ϕn )) are trivial except potentially at Hk (Cone(ϕkn )) and Hk−1 (Cone(ϕk−1
n )). Hence, let
k∗∗
:
Hk (Cone(ϕkn )) →
)),
which
in
particular
gives
us
π
π ∗∗ : T [1]H∗ (Cone(ϕkn )) → H∗ (Cone(ϕk−1
n
n
k−1
Hk−1 (Cone(ϕn )). We extend this inductively across all indices to obtain
ϕm
n ...
k−1
πn
Cone
Cone(ϕm
n )...
Hm
/ ϕkn
k
πn
/ ϕk−1
n
Cone
k+1∗
πn
/ Cone(ϕkn )
Hk
k+1∗∗
πn
k
/
Hm (Cone(ϕm
))
.
.
.
H
(Cone(ϕ
k
n
n ))
k−1
πn
Cone
∗
/ Cone(ϕk−1
)
n
k∗
πn
Hk−1
/ . . . ϕ0n
Cone
∗
k−1
πn
/ . . . Cone(ϕ0n )
H0
k−1∗∗
πn
0
/ Hk−1 (Cone(ϕk−1
/
))
.
.
.
H
(Cone(ϕ
0
n
n ))
k∗∗
πn
for n = 1, 2. The nontrivialities in the bottom row show the emergence of errors in subprograms λj ⊂ λ and the
presence of error fixes.
Call a subprogram λk good if Hi (Cone(ϕkn )) = 0 for all i ∈ N and n = 1, 2. A good subprocess is therefore
one in which no errors are born or surplus data is yielded. In the following section, we elaborate on the natural
homological interplay between good, faulty, and able programs.
4.1
P -intervals
Based on the last diagram, we can formulate the notion of homological P -intervals generalized to homological
error emergence/disappearance. Let us denote the bottom row in the above diagram as H∗ (Cone(ϕ∗n )).
0
Let Ch6=
∗ (FinVectk ) be the subcategory of the category of chain complexes such that given two nontrivial terms
0
indexed i and j, all terms indexed n for i ≤ n ≤ j are nontrivial. Let γ : Ch6=
∗ (FinVectk ) ,→ Ch∗ (FinVectk ) be
+,−
6=0
the embedding, and : Ch∗ (FinVectk ) → Ch∗ (FinVectk ) be a functor with deleting trivial middle terms
Cosheaf Theoretical Constructions and Persistent Homology
7
0
in a given chain complex and creating a new chain complex in Ch6=
∗ (FinVectk ) ( is a left adjoint to γ). Let
6=0
χ : Ch∗ (FinVectk ) → N be a functor that recovers indexes of terms in a chain complex (N given usual ordering).
Let α : N → N recover the original index of χ−1 (m) in Ch∗ (FinVectk ) given an input m ∈ N.
We give an algorithmic description of P -intervals in the sense of homological errors. Let α ◦ χ ◦
(H∗ (Cone(ϕ∗n ))) = S n ⊂ N for n = 1, 2 and denote the element of S n at index i by sni .
Data: S n for n = 1, 2
Result: Set of P -intervals P ⊂ ω
while i ≥ 0 do
Starting from i = max(S 1 )
Assign to s1i the greatest s2k not already chosen such that
dim(−1 ◦ χ−1 ◦ α−1 (s1i )) = dim(−1 ◦ χ−1 ◦ α−1 (s2k ));
reduce i by one;
if |S 1 | = |S 2 | then
P = {(s1i , s2k )}, where s2i is assigned to s1k ;
else
P = {(s1i , s2k )}∪{(S 1 \ S 2 ) × ∞};
end
end
Algorithm 1: Generation of P -intervals
Algorithm 1 assigns each error index from S 1 to its “fixing” index in S 2 based on availability of space in
able subprograms.
The set of assignments constitute proper points. Additionally, elements in S 1 that do not have “fixing”
indices in S 2 are paired with ∞, constituting points at infinity. Visually, the points of P ⊂ ω give a persistence
] ) for P associated to G .
diagram Dgm(G
5 Higher Multiplicities
−−−→
We now account for constructions in Sections 4 and 4.1 with µ(pk ) ≥ 1 for pk ∈ Dgm1 . Generally, persistence
diagrams fail to give a clear visual depiction of multiplicities of points, making it difficult to extract information
pertaining to multiplicities from cosheaves on them. In our context, µ(pk ) represents the number of subprograms
existing (parallel programs) at index m − k for m the maximum index (recall the opposite ordering of points).
We give a formal definition later.
−−−→
−−−→
−−−→
Consider the product space Dgm1 × N. Each cross section (Dgm1 , l), which we will denote Dgm1 l , gives a
−−−−→
visual survey of subprograms in the lth parallel system. Let Gn∗i : Dgm1 i → FinVectk be the precosheaf in the
−
−
−
→
−
−
−
→
same sense as Section 4. Let ξ l : Dgm1 l → Dgm1 l+1 be a map of persistence diagrams. Consider the following
diagram
..
.
..
.
..
.
0 → . . . → Čk+1 (U ; Gn∗i−1 ) . . .
/ Čk (U ; Gn∗i−1 )
/ Čk−1 (U ; Gn∗i−1 ) → . . . → 0
0 → . . . → Čk+1 (U ; Gn∗i ) . . .
/ Čk (U ; Gn∗i )
/ Čk−1 (U ; Gn∗i ) → . . . → 0
0 → . . . → Čk+1 (U ; Gn∗i+1 )...
/ Čk (U ; Gn∗i+1 )
/ Čk−1 (U ; Gn∗i+1 ) → . . . → 0
...
...
...
The ith row is Č∗ (U ; Gn∗i ) and the vertical maps are induced by ξ j for sequentially increasing j. It is now
−−−→
clear that the multiplicity µ(pk ) = |{Gpk : Gpk 6= 0}| for pk ∈ Dgm1 ∗i . The difference between G and G ∗ should
not be a subject of confusion.
8
N. Scoville and K. Yegnesh
L We can ∗iintuitively take the direct sum across a selection of rows, say Q = {a0 , a1 , . . . , aj } ⊂ N yielding
i Č∗ (U ; Gn ) for i ∈ Q. This encodes the total presence of errors/fixes in parallel subprocesses indexed in Q.
0
Continuing to follow in the same manner as in Section 4, let C∗ (U ; Gn∗i ) be the category of chain complexes
0
with at most one nontrivial term corresponding to Gn∗i induced by U . Let C∗ (U ; Gn∗i )→ be its morphism
0
∗i p
∗i p−1
category, with ϕp,i
. For clarity, we include a diagram of C∗ (U ; Gn∗∗ )→ .
n : T [1]C∗ (U ; Gn ) → C∗ (U ; Gn )
..
.
..
.
..
.
→ ...
0 → . . . → ϕp+1,i−1
n
/ ϕp,i−1
n
/ ϕp−1,i−1
→ ... → 0
n
0 → . . . → ϕp+1,i
→ ...
n
/ ϕp,i
n
/ ϕnp−1,i → . . . → 0
0 → . . . → ϕp+1,i+1
→ ...
n
/ ϕp,i+1
n
/ ϕp−1,i+1
→ ... → 0
n
..
.
..
.
..
.
We can take
union of categories across F
a row selection in the previous two diagrams yielding
F the
0
0
0
0
C∗ (U ; Gn∗∗ ) = i C∗ (U ; Gn∗i ) and C∗ (U ; Gn∗∗ )→ = i C∗ (U ; Gn∗i )→ , respectively. The decomposition in the
0
previous paragraph and union of categories gives a natural Grothendieck
topology on C∗ (U ; Gn∗∗ ), which is
L
0
∗i (→)
∗i (→)
∗∗ →
→ i Č∗ (U ; Gn ) }, or a trivial covering on
carried to C∗ (U ; Gn ) . We have coverings {Č∗ (U ; Gn )
Č∗ (U ; Gn∗i )(→) if it does not decompose in Č∗ (U ; Gn∗∗ )(→) .
To continue in the same fashion as Section 4 with the Cone functor on Č∗ (U ; Gn∗∗ )→ and homological
errors, we must preserve the Grothendieck topology on Č∗ (U ; Gn∗∗ ). It suffices to show: that Cone is additive
0 0
and ϕnp ,i . Now, we can consider H∗
on Č∗ (U ; Gn∗∗ )→ , which follows from direct computation given some ϕp,i
n
0
as a cosheaf Hn : C∗ (U ; G ∗∗ ) → FinVectk since topology is preserved through Cone. From additivity of Hk and
Cone, we obtain the following Proposition.
L
L
k,i
Proposition 5.1. Hk (Cone( i ϕk,i
n )) =
i Hk (Cone(ϕn ))
This gives an easy computation of error/fix margins across parallel systems.
6
Categorical Integration
The objective of this section is to further integrate and enhance the concepts discussed in the previous sections
in a more general framework with an eye towards application in the end.
Let us return to the families of N × N graded categories λn ⊂ Finvectk for n ∈ N. As
L in the previous section,
the grading determines a Grothendieck topology on each λn , with coverings {λni,j → i,j λni,j }. Denote Z2∗ as
the object in FinSet∗ with elements {0, 1}. Fix Oλn : λn → Z2∗ the locally constant cosheaf, with basepoint
β(Oλni,j ) in Oλn (λni,j ) for i > 1 defined by
1,
if P(λni,j ) = >
β(Oλni,j ) =
0,
if P(λni,j ) = ⊥
and for i = 1
β(Oλni,j ) =
1,
0,
n
if P(λni,j ) ⊗ δi,j
=>
.
n
n
if P(λi,j ) ⊗ δi,j = ⊥
Hence the i = 1 case considers the possibility of data flow errors. The key here is that although errors are
taken into account, Oλn restricted to λni,j that would not exist due to premature data release are still shown.
This allows for the following.
Pr
Proposition 6.1. A data flow error occurs if and only if j=1 β(Oλn1,j ) > 1 for r the highest iteration.
Cosheaf Theoretical Constructions and Persistent Homology
9
Pr
n
Proof . Because of the disjunctive grading across the top row,
j=1 β(Oλ1,j ) > 1 implies that there are
n
n
n
n
n
consecutive ones in the first row of λ . So either P(λ1,j ) ⊗ δ1,j > P(λ1,j ) for some j ∈ N or P(λn1,j ) ⊗ δ1,j
=
n
n
n
n
P(λ1,j ). The latter case is obviously impossible as P(λ1,j ) = > triggers a data exit from λ and thus λ1,j+1 never
occurs. By definition, the former case yields a data error. Conversely,
suppose a data
Pr
Pr transfer error has occurred
n
in λn → λn+1 and, for the sake of contradiction, that 0 ≤ j=1 β(Oλn1,j ) ≤ 1.
j=1 β(Oλ1,j ) = 0 is trivially
Pr
n
incorrect. If j=1 β(Oλn1,j ) = 1, then β(Oλn1,j ) = 1 only at j = r, which means that P(λn1,j ) ⊗ δ1,j
≤ P(λn1,j )
and an early data release could not have occurred.
N
V
n
n
n
, where the smash product
Remark 6.2. It is also worth noting that β
j P(λ1,j ) ⊗ δ1,j
j Oλ1,j = β
V
V
N
N
n
n
n
for
k and disjunction
j range over the top row. It also holds that β
k Oλi,k = β
k P(λi,k ) ⊗ δ1,k
some fixed 1 ≤ k ≤ r. This means that we can smash together Oλni,j across fixed rows and columns with the
basepoint in the smash product still representative of the original disjunctive grading from P. To formalize this,
we set
Pr
1,
if
β(Oλn1,j ) > 1
Pj=1
β(Oλn1,∗ ) =
r
n
0,
if
j=1 β(Oλ1,j ) = 1
and write β(Oλn ) = β(Oλn1,∗ ).
Now let λ∗ = {λ1 → λ2 → . . . → λp } ⊂ FinVectk denote a full hierarchical process. We continue this
construction for all λn ∈ λ∗ . With the indiscrete topology on λ∗ , Oλn easily extends to Oλ∗ : λ∗ → Z2∗ .
−−−→
−−→ : Dgm1 → Z2∗ via the pullback
We can define a precosheaf O−
Dgm
1
−−−→
Dgm1
Gn
Oλ∗ ◦Gn
/ λ∗
Oλ∗
" Z2∗
−−−→
−−→ associates to each open subset U ⊂ Dgm1 a representation of internal control
for some i ∈ N. Then O−
Dgm1
−−→ (λn ) for costalk Gpm = λn and maximal pm ∈ U . This construction holds intuitively because G is
in O−
Dgm1
determined by a single costalk which translates well into the indiscrete topology in λ∗ .
−−→ recovers data local to each λk subprogram, which is lost when
This factorization is beneficial because O−
Dgm1
computing only Gn . However, the extent of data output errors/surpluses from each subprocess is not recorded
−−→ . Our following constructions seek to combine local information about internal functions in some λn
in O−
i,j
Dgm1
with the homological description of data flow errors obtained in Section 4.
Let Fn : λ∗ → Finset be a cosheaf of sets on λ∗ for n ∈ {1, 2} with Fn (λj ) = {(−1)n dim(Hj (Cone(ϕjn )))}.
Then Fn describes the extent to which a subprocess contributes to network data flow errors and corrections.
Clearly, F2 (λj ) > 0 for able λj contributing to repair and F1 (λj ) < 0 for faulty λj . Additionally, Fn (λj ) is
trivial for good λj and n = 1, 2. Since a f aulty subprogram cannot produce surplus data, F2 (λj ) = 0 for faulty
−−−−→
−−−→
λj and likewise F1 (λj ) = 0 for able λj . We can define Fn on Dgm1 as F˜n : Dgm1 → FinSet in the same manner
−−→ via the pullback:
as O−
Dgm
1
−−−→
Dgm1
Gn
Fn ◦Gn
/ λ∗
Fn
$ FinSet
−−→
−−−→ O−
Dgm1
ζ
∆
Consider the functor sequence Dgm1 −−−−→
Z2∗ −
→ {0, 1} −→ Z2 , where ζ is the canonical forgetful functor
FinSet∗ → FinSet and ∆ is a functor from FinSet into the multiplicative group of integers modulo 2 regarded
−−−→
−−→ : Dgm1 → Z2 .
as a single object category. Let the composite constant cosheaf be denoted as Õ−
Dgm
1
Remark 6.3. With this development, we see that F˜n naturally carries a Õλ∗ action. This establishes a formal
relation between local subprocess control behavior and magnitude of data flow errors and corrections. We
˜n (U ) → F˜n (U ) on
−−→ (U )) × F
can endow F˜n a multiplicative action Õλ∗ × F˜n → F˜n , yielding Õλ∗ (U ) 3 β(O−
Dgm1
−−−→
open sets U ⊂ Dgm1 . Suppose ps is maximal in U . The occurrence of a data flow malfunction in λs implies that
P
r
s
n
n
∗
j=1 β(Oλ1,j ) > 1 by Proposition 6.1. By definition, β(Oλ ) = β(Oλ1,∗ ) = 1, so the action of Õλ (U ) preserves
r
the homology dimension in Cone(ϕn )) for n = 1, 2. Now suppose that costalk Gpr is good. Then again Proposition
10
N. Scoville and K. Yegnesh
Pr
6.1 yields j=1 β(Oλs1,j ) = 1 and therefore β(Oλn ) = 0. The action of Õλ∗ (U ) coincides nicely with the definition
of a good subprocess, namely that H∗ (Cone(ϕrn ))) is trivial.
−−−→
Now, let F˜n! : Open(Dgm1 ) → MultiSet be the (multi)set of the union of singleton sets of stalks in F˜n
−−−→
given the ordering of points in Dgm1 by magnitude of ordinate. We have F˜n! (U ) = {F˜npk , F˜npk+1 , ..., F˜npm }
−−−→
for pk and pm minimal and maximal in U , respectively. Note that global sections F˜n! (Dgm1 ) for both n = 1, 2
is similar to the input for Algorithm 1. Let Set(N) denote the category of sets of natural numbers and obvious
−−−→
morphisms. Let Υn (U ) : F˜n! (U ) → Set(N) for U ⊂ Dgm1 be an indexing functor in a similar sense as Section
4.1. It sends F˜n! (U ) 7→ {1, 2, . . . , |F˜n! (U )|}, with ordering in F˜n! (U ) preserved in the ordering of N. If we endow
the set F˜n! (U ) with the discrete topology, Υn can index specific terms ai ∈ F˜n! (U ) by their placement in the
set. Clearly, the inverse Υ−1
n is well-defined.
We proceed with a few analogues to the development of Algorithm 1 in Section 4.1. Let
Φn (U ) : im(Υn (U )) → Set(N) remove the indices such that their preimages in the set F˜n! (U ) are trivial for
n = 1, 2 and reindexes other elements while preserving the order. Intuitively, Φn removes the presence of good
subprograms from consideration so we are left with sets of indices (albeit shifted) of faulty and able programs.
Denote Φn |ai as the new index of ai ∈ im(Υn (U )) after applying Φn . To recover the original index of indices
−−−→
th
of such programs, we can compute Φ−1
element of Φn (Dgm1 ) as ani . Denote the inverse
n (U ). Denote the i
n
−1 −−−→
. We give a slight adaptation to Algorithm 1 to accommodate this varied
Φ−1
n acting on ai as Φn (Dgm1 )|an
i
construction.
−−−→
[H] Data: Φn (Dgm1 ) for n = 1, 2
Result: Set of P -intervals P ⊂ ω
while i ≥ 0 do
−−−→
Starting from i = max(Φ1 (Dgm1 ))
1
Assign to ai the greatest a2j not already chosen such that
−−−→
−−−→
−1
◦ Φ−1
Υ−1 ◦ Φ−1
2 (Dgm1 )|a2j ;
1 (Dgm1 )|a1i = Υ
reduce i one;
−−−→
−−−→
if |Φ1 (Dgm1 )| = |Φ2 (Dgm1 )| then
P = {(a1i , a2j )}, where a2j is assigned to a1i ;
else
−−−→
−−−→
P = {(a1i , a2j )}∪{(Φ1 (Dgm1 ) \ Φ1 (Dgm1 )) × ∞};
end
end
Algorithm 2: Modified Generation of P -intervals
Alg.2
Algorithm 2 can be described as a bifunctor (Seto (N), Seto (N)) ⊃ J −−−→ Set(N2 ∪ ∞), where Seto (N)
and Set(N2 ∪ ∞) denote the category of ordered sets of natural numbers and the category of sets of 2-tuples
of extended natural numbers, respectively. The object J is regarded as a fixed one-object subcategory of
] ) ⊂ N2 ∪ ∞ be the embedding of P into the error persistence diagram
(Seto (N), Seto (N)). Let ϕ : P → Dgm(G
it determines (see Section 4.1).To combine this with previous notions, consider the following sequence
−−−→ F˜
Υ∗
Φ∗
Open(Dgm1 ) −−∗!
→ MultiSet2 −−→
Set2 (N) −−→
Set2 (N)o
−−−→
where the superscript indicates that the both cases n = 1, 2 are being accounted for. Let ζ : Open(Dgm1 ) →
Alg.2
ϕ
] ), with ω =
Set2 (N) be the composite. Also, consider the sequence Set2 (N)o −−−→ P ⊂ N2 ∪ ∞ −
→ Dgm(G
ϕ ◦ Alg.2. Maps of persistence diagrams between the initial diagram and one parametrizing its data flow errors
arise from the triangle:
−−→
Dgm
ζ
/ Set2 (N) .
ω
#
]
Dgm(G )
We have thus shown that our homological constructions naturally give rise to maps between persistence
diagrams representing the location of recurrent subprograms in HRN and a diagram parametrizing its data flow
Cosheaf Theoretical Constructions and Persistent Homology
11
errors. This enables one to use statistical tools as a comparison of error emergence in multiple networks designed
to perform similar functions.
7 Applications, and Future Work
The most fruitful applications of this work stem from the results generalizing concepts in persistent homology
to study problems in network science. Particularly, our technique to construct persistence diagrams providing a
visual parametrization of the lifetime of data flow errors in HRNs creates the framework for applying statistical
tools to assess persistence diagram stability. Now, results from such an assessment would have implications not
in the topological features of a network, but in the nature of its data flow.
From an applied perspective, this work has implications in recurrent neural and computational processes.
The framework can be used to set the stage for a statistical analysis of bias in hierarchical recurrent neural
networks, which have recently been used in action recognition and document modeling. To extend potential
applications to biological processes, a nonlinear adaptation is required. However, it remains a struggle to find a
suitable category in which such nonlinearity is compatible with the desired algebraic tools.
Acknowledgments
The second author would like to thank Dr. Chad Giusti and Dr. Robert Ghrist for helpful discussions and ideas
and Dr. Justin Curry for clarifications on cosheaves.
References
[1] D. Attali, U. Bauer, O. Devillers, M. Glisse, and A. Lieutier, Homological reconstruction and simplification
in R3 , Comput. Geom. 48 (2015), no. 8, 606–621.
[2] G. E. Bredon, Cosheaves and homology, Pacific J. Math. 25 (1968), 1–32.
, Sheaf theory, second ed., Graduate Texts in Mathematics, vol. 170, Springer-Verlag, New York,
[3]
1997.
[4] P. Bubenik, Statistical topological data analysis using persistence landscapes, J. Mach. Learn. Res. 16 (2015),
77–102.
[5] J. Curry, Sheaves, cosheaves and applications, arXiv:1303.3255 [math.AT] (2013).
[6] T. K. Dey, F. Fan, and Y. Wang, Graph induced complex on point data, Comput. Geom. 48 (2015), no. 8,
575–588.
[7] R. Ghrist and Y. Hiraoka, Applications of sheaf cohomology and exact sequences to network coding, Proc.
NOLTA (2011).
[8] S. Y. Oudot, Persistence theory: from quiver representations to data analysis, Mathematical Surveys and
Monographs, vol. 209, American Mathematical Society, Providence, RI, 2015.
[9] B. Schrauwen and L. Buesing, A Hierarchy of Recurrent Networks for Speech Recognition, NIPS,
Proceedings (2009).
[10] Z. Zuo, G. Liu X. Shuai, B. Wang, and B. Wang, X. Wang, Learning Contextual Dependencies with
Convolutional Hierarchical Recurrent Neural Networks, arXiv:1509.03877 [cs.CV] (2016).