## Abstract

Symbolic dynamics is a powerful tool for studying complex dynamical systems. So far many techniques of this kind have been proposed as a means to analyze brain dynamics, but most of them are restricted to single-sensor measurements. Analyzing the dynamics in a channel-wise fashion is an invalid approach for multisite encephalographic recordings, since it ignores any pattern of coordinated activity that might emerge from the coherent activation of distinct brain areas. We suggest, here, the use of *neural*-*gas algorithm* (Martinez et al. in IEEE Trans Neural Netw 4:558–569, 1993) for encoding brain activity spatiotemporal dynamics in the form of a symbolic timeseries. A codebook of k prototypes, best representing the instantaneous multichannel data, is first designed. Each pattern of activity is then assigned to the most similar code vector. The symbolic timeseries derived in this way is mapped to a network, the topology of which encapsulates the most important phase transitions of the underlying dynamical system. Finally, global efficiency is used to characterize the obtained topology. We demonstrate the approach by applying it to EEG-data recorded from subjects while performing mental calculations. By working in a contrastive-fashion, and focusing in the phase aspects of the signals, we show that the underlying dynamics differ significantly in their symbolic representations.

## Introduction

There are many complex dynamical systems in nature, the function of which defy analysis with traditional approaches applied to recorded signals. When the observed dynamics are relatively simple, e.g. stationary periodicities, long-established analytical tools, such as the Fourier transform, can sufficiently characterize the signal patterns. More complex dynamics, such as bifurcations and chaotic oscillations require more sophisticated approaches. The challenges posed by brain activity are more severe due to the inherent nonlinearities and the metastability of the underlying system.

Among the most important techniques in temporal data mining lies symbolization, also known as symbolic time-series analysis. Symbolization involves the transformation of raw signal measurements into a time series of discretized symbols. The discrete representation of original time series makes available a variety of powerful techniques, founded on information and communication theory, for a more mathematically-concrete manipulation of dynamics. For example, the properties of symbolic encodings are part of the core theory in communication (Shannon and Weaver 1998), Markov chains for discrete systems (Seneta 1981) and bioinformatics (Baldi and Brunak 1998).

