**3. Networks**

The clinical relevance of IEDs is reflected in the huge efforts made by the researchers to describe and identify them [40]. In fact, most of the past publications use traditional raw EEG analysis in order to lateralize and localize the seizure by the presence of IEDs, since the ipsilateral side presents a higher number of IEDs as compared to the contralateral [41–43]. The first evidence of distant synchronization in epilepsy occurred by the analyses of IEDs, demonstrating a hippocampal–entorhinal cortex interaction [44]. However when a synchronization analysis of the interictal period is performed, a critical issue has to be considered: the role of IEDs and the background interictal activity in the synchronization of interictal period. In reference [45], the authors deal with this question; they demonstrated that IEDs are a 1.2, 10, 13.3, 33.3% of the total time in scalp EEG, foramen ovale electrodes (FOE), electrocorticography (ECoG) and depth electrode recordings, respectively. These results give an idea of the contribution of IEDs in each type of recording to the synchronization measurement. Surprisingly, the intuitive association of a higher presence of IEDs in the ipsilateral side with a higher synchrony in the same side presents controversial results, with works favoring this possibility [46–48] and others not [49]. Perhaps this disagreement can be explained by the above-explained synchro‐ nization bias of the depth electrodes as compared to FOE, since works favoring higher synchronization in the ipsilateral side were performed in depth electrodes recordings.

The classical definition describes seizure as a hypersynchronization of a large amount of neurons; however, recent evidences present it as a more complex phenomena. As stated earlier, synchronization has to be considered a dynamical process and that is what happens in a seizure. An increase of desynchronization is observed in the first stages [50] followed by a large-scale increase in synchronization. Hypersynchronization has also been proposed as a seizure termination process, since excessive activation of neurons induces several mechanism of autoregulation entailing seizure termination [29]. Seizure synchronization depends on the spatial scale, the type of synchrony and the EEG patterns analyzed, among others. Despite hypersynchronization also occurs in seizure at cellular level, only a 30% of neurons change its firing rate [50] during partial seizures. This suggests that a dynamical approach is more

The role played by desynchronization in epilepsy has been well documented in the literature [49–53]. Far from challenging the classical point of view, desynchronization has been integrat‐ ed into the epilepsy facts providing a new perspective. It occurs not only at a global scale but also at the cellular level, since desynchronization has also been found in seizure-like events of

First evidences of desynchronization in seizure were reported by Gastaut et al. [54], by describing the electrodecremental seizures. Since then, several works have reported desynch‐ ronization prior to seizures onset. Desynchronization has been described in the analyses of depth electrodes recordings by using phase synchronization methodology. A decrease in the mean phase coherence occurs 15–20 min after seizure onset [53]. Similar results were found only in the beta-band [55]. Two hypotheses were derived from these results; one suggests that desynchronization favors the recruitment of regions until full synchronization is achieved [46],

appropriate to analyze seizure synchronization.

92 Advanced Biosignal Processing and Diagnostic Methods

*2.4.2. Desynchronization*

cellular studies [52].

Traditionally the brain has been considered as a compartmentalized structure with particular functions in each area. However, over the last decade a network approach has been proposed as a more accurate model for brain functioning, leading to the appearance of the connectome concept [66], a connectivity map derived from the neurophysiological and imaging data.

Besides the network-oriented study of physiological brain connectivity, the study of several pathologies, such as epilepsy, has also been focused on the network paradigm. Evidences from EEG studies have raised this alternative point of view. In fact, the ILAE proposed a new terminology including the network concept for the classification of seizures and epilepsies [8]. Moreover, several studies of the ictogenesis [3–6] suggested that seizures are caused by the abnormal activity of a network rather than by an isolated area malfunction. All these infor‐ mation, in particular the last statement, has boosted a large amount of re-analysis of EEG recordings under this new perspective [4,5,11]. Indeed, a rising number of works have appeared in the recent years supporting this idea [12–18].

To deal with this new paradigm, studies are increasingly using graph theory, a mathematical framework that studies the general properties – graphical, topological, statistical, etc. – of a set of nodes interconnected by links. Any kind of system can be described and characterized under this framework as long as the system's elements can adequately be represented by network´s nodes and their relations by links. In the case of the brain, and in particular with respect to the neurophysiological characterization, network nodes are represented by cortical areas covered by the electrodes' contacts and the links between them by the existing synchronization level in their electrical activity. As shown below, the type of links considered between the cortical areas determines the type of network.

Considering the brain as a connectome, three main categories of parameters can be used to extract valuable information of the network activity. These three categories correspond to the three scales where a network can be evaluated, the most basic, centrality or nodal measures; the intermediary, community structures; and the most global, the topological organization. Centrality measures study the significance of the nodes inside the network by determining its characteristics; community structures are based on the recognition or assessment of commun‐ ities of nodes, so-called clusters or modules; and topological organization uses the average of some of the centrality parameters to determine the properties and architectures of a given network. These variables can be correlated with behavioral data (task performing results), clinical data (treatment or surgery outcome) or different pathologies providing a valuable knowledge or a key target in the pathological network. Thus, in the next section, network parameters have been explained providing definitions and mathematical notations, and its use in epilepsy has been discussed.

