# Exploring the structure and function of temporal networks with dynamic graphlets

###### Abstract

With the growing amount of available temporal real-world network data, an important question is how to efficiently study these data. One can simply model a temporal network as either a single aggregate static network, or as a series of time-specific snapshots, each of which is an aggregate static network over the corresponding time window. The advantage of modeling the temporal data in these two ways is that one can use existing well established methods for static network analysis to study the resulting aggregate network(s). However, doing so loses valuable temporal information either completely (in the first case) or at the interface between the different snapshots (in the second case). Here, we develop a novel approach for studying temporal network data more explicitly, by using the snapshot-based representation but by also directly capturing relationships between the different snapshots. We base our methodology on the well established notion of graphlets (subgraphs), which have been successfully used in numerous contexts in static network research. Here, we take the notion of static graphlets to the next level and develop new theory needed to allow for graphlet-based analysis of temporal networks. Our new notion of dynamic graphlets is quite different than existing approaches for dynamic network analysis that are based on temporal motifs (statistically significant subgraphs). Namely, these approaches suffer from many limitations. For example, they can only deal with subgraph structures of limited complexity. Also, their major drawback is that their results heavily depend on the choice of a null network model that is required to evaluate the significance of a subgraph. However, choosing an appropriate null network model is a non-trivial task. Our dynamic graphlet approach overcomes the limitations of the existing temporal motif-based approaches. At the same time, when we thoroughly evaluate the ability of our new approach to characterize the structure and function of an entire temporal network or of individual nodes, we find that the dynamic graphlet approach outperforms the static graphlet approach, independent on whether static graphlets are applied to the aggregate network or to the snapshot-based network representation. Clearly, accounting for more temporal information helps with result accuracy.

## I Introduction

### I-a Motivation

Networks (or graphs) are powerful models for studying complex systems in various domains, from biological cells to societies to the Internet. Traditionally, due to limitations of data collection techniques, researchers have mostly focused on studying the static network representation of a given system [newman2010networks]. However, many real-world systems are not static but they change over time [holme2012temporal]. With new technological advancements, it has become possible to record temporal changes in network structure (or topology). Thus, on top of the traditional static network representation of the system of interest, one can now also obtain information on arrival or departure times of nodes or edges. Examples of temporal networks include person-to-person communication [priebe2005scan], online social [leskovec2008microscopic], citation [leskovec2005graphs], cellular [przytycka2010toward], and functional brain [valencia2008dynamic] networks.

The increasing availability of temporal real-world network data, while opening new opportunities, has also raised new challenges for researchers. Namely, despite a large arsenal of powerful methods that already exist for studying static networks, these methods cannot be directly applied to temporal network data. Instead, the simplest approach to deal with a temporal network is to completely discard its time dimension by aggregating all nodes and edges from the temporal data into a single static network. While this would allow to directly apply to the resulting aggregate network the existing and well established methods for static network analysis, such an aggregate or static approach loses all important temporal information from the data. To overcome this, one could model the temporal network as a series of snapshots, each of which is a static network that aggregates the temporal data observed during the corresponding time interval. Then, with such a snapshot-based network representation, one could use a static-temporal approach to study each snapshot independently via the existing methods for static network analysis and then consider time-series of the results. However, this strategy treats each network snapshot in isolation and discards relationships between the different snapshots. Clearly, both static and static-temporal approaches overlook temporal information that is important for studying evolution of a dynamic system [holme2012temporal]. Therefore, proper analysis of temporal network data requires development of conceptually novel strategies that can fully exploit the available temporal information from the data. And this is exactly the focus of our study.

### I-B Related work

