Content uploaded by Wilmer Leal

Author content

All content in this area was uploaded by Wilmer Leal on Feb 02, 2024

Content may be subject to copyright.

arXiv:2402.00206v1 [math.CT] 31 Jan 2024

Towards a Uni๏ฌed Theory of Time-varying Data

Benjamin Merlin Bumpus โJames FairbanksโMartti Karvonen โ Wilmer Lealโ

Frรฉdรฉric Simardโกโก

Last compilation: Friday 2nd February, 2024

Abstract

What is a time-varying graph, or a time-varying topological space and more generally what does it mean

for a mathematical structure to vary over time? Here we introduce categories of narratives: powerful tools

for studying temporal graphs and other time-varying data structures. Narratives are sheaves on posets of

intervals of time which specify snapshots of a temporal object as well as relationships between snapshots

over the course of any given interval of time. This approach o๏ฌers two signi๏ฌcant advantages. First, when

restricted to the base category of graphs, the theory is consistent with the well-established theory of temporal

graphs, enabling the reproduction of results in this ๏ฌeld. Second, the theory is general enough to extend results

to a wide range of categories used in data analysis, such as groups, topological spaces, databases, Petri nets,

simplicial complexes and many more. The approach overcomes the challenge of relating narratives of di๏ฌerent

types to each other and preserves the structure over time in a compositional sense. Furthermore our approach

allows for the systematic relation of di๏ฌerent kinds of narratives. In summary, this theory provides a consistent

and general framework for analyzing dynamic systems, o๏ฌering an essential tool for mathematicians and data

scientists alike.

1 Introduction

We can never fully observe the underlying dynamics which govern nature. Instead we are left with two ap-

proaches; we call these: the โmethod of axiomsโ and โmethod of dataโ. The ๏ฌrst focuses on establishing mech-

anisms (speci๏ฌed via for example di๏ฌerential equations or automata) which agree with our experience of the

hidden dynamics we are trying to study. On the other hand, the โmethod of dataโ emphasizes empirical observa-

tions, discerning appropriate mathematical structures that underlie the observed time-varying data and extract-

ing meaningful insights into the time-varying system. Both of these approaches are obviously interlinked, but

a lack of a formal treatment of what time-varying data is, prevents us from making it explicit.

In studying the data we can collect over time, we are con๏ฌned us to the โvisibleโ aspects of these hidden

dynamics. Thus, in much the same way as one can glean some (but perhaps not much) of the narrative of

Romeo and Juliet by only reading a page of the whole, we view time-varying data as an observable narrative

that tells a small portion of larger stories governed by more complex dynamics. This simple epistemological

stance appears implicitly in many areas of mathematics concerned with temporal or time-varying data. For

instance, consider the explosive birth of temporal graph theory. Here, one is interested in graphs whose ver-

tices and edges may come and go over time. To motivate these models, one tacitly appeals to the connection

between time-varying data and a hidden dynamical system that generates this data. A common example in

โ(Corresponding authors.)

University of Florida, Computer & Information Science & Engineering, Florida, USA.

โ University of Ottawa, Department of Mathematics, Canada.

โกUniversity of Ottawa, School of Electrical Engineering and Computer Science, Canada.

AMS subject classi๏ฌcation numbers: 68P05, 68R01, 18D70.

1

the ๏ฌeld of temporal graphs is that of opportunistic mobility [10]: physical objects in motion, such as buses,

taxis, trains, or satellites, transmit information between each other at limited distances, and snapshots of the

communication networks are recorded at various evenly-spaced instants in time. Further examples that assume

the presence of underlying dynamics include human and animal proximity networks, human communication

networks, collaboration networks, citation networks, economic networks, neuro-scienti๏ฌc networks, biological,

chemical, ecological, and epidemiological networks [15,29,18,25,19,10].

Although it is clear that what makes d ata temporal is its link to an underlyingdynamical system, this connec-

tion is in no way mathematically explicit and concrete. Indeed one would expect there to be further mathematical

properties of temporal data which allow us to distinguish a mere โ-indexed sequence of sets or graphs or groups,

say, from their temporal analogues. As of yet, though, no such distinction exists. For example think of temporal

graphs once again. Modulo embellishing attributes such as latencies or wait times, typical de๏ฌnitions simply

require temporal graphs to be sequences of graphs [21]. No further semantics on the relationships between time

steps is imposed. And these de๏ฌnitions never explicitly state what kind of global information should be tracked

by the temporal data: is it the total accumulation of data over time or is it the persistent structure that emerges

in the data throughout the evolution of the underlying dynamical system?

In this paper we ask: โhow does one build a robust and general theory of temporal data?โ. To address this

question, we ๏ฌrst draw inspiration from the theo ry of time-varying grap hs. This th eory has received considerable

attention recently [15,29,18,19,10,21,11,12,34,13,5,26,22,20] and we can thus learn valuable lessons

about the kinds of questions one would like to ask and the kinds of manipulations one would like to perform on

temporal data.

We determine from these considerations that much of what makes data temporal is whether it is โin the

memoryโ [24] in the sense of st Augustineโs Confessions [2,3]: any good de๏ฌnition of a time-varying or tem-

poral data should not only record what occurred at various instants in time, but it should also keep track of the

relationships between successive time-points. We ๏ฌnd that, hidden in this seemingly simple statement, is the

structure of a sh eaf : a temporal set (or graph or group, etc.) should consist of an assignment of a data set at

each time point together with consistent assignments of sets over each interval of time in such a way that the

sets assigned on intervals are determined by the sets assigned on subintervals. The sheaf-theoretic perspective

we adopt here builds upon Schultz, Spivak and Vasilakopoulouโs [36] notion of an interval sheaf and it allows

for a very general de๏ฌnition of temporal objects.

Our contribution is twofold; ๏ฌrst we distill the lessons learned from tempo ral graph theory into the following

set of desiderata for any mature theory of temporal data:

(D1) (Categories of Temporal Data) Any theory of temporal data should de๏ฌne not only time-varying data,

but also appropriate morphisms thereof.

(D2) (Cumulative and Persistent Perspectives) In contrast to being a mere sequence, temporal data should

explicitly record whether it is to be viewed cumulatively or persistently. Furthermore there should be

methods of conversion between these two viewpoints.

(D3) (Systematic โTemporalizationโ) Any theory of temporal data should come equipped with systematic

ways of obtaining temporal analogues of notions relating to static data.

(D4) (Object Agnosticism) Theories of temporal data should be object agnostic and applicable to any kinds

of data originating from given underlying dynamics.

(D5) (Sampling) Since temporal data naturally arises from some underlying dynamical system, any theory of

temporal data should be seamlessly interoperable with theories of dynamical systems.

Our second main contribution is to introduce categories of narratives, an object-agnostic theory of time-varying

objects which satis๏ฌes the desiderata mentioned above. As a benchmark, we then observe how standard ideas of

temporal graph theory crop up naturally when our general theory of temporal objects is instantiated on graphs.

2

We choose to see this task of theory-building through a category theoretic lens for three reasons. First of

all this approach directly addresses our ๏ฌrst desideratum (D1), namely that of having an explicit de๏ฌnition of

isomorphisms (or more generally morphisms) of temporal data. Second of all, we adopt a category-theoretic

approach because its emphasis, being not on objects, but on the relationships between them [32,4], makes it

particularly well-suited for general, object-agnostic de๏ฌnitions. Thirdly, sheaves, which are our main technical

tool in the de๏ฌnition of time-varying data, are most naturally studied in category theoretic terms [33,27].

1.1 Accumulating Desiderata for a General Theory of Temporal Data: Lessons

from Temporal Graph Theory.

There are as many di๏ฌerent de๏ฌnitions of temporal graphs as there are application domains from which the

notion can arise. This has lead to a proliferation of many subtly di๏ฌerent concepts such as: temporal graphs,

temporal networks,dynamic graphs,evolving graphs and time-varying graphs [15,29,18,19,10,21]. Each

model of temporal graphs makes di๏ฌerent assumptions on what may vary over time. For example, are the

vertices ๏ฌxed, or may they change? Does it take time to cross an edge? And does this change as an edge appears

and disappears? If an edge reappears after having vanished at some point in time, in what sense has it returned,

is it the same edge?

The novelty of these ๏ฌelds and the many fascinating direction for further enquiry they harbour make the

mathematical treatment of temporal data exciting. However, precisely because of the ๏ฌeldโs youth, we believe

that it is crucial to pause and distill the lessons we have learnt from temporal graphs into desiderata for the

๏ฌeld of temporal data more broadly. In what follows we shall brie๏ฌy contextualize each desideratum mentioned

above in turn while also signposting how our theory addresses each point. We begin with (D1).

1. There has been no formal treatment of the notion of morphisms of temporal graphs and this is true regard-

less of which de๏ฌnition of temporal graphs one considers and which speci๏ฌc assumptions one makes on

their internal structure. This is a serious impediment to the generalization of the ideas of temporal graphs

to other time-varying structures since any such general theory should be invariant under isomorphisms.

Thus we distill our ๏ฌrst desideratum (D1): theories of temporal data should not only concern themselves

with what time-varying data is, but also with what an appropriate notion of morphism of temporal data

should be.

Narratives, our de๏ฌnition of time-varying data (De๏ฌnition 2.8), are stated in terms of certain kinds of

sheaves. This immediately addresses desideratum (D1) since it automatically equips us with a suitable

and well-studied [33,27] notion of a morphism of temporal data, namely morphisms of sheaves. Then,

by instantiating narratives on graphs in Section 2.4, we de๏ฌne categories of temporal graphs as a special

case of the broader theory.

2. Our second desideratum is born from observing that all current de๏ฌnitions of temporal graphs are equiv-

alent to mere sequences of graphs [10,21] (snapshots) without explicit mention of how each snapshot

is related to the next. To understand the importance of this observation, we must ๏ฌrst note that in any

theory of temporal graphs, one always ๏ฌnds great use in relating time-varying structure to its older and

more thoroughly studied static counterpart. For instance any temporal graph is more or less explicitly

assumed to come equipped with an underlying static graph [10,21]. This is a graph consisting of all

those vertices and edges that were ever seen to appear over the course of time and it should be thought

of as the result of accumulating data into a static representation. Rather than being presented as part and

parcel of the temporal structure, the underlying static graphs are presented as the result of carrying out a

computation โ that of taking unions of snapshots โ involving input temporal graphs. The implicitness of

this representation has two drawbacks. The ๏ฌrst is that it does not allow for vertices or edges to merge or

divide over time; these are very natural operations that one should expect of time-varying graphs in the

โwildโ (think for example of cell division or acquisitions or merges of companies). The second drawback

of the implicitness of the computation of the underlying static graph is that it conceals another very natural