A final remark regarding the nature of the network approach is in order here. When dealing with very large networks, like networks of networks, composed of a very large number of nodes, the proper approach to network characterization is by the statistical mechanics of network. In this sense, network characterization is preferably done by the statistical properties of their nodes and/or links. The most common examples are for instance to look at the statistical distribution of the nodes connectivity ("degree", see below) and ask whether these distribu‐ tions fit in any of the standard distributions: random networks, scale-free networks, smallworld networks, etc. However, these kinds of networks have typically a huge quantity of nodes, which allows to study their properties across several scales. A typical example of these kinds of networks is the internet, composed of routers and computers as nodes, and the wires and cables, which connect them as the physical links. The kind of networks we are able to characterize in studying neurophysiological records is nonetheless of a very different kind.

### **3.1. Types of networks**

EEG studies have raised this alternative point of view. In fact, the ILAE proposed a new terminology including the network concept for the classification of seizures and epilepsies [8]. Moreover, several studies of the ictogenesis [3–6] suggested that seizures are caused by the abnormal activity of a network rather than by an isolated area malfunction. All these infor‐ mation, in particular the last statement, has boosted a large amount of re-analysis of EEG recordings under this new perspective [4,5,11]. Indeed, a rising number of works have

To deal with this new paradigm, studies are increasingly using graph theory, a mathematical framework that studies the general properties – graphical, topological, statistical, etc. – of a set of nodes interconnected by links. Any kind of system can be described and characterized under this framework as long as the system's elements can adequately be represented by network´s nodes and their relations by links. In the case of the brain, and in particular with respect to the neurophysiological characterization, network nodes are represented by cortical areas covered by the electrodes' contacts and the links between them by the existing synchronization level in their electrical activity. As shown below, the type of links considered between the cortical

Considering the brain as a connectome, three main categories of parameters can be used to extract valuable information of the network activity. These three categories correspond to the three scales where a network can be evaluated, the most basic, centrality or nodal measures; the intermediary, community structures; and the most global, the topological organization. Centrality measures study the significance of the nodes inside the network by determining its characteristics; community structures are based on the recognition or assessment of commun‐ ities of nodes, so-called clusters or modules; and topological organization uses the average of some of the centrality parameters to determine the properties and architectures of a given network. These variables can be correlated with behavioral data (task performing results), clinical data (treatment or surgery outcome) or different pathologies providing a valuable knowledge or a key target in the pathological network. Thus, in the next section, network parameters have been explained providing definitions and mathematical notations, and its use

A final remark regarding the nature of the network approach is in order here. When dealing with very large networks, like networks of networks, composed of a very large number of nodes, the proper approach to network characterization is by the statistical mechanics of network. In this sense, network characterization is preferably done by the statistical properties of their nodes and/or links. The most common examples are for instance to look at the statistical distribution of the nodes connectivity ("degree", see below) and ask whether these distribu‐ tions fit in any of the standard distributions: random networks, scale-free networks, smallworld networks, etc. However, these kinds of networks have typically a huge quantity of nodes, which allows to study their properties across several scales. A typical example of these kinds of networks is the internet, composed of routers and computers as nodes, and the wires and cables, which connect them as the physical links. The kind of networks we are able to characterize in studying neurophysiological records is nonetheless of a very different kind.

appeared in the recent years supporting this idea [12–18].

areas determines the type of network.

94 Advanced Biosignal Processing and Diagnostic Methods

in epilepsy has been discussed.

We briefly summarize here some basic types of networks. The most basic representation of a network is by considering only the nodes and links the network is made of. **Figure 2A** represents a network of this type composed of 34 nodes and 77 links between some of the nodes.

A step into a more complete description of a network is by adding "weights" to the links, that is, it is not only relevant whether or not two different nodes are connected by a link, but also the intensity of the links does also matter. This is represented in **Figure 2B** in such a way that links' weights are represented by lines width, such that more intense connections are repre‐ sented by thicker lines.

In the case we are working on, this is represented by the estimation of the synchronization level between the electrical activities covered by the corresponding contacts.

More complex representations may be achieved when directionally is introduced in the interaction between two different nodes, as it is represented in **Figure 2C**.

Other situation including finer details is represented in **Figure 2D** such that nodes' character‐ istics are also included in the description, represented in this case by the nodes' sizes. Other, more complex situations can be represented in the network descriptions.

**Figure 2.** Different types of networks constructed with 34 nodes: (A) unweighted undirected network with equally im‐ portant nodes; (B) weighted undirected network with equally important nodes; (C) weighted directed nodes with equally important nodes and (D) weighted directed network with unequally important nodes.

From a mathematical point of view, a "simple" network, as the one of **Figure 2A**, is fully characterized by giving the "adjacency matrix" whose elements are binary numbers *aij* denoting the presence or absence of edges, or links, between nodes *i*and *j*, that is *aij* = 1 if a link between node *i* and node *j* does exist and *aij* = 0 if not. Because the adjacency matrix is a symmetric matrix, that is, if a link between nodes *i* and *j* exists, then *aij* = *aji* =1, the total number of links in network with adjacency matrix *aij* is the sum of 1's in *aij* divided by 2 (because of symmetry) minus the number of nodes in the networks (diagonal elements).