Static networks. One way to study the structure of a static network is to compute its global properties such as the degree distribution, diameter, or clustering coefficient [newman2010networks]. However, even though global network properties can summarize the structure of the entire network in a computationally efficient manner, they are not sensitive enough to capture detailed topological characteristics of the complex real-world networks [GraphCrunch]. Thus, local properties have been proposed that can capture more detailed aspects of complex network structure. For example, one can study small partial subgraphs called network motifs that are statistically significantly over-represented in a network compared to some null model [milo2002network, milo2004superfamilies]. However, the practical usefulness of network motifs has been questioned, since the choice of null model can significantly affect the results [artzy2004comment, GraphCrunch], and since selecting an appropriate null model is not a trivial task [milenkovic2009optimized]. Hence, to address this challenge, graphlets have been proposed [prvzulj2004modeling], which are small induced subgraphs of a network that can be employed without reference to a null model (Fig. 1), unlike network motifs. Also, unlike network motifs, graphlets must be induced subgraphs, whereas motifs are partial subgraphs, which makes graphlets more precise measures of network topology compared to motifs [GraphCrunch]. Graphlets have been well established when studying static networks. For example, they were used as a basis for designing topologically constraining measures of network [prvzulj2004modeling] or node [milenkovic2008uncovering] similarities. These measures in turn have been used to develop state-of-the-art algorithms for various computational problems such as network alignment [milenkovic2010optimal, GRAAL, MAGNA], clustering [Solava2012graphlet, hulovatyy2014network], or de-noising [hulovatyy2014revealing], as well as for a number of application problems, such as studying human aging [Faisal2014dynamic, Faisal2014a], cancer [milenkovic2010systems, Ho2010], or pathogenicity [Solava2012graphlet, Milenkovic2011].

Temporal networks. Analogous to studying static networks from a global perspective, temporal networks can also be studied by considering evolution of their global properties [leskovec2005graphs, nicosia2012components]. As this again leads to imprecise insights into network changes with time, recent focus has shifted onto local-level dynamic network analysis via notion of “temporal motifs”. In the simplest case of the static-temporal approach, static motifs (as defined above) are counted in each snapshot and then their counts are compared across the snapshots [braha2009time]. To overcome this approach’s limitation of ignoring any motif relationships between different snapshots, the notion of static network motifs has been extended into several notions of temporal motifs [zhao2010communication, bajardi2011dynamical, kovanen2011temporal, kovanen2013temporal, jurgens2012temporal]. However, each of these existing temporal motif-based approaches suffers from at least three of the following drawbacks:

1. They can only deal with motif structures of limited complexity, such as small motifs or simple topologies (e.g., linear paths) [zhao2010communication, bajardi2011dynamical, jurgens2012temporal], which limits their practical usefulness to capture complex network structure in detail.

2. They pose additional constraints, such as limiting the number of events (temporal edges) a node can participate in at a given time point [kovanen2011temporal, kovanen2013temporal].

3. They allow for obtaining the motif-based topological “signature” of the entire network only but not of each individual node [braha2009time, zhao2010communication, bajardi2011dynamical, jurgens2012temporal, kovanen2011temporal, kovanen2013temporal], whereas the latter is very useful when aiming to link the network topological position of a node to its function via e.g., network alignment or clustering (see the above discussion on static graphlets).

4. Importantly, just as static motifs, the temporal motif-based approaches rely on a null model [braha2009time, zhao2010communication, bajardi2011dynamical, jurgens2012temporal, kovanen2011temporal, kovanen2013temporal], which again makes their practical usefuleness questionable [artzy2004comment, GraphCrunch, milenkovic2009optimized], especially since adequately choosing an appropriate null model is an even more complex problem in the dynamic setting compared to the static setting (see above).

5. They are typically dealing with directed networks (e.g., mobile communications). While this is not necessarily a drawback per se, many real-world networks are undirected (e.g., protein-protein interaction networks). Thus, these approaches cannot be directly applied to such networks.