static structure that always accompanies any given temporal graph, we call it the persistence graph. This

is the static grap h consisting of all th ose vertices and edges which persisted throug hout the entire life-span

3

of the temporal graph. We distill this general pattern into desideratum (D2): temporal data should come

explicitly equipped with either a cumulative or a persistent perspective which records which information

we should be keeping track of over intervals of time.

Thanks to categorical duality, our narratives satisfy desideratum (D2) in the most natural way possible:

sheaves encode the persistence model while co-sheaves (the dual of a sheaf) encode the accumulation

model. As we will show (Theorem 2.10), while these two perspectives give rise to equivalences between

certain categories of temporal graphs, when one passes to other such categories or more generally to

categories of temporal objects โ such as temporal groups, for example โ this equivalence weakens to an

adjunction (roughly one can think of this as a Galois connection [14]). In particular our results imply that

in general there is the potential for a loss of information when one passes from one perspective (the per-

sistent one, say) to another (the cumulative one) and back again. This observation, which has so far been

ignored, is of great practical relevance since it means that one must take a great deal of care when collect-

ing temporal data since the choices of mathematical representations may not be interchangeable. We will

prove the existence of the adjunction between cumulative and persistent temporal graphs in Theorem 2.10

and discuss all of these subtleties in Section 2.3.

3. Another common theme arising in temporal graph theory is the relationship between properties of static

graphs and their temporal analogues. At ๏ฌrst glance, one might naรฏvely think that static properties can be

canonically lifted to the temporal setting by simply de๏ฌning them in terms of underlying static graphs.

However, this approach completely forgets the temporal structure and is thus of no use in generalizing

notions such as for example connectivity or distance where temporal information is crucial to the intended

application [29,10,11,9]. Moreover, the lack of a systematic procedure for โtemporalizingโ notions from

static graph theory is more than an aesthetic obstacle. It fuels the proliferation of myriads of subtly

di๏ฌerent temporal analogues of static properties. For instance should a temporal coloring be a coloring

of the underlying static graph? What about the underlying persistence graph? Or should it instead be

a sequence of colorings? And should the colorings in this sequence be somehow related? Rather than

accepting this proliferation as a mere consequence of the greater expressiveness of temporal data, we

sublime these issues into desideratum (D3): any theory of temporal data should come equipped with a

systematic way of โtemporalizingโ notions from traditional, static mathematics.

In Section 2.5, we show how our theories of narratives satis๏ฌes desideratum (D3). We do so systemati-

cally by leveraging two simple, but e๏ฌective functors: the change of temporal resolution functor (Propo-

sition 2.19) and the change of base functor (Propositions 2.15 and 2.16). The ๏ฌrst allows us to modify

narratives by rescaling time, while the second allows us to change the kind of data involved in the narra-

tive (e.g. passing from temporal simplicial complexes to temporal graphs). Using these tools, we provide

a general way for temporalizing static notions which roughly allows one to start with a class of objects

which satisfy a given property (e.g. the class of paths, if one is thinking about temporal graphs) and ob-

tain from it a class of objects which temporally satisfy that property (e.g. the notion of temporal paths).

As an example (other than temporal paths which we consider in Proposition 2.17) we apply our abstract

machinery to recover in a canonical way (Proposition 2.22) the notion of a temporal clique (as de๏ฌned by

Viard, Latapy and Magnien [38]). Crucially, the only information one needs to be given is the de๏ฌnition

of a clique (in the static sense). Summarizing this last point with a slogan, one could say that โour for-

malism already knew about temporal cliques given solely the notion of a clique as inputโ. Although it is

beyond the scope of the present paper, we believe that this kind of reasoning will prove to be crucial in

the future for a systematic study of how theories of temporal data (e.g. temporal graph theory) relate to

their static counterparts (e.g. graph theory).

4. Temporal graphs are de๏ฌnitely ubiquitous forms of temporal data [15,29,18,19,10,21], but they are by

far not the only kind of temporal data one could attach, or sample from an underlying dynamical system.

Thus Desideratum (D4) is evident: to further our understanding of data which changes with time, we

cannot develop case by case theories of temporal graphs, temporal simplicial complexes, temporal groups

etc., but instead we require a general theory of temporal data that encompasses all of these examples as

speci๏ฌc instances and which allows us to relate di๏ฌerent kinds of temporal data to each other.

4

Our theory of narratives addresses part of Desideratum (D4) almost out of the box: our category theoretic

formalism is object agnostic and can be thus applied to mathematical objects coming from any such

category thereof. We observe through elementary constructions that there are change of base functors

which allow one to convert temporal data of one kind into temporal data of another. Furthermore, we

observe that, when combined with the adjunction of Theorem 2.10, these simple data conversions can

rapidly lead to complex relationships between various kinds of temporal data.

5. As we mentioned earlier, our philosophical contention is that on its own data is not temporal; it is through

originating from an underlying dynamical system that its temporal nature is distilled. This link can and

should be made explicit. But until now the development of such a general theory is impeded by a great

mathematical and linguistic divide between the communities which study dynamics axiomatically (e.g.

the study of di๏ฌerential equations, automata etc.) and those who study data (e.g. the study of time series,

temporal graphs etc.). Thus we distill our last Desideratum (D5): any theory of temporal data should be

seamlessly interoperable with theories of dynamical systems from which the data can arise.

This desideratum is ambitious enough to fuel a research program and it thus beyond the scope of a single

paper. However, for any such theory to be developed, one ๏ฌrst needs to place both the theory of dynam-

ical systems and the theory of temporal data on the same mathematical and linguistic footing. This is

precisely how our theory of narratives addresses Desideratum (D5): since both narratives (our model of

temporal data) and Schultz, Spivak and Vasilakopoulouโs interval sheaves [36] (a general formalism for

studying dynamical systems) are de๏ฌned in terms of sheaves on categories of intervals, we have bridged a

signi๏ฌcant linguistic divide between the study of data and dynamics. We expect this to be a very fruitful

line of further research in the years to come.

2 Categories of Temporal Data

Our thesis is that temporal data should be represented mathematically via sheaves (or cosheaves, their categori-

cal dual). Sheaf th eory, alrea dy established in the 1950s as a crucial tool in algebraic topolog y, complex analysis,

and algebraic geometry, is canonically the study of local-to-global data management. For our purposes here,

we will only make shallow use of this theory; nevertheless, we anticipate that more profound sheaf-theoretic

tools, such as cohomology, will play a larger role in the future study of temporal data. To accommodate readers

from disparate backgrounds, we will slowly build up the intuition for why one should represent temporal data

as a sheaf by ๏ฌrst peeking at examples of temporal sets in Section 2.1. We will then formally introduce interval

sheaves (Section 2.2) and immediately apply them by collecting various examples of categories of temporal

graphs (Section 2.4) before ascending to more abstract theory.

2.1 Garnering Intuition: Categories of Temporal Sets.

Take a city, like Venice, Italy, and envision documenting the set of ice cream companies that exist in that city

each year. For instance, in the ๏ฌrst year, there might be four companies {๐1,๐2, ๐, ๐ }. One could imagine that

from the ๏ฌrst year to the next, company ๐goes out of business, company ๐continues into the next year, a new

ice cream company ๐โฒis opened, and the remaining two companies ๐1and ๐2merge into a larger company ๐โ.

This is an example of a discrete temporal set viewed from the perspective of persistence: not only do we record

the sets of companies each year, but instead we also keep track of which companies persist from one year to the

next and how they do so. Diagramatically we could represent the ๏ฌrst three years of this story as follows.

๐น2

1= {๐1, ๐2, ๐}๐น3

2= {๐โ, ๐โฒ}

๐น1

1โถ= {๐1, ๐2, ๐, ๐}๐น2

2โถ= {๐โ, ๐โฒ, ๐}๐น3

3โถ= {๐โ, ๐โฒ, ๐โฒ}

๐1

1,2๐2

1,2๐2

2,3๐3

2,3

(1)

5

This is a diagram of sets and the arrows are functions between sets. In this example we have that ๐1

1,2is the

canonical injection of ๐น2

1into ๐น1

1while ๐2

1,2maps ๐to itself and it takes both ๐1and ๐2to ๐โ(representing the

uni๏ฌcation of the companies ๐1and ๐2).

Diagram 1is more than just a time-series or a sequence of sets: it tells a story by relating (via functions

in this case) the elements of successive snapshots. It is obvious, however, that from the relationships shown in

Diagram 1we should be able to recover longer-term relationships between instances in time. For instance we

should be able to know what happened to the four companies {๐1, ๐2, ๐, ๐}over the course of three years: by the

third year we know that companies ๐1and ๐2uni๏ฌed and turned into company ๐โ, companies ๐and ๐dissolved

and ceased to exist and two new companies ๐โฒand ๐โฒwere born.

The inferences we just made amounted to determining the relationship between the sets ๐น1

1and ๐น3

1com-

pletely from the data speci๏ฌed by Diagram 1. Mathematically this is an instance of computing ๐น3

1as a ๏ฌbered

product (or pullback) of the sets ๐น2

1and ๐น3

2:

๐น3

1โถ= {(๐ฅ, ๐ฆ) โ ๐น2

1ร๐น3

2โฃ๐2

1,2(๐ฅ) = ๐2

2,3(๐ฆ)}.

Diagrammatically this is drawn as follows.

๐น3

1= {(๐1, ๐โ),(๐2, ๐โ)}

๐น2

1= {๐1, ๐2, ๐}๐น3

2= {๐โ, ๐โฒ}

๐น1

1โถ= {๐1, ๐2, ๐, ๐}๐น2

2โถ= {๐โ, ๐โฒ, ๐}๐น3

3โถ= {๐, ๐โฒ, ๐โฒ}

โ

(2)

The selection of the aforementioned data structures, namely sets and functions, allowed us to encode a

portion of the history behind the ice cream companies in Venice. If we were to delve deeper and investigate,

for instance, why company ๐disappeared, we could explore a cause within the dynamics of the relationships

between ice cream companies and their suppliers. These relationships can be captured using directed graphs,

as illustrated in Diagram 3, where there is an edge from ๐ฅto ๐ฆif the former is a supplier to the latter. This

diagram reveals that company ๐2not only sold ice cream but also supplied companies ๐1and ๐. Notably, with

the dissolution of company ๐in the second year, it becomes conceivable that the closure of company ๐occurred

due to the cessation of its supply source.

๐น1

1๐น2

2

๐1

๐2๐

๐น2

1๐โฒ

๐โ

๐น3

2

๐น3

3

๐โฒ

๐โ๐

๐โฒ

๐โ

๐โฒ

๐2

2,3

๐1

1,2๐2

1,2๐3

2,3

๐1

๐2

๐

๐