When dealing with networks like the one depicted in **Figure 2B**, the adjacency matrix contains the weights, that is, the 1's in the adjacency matrix are replaced by the corresponding weights *wij*. These kinds of networks are called weighted networks. Both kinds of networks, weighted and unweighted, are typical examples of functional connectivity representation in the neurophysiological realm. Effective connectivity on the contrary, when directionality counts are typically represented with the networks, is depicted in **Figure 2C** and **D** [10].

#### **3.2. Networks from time series**

Having described the basic properties of networks, the following step is to know how to construct the network from the recording time series. This is a critical step when the objective is to analyze neurophysiological recordings under a network perspective.

**Figure 3.** Network construction from simulated time series: (A) three correlated time series, X, Y and Z, (B) correlation (Pearson) matrix of time series of panel A, (C) network corresponding to the correlation matrix of panel B (threshold = 0.3) and (D) network corresponding to the correlation matrix of panel B (threshold = 0.6).

In **Figure 3**, the basic steps of constructing a simple network from simulated time series are displayed. Three synthetic time series X, Y and Z are shown in **Figure 3A**. With the objective to know whether any kind of functional connectivity exists between these time series, a synchronization measure (see Section 2.3) is calculated. In this way, an estimation of the potential relations between these recordings is assessed. **Figure 3B** shows a simple correlation estimate, Eq. (1), between these three time series. This figure shows the existence of a correla‐ tion close to 0.8, a rather intense value, between X and Y time series; the correlation between X and Z is close to 0.5, and between Y and Z is close to 0.2. Note that the correlation calculation accomplished in this way provides connectivity between any pair of time series even for the cases with very low values, giving rise to a fully connected network. This means that appa‐ rently uncorrelated time series, with a correlation values close to 0, will nonetheless be linked. Several methods can be used to eliminate these weak links. The first and more obvious is to select only those statistically significant correlations. On the contrary, one can choose an arbitrary threshold and eliminate those correlations below this particular value. This is what is displayed in **Figure 3C** where a threshold equal to 0.3 has been used. The basic network constructed in this way possesses only two links, X-Y and X-Z, because the link Y-Z, equal to 0.2, has been eliminated by the used threshold of 0.3. Whether a more stringent threshold is used, for instance equal to 0.6 as in **Figure 3D**, one of the former links is also discarded, X-Z, and the new network possess only one link, X-Y and one isolated node, Z. We have constructed in this way a non-connected network, because it possesses isolated nodes.

of links in network with adjacency matrix *aij* is the sum of 1's in *aij* divided by 2 (because of

When dealing with networks like the one depicted in **Figure 2B**, the adjacency matrix contains the weights, that is, the 1's in the adjacency matrix are replaced by the corresponding weights *wij*. These kinds of networks are called weighted networks. Both kinds of networks, weighted and unweighted, are typical examples of functional connectivity representation in the neurophysiological realm. Effective connectivity on the contrary, when directionality counts

Having described the basic properties of networks, the following step is to know how to construct the network from the recording time series. This is a critical step when the objective

**Figure 3.** Network construction from simulated time series: (A) three correlated time series, X, Y and Z, (B) correlation (Pearson) matrix of time series of panel A, (C) network corresponding to the correlation matrix of panel B (threshold =

In **Figure 3**, the basic steps of constructing a simple network from simulated time series are displayed. Three synthetic time series X, Y and Z are shown in **Figure 3A**. With the objective to know whether any kind of functional connectivity exists between these time series, a synchronization measure (see Section 2.3) is calculated. In this way, an estimation of the potential relations between these recordings is assessed. **Figure 3B** shows a simple correlation estimate, Eq. (1), between these three time series. This figure shows the existence of a correla‐ tion close to 0.8, a rather intense value, between X and Y time series; the correlation between X and Z is close to 0.5, and between Y and Z is close to 0.2. Note that the correlation calculation

0.3) and (D) network corresponding to the correlation matrix of panel B (threshold = 0.6).

symmetry) minus the number of nodes in the networks (diagonal elements).

are typically represented with the networks, is depicted in **Figure 2C** and **D** [10].

is to analyze neurophysiological recordings under a network perspective.

**3.2. Networks from time series**

96 Advanced Biosignal Processing and Diagnostic Methods

**Figure 4.** Network construction from neurophysiological time series: (A) actual time series from subdural electrodes and (B) matrix of absolute values of the correlation (Pearson) measure. Solid black squares delimit intra-area interac‐ tions.

A more complex and real example is depicted in **Figure 4**, taken from a typical neurophysio‐ logical recording of subdural electrodes. The set of electrodes comprises two subdural grids of 5×4 and 4×8 electrodes and a strip of 1×8 electrodes. A typical recoding lasting 10 s is displayed in **Figure 4A** and the correlation matrix in panel B. Note that all of the correlations values are positive. This is so because we have plotted, and also used, the absolute value of the correlation estimate. No matter in which "direction" the relation exists as long as it exists. It is easy to recognize in this figure the approximate boundaries of intra-area correlations (black solid lines). As mentioned above, the next step is in the selection of a threshold with the objective of simplifying the network. In **Figure 5A** and **B**, two examples of thresholded correlation matrices with 0.2 and 0.5, respectively, are displayed. Using this information the last step is to construct the network as the ones displayed in **Figure 6**. In the first case, **Figure 6A**, the correlation matrix with a threshold of 0.2 was used to construct the network. Due to the low value of threshold employed, 0.2, too many links populate the network. When greater threshold value is employed, as 0.5, only those stronger links remain (**Figure 6B**). As a final remark, note that both networks displayed in **Figure 6** seem to be of the kind unweighted (see Section 3.1), because no apparent differences exist between the links' width. However, every link has a weight associated with it, which is given by the corresponding correlation value. Thus, from this point on one can choose between two different scenarios to work, whether on an unweighted or weighted network. Different network properties and measures are explained in the next sections.