Analogous to extending the notion of network motifs from the static to dynamic setting, recently, we took the first step to do the same with the notion of graphlets. Namely, we used graphlets, along with several other measures of network topology, as a basis of a static-temporal approach to study human aging from protein-protein interaction networks [Faisal2014dynamic]. That is, we counted static graphlets, along with the other network measures, within each snapshot (where different snapshots correspond to different human ages), and then we studied the time-series of the results to gain insights into network structural changes with age [Faisal2014dynamic]. However, in this initial work, we only used the already established notion of static graphlets within a static-temporal approach that ignored important relationships between different snapshots, in order to demonstrate that accounting for at least some temporal information in the static-temporal fashion can improve results compared to using the trivial static (aggregate) approach that has traditionally been used in the field of computational biology. Further important temporal inter-snapshot information remains to be explored via a novel truly temporal approach. In this study, we aim to develop such an approach, as follows.

### I-C Our contribution

To overcome the issues of the existing methods for temporal network analysis, we take the well established notion of static graphlets to the next level to develop new theory of dynamic graphlets that are needed for efficient truly temporal network analysis. Unlike any of the existing temporal motif-based approaches, our dynamic graphlets allow for all of the following: 1) they can study topological and temporal structures of arbitrary complexity, as permitted by available computational resources; 2) there are no limitations such as the one on the number of events that a node can participate in; 3) they can capture the topological signature of the entire network as well as of each individual node; 4) they allow for studying temporal networks without relying on a null model; 5) they complement the temporal motif-based approaches by working with undirected networks. Unlike the existing graphlet-based static-temporal approach, our dynamic graphlets explicitly consider relationships between different snapshots.

Compared to the existing methods, the closest approaches to our work are those of temporal motifs as defined in [kovanen2011temporal], static graphlets [prvzulj2004modeling, milenkovic2008uncovering], and static-temporal graphlets [Faisal2014dynamic]. Since temporal motifs have limitations (see above), the major one being dependence on a null model, they are not comparable to our dynamic graphlet approach. Static and static-temporal graphlet approaches, which ignore all temporal information or inter-snapshot temporal information, respectively, are directly comparable to our dynamic graphlet approach, which does account for inter-snapshot temporal information. Thus, our goal is to fairly compare the three approaches, in order to evaluate the effect on result accuracy of the amount of temporal information that the given approach can consider.

In the rest of the paper, we formally define our novel notion of dynamic graphlets and present an approach for enumerating all dynamic graphlets of an arbitrary size and counting them in a given network (Section II). We thoroughly evaluate the ability of dynamic graphlets to characterize the structure and function of an entire temporal network as well as of individual nodes. Namely, on both synthetic and real-world temporal network data, we measure how well our approach can group (or cluster) temporal networks (or nodes) of similar structure and function and separate those networks (or nodes) of dissimilar structure and function. We find that our dynamic graphlet approach outperforms both static and static-temporal graphlet approaches in all of these tasks (Section III). This confirms our hypothesis that accounting for more temporal information leads to better result accuracy. This in turn illustrates real-life relevance of our new dynamic graphlet methodology, especially because the amount of available temporal network data is expected to continue to grow across many domains.

## Ii Methods

We introduce the theoretic notion of dynamic graphlets in Section II-A. We give an algorithm for dynamic graphlet counting in Section II-B. We discuss a related notion of causal dynamic graphlets in Section II-C. We describe our experimental setup and evaluation framework in Section II-D.

### Ii-a Dynamic graphlets

Let be a temporal network, where is the set of nodes and is the set of events (temporal edges) that are associated with a start time and duration [holme2012temporal]. An event can be represented as a -tuple ,where and are its endpoints, is its starting time, and is its duration. Thus, each event is linked to a unique edge in the aggregate static network, whereas each static edge may be linked to multiple events. Note that here we consider undirected events, but most ideas can be extended to directed events as well.

Let be a temporal subgraph of with and , where is restricted to nodes in . Let events and be -adjacent if they share a node and if both events occur within a given time interval . Two events and are -connected if there exists a sequence of -adjacent events joining an . A temporal network is called -connected if any two of its nodes are -connected.