(3)

More generally, within a system, numerous observations can be made. Each observation is intended to

capture a di๏ฌerent facet of the problem. This diversity translates into the necessity of employing various data

structures, such as sets, graphs, groups, among others, to represent relevant mathematical spaces underlying the

data. Our goal in this work is to use a language that enables us to formally handle data whose snapshots are

modeled via commonly used data structures in data analysis. As we will explain in Section 2.2, the language we

are looking for is that of sheaves, and the structure hidden in Diagrams 2and 3is that of a sheaf on a category of

intervals. Sheaves are most naturally descr ibed in category-theor eticter ms and, as is always the case in c ategory

theory, they admit a categorically dual notion, namely cosheaves. As it turns out, while sheaves capture the

notion of persistent objects, cosheaves on interval categories capture instead the idea of an underlying static

6

object that is accumulated over time. Thus we see (this will be explained formally in Section 2.3) that the two

perspectives โ persistent vs cumulative โ of our second desideratum are not merely convenient and intuitively

natural, they are also dual to each other in a formal sense.

2.2 Narratives

From this section onward we will assume basic familiarity with categories, functors and natural transforma-

tions. For a very short, self-contained introduction to the necessary background suitable for graph theorists, we

refer the reader to the thesis by Bumpus [8, Sec. 3.2]. For a thorough introduction to the necessary category-

theoretic background, we refer the reader to any monograph on category theory (such as Riehlโs textbook [32]

or Awodeyโs [4]). We will give concrete de๏ฌnitions of the speci๏ฌc kinds of sheaves and co-sheaves that feature

in this paper; however, we shall not recall standard notions in sheaf theory. For an approachable introduction to

any notion from sheaf theory not explicitly de๏ฌned here, we refer the reader to Rosiakโs excellent textbook [33].

For most, the ๏ฌrst sheaves one encounters are sheaves on a topological space. These are assignments of data

to each open of a given topological space in such a way that these data can be restricted along inclusions of opens

and such that the data assigned to any open ๎of the space is completely determined from the data assigned to

the opens of any cover of ๎. In gradually more concrete terms, a ๎๎ฅ๎ด-valued sheaf ๎ฒon a topological space ๎

is a contravariant functor (a presheaf )๎ฒโถ๎ป(๎)๐๐ ๎ ๎๎ฅ๎ด from the poset of opens in ๎to sets which satis๏ฌes

certain lifting properties relating the values of ๎ฒon any open ๎to the values of (๎ฒ(๎๐))๐โ๐ผfor any open

cover (๐๐)๐โ๐ผof ๎. Here we are interested in sheaves that are: (1) de๏ฌned on posets (categories) of closed

intervals of the non-negative reals (or integers) and (2) not necessarily ๎๎ฅ๎ด-valued. The ๏ฌrst requirement has

to do with representing time. Each point in time ๐กis represented by a singleton interval [๐ก, ๐ก]and each proper

interval [๐ก1, ๐ก2]accounts for the time spanned between its endpoints. The second requirement has to do with

the fact that we are not merely interested in temporal sets, but instead we wish to build a more general theory

capable or representing with a single formalism many kinds of temporal data such as temporal graphs, temporal

topological spaces, temporal databases, temporal groups etc..

Thus one can see that, in order to specify a sheaf, one requires: (1) a presheaf ๎ฒโถ๎๐๐ ๎ ๎ from a category

๎to a category ๎, (2) a notion of what should count of as a โcoverโ of any object of ๎and (3) a formalization of

how ๎ฒshould relate objects to their covers. To address the ๏ฌrst point we will ๏ฌrst give a reminder of the more

general notation and terminology surrounding presheaves.

De๏ฌnition 2.1. For any small category ๎(such as ๎or ๎โ) we denote by ๎๎the category of ๎-valued

co-presheaves on ๎; this has functors ๐โถ๎ ๎ ๎ as objects and natural transformations as morphisms.

When we wish to emphasize contravariance, we call ๎๎๐๐ the category of ๎-valued presheaves on ๎.

The second point โ on choosing good notions of โcoversโ โ is smoothly handled via the notion of a Grothendieck

topology (see Rosiakโs textbook [33] for a formal de๏ฌnition). Categories equipped with a choice of a Grothendieck

topology are known as sites and the following de๏ฌnition (due to Schultz, Spivak and Vasilakopoulou [36])

amounts to a way of turning categories of intervals into sites by specifying what counts as a valid cover of any

interval.

De๏ฌnition 2.2 (Interval categories [35]).The category of intervals, denoted ๎๎ฎ๎ด is the category having

closed intervals [๐โฒ,๐]in โ+(the non-negative reals) as objects and orientation-preserving isometries

as morphisms. Analogously, one can de๏ฌne the category ๎๎ฎ๎ดโof discrete intervals by restricting only

to โ-valued intervals. These categories can be turned into sites by equipping them with the Johnstone

coverage [35] which stipulates that a cover of any interval [๐,๐โฒ]is a partition into two closed intervals

([๐, ๐],[๐, ๐โฒ]).

Schultz, Spivak and Vasilakopoulou de๏ฌned interval sites in order to speak of dynamica l systems as sheaves [35].

Here we are instead interested in temporal data. As most would expect, data should in general be less temporally

7

interwoven compared to its dynamical system of provenance (after all the temporal data should carry less infor-

mation than a dynamical system). This intuition1motivates why we will not work directly with Schultz, Spivak

and Vasilakopoulouโs de๏ฌnition, but instead we will make use of the following stricter notion of categories of

strict intervals.2

De๏ฌnition 2.3 (Strict Embedding Intervals).We denote by ๎(resp. ๎โ) the full subcategory (speci๏ฌcally

a join-semilattice) of the subobject poset of โ(resp. โ) whose objects are intervals.

Clearly, the ca tegories de๏ฌned above are sub categories of ๎๎ฎ๎ด (resp. ๎๎ฎ๎ดโ) since their mor phisms are orientation-

preserving isometries. Notice that the categories ๎(resp. ๎โ) are posetal and hence observe that the poset of

subobjects any interval [๐, ๐]is a subcategory of ๎(resp ๎โ). We denote this subcategory as ๎(โ,[๐, ๐]) (resp.

๎โ(โ,[๐, ๐])). In what follows, since we will want to speak of discrete, continuous, ๏ฌnite and in๏ฌnite time, it

will be convenient to have terminology to account for which categories we will allow as models of time. We

will call such categories time categories.

Notation 2.4. We will refer to ๎,๎โand any sub-join-semilattices thereof as time categories.

The following lemma states that time categories can be given Grothendieck topologies in much the same

way as the interval categories of De๏ฌnition 2.2. Since the proof is completely routine, but far too technical for

newcomers to sheaf theory, we will omit it assuming that the readers well-versed in sheaf theory can reproduce

it on their own.

Lemma 2.5. Any time category forms a site when equipped with the Johnstone coverage.

Equipped with suitable sites, we are now ready to give the de๏ฌnition of the categories ๎๎ต(๎,๎)and ๎๎ฅ(๎,๎)

where ๎is any time category. We will refer to either one of these as categories of ๎-narratives in ๎-time:

intuitively these are categories whose objects are time-varying objects of ๎. For instance, taking ๎to be ๎๎ฅ๎ด or

๎๎ฒ๎ฐ๎จ one can speak of time varying sets or time-varying graphs. The di๏ฌerence between ๎๎ฅ(๎,๎)and ๎๎ต(๎,๎)

will be that the ๏ฌrst encodes ๎-narratives according to the persistent perspective (these will be ๎-valued sheaves

on ๎), while the second employs a cumulative one (these will be ๎-valued co-sheaves on ๎).

De๏ฌnition 2.6. We will say that the narratives are discrete if the time category involved is either ๎โor any

sub-join-semilattices thereof. Similarly we will say that a category of narratives has ๏ฌnite lifetime if its

time category has ๏ฌnitely many objects or if it is a subobject poset generated by some element of ๎or ๎โ.

Now we are ready to give the de๏ฌnition of a sheaf with respect to any of the sites described in Lemma 2.5.

The reader not interested in sheaf theory should take the following proposition (whose proof is a mere instanti-

ation of the standard de๏ฌnition of a sheaf on a site) as a de๏ฌnition of a sheaf on a time category.

Proposition 2.7 (๎-sheaves and ๎-cosheaves).Let ๎be any time category equipped with the Johnstone

coverage. Suppose ๎is a category with pullbacks, then a ๎-valued sheaf on ๎is a presheaf ๐นโถ๎๐๐ ๎ ๎

satisfying the following additional condition: for any interval [๐, ๐]and any cover ([๐, ๐],[๐, ๐]) of this

interval, ๐น([๐, ๐]) is the pullback ๐น([๐, ๐]) ร๐น([๐,๐]) ๐น([๐, ๐]).

Similarly, supposing ๎to be a category with pushouts, then a ๎-valued cosheaf on ๎is a copresheaf

๎

๐นโถ๎ ๎ ๎ satisfying the following additional condition: for any interval [๐, ๐]and any cover ([๐,๐ ],[๐, ๐])

1By comparing examples of interval sheaves with sheaves on categories of strict intervals, the reader can verify that there is a sense in

which these intuitions can be made mathematically concrete (in order to not derail the presentation of this paper, we omit these examples).

2Note that there is a sense in which a functor de๏ฌned on a subcategory of some category ๎has greater freedom compared to a functor

de๏ฌned on all of ๎. This is because there are fewer arrows (and hence fewer equations) which need to be accounted for in the subcategory.

8

of this interval, ๎

๐น([๐, ๐]) is the pushout ๎

๐น([๐, ๐]) + ๎

๐น([๐,๐]) ๎

๐น([๐, ๐]).

Proof. By de๏ฌnition, a sheaf (resp. cosheaf) on the Johnstone coverage is simply a presheaf which takes each

cover (a partion of an interval) to a limit (resp. colimit). โ

De๏ฌnition 2.8. We denote by ๎๎ฅ(๐ , ๎)(resp. ๎๎ต(๐ , ๎)) the categor y of ๎-valued sheaves (resp. cosheaves)

on ๎and we call it the category of persistent ๎-narratives (resp. cumulative ๎-narratives) with ๎-time.

By this point the reader has already seen an example of a persistent discrete ๎๎ฅ๎ด-narrative. This was Dia-

gram 2(it shows the evolution of the temporal set only over three time steps). In contrast, the following is not

a persistent ๎๎ฅ๎ด-narrative. To see this, observe that ๐น2

1ร๐น2

2

๐น3

2is a pullback of two subsets (notice the hooked

arrows denoting injective maps) of size two. Thus ๐น2

1ร๐น2

2

๐น3

2has cardinality at most four, but ๐น3