**Figure 5.** Network construction from neurophysiological time series: (A) Filtered (thresholded) correlation matrix when a threshold equal to 0.2 is applied and (B) filtered (thresholded) correlation matrix when a threshold equal to 0.5 is applied.

**Figure 6.** Network construction from neurophysiological time series: (A) network from time series of **Figure 4**, derived from the correlation matrix of **Figure 5A** and **(B)** network from time series of **Figure 4**, derived from the correlation matrix of **Figure 5B**.

#### **3.3. Centrality measures**

Centrality measures aim to study the nodes' characteristics and their relevance inside the network (**Figure 7**). Centrality measures characterize hubs nodes inside the network, a fact of surmount importance regarding seizure onset and spread. There are several centrality measures classified accordingly with the characteristics they measure, but we will only present here the most used in the literature, namely: degree, betweenness and local synchronization strength (for review see [10,26,67–69]). All these measures can be calculated for both weighted and unweighted graphs, although we only include here those corresponding to unweighted graphs. When appropriate, weighted definitions are going to be explained. For an extended review of weighted definitions, see [69].

**Figure 7.** Centrality measures in a simulated network. In red, the node with maximum clustering coefficient. In blue, the node with maximum degree and, in yellow, the maximum betweenness. (a) Disordered network. (b) ordered net‐ work according to numeration, i.e. nodes are numbered according to their neighborhood. (c) ordered network accord‐ ing to numeration highlighting nodes with maximum values of centrality measures.

#### *3.3.1. Concepts*

every link has a weight associated with it, which is given by the corresponding correlation value. Thus, from this point on one can choose between two different scenarios to work, whether on an unweighted or weighted network. Different network properties and measures

**Figure 5.** Network construction from neurophysiological time series: (A) Filtered (thresholded) correlation matrix when a threshold equal to 0.2 is applied and (B) filtered (thresholded) correlation matrix when a threshold equal to 0.5

**Figure 6.** Network construction from neurophysiological time series: (A) network from time series of **Figure 4**, derived from the correlation matrix of **Figure 5A** and **(B)** network from time series of **Figure 4**, derived from the correlation

Centrality measures aim to study the nodes' characteristics and their relevance inside the network (**Figure 7**). Centrality measures characterize hubs nodes inside the network, a fact of surmount importance regarding seizure onset and spread. There are several centrality

are explained in the next sections.

98 Advanced Biosignal Processing and Diagnostic Methods

is applied.

matrix of **Figure 5B**.

**3.3. Centrality measures**

As shown in Section 3.1, an unweighted network is fully described by the adjacency matrix *aij*. The number of links of a particular network node is called *node's degree*. The degree *ki* of a node *i* is the number of edges that connect to other nodes

$$k\_i = \sum\_{j \in N} a\_{ij} \tag{3}$$

where *N* is number of network's nodes and *aij* are the binary element of the adjacency matrix. In a directed graph, the node's degree corresponds to the sum of ongoing *ki in* and outgoing *ki out* edges, *ki* =*ki in* <sup>+</sup> *ki out* . The importance of a node inside the network is directly linked to its degree level, i.e. a node with high degree possesses a great number of connections with other nodes of the network, increasing substantially connectivity with the rest of the network.

*Betweenness* can be defined as the capability of a node to facilitate the communication across the network. Betweenness of a node is defined as the number of shortest pathways that pass through this node. The betweenness *bi* of a node *i* is

$$b\_i = \sum\_{j,k \in N, j \neq k} \frac{n\_{jk}(i)}{n\_{jk}} \tag{4}$$

being *njk* (*i*) the number of shortest pathways passing through node *i*, and *njk* the total number of shortest pathways between nodes *j* and *k*. The betweenness concept is also applicable to edges, being the number of shortest pathways passing through a particular edge. A node with high betweenness has a great influence in the communication between other network nodes serving itself as an in-between relay. A node with a high degree may have a high betweenness; however, a node with high betweenness may have a low degree if it is located in a strategic position in the network.

*Local synchronization*, also known as *strength*, is the sum of weights of a particular node with its first neighbors divided by its degree. Thus, the local synchronization is represented as [70]

$$\mathbf{w}\_i = \frac{1}{n\_i} \sum\_{j=1}^{n\_i} \mathbf{w}\_{ij} \,, \tag{5}$$

being *wij* the synchronization value between nodes *i* and *j*, and *ni* is the number of first neighbors of node *i*. Local synchronization gives an idea of the contribution of each node to the total synchronization activity; a node with a higher local synchronization will contribute greatly to the global synchronization and perhaps to determine role in a network as a hub.

*Clustering coefficient* is defined as the proportion of neighbors' nodes that are also neighbor one of each other, characterizing the local connectedness in a network. According to [71], the clustering properties can be overestimated if weights are not considered when calculating clustering coefficient. So, the weighted clustering coefficient of node *i* is