Let two nodes and be connected by a -time-respecting path if there is a sequence of events , such that , , , and . A temporal subgraph is -causal if it has no isolated nodes and if for every two events in this subgraph there exists a -time-respecting path containing both of the events. So, every -causal subgraph is also -connected, while the opposite is not always true.

Then, a dynamic graphlet is an equivalence class of isomorphic -causal temporal subgraphs; equivalence is taken with respect to the relative temporal order of events. For isomorphism, we do not consider events’ actual start times but only their relative ordering. Thus, two -causal temporal subgraphs will correspond to the same dynamic graphlet if they are isomorphic and their corresponding events occur in the same order. Note that we consider only -causal temporal subgraphs, in contrast to temporal motifs that consider only -connected subgraphs [kovanen2011temporal], so our definition is more restricting. Fig. 2 illustrates all dynamic graphlets with up to three events, but we evaluate larger graphlets as well.

Note that if for a given dynamic graphlet with nodes and events we discard the order of the events and remove duplicate events over the same edge, we get a static graphlet with nodes and edges, which we call the backbone of the dynamic graphlet. Each dynamic graphlet has a single backbone, while one backbone can correspond to different dynamic graphlets (Fig. 3). Supplementary Table S1 shows for each static graphlet with up to five nodes [milenkovic2008uncovering] the number of corresponding dynamic graphlets with up to ten events.

The above definitions allow us to describe all dynamic graphlets of a given size in the entire network, in order to obtain topological signature of the network. There already exists a popular notion of topological signature of an individual node in a static network, called the graphlet degree vector (GDV) the node, which describes the number of each of the static graphlets that the node “touches” at a specific “node symmetry group” (or automorphism orbit) within the given graphlet (Fig. 1) [milenkovic2008uncovering]. Analogously, one might want to describe the node’s dynamic GDV equivalent. In this case, automorphism orbits of a dynamic graphlet will be determined based on both topological (as in static case) and temporal (unlike in static case) position of a node within the dynamic graphlet. Thus, a dynamic graphlet with nodes will have different orbits (Fig. 2), whereas the number of orbits in a static graphlet of size is typically less than (Fig. 1); note that for dynamic graphlets with , there will be only one orbit, since events are undirected and thus their end nodes are topologically equivalent.

Next, we discuss the way for computing , the number of dynamic graphlets with nodes and events. Since at least edges are needed to connect nodes, it follows that for . Moreover, since we assume that events are undirected, , for any . To compute when and , notice that each dynamic graphlet with events can be formed from a dynamic graphlet with events and either or nodes, by adding a new event between some two existing nodes or between an existing node and a new node, respectively (Fig. 4).

In the first case, we take a dynamic graphlet with nodes and events and add a new event between its existing nodes, in order to obtain a dynamic graphlet with nodes and events (e.g., construct from ). Due to the -causality constraint, this new event has to involve at least one of the two nodes participating in event . We can add the new event in different ways: between one of these nodes and the “remaining” nodes (which is ways) or just duplicate event .

In the second case, we take a dynamic graphlet with nodes and events and add an event from one of its nodes to the new () node, in order to obtain a dynamic graphlet with nodes and events (e.g., construct from ). For , there are two ways to do this, since there are two potential candidates for this new event (the two endpoints of event ). Note that since events are undirected, for , the two nodes are indistinguishable from our point of view, and so we have only one way to construct a new dynamic graphlet with nodes and events.

In summary, we can get new dynamic graphlets with nodes and events from each dynamic graphlet with nodes and events. Moreover, we can get two new dynamic graphlets with nodes and events from each dynamic graphlet with nodes and events. The only exception is for , since we can get only one new dynamic graphlet with three nodes from a dynamic graphlet with two nodes, as these two nodes are indistinguishable (Fig. 2). Importantly, since each dynamic graphlet with events has a unique -“prefix” from which it was extended, all of these new dynamic graphlets with nodes will be different. Thus, we get the following recursive formulas for :