1(which is

shorthand for ๐น([1,3])) has ๏ฌve elements.

๐น3

1= {๐, ๐ค, ๐ฅ, ๐ฆ, ๐ง}

๐น2

1= {๐, ๐}๐น3

2= {๐, ๐โฒ}

๐น1

1โถ= {๐, ๐, ๐}๐น2

2โถ= {๐, ๐โฒ, ๐}๐น3

3โถ= {๐, ๐โฒ, ๐โฒ}

When writing examples, it is useful to observe that all discrete ๎-narratives (see De๏ฌnition 2.6) are com-

pletely determined by the objects and morphisms associated to intervals of length zero and one. This also

implies, for example, that, in order to store a discrete graph narrative with ๐ก-time steps, it su๏ฌces to store 2๐กโ 1

graphs (one for each interval of length zero and one for each interval of length one) and 2(๐กโ 1) graph homo-

morphisms.

Proposition 2.9. Suppose we are given a objects ๐น([๐ก, ๐ก]) and ๐น([๐ก, ๐ก + 1]) of ๎for each time point [๐ก, ๐ก]and

for each length-one interval [๐ก, ๐ก + 1] and that we are furthermore given a span ๐น([๐ก, ๐ก]) ๎ฝ๐น([๐ก, ๐ก + 1]) ๎

๐น([๐ก+ 1, ๐ก + 1]) for each pair of successive times ๐กand ๐ก+ 1. Then there is (up to isomorphism) a unique

discrete ๎-narrative which agrees with these choices of objects and spans. Conversely, a mere sequence

of objects of ๎(i.e. a choice of one object for each interval of length zero) does not determine a unique

discrete ๎-narrative.

Proof. To see the ๏ฌrst point, simply observe that applying the sheaf condition to this data leaves no choice for

the remaining assignments on objects and arrows: these are completely determined by pullback and pullbacks

are unique up to isomorphism.

On the other hand, suppose we are only given a list of objects of ๎, one for each interval of length zero.

Then, having to satisfy the sheaf condition does not determine a unique ๎-narrative that agrees with the given

snapshots. To see this, observe that any length-one interval [๐ก, ๐ก + 1] has exactly one cover; namely the par-

tition ([๐ก, ๐ก],[๐ก, ๐ก + 1]). Thus, applying the sheaf condition, we we have that ๐บ([๐ก, ๐ก + 1]) must be the pullback

๐บ([๐ก, ๐ก]) ร๐บ([๐ก,๐ก]) ๐บ([๐ก, ๐ก + 1]). However, this pullback is always isomorphic to ๐บ([๐ก, ๐ก + 1]) for any choice of the

object ๐บ([๐ก, ๐ก + 1]) since pullbacks preserve isomorphisms (and since the restriction of ๐บ([๐ก, ๐ก]) to itself is its

identity morphism). โ

For an example of a cumulative narrative, consider the following diagram (recall that, since they are co-

9

sheaves, cumulative narratives are covariant functors).

๐น3

1= {๐โ, ๐, ๐โฒ, ๐, ๐โฒ}

๐น2

1= {๐โ, ๐, ๐โฒ, ๐}๐น3

2= {๐โ, ๐โฒ, ๐, ๐โฒ}

๐น1

1โถ= {๐1, ๐2, ๐, ๐}๐น2

2โถ= {๐โ, ๐โฒ, ๐}๐น3

3โถ= {๐โ, ๐โฒ, ๐โฒ}

โ

We can think of this diagram (where we denoted injections via hooked arrows) as representing a cumulative

view of the example from Section 2.1 of ice cream companies over time. Note that not all arrows are injections

(the arrow ๐น1

1๎๐น2

1marked in blue is not injective since it takes every company to itself except for ๐1and ๐2

which are both mapped to ๐โ). Thus one can think of the cumulative perspective as accumulating not only the

data (the companies) seen so far, but also the relationships that are โdiscoveredโ thus far in time.

2.3 Relating the Cumulative and Persistent Perspectives

This section marks a signi๏ฌcant stride toward realizing our Desideratum (D2) in the development of a theory for

temporal structures. This desideratum emerges from the realization that, as we extend our focus to encompass

categories beyond graphs, there exists the potential for information loss during the transition between the cumu-

lative and persistent underlying data of a temporal structure. The present section systematically characterizes

such transitions. Our Theorem 2.10 yields two key results: the functoriality of transitioning from Cumulative to

Persistent and vice versa, and the establishment of the adjunction ๐ซโฃ๐ฆformally linking these perspectives.

Theorem 2.10. Let ๎be category with limits and colimits. There exist functors ๐ซโถ๎๎ต(๎,๎)๎ ๎๎ฅ(๎,๎)

and ๐ฆโถ๎๎ฅ(๎,๎)๎ ๎๎ต(๎,๎). Moreover, these functors are adjoint to each other:

๎๎ต(๎,๎)๎๎ฅ(๎,๎)

๐ซ

๐ฆ

โฃ

Proof. Passing from the Cumulative to the Persistent perspective is functorial: We de๏ฌne ๐ซas the map that

assigns to any cosheaf ๎

๐นโถ๐ผ๎ ๎ the sheaf ๐ซ(๎

๐น)โถ ๐ผ๐๐ ๎ ๎. It is de๏ฌned on objects by:

๐ซ(๎

๐น)โถ [๐, ๐]๎ญlim(๎(โ,[๐, ๐]) ๎ฑ๐ผ

๎

๐น

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎),

where the existence of lim(๎(โ,[๐, ๐]) ๎ฑ๐ผ

๎

๐น

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎)follows from the hypothesis, as ๎(โ,[๐, ๐]) ๎ฑ๐ผ

๎

๐น

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎)is a

diagram in ๎. Henceforth, we shall use the notations ๎

๐น๐

๐and ๐ซ(๎

๐น)๐

๐in place of ๎

๐น([๐, ๐]) and ๐ซ(๎

๐น)([๐, ๐]),

respectively. Furthermore, ๐ซ(๎

๐น)is de๏ฌned on arrows as follows:

๐ซ(๎

๐น)โถ ([๐โฒ, ๐โฒ]

๐

๎ช๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ [๐, ๐])๎ญ(๐ซ(๎

๐น)๐

๐

๐ซ(๎

๐น)๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๐ซ(๎

๐น)๐โฒ

๐โฒ),

where the existence and uniqueness of ๐ซ(๎

๐น)๐follows from the unique map property of ๐ซ(๎

๐น)๐โฒ

๐โฒ. The fact

that ๐ซ(๎

๐น)maps identities in identities and respects composition follows from analogous arguments, and the

sheaf condition follows from the de๏ฌnition.

Passing from the Persistent to the Cumulative perspective is functorial: We de๏ฌne a functor ๐ฆโถ๎๎ฅ(๎,๎)๎

๎๎ต(๎,๎)which takes any sheaf ๐นโถ๐ผ๐๐ ๎ ๎ to the cosheaf ๐ฆ(๐น) โถ ๐ผ๎ ๎๐๐. It is de๏ฌned on objects by:

๐ฆ(๐น)โถ [๐, ๐]๎ญcolim(๎(โ,[๐, ๐]) ๎ฑ๐ผ๐น

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎).

10

Hereafter, let ๐ฆ(๐น)๐

๐denote ๐ฆ(๐น)([๐, ๐]). Moreover, ๐ฆ(๐น)is de๏ฌned on arrows as follows:

๐ฆ(๐น) โถ ([๐โฒ, ๐โฒ]

๐

๎ช๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ [๐, ๐])๎ญ(๐ฆ(๐น)๐โฒ

๐โฒ

๐ฆ(๐น)๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๐ฆ(๐น)๐

๐.)

Functoriallity follows from dual arguments to those used for ๐ซ(๎

๐น), and the sheaf condition follows from

the de๏ฌnition.

The two perspectives are related by the adjunction ๐ซโฃ๐ฆ: We will prove that there exist an adjunction by

building a pair of natural transformations ๎ฑ๎๎ต(๎,๎)

๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๐ฆ๐ซ and ๐ซ๐ฆ ๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎ฑ๎๎ฅ(๎,๎)that make the triangle identities

commute:

๐ซ ๐ซ๐ฆ๐ซ ๐ฆ ๐ฆ๐ซ๐ฆ

๐ซ ๐ฆ

๐ซ๐

๐๐ซ

๎ฑ๐ซ

๐๐ฆ

๐ฆ๐

๎ฑ๐ฆ

We need to de๏ฌne the components ๎ฑ๎๎ต(๎,๎)(๎

๐น)

๐(๎

๐น)

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๐ฆ๐ซ (๎

๐น)for every cosheaf in ๎๎ต(๎,๎). This involves

choosing natural transformations ๐๎

๐น๐

๐โถ๐ฆ๐ซ(๎

๐น)๐

๐๎๎

๐น๐

๐for each interval [๐, ๐]in ๎ต. As ๐ฆ๐ซ(๎

๐น)๐

๐is a colimit,

there exists only one such arrow. We de๏ฌne ๐๎

๐น๐

๐to be this unique arrow, as illustrated in the commutative

diagram on the left:

๎

๐น๐

๐๐น๐

๐

๐ฆ๐ซ(๎

๐น)๐

๐๐ซ๐ฆ(๐น)๐

๐

๎

๐น๐

๐=๐ซ(๎

๐น)๐

๐๎

๐น๐

๐=๐ซ(๎

๐น)๐

๐๐น๐

๐=๐ฆ(๐น)๐

๐๐น๐

๐=๐ฆ(๐น)๐

๐

๐ซ(๎

๐น)๐

๐๐ฆ(๐น)๐

๐

โ

๐๎

๐น๐

๐๐๐น๐

๐

โ

Applying a dual argument, we can construct ๐ซ๐ฆ ๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎ฑ๎๎ฅ(๎,๎)using the natural transformations ๐๐น๐

๐, as il-

lustrated in the diagram on the right. The existence of these natural transformations ๐and ๐is su๏ฌcient to

ensure that the triangle identities commute. This is attributed to the universal map properties of ๐ฆ๐ซ(๎

๐น)๐

๐and

๐ซ๐ฆ(๐น)๐

๐, respectively. โ

From a practical perspective, Theorem 2.10 implies that in general there is the potential for a loss of in-

formation when one passes from one perspective (the persistent one, say) to another (the cumulative one) and

back again. Furthermore the precise way in which this information may be lost is explicitly codi๏ฌed by the

unit ๐and co-unit ๐of the adjunction. These observations, which were hidden in other encodings of temporal

data [29,21,10], are of great practical relevance since it means that one must take a great deal of care when

collecting temporal data: the choices of mathematical representations may not be interchangeable.

11

๐

๐๐

๐

๐บ0

๐

๐๐

๐

๐บ1