$$\mathbf{c}\_{i} = \frac{1}{s\_{i}(k\_{i} - 1)} \sum\_{j,k} \frac{\mathbf{w}\_{ij} + \mathbf{w}\_{ik}}{2} a\_{ij} a\_{ik} a\_{jk},\tag{6}$$

where *ki* is the degree of *i*, *si* is its strength, *aij* are the binary elements of the adjacency matrix and *wij* are the weights between nodes *i* and *j*. The clustering is considered a segregation parameter because it describes the existence of specialized nodes, i.e. higher clustering coefficient means a higher connection density in the local subnetwork that surrounds the given node.

The following measure is not exactly a centrality measure, but nonetheless its importance has been explained in the following sections. The *Shortest path lengths* is the smallest number of edges that connect two nodes *i* and *j*, that is

$$d\_{ij} = \sum\_{a\_{\text{av}} \in g\_{\text{s} \ast \omega\_{\text{s}}}} a\_{\text{av}}\,,\tag{7}$$

where *gi*↔*<sup>j</sup>* is the shortest path between *i* and *j* across the network nodes. The shortest path lengths is considered a measure of integration because it describes connectivity between distant nodes. This is why shortest path lengths is more informative as a global parameter, providing information about the global network integration through the average path length (see Section 3.5).

#### *3.3.2. Applications*

*ki out* edges, *ki* =*ki*

position in the network.

where *ki* is the degree of *i*, *si*

*in* <sup>+</sup> *ki out*

100 Advanced Biosignal Processing and Diagnostic Methods

through this node. The betweenness *bi*

. The importance of a node inside the network is directly linked to its

Î ¹ *<sup>n</sup>* <sup>=</sup> å (4)

<sup>=</sup> å (5)

<sup>+</sup> <sup>=</sup> - <sup>å</sup> (6)

is its strength, *aij* are the binary elements of the adjacency matrix

is the number of first

degree level, i.e. a node with high degree possesses a great number of connections with other nodes of the network, increasing substantially connectivity with the rest of the network.

*Betweenness* can be defined as the capability of a node to facilitate the communication across the network. Betweenness of a node is defined as the number of shortest pathways that pass

( ) *jk*

*n i*

being *njk* (*i*) the number of shortest pathways passing through node *i*, and *njk* the total number of shortest pathways between nodes *j* and *k*. The betweenness concept is also applicable to edges, being the number of shortest pathways passing through a particular edge. A node with high betweenness has a great influence in the communication between other network nodes serving itself as an in-between relay. A node with a high degree may have a high betweenness; however, a node with high betweenness may have a low degree if it is located in a strategic

*Local synchronization*, also known as *strength*, is the sum of weights of a particular node with its first neighbors divided by its degree. Thus, the local synchronization is represented as [70]

> 1 <sup>1</sup> , *<sup>i</sup> <sup>n</sup> i ij i j s w <sup>n</sup>* <sup>=</sup>

neighbors of node *i*. Local synchronization gives an idea of the contribution of each node to the total synchronization activity; a node with a higher local synchronization will contribute greatly to the global synchronization and perhaps to determine role in a network as a hub.

*Clustering coefficient* is defined as the proportion of neighbors' nodes that are also neighbor one of each other, characterizing the local connectedness in a network. According to [71], the clustering properties can be overestimated if weights are not considered when calculating

, <sup>1</sup>

and *wij* are the weights between nodes *i* and *j*. The clustering is considered a segregation

*ij ik i ij ih jh*

being *wij* the synchronization value between nodes *i* and *j*, and *ni*

clustering coefficient. So, the weighted clustering coefficient of node *i* is

1 ,

*i i j k*

() 2

*w w <sup>c</sup> aa a s k*

of a node *i* is

, ,

*jk N j k jk*

*i*

*b*

The most basic application of centrality nodes in epilepsy is in localizing areas involved in seizures. In [70] an approximation to this critical issue was carried out with the objective to assess whether nodes with high local synchronization participate in seizures in one way or another. In this study, functional connectivity was evaluated during intra-operatory ECoG by using three different measures: cross-correlation, phase synchronization and mutual informa‐ tion (Section 2.3), with a better performance of the two firsts [70]. Those cortical areas covered by electrodes with higher local synchronization seem to be deeply involved in seizures appearance because when these areas were resected during the surgery, patients remained without post-operative seizures. These results agree with other groups that observed higher synchrony in seizure onset zone [6,46,72].

Moreover, those areas with higher local synchronization also display low temporal variability, suggesting that their stability is also critical at the time to be involved in seizure generation [15]. It is argued [15] that the existence of particular areas with both high local synchronization and low temporal variability increase *seizurability*, i.e. the capability of the network to seize. On the contrary, no correlation could be established between these high synchronization areas and seizure onset zones. Altogether, these results seem to favor the hypothesis about seizures generation, which postulates that desynchronization is a preexistent state of the cortical areas and a transient synchronization help to spread the seizures.

The above-reported findings were all accomplished during the interictal period. However, long-run analysis carried out on subdural electrodes was also performed with the objective to explore the dynamics of these high local synchronization areas. In one study [18] of a patient with partial seizures – with and without secondary generalizations – a similar analysis was carried out. The analysis during partial seizures revealed temporal changes in those areas with higher local synchronization. Both types of seizures start in areas with high interictal local synchronization and both seizures present similar patterns in the first part of the seizure. These data support the hypothesis of the role of interictal local synchronization areas in seizure formation.