By expanding the formulas for few smallest values of and , we can get the following closed-form solution:

Supplementary Table S2 shows dynamic graphlet counts for up to and .

Since now we can compute , we next consider the task of enumerating and generating each of these dynamic graphlets (we discuss the process of counting each of the generated graphlets in Section II-B). We build upon the fact that each dynamic graphlet with events has a unique -“prefix” (see above). Thus, we start with a single event (dynamic graphlet with and ) as the current graphlet and then recursively extend the current graphlet until the desired size is reached. Supplementary Algorithm S1 illustrates our enumeration procedure.

### Ii-B Counting dynamic graphlets in a network

As now we know the number of different dynamic graphlets with a given number of nodes and events and also how to enumerate and generate each one of them, how to actually count each of the dynamic graphlets in a given network?

We perform dynamic graphlet counting in the same way as we generate the graphlets. That is, for each event in a temporal network, we use this event as the current dynamic graphlet and then search for larger graphlets that are grown recursively from the current one (Fig. 5). Supplementary Algorithms S2-S4 describe this algorithm. Its running time depends on the structure of the given temporal network. In general, since the algorithm explicitly goes through every dynamic graphlet that it counts, the running time is proportional to the number of dynamic graphlets. For a network with -adjacent event pairs, counting all dynamic graphlets with up to events takes . As with static graphlets, the running time of exhaustive dynamic graphlet counting is exponential in graphlet size (but is still practical, as we will show). Yet, as elegant non-exhaustive approaches were proposed for faster static graphlet counting [hovcevar2014combinatorial, marcus2012rage], similar techniques can be sought for dynamic graphlet counting as well.

### Ii-C Causal counting of dynamic graphlets in a network

A network having dense neighborhoods with many events between the same node pairs will have a large number of different dynamic graphlets with large counts. This is because for a given dynamic graphlet, there will be many -adjacent candidates which can be used to “grow” this dynamic graphlet. For each of these possible extensions of a dynamic graphlet, we will again have many possibilities for further extension, and so on. For example, consider a snapshot-based network representation where each snapshot is the same dense graph. Clearly, a large number of different dynamic graphlets will be detected, yet many of them will just be artifacts of the consecutive snapshots “sharing” the dense network structure.

To address this issue and remove the likely redundant graphlet counts, which is expected to also reduce computational complexity of dynamic graphlet counting, we propose a modification to the counting process from Section II-B, as follows. When we are extending a dynamic graphlet ending with event with a new event , if , i.e., if the two events correspond to the same static edge, then we impose the same two conditions as in the regular counting procedure from Section II-B: 1) the two events and must be -adjacent with , and 2) the two events must share a node. Otherwise, if , i.e., if the two events correspond to two different static edges, we also add a new third condition: to extend the dynamic graphlet ending with event with event , and cannot interact between the starting times of and (i.e., with ).

Intuitively, the new third condition requires a “causal” relationship between and : and start their interaction only after the end of (though note that there could still be an event involving and sometime before the start of ). That is, in order to extend a dynamic graphlet ending with event with some event , the two nodes participating in should not interact with each other between the start of and the start of , unless and involve the same nodes (otherwise, the counting process is as in Section II-B). This allows one to reduce the number of likely redundant temporal subgraphs that are being considered, which in turn reduced the total running time.

Note that we split the counting procedure into two above cases ( and corresponding to the same static edge, and and not corresponding to the same edge) for the following reason. We want to impose the new third condition only in the latter case, but not in the former one. This is because in the former case we still want to allow for counting dynamic graphlets having consecutive repetitions of the same event, such as or . And if we imposed the third condition in the former case as well, then such a dynamic graphlet would never be counted.