๐

๐๐

๐

๐บ2

(a) A temporal graph ๎ณ(in the sense of De๏ฌnition 2.11) with three snapshots

๐

๐๐

๐

๐

๐๐

๐๐

๐๐

๐

๐

๐๐

๐๐

๐๐

๐๐

๐๐

๐

(b) The persistent narrative of ๎ณ

๐

๐๐

๐

๐

๐๐

๐๐

๐๐

๐

๐

๐๐

๐๐

๐๐

๐๐

๐๐

๐

(c) The cumulative narrative of ๎ณ

Figure 1: A temporal graph along with its persistent and cumulative narratives

2.4 Collecting Examples: Narratives are Everywhere

Temporal graphs. Think of satellites orbiting around the earth where, at each given time, the distance be-

tween any two given satellites determines their ability to communicate. To understand whether a signal can

be sent from one satellite to another one needs a temporal graph: it does not su๏ฌce to solely know the static

structure of the time-indexed communication networks between these satellites, but instead one needs to also

keep track of the relationships between these snapshots. We can achieve this with narratives of graphs, namely

cosheaves (or sheaves, if one is interested in the persistent model) of the form ๎ณโถ๎ ๎ ๎๎ฒ๎ฐ๎จ from a time cate-

gory ๎into ๎๎ฒ๎ฐ๎จ,acategory of graphs. There are many ways in which one could de๏ฌne categories of graphs;

for the purposes of recovering de๏ฌnitions from the literature we will now brie๏ฌy review the category of graphs

we choose to work with.

We view graphs as objects in ๎๎ฅ๎ด๎๎๎ฒ , the functor category from the graph schema to set. It has as objects

functors ๐บโถ๎๎๎ฒ ๎ ๎๎ฅ๎ด where ๎๎๎ฒ is thought of as a schema category with only two objects called ๐ธand ๐

and two non-identity morphisms ๐ , ๐ก โถ๐ธ๎๐which should be thought as mnemonics for โsourceโ and โtargetโ.

We claim that ๎๎ฅ๎ด๎๎๎ฒ is the category of directed multigraphs and graph homomorphisms. To see this, notice

that any functor ๐บโถ๎๎๎ฒ ๎ ๎๎ฅ๎ด consists of two sets: ๐บ(๐ธ)(the edge set) and ๐บ(๐)(the vertex set). Moreover

each edge ๐โ๐บ(๐ธ)gets mapped to two vertices (namely its source ๐บ(๐ )(๐)and target ๐บ(๐ก)(๐)) via the functions

๐บ(๐ )โถ ๐บ(๐ธ)๎๐บ(๐)and ๐บ(๐ก) โถ ๐บ(๐ธ)๎๐บ(๐). Arrows in ๎๎ฅ๎ด๎๎๎ฒ are natural transformations between functors.

To see that natural transformations ๐โถ๐บ๎๐ปde๏ฌne graph homomorphisms, note that any such ๐consists of

functions ๐๐ธโถ๐บ(๐ธ)๎๐ป(๐ธ)and ๐๐โถ๐บ(๐)๎๐ป(๐)(its components at ๐ธand ๐) which commute with the

source and target maps of ๐บand ๐ป.

The simplest de๏ฌnition of temporal graphs in the literature is that due to Kempe, Kleinberg and Kumar [21]

which views temporal graphs as a sequence of edge sets over a ๏ฌxed vertex set.

De๏ฌnition 2.11 ([21]).A temporal graph ๎ณconsists of a pair (๐ , (๐ธ๐)๐โโ)where ๐is a set and (๐ธ๐)๐โโis

a sequence of binary relations on ๐.

The above de๏ฌnition can be immediately formulated in terms of our discrete cumulative (resp. persistent)

graph narratives whereby a temporal graph is a cumulative narrative valued in the category ๎๎ฅ๎ด๎๎๎ฒ with discrete

time. To see this, observe that, since De๏ฌnition 2.11 assumes a ๏ฌxed vertex set and since it assumes simple

graphs, the cospans (resp. spans) can be inferred from the snapshots (see Figure 1for examples). For instance,

in the persistent case, there is one maximum common subgraph to use as the apex of each span associated to the

inclusions of intervals of length zero into intervals of length one. This, combined with Proposition 2.9 yields a

unique persistent graph narrative which encodes any given temporal graph (as given in De๏ฌnition 2.11).

12

Notice that once an edge or vertex disappears in a persistent (or cumulative) graph narrative, it can never

reappear: the only way to reconnect two vertices is to create an entirely new edge. In particular this means that

cumulative graph narratives associate to most intervals of time a multigraph rather than a simple graph (see

Figure 1c). This is a very natural requirement, for instance: imagining a good being delivered from ๐ขto ๐ฃat

times ๐กand ๐กโฒ, it is clear that the goods need not be delivered by the same person and, in any event, the very acts

of delivery are di๏ฌerent occurrences.

As shown by Patterson, Lynch and Fairbanks [31], by passing to slice categories, one can furthermore

encode various categories of labelled data. For instance, one can ๏ฌx the monoid of natural numbers viewed as

a single-vertex graph with a loop edge for each natural number ๐บ๐ตโโถ๎๎๎ฒ ๎ ๎๎ฅ๎ด having ๐บ๐ตโ(๐) = 1 and

๐บ๐ตโ(๐ธ) = โ)and consider the slice category ๎๎ฅ๎ด๎๎๎ฒ โ๐บ๐ตโ. This will have pairs (๐บ, ๐ โถ๐บ๎๐บ๐ตโ)as objects

where ๐บis a graph and ๐is a graph homomorphism e๏ฌectively assigning a natural number label to each edge

of ๐บ. The morphisms of ๎๎ฅ๎ด๎๎๎ฒโ๐บ๐ตโare label-preserving graph homomorphisms. Thus narratives valued in

๐บ๐ตโโถ๎๎๎ฒ ๎ ๎๎ฅ๎ด can be interpreted as time-varying graphs whose edges come equipped with latencies

(which can change with time).

By similar arguments, it can be easily shown that one can encode categories of graphs which have labeled

vertices and labeled edges [31]. Narratives in such categories correspond to time-varying graphs equipped with

both vertex- and edge-latencies. This allows us to recover the following notion, due to Casteigts, Flocchini,

Quattrociocchi and Santoro, of a time-varying graph which has recently attracted much attention in the literature.

De๏ฌnition 2.12 (Section 2 in [10]).Take ๐to be either โor โ. A ๐-temporal (directed) network is a

quintuple (๐บ, ๐๐, ๐๐, ๐๐ฃ, ๐๐ฃ)where ๐บis a (directed) graph and ๐๐,๐๐,๐๐ฃand ๐๐ฃare functions of the following

types:

๐๐โถ๐ธ(๐บ) ร ๐๎{โฅ, โค}, ๐๐โถ๐ธ(๐บ) ร ๐๎๐,

๐๐ฃโถ๐(๐บ) ร ๐๎{โฅ, โค}, ๐๐ฃโถ๐(๐บ) ร ๐๎๐

where ๐๐and ๐๐ฃare are functions indicating whether an edge or vertex is active at a given time and where

๐๐and ๐๐ฃare latency functions indicating the amount of time required to traverse an edge or vertex.

We point out that this de๏ฌnition, stated as in [10] does not enforce any coherence conditions to ensure that

edges are present at times in which their endpoints are. Our approach, in contrast, comes immediately equipped

with all such necessary coherence conditions.

Other structures. There exist diverse types of graphs, such as re๏ฌexive, symmetric, and half-edge graphs,

each characterized by the nature of the relation aimed to be modeled. Each graph type assemble into speci๏ฌc cat-

egories, and the selection of graph categories distinctly shapes the resulting graph narratives. To systematically

investigate the construction of various graph narratives, we employ a category-theoretic trick. This involves

encoding these diverse graphs as functors, speci๏ฌcally set-valued copresheaves, over a domain category known

as a schema. The schema encapsulates the syntax of a particular graph type (e.g., symmetric graphs, re๏ฌexive

graphs, etc.), allowing us to encode a multitude of structures. Notable examples of such schemata include ๎๎๎๎ฒ,

re๏ฌexive graphs ๎๎๎๎ฒ, symmetric-and-re๏ฌexive graphs ๎๎๎๎๎ฒ and half-edge graphs ๎๎๎ฅ๎๎ฒ.

๐ธ ๐ธ ๐ธ ๐ป

๐ ๐ ๐ ๐

s.t. ๐ โฆ๐=๐กand ๐กโฆ๐=๐ s.t. ๐ โฆ๐ =๐กโฆ๐ s.t. ๐ โฆ๐=๐กand ๐กโฆ๐=๐ and ๐ โฆ๐ =๐กโฆ๐ s.t. ๎ฉ๎ฎ๎ถโฆ๎ฉ๎ฎ๎ถ =๎ฉ๎ค๐ป

๐

๐ ๐ก ๐ ๐ก

๐

๐ ๐ก

๐๐๐ฃ

๐ ๐ ๐

These are all subcategories of multigraphs but other relational structures of higher order such as Petri nets

13

and simplicial complexes can also be constructed using this approach. For instance, the following is the schema

for Petri nets [31]:

๎๎ฎ๎ฐ๎ต๎ด

๎๎ฏ๎ซ๎ฅ๎ฎ ๎๎ฐ๎ฅ๎ฃ๎ฉ๎ฅ๎ณ ๎๎ฒ๎ก๎ฎ๎ณ๎ฉ๎ด๎ฉ๎ฏ๎ฎ

๎๎ต๎ด๎ฐ๎ต๎ด

It is known that all of these categories of ๎๎๎ฅ๎ด๎ณ are topoi (and thus admit limits and colimits which are

computed point-wise) and thus we can de๏ฌne narratives as presheaves ๐นโถ๎๐๐ ๎ ๎๎๎ฅ๎ด satisfying the sheaf

condition stated in Proposition 2.7 for any choice of schema (e.g., ๎๎๎๎ฒ,๎๎๎๎ฒ,๎๎๎๎๎ฒ ๎๎๎ฅ๎๎ฒ, etc.).

Note 2.13 (Beyond relational structures).Proposition 2.7 indeed states that we can de๏ฌne narratives valued in

any category that has limits and/or colimits. For instance, the category ๎๎ฅ๎ด of metric spaces and contractions is

a complete category, allowing us to study persistent ๎๎ฅ๎ด-narratives. Diagram 4illustrates a ๎๎ฅ๎ด-narrative that

recounts the story of how the geographical distances of ice cream companies in Venice changed over time. Each

snapshot (depicted in pink) represents a metric space, and all morphisms are canonical isometries. The curious

reader can use it to speculate about why company ๐ceased its activities and what happened to the physical