To summarize, altogether these data demonstrate how the centrality measures are a valuable tool for the analysis of invasive neurophysiological recordings, since it makes possible the characterization of the cortical dynamics in epilepsy patients. Specifically, these kinds of works prove the existence of stable local synchronization areas, which are involve in seizures generation because if they are surgically removed, the patients present better outcomes. The existence of these local synchronization areas implies the existence of areas with no high connectivity but also very intense and temporally stable local synchronization. It seems therefore that the cortex of epilepsy patients presents a highly heterogeneous connectivity, something that has been proved by immunohistochemistry, genetics and electrophysiological studies [73–75]. In addition, computational studies have shown that those areas of high local synchrony facilitate the global synchronization processes [24]. The stability of those local synchrony areas has been demonstrated that induce a change in network topology, to a smallworld architecture (see Section 3.5.1), simplifying the synchronous activity between regions and favoring seizure onset.

#### **3.4. Community structures**

Detection of community structures is aimed to study the topological organization of a network accordingly with its subnetworks [26]. Community structures characterize clusters of tightly connected nodes inside the entire network. There are several community measures, the most used are motifs and modularity [69]. In the last years several methods to detect community structures have been published with great differences in both performances and capabilities, some of them using highly sophisticated algorithms [26].

#### *3.4.1. Concepts*

*Modularity* determines how well a given partition or division in a complex network corre‐ sponds to a natural or expected sub-division, i.e. which groups of nodes are more connected between them than with other nodes of the network. Thus modularity is defined as [69]

$$\mathcal{Q} = \frac{1}{2m} \sum\_{i,j} (a\_{ij} - \frac{k\_i k\_j}{2m}) \sigma(c\_i, c\_j), \tag{8}$$

where *m* is the number of edges, *aij* is the element of the adjacency matrix, *ki* and *kj* are the degree of node *i* and *j*, respectively; *ci* is the type (or component) of *i*, *cj* that of *j*, the sum goes over all *i* and *j* pairs of vertices, and *σ* (*x*, *y*) is 1 if *x* = *y* and 0 otherwise.

In addition to the above-mentioned definition of community, an important issue in community structures is the method to be used to find them. Unlike other network parameters that are computed exactly, community structure calculations are obtained by optimizing algorithms. Although several and highly sophisticated algorithms to calculate community exist [26], one of them, based on cutting a hierarchical tree, will be explained in the following section to understand its importance. A *Hierarchical clustering* algorithm is a method based on the construction of a hierarchy or tree based in similarities. The lower branches of the tree are composed of those more closely related nodes. In order to construct a hierarchical tree, a "distance" between objects is firstly defined and then, an ordering of distances is performed with the aim to construct the tree. A typical measure of distance is the so-called Gower distance

$$d\_{(i,j)} = \sqrt{2(1-\rho\_{\circ})}\,,\tag{9}$$

based on the Pearson correlation (Eq. (1)) *ρij*. In doing so, elements highly correlated with *ρij* close to 1 attain distances close to 0. Then, one can construct a hierarchical tree by grouping those elements with similar distances. The process of assignations of nodes to a group or cluster can be done by combining nodes into groups by using an agglomerative method, or by separating groups into smaller ones by means of divisive methods. The single-linkage, complete-linkage and the average-link are the most common agglomerative methods. Once a hierarchical tree, also known as dendrogram, is constructed, the last step is simply to cut the tree at a particular level, obtaining the clusters or communities. A simple example can be observed in [26].

#### *3.4.2. Applications*

synchronization and both seizures present similar patterns in the first part of the seizure. These data support the hypothesis of the role of interictal local synchronization areas in seizure

To summarize, altogether these data demonstrate how the centrality measures are a valuable tool for the analysis of invasive neurophysiological recordings, since it makes possible the characterization of the cortical dynamics in epilepsy patients. Specifically, these kinds of works prove the existence of stable local synchronization areas, which are involve in seizures generation because if they are surgically removed, the patients present better outcomes. The existence of these local synchronization areas implies the existence of areas with no high connectivity but also very intense and temporally stable local synchronization. It seems therefore that the cortex of epilepsy patients presents a highly heterogeneous connectivity, something that has been proved by immunohistochemistry, genetics and electrophysiological studies [73–75]. In addition, computational studies have shown that those areas of high local synchrony facilitate the global synchronization processes [24]. The stability of those local synchrony areas has been demonstrated that induce a change in network topology, to a smallworld architecture (see Section 3.5.1), simplifying the synchronous activity between regions

Detection of community structures is aimed to study the topological organization of a network accordingly with its subnetworks [26]. Community structures characterize clusters of tightly connected nodes inside the entire network. There are several community measures, the most used are motifs and modularity [69]. In the last years several methods to detect community structures have been published with great differences in both performances and capabilities,

*Modularity* determines how well a given partition or division in a complex network corre‐ sponds to a natural or expected sub-division, i.e. which groups of nodes are more connected between them than with other nodes of the network. Thus modularity is defined as [69]

> <sup>1</sup> ( ) ( , ), 2 2 *i j ij i j*