Henceforth, we refer to this modified counting procedure as causal dynamic graphlet counting. Fig. 5 illustrates the distinction between regular and causal dynamic graphlet counting procedures. Clearly, causal dynamic graphlet counting allows for examining fewer dynamic graphlet options during counting compared to regular dynamic graphlet counting, because the former excludes from consideration graphlets that are likely artifacts of repeated events, unlike the latter. As a consequence, causal dynamic graphlet counting is expected to be more computationally efficient in terms of running time.

### Ii-D Experimental setup

Graphlet methods under consideration, and the corresponding network construction strategies. We compare four graphlet-based approaches: static, static-temporal, dynamic and causal dynamic graphlets. To apply static graphlet counting to a temporal network, we first aggregate the temporal data into a single static network, by keeping the node set the same, and by adding an edge between two nodes in the static network if there are at least events between these two nodes in the temporal network. For other methods, we use a snapshot-based representation of the temporal network: we split the whole time interval of the temporal network into time windows of size , and for each time window, we construct the corresponding static snapshot by aggregating the temporal data during this window with the parameter , as above. For static and static-temporal graphlet approaches, we vary the number of graphlet nodes , and for dynamic and causal dynamic graphlet approaches, we vary both the number of graphlet nodes and the number of graphlet events .

We began our analysis by testing in detail values of 1, 2, 3, 5, and 10 on one of our data sets (see below). Since we observed no qualitative differences in results produced by the different choices of this parameter, we continued with the choice of , and we report the corresponding results throughout the paper. We also tested multiple values for in each data set (see below), and again we saw no significant qualitative differences in the results. Hence, throughout the paper, we report results for (the unit of time for this parameter depends on the data set; see below).

Network classification. An approach that captures network structure (and function) well should be able to group together similar networks (i.e., networks from the same class) and separate dissimilar networks (i.e., networks from different classes) [yaverouglu2014revealing]. To evaluate our dynamic graphlet approach against static and static-temporal graphlet approaches in this context, we generate a set of synthetic (random graph) temporal networks of nine different classes corresponding to nine different versions of an established network evolution model [leskovec2008microscopic]. We use synthetic temporal network data because obtaining real-world temporal network data for multiple different classes and with multiple examples per class is hard. And even if a wealth of temporal network data were available, we typically have no prior knowledge of which real-networks are (dis)similar, i.e., which networks belong to which functional class.

The network evolution model that we use was designed to simulate evolution of real-world (social) networks, and it incorporates the following parameters: node arrival rate, initiation of an edge by a node, and selection of edge destination. Specifically, the model is parameterized by the node arrival function that corresponds to the number of nodes in the network at a given time, parameter that controls the lifetime of a node, and parameters and that control how active the nodes are in adding new edges. By choosing different options for the model parameters, we can generate networks with different evolution processes. In particular, for our analysis, we test three different types of the node arrival function (linear, quadratic, and exponential) and two sets of parameters corresponding to edge initiation (, , , and , , ) [leskovec2008microscopic], resulting in six different network classes. We also test a modification of the network evolution model, in which each node upon arrival simply adds a fixed number of edges (in our case, 20) according to preferential attachment and then stops [barabasi1999emergence]. Intuitively, this modification corresponds to preferential attachment model extended with a node arrival function. In this way, we create three additional network classes, one for each of the three node arrival functions, resulting in nine different network classes in total.

In order to test the robustness of the network classification methods to the network size, in each of the nine classes, we test three network sizes: 1000, 2000, and 3000 nodes. Then, for each network size and class, we generate 25 random graph instances. For the above synthetic network set, we report results for the following network construction parameters: and . We tested other parameter values as well ( and ), and all results were qualitatively similar. Also, unless otherwise noted, we report results for the largest network size of 3000 nodes. Results for the other network sizes were qualitatively similar.