The earliest developments in symbolic dynamics began with the study of the complex behavior of dynamical systems. In 1898, Hadamard developed a symbolic description of sequences in geodesic flows on surfaces of negative curvature (Hadamard 1898). Specifically, he identified a finite set of forbidden symbol pairs those which cannot occur and noted that possible sequences were those which did not contain the forbidden pairs. The notion of forbidden patterns was recently applied in financial time series (Zanin 2008). The developments in symbolic dynamics followed several diverse directions, including the analysis of nonlinear oscillators, the treatment of nonlinear maps, and the establishment of a connection with information theory and the notion of metric entropy (a detailed review: (Daw et al. 2001).

A generic method for analyzing a dynamical system, that exploits the properties of its trajectory in a phase space (obtained via time-delay embedding of the original 1D time series), is based on recurrence plots (Marwan et al. 2007) and aims at revealing the dynamical invariants of the system. Recently, a technique called Fuzzy Symbolic Dynamics (FSD) has been proposed to enhance this information mapping (Duch and Dobosz 2011). FSD attempts to cluster each multidimensional point to a neighborhood and then to map the encapsulated information to a simplified and more understandable two or three dimensional diagram.

Various complexity measures, stemming from information theory (for a review see Gao et al. 2011), were lately applied to symbolic sequences derived from multichannel EEG/MEG data in order to understand the nature of brain dynamics, to develop novel diagnostic methods for brain pathologies and also to discriminate between different cognitive tasks. In a recent study, EEG data from Alzheimer patients were transformed into symbols of 0, 1, 2 employing the median, maximum and minimum value of the amplitude as thresholds in a channelwise fashion (Abasolo et al. 2006). Subsequently, the *central tendency* and the *Lempel*–*Ziv complexity* measures were applied (for definitions refer to (Gao et al. 2011)). In an MEG study (Amigo et al. 2010) employing data from ADHD children and controls, the authors adopted a spatio-temporal approach, in which the symbolization was first performed independently for each channel, by using the mean amplitude of the signal as a threshold to produce binary sequences. They then applied a new permutation complexity measure based on forbidden and ordinal patterns. Finally, the technique of *ordinal patterns* itself can be considered as a symbolization approach that has already gained popularity and found important applications, e.g. in the detection of epileptic seizures (Ouyang et al. 2010).

The available symbolization techniques work either with the original 1D time series or with its representation in a reconstructed phase space. In the case of multichannel EEG/MEG recordings where the complex system dynamics are densely sampled (and correspond to activations from distributed brain networks), a more delicate encoding is desirable. The component-wise treatment (in which symbols are assigned separately for each channel’s signal) is unsatisfactory, as it misses possible patterns of coordinated brain activity. Considering that such patterns are dynamic signatures of segregation and integration around which cognition is known to revolve, the pursuit of a symbolization scheme that would respect them was a plausible research objective.

This paper introduces the use of neural-gas algorithm (Martinez et al. 1993) for symbolic encoding of neural spatiotemporal dynamics. The multichannel signal is considered as a time-dependent sequence of instantaneous patterns (vectors) that when fed to a suitable vector-quantization scheme can be transformed to a symbolic time series. Neural-gas is a self-organization network that efficiently derives the codebook (i.e. a set of prototypical patterns) that can describe the given multichannel data in a faithful manner. The codebook design corresponds to the symbols-selection step and precedes the vector quantization step which corresponds to symbol assignment step. Neural-gas has already been successfully applied to clustering temporal patterns of MEG response (Laskaris et al. 2004), organizing odour responses in optical recordings data (Laskaris et al. 2008) and classifying saccadic eye-movements (Bozas et al. 2010). Its ability to mine key-patterns from voluminous datasets is exploited, for the first time here, in the setting of multichannel encephalographic recordings.

The structure of this paper is organized as follows. In “Methods”, the neural-gas based symbolization scheme is described and followed by an algorithm that represents brain dynamics as a network topology that emphasizes state transitions. Section “Results” is devoted to the results obtained by applying the proposed technique to experimental EEG-data. Section "Discussion” discusses the benefits and the potential of the proposed methodology.

## Methods

### Neural-gas based symbolization

Assume that some unknown sources contribute to a multidimensional signal that is changing in time, for example an EEG/MEG signal measured by N electrodes:

The vector X(t) = [x_{1}(t), x_{2}(t) …, x_{N}(t)] represents the state of the “dynamical system” at time t.

The partition of all T vectors x(t) into groups of homogenous patterns is the most direct way to summarize the temporal variations in the EEG/MEG recordings. In our approach, a codebook of k code vectors is designed by applying the neural-gas algorithm^{Footnote 1} to the data matrix **X**
^{data}. This algorithm is an artificial neural network model, which converges efficiently to a small number k < < T of codebook vectors {M_{i}}_{i=1:k}, using a stochastic gradient descent procedure with a soft-max adaptation rule that minimizes the average distortion error (Martinez et al. 1993).

The nearest code vector k is then assigned to each of the T vectors X(t). In this way, the bulk of information contained in the data matrix is represented, in a parsimonious way, by a (T × k) partition matrix U, with elements u_{ij} indicating the assignment of input vectors to code vectors. Following the inverse procedure, we can rebuilt with a small reconstruction error **X**
^{data} from the k code vectors. The reconstructed version of **X**
^{data} is denoted as **X**
^{data}_{
R
}
. To compute the fidelity of the overall encoding procedure, an index which is the total distortion error divided by the total dispersion of the data is adopted:

The smaller the n_{Distortion}, the better the encoding. This index gets smaller with the increase of k, while reaches a plateau for a relative small value of k. In the present study, we considered as acceptable encoding the one produced with the smallest k and simultaneously satisfied the condition that n_{Distortion} should be less than 8%. Hence, we repeatedly applied the neural-gas algorithm with increasing k and measured the reconstruction quality. In this way we defined the optimal k_{o}, which in turn defined the codebook to use in the subsequent symbolization scheme. At the vector-quantization stage, each vector X(t) is assigned (according to the nearest-prototype rule) to the most similar among the derived prototypical patterns M_{i}, i = 1, 2, …, k_{o}. This step completes the mapping from multichannel data to a symbolic time series s(t), t = 1, 2, … ,T, which in mathematical notation reads as follows

This, one and only, timeseries has encoded the spatiotemporal dynamics of brain activity as succession of adaptively-defined (i.e. data-dependent) symbols. The temporal aspects of the dynamics can be red directly in the symbols timecourse, while the spatial patterning of brain activity can be deciphered only implicitly. Having in mind that in many situations the ultimate goal of data analysis is to provide a systematic quantitative comparison of the dynamics observed at different recording conditions (e.g. rest vs. active state), we describe next a novel scheme that can fully exploit the derived symbolic timeseries towards this end.

### A network representation of neural-gas based symbolic time series

Recently, a method to convert a sequence of symbols into a weighted directed network has been introduced (Sinatra et al. 2010). This opens the possibility to characterize a given symbolic sequence in terms of well-established network metrics and further facilitates the comparison between symbolic sequences on the basis of network topologies. For consistency, we first summarize the main ideas in the original general setting and then describe how they were adopted for the purposes of the particular study. The method starts by first defining **k**-motifs which are particular strings of length **k**. After enumerating all the motifs in the given symbolic sequence, a network is built with nodes representing the different motifs and links denoting pairs of motifs with statistically significant co-occurrence in the sequence.

In our implementation, we restricted ourselves to single-symbol motif. Hence the obtained network consists of k_{o}-nodes (i.e. each node corresponds to a particular code vector). The links of the network indicates those symbol pairs that were found lying consecutively in the symbolic time series. The direction of the links indicates the order of appearance and their weights have been estimated with the following procedure. We first estimated the observed probability p^{obs} (α, β) that symbol α is followed by symbol β within the symbolic timeseries s(t). To detect the significantly correlated appearance of symbols, we need to estimate the probability of random co-occurrence of these two symbols. We denote as p(α) and p(β) the probabilities of finding the two symbols in s(t). The symbol α can occupy positions ranging from the first to the (T − 1)th position, where T is the length of s(t). For each fixed position i of α, with i = 1, …, (T − 1), there are (T – 1 − i) possible positions for β to appear in the sequence. Hence, the number of possible transitions α_{→}β within s(t) is given by the equation:

A weight w_{α},_{β} can be associated with the link from α to β, based on the extent to which the number of observed transitions deviates from the expected value:

The obtained network topology emphasizes the state transitions that appear systematically and, therefore, are expected to have a crucial role in brain function.

Among the whole battery of metrics that can be applied to the derived *codebook*-*network*, we describe here the use of (weighted) *directed global efficiency* (GE), which in the case of a k_{o}-nodes network takes the form

GE is the inverse of the harmonic mean of the shortest path lengths between every pair of nodes (The d_{ij} values in Eq. 6 indicate the results of a simple transform that is applied to w_{α,β} values so as to get ‘translated’ into pairwise ‘distances’ between nodes (Latora and Marchiori 2001)). Its values range between 0 and 1, with high values indicating an increased (with respect to randomness) number of state transitions, and hence a highly non-stable system.

### Contrasting brain dynamics

The issue of comparing spatiotemporal dynamics from different brain states or associated with different tasks remains open. This is mainly due to the high inter-subject variability and the nature of encountered signals that do not comply with the conditions of normality and stationarity which are necessary for the applicability of traditional methods. To extract dynamic invariants, i.e. characteristics which robustly describe the underlying system regardless the particular realization of the available recordings and the presence of noise, is the usually preferred path. The application of standard metrics to the codebook-network(s) falls within this category and could be considered as an appealing option. In this study, however, we found (experimentally) that a slightly modified strategy can facilitate better the direct comparison between spatiotemporal dynamics. The difference of the adopted approach lies in the design of codebook, which is common for the two (or more) conditions to be compared. Provided the datasets **X**
^{data} = {x_{i}(t)} and **Y**
^{data} = {y_{i}(t)}, i = 1, …, N and t = 1, 2, …, T, the neural-gas algorithm is applied to the augmented dataset **Z**
^{data} = [**X**
^{data}|**Y**
^{data}]. Using the derived code vectors, both the symbolization step and the formation of codebook-network proceed as before. In this way, the GE measure derived for each of the condition to be compared has now been expressed in common terms (i.e. reffers to the same codebook) and, hence, reflects differences in a more concrete manner. Figure 1 provides a schematic illustration of the proposed strategy.

## Results

### Experimental data

To demonstrate the suggested methodology, we utilized EEG data from healthy subjects recorded while performing two different mental arithmetic tasks (comparison and multiplication) and during a resting state (control). The particular datasets have been used in previous studies (Micheloyannis et al. 2005; Dimitriadis et al. 2010a, b) and its description is provided in this article as supplementary material. Here, the purpose was to test if our symbolization scheme can subserve the comparison of brain activity dynamics. For comparison purposes, we also applied the relevant technique of *ordinal patterns* (Ouyang et al. 2010), which has gained high popularity and its function is based on symbols (associated with the ordinal patterns) assigned in a channel-wise fashion.

### Different signal representations

Various comparisons were performed after filtering the signal appropriately and using the frequency-band as parameter (e.g. θ, α_{1}; see Table 1). Apart from the frequency range, we tested extensively if the (filtered) signal in its original form, or in a form that either emphasizes amplitude or phase dynamics, facilitates better the differentiation between different recording conditions. To isolate the amplitude and phase dynamics from the filtered signal __x__(t), we applied the Hilbert transform (Cohen 1995), which returns the *instantaneous amplitude* A(t) and *instantaneous phase* φ(t) and is defined as follows

where λ is the Cauchy principal value for the integral. An illustration of the three different signal representations, derived from the timeseries recorded at particular channel, is provided in Fig. 2.

### Differentiation of task-related brain dynamics

The new symbolization scheme, followed by the codebook-network analysis, was applied, in a contrastive fashion, for all possible pairs of recording conditions (control—comparison, control—multiplication and comparison—multiplication). For every frequency band and each of the three different signal representations (i.e. __x__(t), A(t), φ(t)), the pair of GE-measures was derived independently for each subject. To summarize across subjects, the computed set of GE-pairs were analyzed via the Wilcoxon-test. Figure 1, depicts schematically the overall procedure. Setting as significance level *P* = 0.001, we filtered out the non-significant results. Figure 3, illustrates the comparison of brain activity dynamics, which was performed on the basis of single-subject’s data and referred to the codebook-network representation. The contrasted conditions (control and multiplication) are associated with different connectivity patterns (a noticeable difference lies in the identity of forbidden transitions) and these differences have a direct implication to the measured GE-metric.

The statistical analysis of GE-values showed that phase representation was the most suitable one for detecting task-related changes in brain dynamics. Table 1 includes the corresponding, averaged across-subjects, scores.

The most important trend is that GE, which in this setting described the spatiotemporal dynamics of instantaneous phase, succeeded to discriminate between the tasks in the whole frequency spectrum. Interestingly, the control condition is characterized by significantly lower GE-values for all frequency bands.

The observation about the enhanced importance of phase information in the multichannel symbolization, seems in accordance with recent findings. Phase synchronization reflects the exact timing of communication between distant but functionally related neural populations (for a review see Sauseng and Klimesch 2008). According to a well-known hypothesis (Varela et al. 2001), the most plausible mechanisms for neural integration are the formation of particular dynamical links that are reflected as phase-synchronisation in the EEG signals. The derived codebook manifests such patterns of phase-coupling and the transition-network indicates that the dynamic motifs are task-dependent.

Finally, it is important to mention here that the approach of ordinal patterns (considered as an alternative symbolization scheme which was applied in channel-wise fashion) failed to reveal significant differences between the mathematical tasks.

## Discussion

A symbolization scheme capable of handling multichannel recordings of brain activity and useful for contrasting dynamics from different conditions was introduced and applied to EEG data from mental calculations. Considering the emerging patterns of coordinated activity as an important aspect of underlying mechanisms, we developed a symbolic dynamics methodology that respects brain’s multistable character.

Among the outcomes of this study was that during multiplication GE values are higher than during comparison (for all frequency bands). The above observation is important since the two mathematical tasks depend upon neurophysiological processes that are known to differ regarding their nature and the distribution of the activated brain regions. According to several neuroimaging studies, the comparison task is a more localized procedure while difficult (two-digits) multiplication demands the activation of a widely distributed network (Micheloyannis et al. 2005—see Supp. Material).

At a methodological level, our approach bears some common characteristics with the *mode level cognitive subtraction* (MLCS) (Banerjee et al. 2008). However, our scheme relies on a non-linear summarisation of the multichannel data and the network representation of the mode sequences. Moreover, our approach shares the ‘prototyping’ step with the pioneer work of segmenting brain activity into functional microstates (Pascual-Marqui et al. 1995). However, it incorporates advanced algorithms for both codebook design (which in our case is subject-dependent) and treating the dynamics (symbolic timeseries are mapped to network topologies).

Our scheme can be readily adapted to various recording modalities (MEG, fMRI etc.) and used for comparing dynamics between healthy and diseased brains and based on a variety of different representations (e.g. network metrics time series; Dimitriadis et al. 2010a).

## References

Abásolo D, Hornero R, Gómez C, García M, López M (2006) Analysis of EEG background activity in Alzheimer’s disease patients with Lempel–Ziv complexity and central tendency measure. Med Eng Phy 28:315–322

Amigó JM, Zambrano S, Sanjuán MAF (2010) Permutation complexity of spatiotemporal dynamics. EPL. doi:10007/10.1209/0295-5075/90/10007

Baldi P, Brunak S (1998) Bioinformatics: the machine learning approach, 2nd edn. MIT Press, Cambridge

Banerjee A, Tognoli E, Assisi C, Kelso S, Jirsa V (2008) Mode level cognitive subtraction (MLCS) quantifies spatiotemporal reorganization in large-scale brain topographies. Neuro Image 42:663–674

Bozas K, Dimitriadis SI, Laskaris NA, Tzelepi A (2010) A novel single-trial analysis scheme for characterizing the presaccadic brain activity based on a SON representation paper presented at the 20th ICANN 2010, Thessaloniki, Greece, 15–18 Sep 2010

Cohen L (1995) Time-frequency analysis: theory and applications, Chap. 2. Prentice-Hall, Upper Saddle River, p 30

Daw CS, Finney CEA, Tracy ER (2001) Symbolic analysis of experimental data. Review of Scientific Instruments

Dimitriadis SI, Laskaris NA, Tsirka V, Vourkas M, Micheloyannis S (2010a) Tracking brain dynamics via time-dependent network analysis. J Neurosci Methods 193:145–155

Dimitriadis SI, Laskaris NA, Tsirka V, Vourkas M, Micheloyannis S, Fotopoulos S (2010b) What does delta band tell us about cognitive processes: a mental calculation study. Neurosci Lett 483:11–15

Duch W, Dobosz K (2011) Visualization for understanding of neurodynamical systems. Cogn Neurodyn 5:145–160

Gao J, Hu J, Tung W (2011) Complexity measures of brain wave dynamics. Cogn Neurodyn 5:171–182

Hadamard J (1898) Les surfaces à courbures opposées et leurs lignes géodésiques. J Math Pures et Appl 4:27–73

Laskaris N, Fotopoulos S, Ioannides AA (2004) Mining information from event related recordings. IEEE Signal Process Mag 21:66–77

Laskaris N, Kosmidis EK, Vucinic D, Homma R (2008) Understanding and characterizing olfactory responses. IEEE Eng Med Biol 27:69–79

Latora V, Marchiori M (2001) Efficient behaviour of small-world networks. Phys Rev Lett 87:198701

Martinez T, Berkovich S, Schulten K (1993) Neural-gas network for vector quantization and its application to time-series prediction. IEEE Trans Neural Netw 4:558–569

Marwan N, Romano MC, Thiel M, Kurths J (2007) Recurrence plots for the analysis of complex systems. Phys Reports 438:237–329

Micheloyannis S, Sakkalis V, Vourkas M, Stam CJ, Simos PG (2005) Neural networks involved in mathematical thinking: evidence from linear and non-linear analysis of electroencephalographic activity. Neurosci Lett 373:212–217

Ouyang G, Dang C, Richards DA, Li X (2010) Ordinal pattern based similarity analysis for EEG recordings. Clin Neurophysiol 121:694–703

Pascual-Marqui RD, Michel CM, Lehmann D (1995) Segmentation of brain electrical activity into microstates: model estimation and validation. IEEE Trans Biomed Eng 42:658–665

Sauseng P, Klimesch W (2008) What does phase information of oscillatory brain activity tell us about cognitive processes? Neurosci Biobehav Rev 32:1001–1013

Seneta E (1981) Non-negative matrices and markov chains, 2nd edn. Springer, New York

Shannon CE, Weaver W (1998) The mathematical theory of communication reprinted. University of Illinois Press, Urbana

Sinatra R, Condorelli D, Latora V (2010) Networks of motifs from sequences of symbols. Phys Rev Lett 105:178702

Varela F, Lachaux JP, Rodriguez E, Martinerie J (2001) The brain web: phase synchronization and large-scale integration. Nat Rev Neurosci 2:229–239

Zanin M (2008) Forbidden patterns in financial time series. Chaos 18:013119

## Author information

### Authors and Affiliations

### Corresponding author

## Electronic supplementary material

Below is the link to the electronic supplementary material**.**

## Rights and permissions

## About this article

### Cite this article

Dimitriadis, S.I., Laskaris, N.A., Tsirka, V. *et al.* A novel symbolization scheme for multichannel recordings with emphasis on phase information and its application to differentiate EEG activity from different mental tasks.
*Cogn Neurodyn* **6**, 107–113 (2012). https://doi.org/10.1007/s11571-011-9186-5

Received:

Revised:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s11571-011-9186-5