*k k Q a cc m m* = - å

In addition to the above-mentioned definition of community, an important issue in community structures is the method to be used to find them. Unlike other network parameters that are computed exactly, community structure calculations are obtained by optimizing algorithms.

s

(8)

and *kj*

that of *j*, the sum goes

are the

,

degree of node *i* and *j*, respectively; *ci* is the type (or component) of *i*, *cj*

over all *i* and *j* pairs of vertices, and *σ* (*x*, *y*) is 1 if *x* = *y* and 0 otherwise.

*i j*

where *m* is the number of edges, *aij* is the element of the adjacency matrix, *ki*

formation.

102 Advanced Biosignal Processing and Diagnostic Methods

and favoring seizure onset.

**3.4. Community structures**

*3.4.1. Concepts*

some of them using highly sophisticated algorithms [26].

Communities or cluster detection has been successfully applied to neurophysiological data coming from scalp and FOE [28,49]. In these works, clustering detection was done by hierarchical clustering using a single-linkage clustering method. The aim of clustering detection was used to detect exactly the opposite, that is, those electrodes which do not belong to any cluster, or declustered nodes. Detection of declustered electrodes is important because it allows to correctly lateralize the ipsilateral side to seizures during the interictal period in TLE patients [28,49]. This calculation is performed through a lateralization index, quantifying which lobe possesses more declusterized/desynchronized electrodes. However, some controversy exists about the synchronization level of the ipsilateral side, since there are works describing higher synchronization in the ipsilateral side [76,77]. This controversy could be explained because of the different kinds of invasive electrodes, and different recording areas, used in those studies.

Community structures detection has been also used over subdural electrodes as in [18] in order to calculate the modularity. In this work it is shown that the value of modularity decreases during the seizures as compared with the preictal levels. Similar results are found by using a combination of scalp and FOE.

These results provide evidence that community detection is a promising diagnostic tool for network epilepsy, since it could help to determine the side of the seizure in TLE patients in semi-invasive interictal recordings of 1 or 2 h, saving time and using a less disturbing and a cheaper technique. Community detection can also help to determine the ictal dynamics through the analysis of modularity in ECoG and scalp and FOE. In addition to the abovementioned community structures measures, others parameters can also help to analyze communities. Those are the network resilience measures, which define the resistance of a network to remove the random or critical nodes, as occurs in epilepsy surgery, for review see [69].

#### **3.5. Topological organization**

The epileptic network can also be characterized by changes in its topological organization which is reflected in the changes of other several parameters. One way to quantifying these changes is through averages, over the whole network, of certain measures, as for instance the shortest path length (Eq. (7)). Another way consists of transforming the entire network into a simplified network, called the minimum spanning tree, in order to study the main properties of the actual network by using the simplified one, instead.

#### *3.5.1. Concepts*

*Average shortest path length* (APL) is a network parameter employed to provide information of how fast or slow is the communication transfer through the network nodes, i.e. the average number of steps along the shortest paths through the network nodes. APL is defined as

$$APL = \frac{1}{n(n-1)} \sum\_{i \neq j} d(\mathbf{v}\_i, \mathbf{v}\_j),\tag{10}$$

being *n* the number of nodes and *d*(*vi* , *vj* ) the shortest path lengths between nodes *vi* and *vj* , calculated by Eq. (7).

The *density of links* (DoL) is the ratio between the actual number of links and all possible links of the network. It provides information of how globally connected is the network. DoL is calculated as follows