Given the resulting aggregate or snapshot-based network representations, we then compute static, static-temporal, or dynamic graphlet counts in each network and reduce the dimensionality of the networks’ graphlet vectors with principle component analysis (PCA). For a given graphlet vector, we keep its first two PCA components, since in all cases the first two PCA components account for more than 90% of variation. Then, we use Euclidean distance in this PCA space as a network distance measure and evaluate whether networks from the same class are closer in the graphlet-based PCA space than networks from different classes, as described below.

Node classification. We also compare the three graphlet-based methods by evaluating whether they can group together similar nodes rather than entire networks. Specifically, we measure the ability of the methods to distinguish between functional node labels (i.e., classes) based on the nodes’ graphlet-based topological signatures. As a proof of concept, we do this on a publicly available Enron dataset [priebe2005scan], which is both temporal and contains node labels. Unfortunately, availability of additional temporal and labeled network data is very limited. The Enron network is based on email communications of 184 users from 2000 to 2002, and seven different user roles in the company are used as their labels: CEO, president, vice president, director, managing director, manager, and employee.

For the above real-world network, we report results for the following network construction parameters: and months. Note that we tested other parameter values as well (, , , and ; week, weeks, month, and months), and all results were qualitatively similar.

Given the appropriate aggregate or snapshot-based network data representations, we then compute static, static-temporal, or dynamic graphlet counts of each node in the network and reduce the dimensionality of the given node’s graphlet vector with PCA. We keep the first three PCA components to account for enough of the variation. Then, we use Euclidean distance in this PCA space as a node distance measure, and evaluate whether nodes having the same label are closer in the graphlet-based PCA space than nodes with different labels, as follows.

Evaluation strategy. We have a set of objects (networks or nodes), graphlet-based PCA distances between the objects, and the objects’ ground truth classification (with respect to nine network classes or seven node labels). For a given method, we measure its graphlet-based PCA performance as follows.

First, we take all possible pairs of objects and retrieve them in the order of increasing distance, starting from the closest ones. We retrieve the object pairs in increments of (including ties), where we vary from to in increments of 0.01% until we retrieve top 1% of all pairs and in increments of 1% afterwards. If we retrieve a pair with two objects of the same ground truth class, the pair is a true positive, otherwise the pair is a false positive. At a given step, for all pairs that we do not retrieve, the given pair is either a true negative (if it contains objects of different classes) or a false negative (if it contain objects of the same class). Then, at each value of , we compute precision, the fraction of correctly retrieved pairs out of all retrieved pairs, and recall, the fraction of correctly retrieved pairs out of all correct pairs. We find the value of where precision and recall are equal, and we refer to the resulting precision and recall value as the break-even point. Since lower precision means higher recall, and vice versa, we summarize the two measures into F-score, their harmonic mean, and we report the maximum F-score over all values of . To summarize these results over the whole range of , we measure average method accuracy by computing the area under the precision-recall curve (AUPR). Moreover, we compute an alternative classification accuracy measure, namely the area under the receiver operator characteristic curve (AUROC), which corresponds to the probability of a method ranking a randomly chosen positive pair higher than a randomly chosen negative pair (and so the AUROC value of corresponds to a random result). AUPRs are considered to be more credible than AUROCs when there exists imbalance between the size of the set of network pairs that share a class and the size of the set of network pairs that do not share a class.

Second, we split all pairs of objects (and their corresponding graphlet-based PCA distances) into two classes: correct pairs (each containing two objects of the same class) and incorrect pairs (each containing two objects of two different classes). Then, we compare distances of correct pairs against distances of incorrect pairs, with the expectation that distances of the correct pairs would be statistically significantly lower than distances of the incorrect pairs. For this purpose, we compare the two sets of distances using Wilcoxon rank-sum test [hulovatyy2014network].

