EEG Pattern Classiﬁcation of Picking and Coordination Using Anonymous Random Walks

: Tacit coordination games are games where players are trying to select the same solution without any communication between them. Various theories have attempted to predict behavior in tacit coordination games. Until now, research combining tacit coordination games with electrophysiological measures was mainly based on spectral analysis. In contrast, EEG coherence enables the examination of functional and morphological connections between brain regions. Hence, we aimed to differentiate between different cognitive conditions using coherence patterns. Speciﬁcally, we have designed a method that predicts the class label of coherence graph patterns extracted out of multi-channel EEG epochs taken from three conditions: a no-task condition and two cognitive tasks, picking and coordination. The classiﬁcation process was based on a coherence graph extracted out of the EEG record. To assign each graph into its appropriate label, we have constructed a hierarchical classiﬁer. First, we have distinguished between the resting-state condition and the other two cognitive tasks by using a bag of node degrees. Next, to distinguish between the two cognitive tasks, we have implemented an anonymous random walk. Our classiﬁcation model achieved a total accuracy value of 96.55%.


Introduction
Tacit coordination games are games where two or more individuals are trying to select the same solution out of the same set of options without any communication between them [1]. In games and problems of this kind, where there are several Nash equilibria points, classical game theory recommends choosing the options at random (i.e., picking) [2]. According to this analysis of classical game theory, in tacit coordination games, the predicted chance of successful coordination is 1 N , where N is the number of Nash equilibrium points. Despite this assumption, experimental studies have shown that human coordination abilities are significantly higher than 1/N (e.g., [3][4][5][6][7]). This difference between the predicted results by classical game theory and actual performance stems from the fact that classical game theory considers only the rewards associated with each solution, which is the same for all Nash equilibrium points, regardless of cues such as color, size, shape and spatial location [8][9][10]. These cues may affect the preference of the player, who may choose the more prominent solution to the game. The more salient solutions are known as focal points [8][9][10].
Until now, research combining tacit coordination games with electrophysiological measures was mainly based on spectral analysis (e.g., [11][12][13]). Another tool that can describe the dynamics of activation during cognitive tasks is coherence. EEG coherence (e.g., [14][15][16]) measures the similarity between two different signals, recorded simultaneously at different sites of the scalp, based on the normalized cross-power spectrum per frequency of the two signals. Thus, it measures the degree of synchronization between their oscillatory activities. Using these two methodologies, we can provide complementary insights into the dynamics of brain activation and reveal important patterns of neurological activity accompanying tacit coordination. Power spectrum analysis is an important part of EEG analysis and enables the extraction of key discriminative features associated with different cognitive processes. In contrast, EEG coherence enables the examination of functional and morphological connections between brain regions [17].
In a previous study [11], we tried to differentiate between three cognitive states, resting state, picking and coordination, by using EEG power spectrum measures. However, in that study, we constructed a complex model that was based on a deep CNN combined with a transfer learning method and involved only frontal and pre-frontal electrodes. The resultant model was a weighted combination of all frontal electrodes based on the use of a genetic algorithm. In contrast, in the current study, we would like to differentiate between the three abovementioned conditions using coherence patterns that are manifested throughout the scalp and involve all the electrodes using graph theory.
Previous studies have used various EEG classification methods to predict different clinical states and humans' behavioral patterns, such as sleep disorders [18], Alzheimer's [19] and upcoming emergency brakings during simulated driving [20]. Some of the studies used the fact that the EEG recording includes a large number of electrodes that have a spatial relationship between them, according to their location on the scalp, and used graph theory to improve the classification results (e.g., [21][22][23]). In the current study, we have transformed the raw EEG signals into a graph. Each graph contained 16 nodes (equivalent to the 16 EEG channels) while the arcs between nodes were determined by coherence analysis. To assign each graph (16 EEG epochs) into its appropriate label, we have constructed a hierarchical classifier. In the first stage, we have distinguished between the resting-state condition and the other two cognitive tasks, namely picking and coordination. This task was accomplished by a relatively simple feature embedding process in which the graph was represented by a low-dimensional vector (e.g., [24][25][26]). This was achieved by using a bag of node degrees [27,28], which represents the distribution of the node degree in the graph assuming a random sampling of the nodes.
Next, to distinguish between the two cognitive states (i.e., picking and coordination), we have implemented a more computationally complex method, namely an anonymous random walk [24], which better represents the structure of the graph by mapping the indexes of the visited nodes during different random walks. Random walks are the sequences of nodes, where each new node is selected independently from the set of its neighbors, regardless of the previous nodes in the sequence. Recently, it has been shown that an anonymized version of a random walk is a reliable representation of a graph even when node labels are not considered [29]. By using the hierarchical classifier, we have managed to avoid using the more complex computations, by first implementing a relatively simple embedding process and only then proceeding with a more complex technique applied only on the selected graphs. Our hierarchical classification model achieved a total accuracy value of 96.55%. However, since we worked with an unbalanced dataset, we measured the precision of each of the different labels. Precision of 99.33% was achieved for the resting-state condition, whereas, for the picking and coordination conditions, the precision was 90.60% and 88.8%, respectively. This study has three main contributions. First, we have managed to construct a classifier that can distinguish between task and no-task states (the first stage of the hierarchical classifier). Second, by using coherence patterns represented by anonymous random walk embeddings, we have managed to predict the cognitive state of a task, picking or coordination. Third, we have shown that different cognitive states are associated with different graph configurations, while each graph represents an electrophysiological pattern. These findings are discussed along with future research possibilities.