$$DoL = \frac{\#of\text{ existing links}}{\#of\text{ possible links}}.\tag{11}$$

Both APL and DoL are related, i.e. a high DoL implies a low APL because a higher number of links entails higher possibilities to interconnect nodes and reaching this connection by using shortest paths. On the other hand, one cannot assume that a low APL implies a high DoL, because the presence of long-distance connected nodes favor the low APL without a high number of links, this is measured by the next parameter, the clustering coefficient.

*Average clustering coefficient* (ACC) measures how well neighbors nodes of a particular node are connected between them, characterizing local connectedness. ACC is defined as

$$ACC = \frac{1}{n} \sum\_{i=1}^{n} c\_i,\tag{12}$$

being *n* the number of nodes and *cj* clustering coefficient of node *i*, calculated by Eq. (6).

The use of these three parameters allows a broad classification of networks in three groups: random, small-world and scale-free networks. *A random network* is a network with a uniform distribution of links, i.e. every node is connected with other every network's node with uniform probability. On the contrary, *small world network* is that network in which nodes have high local connectivity, i.e. high clustering coefficient, and some nodes also have long-distance connec‐ tions. This last property represents that these small-world networks have a small average path length. Lastly, a *scale-free network* is that network in which most of the nodes have few local connections but some of them, called hubs, have a high number of connections. In the context of the average parameters, all three types can also be defined: random networks presented a low ACC and APL, regular networks showed a high ACC and low APL, small-world presented a high ACC and a low APL and scale-free presented similar characteristics to the small-world network.

The *minimum spanning tree* (*MST)* is a simplification of the full network into another, simpler, network. It is a tree without closed paths, i.e. from a node *i* to a node *j* always exists a unique path. The MST is obtained by the construction of a matrix based on the distance matrix, in the same way the construction of a hierarchical tree is done (see Section 3.4.1). The MST possesses the feature of retaining the more important links in the original network under the simplest topology.

#### *3.5.2. Applications*

cheaper technique. Community detection can also help to determine the ictal dynamics through the analysis of modularity in ECoG and scalp and FOE. In addition to the abovementioned community structures measures, others parameters can also help to analyze communities. Those are the network resilience measures, which define the resistance of a network to remove the random or critical nodes, as occurs in epilepsy surgery, for review see

The epileptic network can also be characterized by changes in its topological organization which is reflected in the changes of other several parameters. One way to quantifying these changes is through averages, over the whole network, of certain measures, as for instance the shortest path length (Eq. (7)). Another way consists of transforming the entire network into a simplified network, called the minimum spanning tree, in order to study the main properties

*Average shortest path length* (APL) is a network parameter employed to provide information of how fast or slow is the communication transfer through the network nodes, i.e. the average number of steps along the shortest paths through the network nodes. APL is defined as

> <sup>1</sup> ( , ), ( 1) *i j i j APL dv v n n* <sup>¹</sup>

The *density of links* (DoL) is the ratio between the actual number of links and all possible links of the network. It provides information of how globally connected is the network. DoL is

> # . # *of existing links DoL*

Both APL and DoL are related, i.e. a high DoL implies a low APL because a higher number of links entails higher possibilities to interconnect nodes and reaching this connection by using shortest paths. On the other hand, one cannot assume that a low APL implies a high DoL, because the presence of long-distance connected nodes favor the low APL without a high

*Average clustering coefficient* (ACC) measures how well neighbors nodes of a particular node

number of links, this is measured by the next parameter, the clustering coefficient.

are connected between them, characterizing local connectedness. ACC is defined as

, *vj*

<sup>=</sup> - å (10)

*of possiblelinks* <sup>=</sup> (11)

) the shortest path lengths between nodes *vi* and *vj*

,

[69].

*3.5.1. Concepts*

**3.5. Topological organization**

104 Advanced Biosignal Processing and Diagnostic Methods

being *n* the number of nodes and *d*(*vi*

calculated by Eq. (7).

calculated as follows

of the actual network by using the simplified one, instead.

To consider the topological aspects of networks, especially their changes, is of critical impor‐ tance in its relation with epilepsy as it was demonstrated in several works [12,17,78]. A typical example of the application of network changes during seizures was recently presented by Vega-Zelaya et al. [18]. In this work differences in the network structure, constructed upon subdural recordings, between preictal, ictal and postictal stages were found. It is shown that after seizure onset of a partial seizure with secondary generalization, a decrease in both the modularity and the APL jointly with an increase in the DoL and the ACC exists.

Recently, the study of the transition from the preictal to the ictal period, recorded in scalp and FOE, reported that in 72% of the cases, an increase in the DoL during seizures with a decrease in the APL in 68% of cases exists. This fact suggests an increase in connectivity in the underlying functional network likely provoked by the small-world ictal architecture [58]. Although other works show a shift toward a regular network during the preictal-ictal transition [12,13,16], the difference could be explained by the use of FOE, which records electrical activity at the extrahippocampal areas [28]. In this regard, Mormann et al. [79] has revealed a different synchronization levels in the entorhinal cortex and hippocampus areas. Vega-Zelaya et al. [58] also reported an imbalance between ipsilateral and contralateral side, resulting in lower DoL and ACC and a higher APL in the ipsilateral side than the contralateral one. These results are also supported by fMRI studies [77,80], and even by results of studies of patients with extratemporal seizures, which presented lower connectivity in the seizure area [81].

The application of topological parameters to the analysis of epilepsy turned out to be a great tool for network characterization, either in ECoG, scalp or FOE recordings. It has uncovered the dynamics and connectivity of the brain in TLE as well in the extratemporal ones. In fact, these works showed a lack of connectivity in the seizure area. In particular, in TLE the lack of connectivity in the ipsilateral side could be somehow related to the ipsilateral impairment found in the community structures analysis of FOE [49]. Moreover, loss of connectivity within specific network structures has been involved in seizure generation [82], and computational models has revealed that connections deletion increases seizure likelihood [83].

Also, the use of the MST has provided to be of great importance in describing different types of functional architecture [68]. In that work, the MST was used to simplify the underlying network with the objective to localize particular areas of interest, as the node's degree, betweenness and local synchronization. As it was shown, critical nodes in the MST are those with highest local synchronization. Moreover, when different types of critical parameters, as maximum local synchronization, maximum betweenness, concur at a particular cortical area, resection of these area correlates with a goof post-operative outcome. **Figure 8** displays three different MST architectures with the critical nodes marked in each case. In the last case, **Figure 8C**, the three nodes with maximal local synchronization, betweenness and degree concur at the same location, that is node #2. During the surgery, a minimal cortical resection involved this cortical area and the patient remained free of seizures [68].

**Figure 8.** Centrality measures and minimum spanning tree (MST) constructed from ECoG data from two different lo‐ cations. (A, B, C) Represent three examples from three patients. Electrodes are represented by gray circles (location 1) and white circles (location 2). The node with maximun local synchronization is represented by a cyan circle, the node with maximun degree by a yellow circle and The node with maximun betweenness by a red-border circle. Magenta circle represents superposition of the three centrality measures in the same node.