For each of these evaluation tests, we also evaluate all three graphlet-based methods against a random approach. First, as the simplest possible random approach (which favors the graphlet-based methods the most), we randomly embed objects (networks or nodes) into a 2-dimensional (for networks) or 3-dimensional (for nodes) Euclidean space, compute the objects’ pairwise Euclidean distances, and evaluate the resulting random approach in the same way as above. Second, as a more sophisticated and restrictive random approach (which favors the graphlet-based methods the least), for each graphlet-based method, we keep its actual PCA distances between objects, and we just randomly permute the object classes/labels before we evaluate the results. By comparing the performance of each actual method with the performance of the method’s corresponding restrictive random counterpart, we can be more confident in potential non-random behavior of the given method than with the initial simple randomization approach.

For each randomization approach, we compute its results as an average over 10 different runs. We report as “random” approach’s results the highest-scoring values over all of the different randomization schemes, in order to gain as much confidence as possible into the graphlet approaches’ results.

## Iii Results and discussion

We evaluate our novel dynamic graphlet approach against the existing static and static-temporal graphlet approaches in the context of two evaluation tasks: network classification (Section III-A) and node classification (Section LABEL:sec:results_node_classification). Also, we discuss the effect of different method parameters on the results (Section LABEL:sec:results_effects).

### Iii-a Network classification

We test how well the different methods distinguish between nine different classes of synthetic temporal networks based on the networks’ graphlet counts. The different evaluation criteria give consistent results: while according to Wilcoxon rank-sum test, all methods have intra-class distances significantly lower than inter-class distances and thus show non-random behavior (-values less than ), (causal) dynamic graphlets are superior both in terms of accuracy and computational complexity, followed by static-temporal graphlets, followed by static graphlets, (Fig. LABEL:fig:model_aupr_auroc, Fig. LABEL:fig:model_3na_3wa_3000_p_r, and Table LABEL:tab:model_analysis_results). Some additional observations are as follows: regular dynamic graphlets perform better than causal dynamic graphlets in terms of accuracy, and the two are comparable in terms of computational complexity.

Method | AUPR | AUROC | Break-even point | Maximum F-score | Running time, s |
---|---|---|---|---|---|

Static, 3-node | 0.507 | 0.935 | 0.508 | 0.613 | 3.3 (1.785) |

Static, 4-node | 0.423 | 0.882 | 0.463 | 0.468 | 3.3 (1.785) |

Static, 5-node | 0.321 | 0.807 | 0.341 | 0.376 | 3.3 (1.785) |

Static-temporal, 3-node | 0.784 | 0.947 | 0.702 | 0.707 | 3.7 (0.173) |

Static-temporal, 4-node | 0.498 | 0.826 | 0.475 | 0.476 | 3.7 (0.173) |

Static-temporal, 5-node | 0.374 | 0.790 | 0.379 | 0.390 | 3.7 (0.173) |

Dynamic, 3-event, 3-node | 0.960 | 0.994 | 0.884 | 0.885 | 0.6 (0.116) |

Dynamic, 5-event, 3-node | 0.960 | 0.994 | 0.884 | 0.885 | 0.7 (0.104) |

Dynamic, 7-event, 3-node | 0.960 | 0.994 | 0.884 | 0.885 | 1.4 (0.149) |

Dynamic, 6-event, 4-node | 0.714 | 0.937 | 0.656 | 0.660 | 4.8 (0.875) |

Causal dynamic, 3-event, 3-node | 0.949 | 0.993 | 0.881 | 0.881 | 0.6 (0.188) |

Causal dynamic, 5-event, 3-node | 0.949 | 0.993 | 0.881 | 0.881 | 0.7 (0.145) |

Causal dynamic, 7-event, 3-node | 0.949 | 0.993 | 0.881 | 0.881 | 1.5 (0.206) |

Causal dynamic, 6-event, 4-node | 0.740 | 0.939 | 0.672 | 0.675 | 4.2 (0.684) |

Random | 0.107 (0.002) | 0.499 (0.005) | 0.108 (0.006) | 0.194 (0.000) | - |