facilities of companies ๐1and ๐.

๐น1

1๐น2

2

๐น2

1๐น3

2

๐น3

3

๐2

2,3

๐1

1,2๐2

1,2๐3

2,3

๐1

๐2

๐

๐

๐1

๐2

๐

๐โฒ

๐โ

๐

๐โฒ

๐โ

๐โฒ

๐โ

๐โฒ

(4)

2.5 Temporal Analogues of Static Properties

The theory of static data (be it graph theory, group theory, etc.) is far better understood than its temporal

counterpart (temporal graphs, temporal groups, etc.). For this reason and since static properties are often easier

to think of, it is natural to try to lift notions from the static setting to the temporal.

This idea has been employed very often in temporal graph theory for instance with the notion of a temporal

path. In this section we will consider temporal paths and their de๏ฌnition in terms of graph narratives. This

section is a case-study intended to motivate our more general approach in Section 2.5.

2.5.1 Temporal Paths

As we mentioned in Section 1.1, one easy way of de๏ฌning the notion of a temporal path in a temporal graph

๎ณis to simply declare it to be a path in the underlying static graph of ๎ณ. However, at ๏ฌrst glance (and we will

address this later on) this notion does not seem to be particularly โtemporalโ since it is forgetting entirely the

various temporal relationships between edges and vertices. In contrast (using Kempe et. al.โs De๏ฌnition 2.11 of

a temporal graph) temporal paths are usually de๏ฌned as follows (we say that these notions are โ๐พ3-temporalโ to

make it clear that they are de๏ฌned in terms of Kempe, Kleinberg and Kumarโs de๏ฌnition of a temporal graph).

14

De๏ฌnition 2.14 (๐พ3-temporal paths and walks).Given vertices ๐ฅand ๐ฆin a temporal graph (๐บ, ๐ ), a

temporal (๐ฅ, ๐ฆ)-walk is a sequence ๐= (๐1, ๐ก1),โฆ,(๐๐, ๐ก๐)of edge-time pairs such that ๐1,โฆ, ๐๐is a walk

in ๐บstarting at ๐ฅand ending at ๐ฆand such that ๐๐is active at time ๐ก๐and ๐ก1โค๐ก2โคโฏโค๐ก๐. We say that a

temporal (๐ฅ, ๐ฆ)-walk is closed if ๐ฅ=๐ฆand we say that it is strict if the times of the walk form a strictly

increasing sequence.

Using this de๏ฌnition, one also has the following natural decision problem on temporal graphs.

๐ ๐๐๐๐พ3๐ ๐๐กโ๐

Input: a๐พ3-temporal graph ๐บโถ= (๐ , (๐ธ๐)๐โโ)and an ๐โโ

Task: determine if there exists a ๐พ3-temporal path of length at least ๐in ๐บ.

Notice that in static graph theory most computational problems can be cast as homomorphism problems in

appropriate categories of graphs. For instance, the question of determining whether a ๏ฌxed graph ๐บadmits a

path of length at least ๐is equivalent to asking if there is at least one injective homomorphism ๐๐๎ฑ๐บfrom

the ๐-path to ๐บ. Similarly, if we wish to ask if ๐บcontains a clique on ๐vertices as a minor3, then this is simply

a homomorphism problem in the category ๎๎ฒ๎ฐ๎จโชฏhaving graphs as objects and graph minors as morphisms: ๐บ

contains ๐พ๐as a minor if and only if the hom-set ๎๎ฒ๎ฐ๎จโชฏ(๐พ๐, ๐บ)is nonempty.

Wishing to emulate this pattern from traditional graph theory, one immediately notices that, in order to

de๏ฌne notions such as temporal paths, cliques and colorings (to name but a few), one ๏ฌrst needs two things:

1. a notion of morphism of temporal graphs and

2. a way of lifting graph classes to classes of temporal graphs (for instance de๏ฌning temporal path-graphs,

temporal complete graphs, etc...).

Fortunately our narratives come equipped with a notion of morphism (these are simply natural transformations

between the functors encoding the narratives). Thus, all that remains to be determined is how to convert classes

of graphs into classes of temporal graphs. More generally we ๏ฌnd ourselves interested in converting classes

of objects of any category ๎into classes of ๎-narratives. We will address these questions in an even more

general manner (Propositions 2.15 and 2.16) by developing a systematic way for converting ๎-narratives into

๎-narratives whenever we have certain kinds of data-conversion functors ๐พโถ๎ ๎ ๎.

Proposition 2.15 (Covariant Change of base).Let ๎and ๎be categories with limits (resp. colimits) and let

๎be any time category. If ๐พโถ๎ ๎ ๎ is a continuous functor, then composition with ๐พdetermines a func-

tor (๐พโฆโ) from persistent (resp. cumulative) ๎-narratives to persistent (resp. cumulative) ๎-narratives.

Spelling this out explicitly for the case of persistent narratives, we have:

(๐พโฆโ)โถ ๎๎ฅ(๎,๎)๎ ๎๎ฅ(๎,๎)

(๐พโฆโ)โถ (๐นโถ๐๐๐ ๎ ๎)๎ญ(๐พโฆ๐นโถ๐๐๐ ๎ ๎).

Proof. It is standard to show that ๐พโฆ๐นis a functor of presheaf categories, so all that remains is to show that

it maps any ๎-narrative ๐นโถ๐๐๐ ๎ ๎ to an appropriate sheaf. This follows immediately since ๐พpreserves

limits: for any cover ([๐,๐],[๐, ๐] ) of any interval [๐, ๐]we have (๐พโฆ๐น)([๐, ๐])) = ๐พ(๐น([๐, ๐]) ร๐น([๐,๐]) ๐น([๐, ๐])) =

(๐พโฆ๐น)([๐, ๐]) ร(๐พโฆ๐น)([๐,๐]) (๐พโฆ๐น)([๐, ๐])).By duality the case of cumulative narratives follows. โ

Notice that one also has change of base functors for any contravariant functor ๐ฟโถ๎๐๐ ๎ ๎ taking limits in

๎to colimits in ๎. This yields the following result (which can be proven in the same way as Proposition 2.15).

3Recall that a contraction of a graph ๐บis a surjective graph homomorphism ๐โถ๐บ๎ง๐บโฒsuch that every preimage of ๐is connected in

๐บ(equivalently ๐บโฒis obtained from ๐บby a sequence of edge contractions). A minor of a graph ๐บis a subgraph ๐ปof a contraction ๐บโฒof

๐บ.

15

Proposition 2.16 (Contravariant Change of base).Let ๎be a category with limits (resp. colimits) and

๎be a category with colimits (resp. limits) and let ๎be any time category. If ๐พโถ๎๐๐ ๎ ๎ is a functor

taking limits to colimits (resp. colimits to limits), then the composition with ๐พdetermines a functor from

persistent (resp. cumulative) ๎-narratives to cumulative (resp. persistent) ๎-narratives.

To see how these change of base functors are relevant to lifting classes of objects in any category ๎to

corresponding classes of ๎-narratives, observe that any such class ๎of objects in ๎can be identi๏ฌed with a

subcategory ๐โถ๎ ๎ ๎. One should think of this as a functor which picks out those objects of ๎that satisfy a

given property ๐. Now, if this functor ๐is continuous, then we can apply Proposition 2.15 to identify a class

(๐โฆโ)โถ ๎๎ฅ(๎,๎)๎ ๎๎ฅ(๎,๎)(5)

of ๎-narratives which satisfy the property ๐at all times. Similar arguments let us determine how to specify

temporal analogues of properties under the cumulative perspective. For example, consider the full subcategory

๐โถ๎๎ก๎ด๎จ๎ณ ๎ฑ ๎๎ฒ๎ฐ๎จ which de๏ฌnes the category of all paths and the morphisms between them. As the following

proposition shows, the functor ๐determines a subcategory ๎๎ต(๐ , ๎๎ก๎ด๎จ๎ณ)๎ฑ ๎๎ต(๐ , ๎๎ฒ๎ฐ๎จ)whose objects are

temporal path-graphs.

Proposition 2.17. The monic cosheaves in ๎๎ต(๎,๎๎ก๎ด๎จ๎ณ)determine temporal graphs (in the sense of De๏ฌ-

nition 2.11) whose underlying static graph over any interval of time is a path. Furthermore, for any graph

narrative ๎ณโ๎๎ต(๎,๎๎ฒ๎ฐ๎จ)all of the temporal paths in ๎ณassemble into a poset ๎๎ต๎ข(๐โฆโ) (๎ณ)de๏ฌned as the

subcategory of the subobject category ๎๎ต๎ข(๎ณ)whose objects are in the range of (๐โฆโ). Finally, strict tem-

poral paths in a graph narrative ๎ณconsists of all those monomorphism ๐(๎ผ)๎ฑ๎ณwhere the path narrative

๎ผin ๎๎ต๎ข(๐โฆโ)(๎ณ)sends each instantaneous interval (i.e. one of the form [๐ก, ๐ก]) to a single-edge path.

Proof. Since categories of copresheaves are adhesive [23] (thus their pushouts preserve monomorphims), one

can verify that, when they exists (pushouts of paths need not be paths in general), pushouts in ๎๎ก๎ด๎จ๎ณ are given

by computing pushouts in ๎๎ฒ๎ฐ๎จ. Thus a monic cosheaf ๎ผin ๎๎ต(๎,๎๎ก๎ด๎จ๎ณ)is necessarily determined by paths for

each interval of time that combine (by pushout) into paths at longer intervals, as desired. Finally, by noticing

that monomorphisms of (co)sheaves are simply natural transformations whose components are all monic, one

can verify that any monormphism from ๐(๎ผ)to ๎ณin the category of graph narratives determines a temporal

path of ๎ณand that this temporal path is strict if ๎ผ([๐ก, ๐ก]) is a path on at most one edge for all ๐กโ๐. Finally,

as is standard in category theory [4], observe that one can collect all such monomorphisms (varying ๎ผover

all objects of ๎๎ต(๎,๎๎ก๎ด๎จ๎ณ)) into a subposet of the subobject poset of ๎ณ, which, by our preceding observation,

determines all of the temporal paths in ๎ณ.โ

Comparing the Cumulative to the Persistent. Given Proposition 2.17 one might wonder what a temporal

path looks like under the persistent perspective. By duality (and since pullbacks preserve monomorphisms and

connected subgraphs of paths are paths) one can see that monic persistent path narratives must consist of paths

at each snapshot satisfying the property that over any interval the data persisting over that interval is itself a

path.

Since applying the functor ๐ซโถ๎๎ต(๎,๎๎ก๎ด๎จ๎ณ)๎ ๎๎ฅ(๎,๎๎ก๎ด๎จ๎ณ)of Theorem 2.10 turns any cumulative path nar-