Materials and Methods
In this study, players participated in an experiment that consisted of three conditions, resting-state, picking and coordination. In the resting-state condition, EEG activity with eyes open was recorded for two minutes while participants focused on a red cross on the screen overlayed over a grey background. The other two conditions, picking and coordination, were each based on the same set of stimuli and presentation schemes. However, the instructions given in each of the conditions differentiated between them, as will be explained below. In the picking and coordination conditions, participants were presented with two sets of 12 different trials, each with a different set of words. For example, game board #1 displayed a trial containing the set {"Water", "Beer", "Wine", "Whisky"} appearing in Hebrew. Each set of words was displayed between two short vertical lines following a slide containing only the lines without the word set so that participants would focus their gaze at the center of the screen ( Figure 1A,B).

Materials and Methods
In this study, players participated in an experiment that consisted of thr resting-state, picking and coordination. In the resting-state condition, EEG eyes open was recorded for two minutes while participants focused on a re screen overlayed over a grey background. The other two conditions, pickin nation, were each based on the same set of stimuli and presentation schem the instructions given in each of the conditions differentiated between th explained below. In the picking and coordination conditions, participants w with two sets of 12 different trials, each with a different set of words. For e board #1 displayed a trial containing the set {"Water", "Beer", "Wine", "Wh ing in Hebrew. Each set of words was displayed between two short vertical l a slide containing only the lines without the word set so that participant their gaze at the center of the screen ( Figure 1A,B). In the picking condition, participants were only required to freely pick each set of four words presented to them in each of the 12 trials. In the coo dition, participants were instructed to coordinate their choice of a word with partner so that they would end up choosing the same word from the set. Par further informed that they would receive an amount of 100 points for each word in the picking task, and for each successful coordination in the coor The participants were 10 students from Ariel University that were enrolled courses on campus (right-handed, mean age = ~26, SD = 4).
Error! Reference source not found. portrays the outline of the experim containing the set of words (task trials) was preceded by a slide containing cal lines without the word set (stand-by slides) to keep the gaze of participa dle of the screen throughout the experiment. Each of the stand-by slides w for U(2,2.5) s, while each slide containing the set of words was presented duration of 8 ]s[. Following a task trial, participants could move to the ne button press. The sequence of the task trials was randomized in each sessio  In the picking condition, participants were only required to freely pick a word out of each set of four words presented to them in each of the 12 trials. In the coordination condition, participants were instructed to coordinate their choice of a word with an unknown partner so that they would end up choosing the same word from the set. Participants were further informed that they would receive an amount of 100 points for each selection of a word in the picking task, and for each successful coordination in the coordination task. The participants were 10 students from Ariel University that were enrolled in one of the courses on campus (right-handed, mean age =~26, SD = 4). Figure 2 portrays the outline of the experiment. Each slide containing the set of words (task trials) was preceded by a slide containing only the vertical lines without the word set (stand-by slides) to keep the gaze of participants at the middle of the screen throughout the experiment. Each of the stand-by slides was presented for U(2,2.5) s, while each slide containing the set of words was presented for a maximal duration of 8 [s]. Following a task trial, participants could move to the next slide with a button press. The sequence of the task trials was randomized in each session.

Materials and Methods
In this study, players participated in an experiment that consisted of three conditions, resting-state, picking and coordination. In the resting-state condition, EEG activity with eyes open was recorded for two minutes while participants focused on a red cross on the screen overlayed over a grey background. The other two conditions, picking and coordination, were each based on the same set of stimuli and presentation schemes. However, the instructions given in each of the conditions differentiated between them, as will be explained below. In the picking and coordination conditions, participants were presented with two sets of 12 different trials, each with a different set of words. For example, game board #1 displayed a trial containing the set {"Water", "Beer", "Wine", "Whisky"} appearing in Hebrew. Each set of words was displayed between two short vertical lines following a slide containing only the lines without the word set so that participants would focus their gaze at the center of the screen ( Figure 1A,B). In the picking condition, participants were only required to freely pick a word out of each set of four words presented to them in each of the 12 trials. In the coordination condition, participants were instructed to coordinate their choice of a word with an unknown partner so that they would end up choosing the same word from the set. Participants were further informed that they would receive an amount of 100 points for each selection of a word in the picking task, and for each successful coordination in the coordination task. The participants were 10 students from Ariel University that were enrolled in one of the courses on campus (right-handed, mean age = ~26, SD = 4).
Error! Reference source not found. portrays the outline of the experiment. Each slide containing the set of words (task trials) was preceded by a slide containing only the vertical lines without the word set (stand-by slides) to keep the gaze of participants at the middle of the screen throughout the experiment. Each of the stand-by slides was presented for U(2,2.5) s, while each slide containing the set of words was presented for a maximal duration of 8 ]s[. Following a task trial, participants could move to the next slide with a button press. The sequence of the task trials was randomized in each session. EEG was recorded from participants while they were performing the tasks. The EEG was recorded by a 16-channel g.USBAMP biosignal amplifier (g.tec, Austria) at a sampling frequency of 512 Hz. A total of 16 active electrodes were used for collecting EEG signals EEG was recorded from participants while they were performing the tasks. The EEG was recorded by a 16-channel g.USBAMP biosignal amplifier (g.tec, Austria) at a sampling frequency of 512 Hz. A total of 16 active electrodes were used for collecting EEG signals from the scalp based on the international 10-20 system. Recording was done by the Open-Vibe [30] recording software. Impedance of all electrodes was kept below the threshold of [ohm] during all recording sessions. The presentation order of the conditions was kept constant and was as follows: resting state, picking and coordination, respectively.
Before performing the actual experiment, each participant underwent a training session with the EEG cap, to ensure their familiarity with the application and task. The training task included a total of five trials (each including a different set of words).
EEG coherence: In the world of signal processing, coherence is a statistical measure that is used to examine the relationship between two acquired signals. The coherence of two signals (C xy ( f )), x(t) and y(t), will be defined according to the following formula: where G xy ( f ) 2 is the magnitude of the cross spectral density between x and y; G xx ( f ) and G yy ( f ) are the auto spectral density of x(t) and y(t), respectively. The cross spectral density between two signals x 1 and x 2 is calculated as follows: The cortical connectivity between two brain areas can be calculated efficiently using coherence when applied to the analysis of EEG signals [31]. The EEG coherence measures the level of synchronization between two brain regions of the same person or alternatively the compatibility in brain activity of the same area between two different people [31,32]. There is a direct relationship between the coherence index and brain synchronization. A high level of brain synchronization is indicated by high EEG coherence, and vice versa [31,32]. In addition, previous studies have shown that the synchronization of different EEG frequency bands (i.e., alpha, theta and beta) is correlated with different cognitive processes [33].

Data Processing and Analysis
This section describes the stages of data analysis from EEG preprocessing to cognitive state identification. Following the EEG preprocessing pipeline, we detailed the calculation of the coherence index and presented the data by a graph based on the synchronicity between nodes. Next, we used a bag of node degrees to extract features differentiating between resting-state and task states that involve cognitive task processing. Subsequently, we utilized an anonymous random walk to perform a classification of the different electrophysiological patterns as a function of cognitive state. Finally, we combined both classifiers into a single hierarchal classifier that performs multi-class classification (resting state, picking coordination).

Preprocessing Pipeline and Graph Construction
Before performing the coherence calculation, the EEG data underwent the following preprocessing pipeline as was previously used in [11][12][13]34]. The preprocessing pipeline consisted of finite impulse response (FIR) band-pass filtering (BPF) [1,32] Hz and artifact removal following iCA. The data were re-referenced to the average reference and downsampled from 512 to 64 Hz following baseline correction. Data were analyzed on a 1 s epoch window from the onset of each task (for stages 2 and 3). In the resting-state condition, a 30 to 90 s epoch was extracted from a 120 s interval from trial onset, resulting in 60 1 s epochs per participant. However, in the picking and coordination conditions, there were in total 12 decision points per participant.
Next, we calculated the coherence (ranged [0, 1]) for each pair of electrodes included in the array. The coherence calculation was performed for each subject on all 1 sec epochs (60 resting-state epochs, 12 picking epochs and 12 coordination epochs). In order to convert the results to a graph, we performed discretization, where, for an absolute coherence value ≥ 0.5, we determined that synchronization existed between each electrode pair; otherwise, there was no synchronization.
The constructed graph is undirected. The adjacency matrix (16 * 16) is symmetric and the maximal number of total edges in each graph (i.e., in each epoch) is therefore 120 ( n * (n−1) 2 , where n is the number of nodes). Each node in the graph (e.g., each electrode) can have a maximum of 15 edges excluding self-loops. Self-loops were excluded since the coherence of a signal with itself is always 1. Figure 3 presents the graph obtained for an exemplar player in a specific coordination task. For example, let us consider the Fp1 electrode in a single coordination epoch. Fp1 had an absolute coherence value ≥ 0.5 with Fp2, F3 and F7. Hence, the nodes representing these electrodes are connected to the Fp1 node. value ≥ 0.5, we determined that synchronization existed between each elec otherwise, there was no synchronization.
The constructed graph is undirected. The adjacency matrix (16 * 16) is and the maximal number of total edges in each graph (i.e., in each epoch) is th ( * ( −1) 2 , where n is the number of nodes). Each node in the graph (e.g., each ele have a maximum of 15 edges excluding self-loops. Self-loops were excluded s herence of a signal with itself is always 1. Error! Reference source not found. p graph obtained for an exemplar player in a specific coordination task. For exa consider the Fp1 electrode in a single coordination epoch. Fp1 had an absolut value ≥ 0.5 with Fp2, F3 and F7. Hence, the nodes representing these electrod nected to the Fp1 node.

Classification of Coherence Patterns Based on Bag of Node Degrees
To train a classifier and predict the label of the different graphs (resting st or coordination), we first have to perform a process of graph embedding [26] bedding process, we transformed the adjacency matrix of the graph into a low sional space in which classification was performed by using machine learning In order to represent the graph by a low-dimensional vector, we use the b degrees algorithm (e.g., [27,28]). The degree of a node is the number of conn the rank, that it has with other nodes in the network. Therefore, for each graph a 16-length representation vector (ℝ 16 ) following the embedding process. Fo the embedding vector for the graph presented in Error! Reference source not be as follows: = [0,5,4,2,0,4,0,1,0,0,0,0,0,0,0,0]. Out of the embedding vect be seen that the graph has five nodes with node degree 1, four nodes with nod etc.
Based on the characteristics of the dataset, we chose to use random forest

Classification of Coherence Patterns Based on Bag of Node Degrees
To train a classifier and predict the label of the different graphs (resting state, picking or coordination), we first have to perform a process of graph embedding [26]. In the embedding process, we transformed the adjacency matrix of the graph into a lower-dimensional space in which classification was performed by using machine learning.
In order to represent the graph by a low-dimensional vector, we use the bag of node degrees algorithm (e.g., [27,28]). The degree of a node is the number of connections, i.e., the rank, that it has with other nodes in the network. Therefore, for each graph, we obtain a 16-length representation vector (R 16 ) following the embedding process. For example, the embedding vector for the graph presented in Figure 3 will be as follows: E = [0, 5, 4, 2, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]. Out of the embedding vector E, it can be seen that the graph has five nodes with node degree 1, four nodes with node degree 2, etc.
Based on the characteristics of the dataset, we chose to use random forest as our classifier. For parameter optimization, we applied grid search, which resulted in using 100 trees with a tree depth (max depth) limited to 15 branches. In order to avoid overfitting, we worked with a four-fold cross-validation method so that the training set included 630 samples (three folds) and the test set included 210 samples (one-fold). We repeated this process four times to obtain a reliable prediction of all the samples in the test group. While we could have used the leave-one-out cross-validation method, which is suitable for relatively small sample sizes, in the case of our dataset (840 samples), this would have resulted in many similar models since each model was different by only one data point. Furthermore, using a train-test split would cause us to lose x% of the data allocated for training. Therefore, using the k-fold cross-validation was more beneficial considering the size of our dataset and the efficient usability of it.
The classification results are presented in Table 1.  Table 1 presents the results of the classification. Since the dataset on which the training was performed was unbalanced (600 {resting state}, 120 {picking}, 120 {coordination}), we had to report the precision ( TP TP+FP ) and recall ( TP TP+FN ) indices of each class separately, rather than the overall accuracy percentage. For the resting-state class, where there is no task-related cognitive activity, it can be seen that the classifier is able to classify the EEG segments with a high level of accuracy, given by the positive predicted value (PPV) and true positive rate (TPR), which were each over 98%. In contrast, for the task-related classes, picking and coordination, the classifier was not able to differentiate between the two different classes. We can see in Table 1 that, in both task-related classes, PPV was around~60% accuracy.
Based on the previous classification results, we decided to convert the multi-class classification problem into a binary one by combining the two classes (picking and coordination). Thus, the binary classifier was able to differentiate between resting-state and task-related cognitive activity (picking and coordination). The results of the binary classifier are shown in Table 2. The PPV for the task-related class achieved by the binary classifier was~97%, and the TPR was~99%.

Coherence Pattern Classification Based on Anonymous Walk Approach
In the previous section, the random forest classifier managed to differentiate electrophysiological activity represented by a graph based on coherence that was related to two classes only, non-task-related and task-related activity. The features that were fed into the classifier were based on the bag of nodes embedding method. The output of bag of nodes is a vector representation of the node degree distribution of the entire graph achieved by quantifying the degree for each node individually. Hence, this method is agnostic to different spatial paths in the graph.
In view of the above, we aimed to use a graph embedding method sensitive to the spatial properties of the entire graph, such as [35,36], which showed how a spatial graph embedding could be implemented by summing or averaging node embeddings such as node2vec [25,37] or deep-walk [25,38]. Another method introduced by [39] suggested to Algorithms 2022, 15, 114 7 of 13 define a virtual node to model the entire graph embedding using standard node embedding techniques. In the current study, we used anonymous random walks to spatially encode the entire graph structure without relying on data at the level of individual nodes. Anonymous random walks enable us to encapsulate the structure of a graph regardless of the specific node labels. That is, random walks that visited different nodes in the same sequence will result in the same anonymous walk encoding [24]. The number of anonymous walks increases exponentially as a function of the anonymous walk length, as presented in Figure 4. The minimal number of random walks needed to achieve a reliable distribution is calculated using Equation (3) (e.g., [37]): where N (the Y-axis in Figure 4) is the number of possible anonymous walk patterns for an anonymous walk of a specific length (the X-axis in Figure 4). The distribution of anonymous walks has an error of no more than (ε) with probability less than (δ) relative to the optimal distribution ( m → ∞ ).

Coherence Pattern Classification Based on Anonymous Walk Approach
In the previous section, the random forest classifier managed to differe physiological activity represented by a graph based on coherence that was classes only, non-task-related and task-related activity. The features that we classifier were based on the bag of nodes embedding method. The output o is a vector representation of the node degree distribution of the entire grap quantifying the degree for each node individually. Hence, this method is a ferent spatial paths in the graph.
In view of the above, we aimed to use a graph embedding method se spatial properties of the entire graph, such as [35,36], which showed how a embedding could be implemented by summing or averaging node embed node2vec [25,37] or deep-walk [25,38]. Another method introduced by [39] define a virtual node to model the entire graph embedding using standard ding techniques. In the current study, we used anonymous random walks t code the entire graph structure without relying on data at the level of indi Anonymous random walks enable us to encapsulate the structure of a gra of the specific node labels. That is, random walks that visited different nod sequence will result in the same anonymous walk encoding [24].
The number of anonymous walks increases exponentially as a functio ymous walk length, as presented in Figure 4. The minimal number of r needed to achieve a reliable distribution is calculated using Equation (3) where N (the Y-axis in Error! Reference source not found.) is the numb anonymous walk patterns for an anonymous walk of a specific length (the X Reference source not found.). The distribution of anonymous walks has a more than (ε) with probability less than (δ) relative to the optimal distributi  Random walks varied in length from 2 to 7, where the parameters ε = 0.1 and δ = 0.01 determined m, the number of random walks per a graph embedding, according to Equation (3). Our dataset included 240 observations divided equally between the two classes, picking and coordination. In order to avoid over-fitting, we worked with a three-fold cross-validation method; each fold was equally distributed between classes. For each random walk length, we trained a specific classifier optimized by the various random forest parameters (number of trees, trees max depth and minimal samples per leaf). The best classification result was achieved for an anonymous walk of length 5 (corresponding to a probability vector with 52 dimensions; see Figure 4) with accuracy of 90.42% (see Table 3). Thus, by using random walks we were able to dramatically improve the classification of the task-related classes (picking and coordination). By using the bag of nodes technique PPV and TPR were both~60% (Table 1), whereas by using random walks the PPV and TPR both increased to~90% (Table 3). Hence, using a technique that captures the graph distribution has enabled classifying a complex task with a much higher level of accuracy.

Coherence Pattern Classification Based on Random Walk Approach
In this section, we describe the construction of a multi-class hierarchical classifier [40,41] composed of the two binary classifiers described earlier in Sections 3.2 and 3.3 (see Figure 5). The classifier pipeline is composed of the following stages. First, following signal preprocessing, the EEG signal is transformed into a coherence graph and undergoes a process of embedding using bag of node degrees to classify it as either a non-task-or task-related process. The signals identified as task-related will then undergo an embedding process based on anonymous random walks and will be transferred to the second classification stage to evaluate the associated cognitive state (picking or coordination).  Thus, by using random walks we were able to dramatically improve the classification of the task-related classes (picking and coordination). By using the bag of nodes technique PPV and TPR were both ~60% (Table 1), whereas by using random walks the PPV and TPR both increased to ~90% (Table 3). Hence, using a technique that captures the graph distribution has enabled classifying a complex task with a much higher level of accuracy.

Coherence Pattern Classification Based on Random Walk Approach
In this section, we describe the construction of a multi-class hierarchical classifier [40,41] composed of the two binary classifiers described earlier in Sections 3.2 and 3.3 (see Error! Reference source not found.). The classifier pipeline is composed of the following stages. First, following signal preprocessing, the EEG signal is transformed into a coherence graph and undergoes a process of embedding using bag of node degrees to classify it as either a non-task-or task-related process. The signals identified as task-related will then undergo an embedding process based on anonymous random walks and will be transferred to the second classification stage to evaluate the associated cognitive state (picking or coordination). The hierarchical classification reduces the mathematical complexity of the algorithm since, at the first stage, we use a simple embedding process (bag of nodes) that filters one class (i.e., resting state) from the entire dataset. Only then do we continue with a more complex stochastic embedding process (anonymous random walks) applied on the rest of the data. In order to achieve optimal results, we re-trained the first classifier, which failed to differentiate between the three classes (Section 3.2) as a binary classifier within the The hierarchical classification reduces the mathematical complexity of the algorithm since, at the first stage, we use a simple embedding process (bag of nodes) that filters one class (i.e., resting state) from the entire dataset. Only then do we continue with a more complex stochastic embedding process (anonymous random walks) applied on the rest of the data. In order to achieve optimal results, we re-trained the first classifier, which failed to differentiate between the three classes (Section 3.2) as a binary classifier within the framework of the hierarchical classifier ( Figure 5). The results of the hierarchical classifier are presented in Table 4. Note that the results displayed in Table 4 are based on the data presented in Tables 2 and 3 and were already described in Sections 3.2 and 3.3. The Table summarizes the results of the hierarchical multiclass classifier aimed to differentiate between the three experimental conditions using graph embedding feature representation based on coherence. The overall accuracy of the classifier was 96.55%, while the PPV of the resting-state class (first level of the classifier) was 99.33%, and the PPV of the picking and coordination classes (second level of the classifier) was 90.60% and 88.8%, respectively. The TPR of the resting-state class (first level of the classifier) was 99.00%, and the TPR of the picking and coordination classes (second level of the classifier) was 88.33% and 92.50%, respectively. In order to estimate the hierarchical classifier while reducing possible bias caused by either the PPV or the TPR, we combined both indices by computing their harmonic mean, i.e., the F1 score index, as presented in Table 5.

Conclusions and Future Work
In the current study, we have designed a method that predicts the class label of coherence graph patterns extracted out of multi-channel EEG epochs taken from three different conditions: a no-task condition (resting state) and two cognitive tasks, which require an investment of cognitive resources, namely picking and coordination. The classification process was based on a coherence graph extracted out of the EEG record. Each node in the graph represents an electrode channel, and each edge represents the coherence between two different electrodes.
The classification process was performed hierarchically using two levels. The purpose of the first level was to separate between the two cognitive tasks (i.e., picking and coordination) and the resting-state condition. Since all the samples passed through the first level of the classifier, it was important to use a computationally efficient method such as a bag of node degrees (e.g., [27,28]). To classify the graph embedding vector, we have used a random forest classifier. The purpose of the second level was to separate between picking and coordination. For this purpose, we have chosen a more computationally complex embedding process that preserves and encodes the spatial structure of the graph, namely an anonymous random walk [24] attached to a random forest classifier. It is noteworthy that while an anonymous random walk preserves the spatial properties of the graph, bag of node degrees encodes each node separately while disregarding the other nodes in the graph. Hence, this method enabled us to separate between the different two cognitive tasks.
The contribution of this study is two-fold. First, we built an EEG-based classifier to categorize resting state and two types of tacit coordination task conditions, i.e., picking and coordination, by their respective functional connectivity patterns. That is, we have utilized a anonymous random walk graph embedding technique to spatially encode the graph's structure while calculating the coherence between nodes (EEG electrodes). Second, previous studies relied on graph theory measures (such as centrality, path length and modularity (e.g., [42][43][44])) in order to distinguish between different cognitive loads. These studies utilized either frequency-and power-based features [42] or the temporal properties of the raw EEG [44]. In contrast, the method used in the current study comprises all channels and frequency bands weighted by the coherence measure between all possible 16-channel combinations. Hence, our proposed algorithm found an automated solution such that, by using random walks, we were able to dramatically improve the classification of the task-related classes from 60% using bag of nodes to 90% while using the hierarchical classifier. Thus, the generality of this method is advantageous relative to the previous ones cited here since it is applicable to other EEG classification problems in which there is no predefined intuition regarding the relevant spectral features or brain channels involved.
There are some limitations of the current study that warrant consideration. First, in this study, we used a homogeneous sample of participants who were all students at the same university. Since it has been previously shown [45] that the players' behavior in coordination games is sensitive to the effect of the cultural background, it is important to extend the study to include diverse populations. Second, the current study is limited to a single type of game, which is a coordination game based on semantic meaning. Therefore, future studies should consider other types of coordination games that include other cues, such as spatial location, colors and shapes. We have shown that as the length of the anonymous walk increases, the number of possible anonymous walks increases exponentially ( Figure 4). Therefore, increasing the number of electrodes (e.g., 32 or 64 channels) would entail an exponential increase in the average length of the anonymous walk, which will consequently necessitate more data and computational time (see Equation (3)). Finally, in this study, we used an EEG system that included 16 electrodes; it is worth considering using a higher number of electrodes, which will potentially lead to a higher resolution of the coherence graph.
The results of this study suggest a number of possible directions for future research regarding the prediction of the depth of reasoning by EEG indices. First, it will be interesting to examine the effect of both personal and contextual factors, such as social value orientation [46], loss aversion [47,48] and culture [45], on the different EEG indices and coherence measures. Furthermore, other EEG indices such as power spectrum ratios, e.g., Theta-Beta [49,50], Theta-Alpha [50,51], might be used in conjunction with brain source localization methods (such as LORETA [52,53]) to improve classification accuracy levels. Finally, an enhanced ability of depth of reasoning prediction is essential for improved coordination in human-agent interaction scenarios (e.g., [8,46,[54][55][56]) and might also aid in developing autonomous robots with improved anticipation models of human action in their surroundings [57,58].
Author Contributions: D.M., I.L. and I.Z. carried out the stages of conceptualization, design of methodology, data curation, formal analysis, data modeling, model validation, writing, drafting and editing. D.M. was also responsible for visualization and implementation of supporting algorithms. I.Z. and I.L. supervised the research activity. All authors discussed the results, read and approved the final manuscript and are accountable for all aspects of the work. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Institutional Review Board Statement: The experimental protocols used in this work were evaluated and approved by the Ethics Committee of Ariel University (confirmation number: AU-SOC-SL-20190901). Permission to perform the electrophysiological recordings in the experiment was given from 1 September 2019 to 31 August 2020.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Written informed consent has been obtained from the patients to publish this paper.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the privacy of experiment participants.

Conflicts of Interest:
The authors declare no conflict of interest.