rative into a persistent one, it seem at ๏ฌrst glance that there is not much distinction between persistent temporal

paths and those de๏ฌned cumulatively in Proposition 2.17. However, the distinction becomes apparent once

one realises that in general we cannot simply turn a persistent path narrative into a cumulative one: in general

arbitrary pushouts of paths need not be paths (they can give rise to trees).

Realizing the distinctions between cumulative and persistent paths is a pedagogical example of a subtlety

that our systematic approach to the study of temporal data can uncover but that would otherwise easily go

unnoticed: in short, this amounts to the fact that studying the problem of the temporal tree (de๏ฌned below) is

equivalent to studying the persistent temporal path problem.

16

To make this idea precise, consider the adjunction

๎๎ต(๎,๎๎ฒ๎ฐ๎จ๐๐๐๐)๎๎ฅ(๎,๎๎ฒ๎ฐ๎จ๐๐๐๐ )

๐ซ

๐ฆ

โฃ

given to us by Theorem 2.10 (notice that the result applies since ๎๎ฒ๎ฐ๎จ has all limits and colimits). This together

with Proposition 2.15 applied to the full subcategory ๐โถ๎๎ฒ๎ฅ๎ฅ๎ณ๐๐๐๐ ๎ ๎๎ฒ๎ฐ๎จ๐๐๐๐ yields the following diagram.

๎๎ต(๎,๎๎ฒ๎ฅ๎ฅ๎ณ๐๐๐๐)๎๎ต(๎,๎๎ฒ๎ฐ๎จ๐๐๐๐ )

๎๎ฅ(๎,๎๎ก๎ด๎จ๎ณ๐๐๐๐)๎๎ฅ(๎,๎๎ฒ๎ฐ๎จ๐๐๐๐)

(๐โฆโ)

๐ฆ

(๐โฆโ)

The pullback (in ๎๎ก๎ด) of this diagram yields a category having as objects pairs (๎,๎ผ)consisting of a cumulative

tree narrative ๎and a persistent path narrative ๎ผsuch that, when both are viewed as cumulative ๎๎ฒ๎ฐ๎จ๐๐๐๐-

narratives, they give rise to the same narrative. Since the adjunction of Theorem 2.10 restricts to an equivalence

of categories, we have the question of determining whether a cumulative graph narrative ๎ณcontains ๐(๎)as

a sub-narrative can be reduced to the question of determining whether ๎ผis a persistent path sub-narrative of

๐ซ(๎ณ).

Aside 2.18. Although it is far beyond the scope of this paper, we believe that there is a wealth of under-

standing of temporal data (and in particular temporal graphs) to be gained from the interplay of lifting

graph properties and the persistent-cumulative adjunction of Theorem 2.10. For instance the preceding

discussion shows that one can equivalently study persistent paths instead of thinking about cumulative

temporal trees. Since persistent paths are arguably easier to think about (because paths are fundamentally

simpler objects than trees) it would stand to reason that this hidden connection between these classes of

narratives could aid in making new observations that have so far been missed.

2.5.2 Changing the Resolution of Temporal Analogues.

As we have done so far, imagine collecting data over time from some hidden dynamical system and suppose,

after some exploratory analysis of our data, that we notice the emergence of some properties in our data that

are only visible at a certain temporal resolution. For example it might be that some property of interest is only

visible if we accumulate all of the data we collected over time intervals whose duration is at least ten seconds.

In contrast notice that the temporal notions obtained solely by โchange of baseโ (i.e. via functors such as (5))

are very strict: not only do they require each instantaneous snapshot to satisfy the given property ๐, they also

require the property to be satis๏ฌed by any data that persists (or, depending on the perspective, accumulates) over

time. For instance the category of temporal paths of Proposition 2.17 consists of graph narratives that are paths

at all intervals. In this section we will instead give a general, more permissive de๏ฌnition of temporal analogues

or static notions. This de๏ฌnition will account for the fact that one is often only interested in properties that

emerge at certain temporal resolutions, but not necessarily others.

To achieve this, we will brie๏ฌy explain how to functorially change the temporal resolution of our narratives

(Proposition 2.19). Then, combining this with our change of base functors (Propositions 2.15 and 2.16) we will

give an extremely general de๏ฌnition of a temporal analogue of a static property. The fact that this de๏ฌnition is

parametric in the temporal resolution combined with the adjunction that relates cumulative and persistent nar-

ratives (Theorem 2.10) leads to a luscious landscape of temporal notions whose richness can be systematically

studied via our category-theoretic perspective.

17

Proposition 2.19 (Change of Temporal Resolution).Let ๎be a time category and ๎

๐

๎ช๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎ be a sub-join-

semilattice thereof. Then, for any category ๎with (co)limits, there is a functor (โโฆ๐)taking persistent

(resp. cumulative) ๎narratives with time ๐to narratives of the same kind with time ๐.

Proof. By standard arguments the functor is de๏ฌned by post composition as

(โโฆ๐)โถ ๎๎ต(๎,๎)๎ ๎๎ต(๎,๎)where (โโฆ๐) โถ (๎ฒโถ๎ ๎ ๎)๎ญ(๎ฒโฆ๐โถ๎ ๎ ๎).

The persistent case is de๏ฌned in the same way. โ

Thus, given a sub-join-semilattice ๐โถ๐๎ฑ๐of some time-category ๎, we would like to specify the col-

lection of objects of a category of narratives that satisfy some given property ๐only over the intervals in ๐. A

slick way of de๏ฌning this is via a pullback of functors as in the following de๏ฌnition.

De๏ฌnition 2.20. Let ๐โถ๎ ๎ฑ ๎ be a sub-join-semilattice of a time category ๎let ๎be a category with

limits and let ๐โถ๎ ๎ฑ ๎ be a continuous functor. Then we say that a persistent ๎-narrative with time ๎

๐-satis๏ฌes the property ๐if it is in the image of the pullback (i.e. the red, dashed functor in the following

diagram) of (โโฆ๐)along (๐โฆโโฆ๐). An analogous de๏ฌnition also holds for cumulative narratives when ๎

has colimits and ๎is continuous.

๎๎ฅ(๎,๎)๎๎ฅ(๎,๎)๎๎ฅ(๎,๎)

๎๎ฅ(๎,๎) ร๎๎ฅ(๎,๎)๎๎ฅ(๎,๎)๎๎ฅ(๎,๎)

(๐โฆโ)(โโฆ๐)

(โโฆ๐)

โ

As a proof of concept, we shall see how De๏ฌnition 2.20 can be used to recover notions of temporal cliques

as introduced by Viard, Latapy and Magnien [38].

Temporal cliques were thought of as models of groups of people that commonly interact with each other

within temporal contact networks. Given the apparent usefulness of this notion in epidemiological modeling and

since the task of ๏ฌnding temporal cliques is algorithmically challenging, this notion has received considerable

attention recently [16,6,7,17,30,37]. They are typically de๏ฌned in terms of Kempe, Kleinberg and Kumarโs

de๏ฌnition of a temporal graph (De๏ฌnition 2.11) (or equivalently in terms of link streams) where one declares a

temporal clique to be a vertex subset ๐of the time-invariant vertex set such that, cumulatively, over any interval

of length at least some given ๐,๐induces a clique. The formal de๏ฌnition follows.

De๏ฌnition 2.21 ([38]).Given a ๐พ3-temporal graph ๐บโถ= (๐ , (๐ธ๐)๐โโ)and an ๐โโ, a subset ๐of ๐is

said to be a temporal ๐clique if |๐|โฅ๐and if for all intervals [๐, ๐]of length ๐in โ(i.e. ๐=๐+๐โ 1)

one has that: for all ๐ฅ, ๐ฆ โ๐there is an edge incident with both ๐ฅand ๐ฆin โ๐กโ[๐,๐]๐ธ๐ก.

Now we will see how we can obtain the above de๏ฌnition as an instance of our general construction of

De๏ฌnition 2.20. We should note that the following proposition is far more than simply recasting a known

de๏ฌnition into more general language. Rather, it is about simultaneously achieving two goals at once.

1. It is showing that the instantiation of our general machinery (De๏ฌnition 2.20) recovers the specialized

de๏ฌnition (De๏ฌnition 2.21).

2. It provides an alternative characterization of temporal cliques in terms of morphisms of temporal graphs.

This generalizes the traditional de๏ฌnitions of cliques in static graph theory as injective homomorphisms

into a graph from a complete graph.

18

Proposition 2.22. Let ๐
โฅ๐โถ๎๎ฏ๎ญ๎ฐ๎ฌ๎ฅ๎ด๎ฅโฅ๐๎ฑ ๎๎ฒ๎ฐ๎จ be the subcategory of ๎๎ฒ๎ฐ๎จ whose objects are com-

plete graphs on at least ๐vertices and let ๐โฅ๐โถ๐๎ ๎โbe the sub-join-semilattice of ๎โwhose objects

are intervals of ๎โlength at least ๐. Consider any graph narrative ๎ทwhich ๐๐-satis๏ฌes ๐
โฅ๐then all of

its instantaneous snapshots ๎ท([๐ก, ๐ก]) have at least ๐vertices. Furthermore consider any monomorphism

๐โถ๎ท๎ฑ๎ณfrom such a ๎ทto any given cumulative graph narrative ๎ณ. If ๎ทpreserves monomorphisms,

then we have that: every such morphism of narratives ๐determines a temporal clique in ๎ณ(in the sense of

De๏ฌnition 2.21) and moreover all temporal cliques in ๎ณare determined by morphisms of this kind.

Proof. First of all observe that if a pushout ๐ฟ+๐๐
of a span graphs ๐ฟ๐

๎ฝ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ ๐๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๐
is a complete graph, then

we must have that at least one of the graph homomorphisms ๐and ๐must be surjective on the vertex set (if not

then there would be some vertex of ๐ฟnot adjacent to some vertex of ๐
in the pushout). With this in mind now

consider any cumulative graph narrative ๎ทwhich ๐โฅ๐-satis๏ฌes ๐
โฅ๐. By De๏ฌnition 2.20 this means that for all

intervals [๐, ๐]of length at least ๐the graph ๎ท([๐, ๐]) is in the range of ๐
โฅ๐: i.e. it is a complete graph on at least

๐vertices. This combined with the fact that ๎ทis a cumulative narrative implies that every pushout of the form

๎ท([๐, ๐]) +๎ท([๐,๐]) ๎ท([๐, ๐])

yields a complete graph and hence every pair of arrows

๎ท([๐, ๐]) ๐

๎ฝ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ ๎ท([๐, ๐]) ๐

๎ฌ๎ฌ๎ฌ๎ฌ๎ฌ๎ ๎ท([๐, ๐])

must have at least one of ๐or ๐surjective. From this one deduces that for all times ๐กโฅ๐every instantaneous

graph ๎ท([๐ก, ๐ก]) must have at least ๐vertices: since ๎ท๐โฅ๐-satis๏ฌes ๐
โฅ๐, the pushout of the span

๎ท([๐กโ๐+ 1, ๐ก]) +๎ท([๐ก,๐ก]) ๎ท([๐ก, ๐ก +๐โ 1])

must be a complete graph on at least ๐vertices and this is also true of both feet of this span, thus we are done

by applying the previous observation.

Observe that, if ๐is a vertex set in ๎ณwhich determines a temporal clique in the sense of De๏ฌnition 2.21, then

this immediately determines a cumulative graph narrative ๎ทwhich ๐โฅ๐-satis๏ฌes ๐
โฅ๐and that has a monomor-

phism into ๎ณ: for any interval [๐, ๐],๎ท([๐, ๐]) is de๏ฌned as the restriction (i.e. induced subgraph) of ๎ณ([๐, ๐]) to

the vertices in ๐. The fact that ๎ทpreserves monomorphisms follows since ๎ณdoes.

For the converse direction, notice that, if ๎ทpreserves monomorphisms (i.e. the projection maps of its

cosheaf structure are monomorphisms), then, by what we just argued, for any interval [๐,๐]we have |๎ท([๐, ๐])|โฅ

|๎ท([๐, ๐])|โฅ๐. Thus, since all of the graphs of sections have a lower bound on their size, we have that there

must exist some time ๐กsuch that ๎ท([๐ก, ๐ก +๐โ 1]) has minimum number of vertices. We claim that the vertex-set

of ๎ท([๐ก, ๐ก +๐โ 1]) de๏ฌnes a temporal clique in ๎ณ(in the sense of De๏ฌnition 2.21). To that end, all that we need

to show is that the entire vertex set of ๎ท([๐ก, ๐ก +๐โ 1]) is active in every interval of length exactly ๐. To see why,

note that, since all of the projection maps in the cosheaf ๎ทare monic, every interval of length at least ๐will

contain all of the vertex set of ๎ท([๐ก, ๐ก +๐โ 1]); furthermore each pair of vertices will be connected by at least

one edge in the graphs associated to such intervals since ๎ท๐โฅ๐-satis๏ฌes ๐
โฅ๐.

Thus, to conclude the proof, it su๏ฌces to show that for all times ๐ โฅ๐โ 1 we have that every vertex of

๎ท([๐ก, ๐ก +๐โ 1]) is contained in ๎ท([๐ , ๐ ]) (notice that for smaller ๐ there is nothing to show since there is no

interval [๐ โฒ, ๐ ]of length at least ๐which needs to witness a clique on the vertex set of ๎ท([๐ก, ๐ก +๐โ 1])). To that

end we distinguish three cases.

1. Suppose ๐ โ [๐ก, ๐ก +๐โ 1], then, if ๐ > ๐ก +๐โ 1 , consider the diagram of monomorphisms

๎ท([๐ก, ๐ ])

๎ท([๐ก, ๐ก +๐โ 1]) ๎ท([๐ , ๐ +๐โ 1])

๎ท([๐ , ๐ ])

๐

๐

19

and observe by our previous arguments that ๐or ๐must be surjective on vertices. We claim that ๐is

always a vertex-surjection: if ๐is surjective on vertices, then, by the minimality of the number of vertices

of ๎ท([๐ก, ๐ก +๐โ 1]) and the fact that the diagram is monic, we must have that ๐is surjective on vertices. But

then this yields the desired result since we have a diagram of monomorphisms. Otherwise, if ๐ < ๐ก either

๐ < ๐ โ 1 (in which case there is nothing to show), or a specular argument to the one we just presented for

case of ๐ > ๐ก +๐โ 1 su๏ฌces.

2. If ๐ โ [๐ก, ๐ก +๐โ 1], then consider the following diagram

๎ท([๐กโ๐+ 1, ๐ก]) ๎ท([๐ โ๐+ 1, ๐ ]) ๎ท([๐ก, ๐ก +๐โ 1] ) ๎ท([๐ , ๐ +๐โ 1]) ๎ท([๐ก+๐โ 1, ๐ก + 2(๐โ 1)])

๎ท([๐ก, ๐ก]) ๎ท([๐ , ๐ ]) ๎ท([๐ก+๐โ 1, ๐ก +๐โ 1] )

๐ฝ

๐ผ

๐๐

and observe that, by the same minimality arguments as in the previous point, we have that ๐and ๐must

be surjective on vertices. By what we argued earlier, one of ๐ผand ๐ฝmust be surjective on vertices; this

combined with the fact that there are monomorphisms

๎ท([๐ก, ๐ก]) ๎ฑ๎ท([๐ โ๐+ 1, ๐ ]) and ๎ท([๐ก+๐โ 1, ๐ก +๐โ 1]) ๎ฑ[๐ , ๐ +๐โ 1]

(since ๐กโ [๐ โ๐+1, ๐ ]and ๐ก+๐โ 1 โ [๐ , ๐ +๐โ 1]) implies that every vertex of ๎ท([๐ก, ๐ก+๐โ 1]) is contained

in ๎ท([๐ , ๐ ]) as desired.

โ

In the world of static graphs, it is well known that dual to the notion of a clique in a graph is that of a

proper coloring. This duality we refer to is not merely aesthetics, it is formal: if a clique in a graph ๐บis a

monomorphism from a complete graph ๐พ๐into ๐บ, then a coloring of ๐บis a monomorphism ๐พ๐๎ฑ๐บin the

opposite category. Note that this highlights the fact that di๏ฌerent categories of graphs give rise to di๏ฌerent

notions of coloring via this de๏ฌnition (for instance note that, although the typical notion of a graph coloring is

de๏ฌned in terms of irre๏ฌexive graphs, the de๏ฌnition given above can be stated in any category of graphs).

In any mature theory of temporal data and at the very least any theory of temporal graphs, one would expect

there to be similar categorical dualities at play. And indeed there are: by dualizing Proposition 2.22, one can

recover di๏ฌerent notions of temporal coloring depending on whether one studies the cumulative or persistent

perspectives. This is an illustration of a much deeper phenomenon whereby stating properties of graphs in a

categorical way allows us to both lift them to corresponding temporal analogues while also retaining the ability

to explore how they behave by categorical duality.

3 Discussion: Towards a General Theory of Temporal Data

Here we tackled the problem of building a robust and general theory of temporal data. First we distilled a list of

๏ฌve desiderata (see (D1),(D2),(D3),(D4),(D5) in Section 1) for any such theory by drawing inspiration from

the study of temporal graphs, a relatively well-developed branch of the mathematics of time-varying data.

Given this list of desiderata, we introduced the notion of a narrative. This is a kind of sheaf on a poset

of intervals (a join-semilattice thereof, to be precise) which assigns to each interval of time an object of a

given category and which relates the objects assigned to di๏ฌerent intervals via appropriate restriction maps.

The structure of a sheaf arises immediately from considerations on how to encode the time-varying nature of

data, which is not speci๏ฌc to the kinds of mathematical object one chooses to study (Desideratum (D4)). This

object-agnosticism allows us to use of a single set of de๏ฌnitions to think of time varying graphs or simplicial

complexes or metric spaces or topological spaces or groups or beyond. We expect the systematic study of

di๏ฌerent application areas within this formalism to be a very fruitful line of future work. Examples abound,

but, in favor of concreteness, we shall brie๏ฌy mention two such ideas:

20

โข The shortest paths problem can be categori๏ฌed in terms of the free category functor [28]. Since this is

an adjoint, it satis๏ฌes the continuity requirements to be a change of base functor (Proposition 2.15) and

thus one could de๏ฌne and study temporal versions of the algebraic path problem (a vast generalization of

shortest paths) by relating narratives of graphs to narratives of categories.

โข Metabolic networks are cumulative representations of the processes that determine the physiological and

biochemical properties of a cell. These are naturally temporal objects since di๏ฌerent reactions may occur

at di๏ฌerent times. Since reaction networks, one of the most natural data structures to represent chem-

ical reactions, can be encoded as copresheaves [1], one can study time varying reaction networks via

appropriate narratives valued in these categories.

Encoding temporal dat a via narratives equips us with a natural choice of morphism of temp oral data, namely:

morphism of sheaves. Thus we ๏ฌnd that narratives assemble into categories (Desideratum (D1)), a fact that

allows us to leverage categorical duality to ๏ฌnd that narratives come in two ๏ฌavours (cumulative and persistent,

Desideratum (D2) depending on how information is being tracked over time. In su๏ฌciently nice categories,

persistent and cumulative narratives are furthermore connected via an adjunction (Theorem 2.10) which allows

one to convert one description into the other. As is often the case in mathematics, we expect this adjunction to

play an important role for many categories of narratives.

To be able to lif t notions from static settings to temporal ones, we ๏ฌnd that it su๏ฌces to ๏ฌrst determine canon-

ical ways to change the temporal resolution of narratives or to change the underlying categories in which they

are valued. Both of these tasks can be achieved functorially (Propositions 2.15 and 2.16 and Proposition 2.19)

and, embracing minimalism, one ๏ฌnds that they are all that is needed to develop a framework for the systematic

lifting of static properties to their temporal counterparts (D3).

Finally, addressing Desideratum (D4), we showed how to obtain change of base functors (Propositions 2.15

and 2.16) which allows for the conversion of narratives valued in one category to another. In the interest of

a self-contained presentation, we focused on only one application of these functors; namely that of building a

general machinery (De๏ฌnition 2.20) capable of lifting the de๏ฌnition of a property from any category to suitable

narratives valued in it. However, the change of base functors have more far reaching applications than this and

should instead be thought of as tools for systematically relating di๏ฌerent kinds of narratives arising from the

same dynamical system. This line of enquiry deserves its own individual treatment and we believe it to be a

fascinating new direction for future work.

In so far as the connection between data and dynamical systems is concerned (Desideratum (D5)), our

contribution here is to place both the theory of dynamical systems and the theory of temporal data on the same

mathematical and linguistic footing. This relies on the fact that Schultz, Spivak and Vasilakopoulouโs interval

sheaves [36] provide an approach to dynamical systems which is very closely related (both linguistically and

mathematically) to our notion of narratives: both are de๏ฌned in terms of sheaves on categories of intervals. We

anticipate that exploring this newfound mathematical proximity between the way one represents temporal data

and the axiomatic approach for the theory of dynamical systems will be a very fruitful line of further research

in the years to come.

References

[1] Rebekah Aduddell, James Fairbanks, Amit Kumar, Pablo S Ocal, Evan Patterson, and Brandon T Shapiro.