Brain tissue classification from stereoelectroencephalographic recordings

BACKGROUND
Stereoelectroencephalographic (SEEG) recordings can be performed before final resective surgery in some drug-resistant patients with focal epilepsies. For good SEEG signal interpretation, it is important to correctly identify the brain tissue in which each contact is inserted. Tissue classification is usually done with the coregistration of CT scan (with implanted SEEG electrodes) with preoperative MRI.


NEW METHOD
Brain tissue classification is done here directly from SEEG signals obtained at rest by a linear discriminant analysis (LDA) classifier using measured SEEG signals. The classification operates on features extracted from Bode plots obtained via non-parametric frequency domain transfer functions of adjacent contacts pairs. Classification results have been compared with classification from T1 MRI following the labelling procedure described in DEMAN et al. (2018), together with minor corrections by visual inspection by specialists.


RESULTS
With the data processed from 19 epileptic patients representing 1284 contact pairs, an accuracy of 72 ± 3 % was obtained for homogeneous tissue separation. To our knowledge only one previous study conducted brain tissue classification using the power spectra of SEEG signals, and the distance between contacts on a shaft. The features proposed in our article performed better with the LDA classifier. However, the Bayesian classifier proposed in GREENE et al. (2020) is more robust and could be used in a future study to enhance the classification performance.


CONCLUSIONS AND SIGNIFICANCE
Our findings suggest that careful analysis of the transfer function between adjacent contacts measuring resting activity via frequency domain identification, could allow improved interpretation of SEEG data and or their co-registration with subject's anatomy.


Introduction
Drug-resistant epileptic patients with focal seizures may undergo resective surgery for the removal of the seizure onset zone. In some cases, intracranial recordings with electrodes implanted using stereotactic procedures (stereoelectroencephalography, SEEG) may be necessary to sufficiently characterise the epileptic network (Kahane and Dubeau, 2014). For interpreting SEEG signals, it is important to know whether the contacts are located in the grey or in the white matter. It is particularly true to interpret responses to electrical stimulation that are sometimes performed (David et al., 2010(David et al., , 2013, as stimulating white matter involves different biological processes than when stimulating the grey matter. In most cases, the coregistration of CT scan (with implanted SEEG electrodes) with preoperative MRI is done (Deman et al., 2018), and the image contrast between grey and white matter is used to classify the tissue (Ruan et al., 2000;Tohka, 2014). Thus, the classification of SEEG contacts can be done automatically by the coregistration software (eg. Deman et al., 2018), that has pre-set algorithms to do so based on the different voxels intensities surrounding the contact. Alternatively, classification from the MRI can be done visually by the medical team. The problem is that, in clinical practice, accurate co-registration procedures may not always be available and thus performed. Therefore, it would be desirable to find other tissue classification approaches that do not rely on co-registration with MRI.
To our knowledge, although there seems to be an extensive literature for improvements on tissue classification via MRI (Choi et al., 1991;Suckling et al., 1999;Cocosco et al., 2003), we only found a couple of studies that address the differences between the white and grey matter SEEG signals. In Mercier et al. (2017), features such as the power spectra and absolute amplitude of spontaneous brain activity in SEEG are used to characterise these differences. However, the authors did not go as far as performing tissue classification. A more recent study (Greene et al., 2020), is the only other case that uses SEEG signals for tissue classification. In their article, the authors propose a signal approach for tissue classification using bipolar montage and a Bayesian classifier. Two main features are extracted from the signal, the first one is the average vertical shift in the power spectrum of a contact compared to the average power spectrum over all contacts, and the second one is the distance between a contact and the most peripheral contact of the shank that was not outside of the brain. In our study, we propose a method for tissue classification using SEEG signals focusing on the transfer function between two contacts rather than signal analysis.
In this method, the features are extracted from the frequency responses of consecutive contact pairs for baseline signals. A linear discriminant analysis (LDA) is used for classification, and prior knowledge issued from tissue classification with MRI is used in the classifier training. This new classification method is applied to the data obtained from 19 epileptic patients. The methodology is described in section 2, and results are presented in section 3. Section 4 provides a discussion before section 5 concludes the paper.

Data sets
SEEG signals of this study have been recorded using a Micromed (Micromed, Treviso, Italy) SEEG/video system, coupled to a Micromed programmable stimulator, from 19 epileptic patients during standard presurgical evaluation procedures at Grenoble-Alpes University Hospital. All the patients gave their consent for their data to be re-used by the research protocol F-TRACT (INSERM IRB 14-140).
The processed patients were adults and suffered from temporal (n = 9), frontal (n = 6), insular (n = 2), temporal/insular (n = 1) and temporal/insular/frontal (n = 1) epilepsies. The specific information for each patient can be found in Table 1. For each patient, 6-15 electrodes containing each one 5-18 contacts have been implanted a week prior to the recordings. The electrodes were manufactured by Dixi Medical (Besançon, France). Each contact was of 0.8 mm diameter and of 1.5 mm long, separated by 3.5 mm (centre to centre) from the next one. SEEG recordings have been performed with a sampling frequency (f s ) of either 1024 Hz (for 7 patients) or 512 Hz (for 12 patients) and an acquisition band-pass filter between 0.1 and 200 Hz. Data were acquired using a referential montage, with a reference contact chosen in the white matter.
Baseline recordings have been selected as 40 s periods of time while the patient was resting, as described in David et al. (2013). An example of baseline signals recorded for one of the patients in four consecutive adjacent contacts located in the frontal lobe (the first two in grey matter and the last two in white matter) can be found in Fig. 1.
For each patient, the brain tissue in which each contact was inserted, was classified using the patient MRI, following the labelling procedure described in Deman et al. (2018) which is based on segmentation methods implemented in the FreeSurfer software. Pre-operative and post-operative MRI were acquired at the isotropic resolution of 1 mm. Post-operative CT-scans were reconstructed at the isotropic resolution of 0.45 mm. Contacts labelling was also visually checked and corrected if necessary. An average of 9% of the contacts were corrected per patient. The majority of the corrections were from white to grey matter (average of 76%). These previous MRI labels will be used here for supervised classification. In addition, SEEG signals were visually reviewed to remove bad channels from further analysis. Bad channels are either the ones with important noise, or contacts that have been disconnected from the SEEG recorder for stimulation. In the case of this study, only channels disconnected for stimulation were considered as bad, this means two channels per patient. The other bad channels were not recorded by neurologists.

Montage choice of SEEG
We conducted a preliminary study in brain tissue classification using features extracted on signals obtained from monopolar montage from three patients (Machado, 2021). The signals were studied by themselves, and features like the first four order moments (mean, variance, skewness, and kurtosis), and the power density of specific frequency bands were extracted from the baseline signals. For each feature, a simple optimum threshold was used to classify the brain tissue. Accuracies in group separation when comparing this classification method to the MRI labels were at the highest 58%. This shows that those features were not sufficiently discriminant for tissue labelling.
In the same line, Mercier et al. (2017) and Greene et al. (2020), also hold back from using simple binary classification from referential montage. In Mercier et al. (2017) Proximal Tissue Density index (PTD) is used to study brain signals originating from different matters, and in Greene et al. (2020) the authors conclude that bipolar montage, where the signal of a contact is subtracted from the signal in the adjacent contact, has better results in tissue separation than the common reference montage. Here, we consider pairs of adjacent contacts. In literature, differences in conductivity of brain tissues have been highlighted (Nathan et al., 1993;Holdefer et al. 2006;Astrom et al., 2012), and they should be better perceived when considering contacts as pairs instead of one. For that, the frequency response of the pair is calculated by methods that will be presented in the next section. The pairs of adjacent electrodes are formed in the ascending order. This means that the first contact of the pair is the shallower one and the second contact is the deeper one on the brain. We call it ascending order because the contact number gets higher the deeper it is located. As the contacts are considered by pairs, the anatomical labels defined visually will no longer be just "grey" (G) or "white" (W) matter, but they will be "G/G" for contacts inserted in homogeneous grey matter, "W/W" for contacts in homogeneous white matter, and "G/W" and "W/G" for contacts in heterogeneous brain matter. For the classifier training, only the contact pairs with homogeneous tissue (as previously classified from the MRI) will be considered (G/G, and W/W). Contact pairs in heterogeneous tissues are harder to separate from other groups as the amount of each tissue is variable from pair to pair.
The signals that are used for the frequency identification are in the monopolar montage (common reference). In the future, other types of reference montages different from the common reference one used in this study could be considered before performing the transfer function identification between adjacent contacts. In Guangye et al. (2018) and Mercier et al. (2017), different types of referencing are compared. The type of montage does not only influence the correlation between signals, but also phase shifts can be introduced.

Frequency response identification
Bode plots are largely used in system identification in order to study the dynamics of a system between two measured signals (Lennart, 1999). They describe the magnitude gain using logarithmic decibel (dB) units and phase shift with respect to frequency when considering the output and input voltages ratio.
We hypothesise that given the difference in conductivity between grey and white matters (Nathan et al., 1993;Holdefer et al., 2006;Astrom et al., 2012), the frequency response between two consecutive signals should be different depending on the tissue between them. This difference can be noticed either on the magnitude or the phase of the Bode plot for pairs in different tissues. Thus, features can be extracted directly from them.
Considering the voltage measured by the first contact as the input (V 1 ) and the voltage measured by the second contact as the output (V 2 ), the dynamical process that connects the two contacts can be characterised by a transfer function G(e iω ). Each complex number G(e iω ) contains the information of what happens at the output when the input (signal of the first contact) is a sinusoïd of frequency ω. In other words, the transfer function describes the dynamics between the output and the input voltages expected for each signal frequency w, and can be described via its magnitude M and phase ϕ, G(e iω ) = M(ω)e iϕ (ω) .
In this work, we chose to estimate the frequency responses using Examples of signals measured in four consecutive contacts in the same electrode shank located in the frontal lobe. The first two in grey matter and the last two in white matter. a) Signal measured in the first contact in grey matter. c) Signal measured in the second contact in grey matter. e) Correlation between the grey matter signals. b) Signal measured in the first contact in white matter. d) Signal measured in the second contact in white matter. f) Correlation between the white matter signals. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) Spectral Power Analysis (SPA) (Lennart, 1999;Stoica and Moses, 2005), which uses the ratio of the windowed periodograms of the input and output signals: being the Fourier transform of the covariance: is the estimation of G(e iω ), thus it can also be written in the polar form: The frequency responses of the contact pairs are calculated with Matlab, using the spa function, and a Hanning window of size 18 s for sampling frequency 1024 Hz, or 36 s to the sampling frequency 512 Hz, and a frequency resolution of 1 Hz, corresponding to frequency points which are equally spaced between 0 Hz and the Nyquist frequency f s ∕2 (with f s either 1024 Hz or 512 Hz).
Since we are working with data from several recording sessions (around 60 for most patients), in which, for each of them, the same contacts were used to measure brain activity at different times, one can obtain a smoother frequency response of a contact pair by taking the mean of the frequency responses over different recordings (Lennart, 1999).

Feature extraction
In order to classify the brain tissue from the identified frequency responses, information must be extracted in the form of features. Here, we chose two different types of features that quantify the magnitude of the frequency responses in a specific frequency band.

Mean square (MS) of a specific frequency band
In a specific frequency band , the mean square (MS) magnitude can be given as the sum of the squared magnitude values according to the sampling time T s , divided by the number of points (N i ) in the frequency band b i :

Relative mean square (MS r ) of a specific frequency band
Once again, given the magnitude of a specific frequency band , the relative mean square (MS r ) is equivalent to the MS of the considered band b i divided by the MS of the total frequency band (0 Hz ≤ b≤ f s /2 Hz):

Classifier choice
As mentioned, information on brain tissue surrounding the contacts is available due to previous MRI co-registration. This is why supervised classification will be carried out. Different types of classifiers compute different frontier shapes to separate features belonging to each group (Maglogiannis, 2007). Linear and quadratic frontiers can be found with a linear discriminant analysis (LDA), and a quadratic discriminant analysis (QDA) respectively. The support vector machine (SVM) classifier finds a hyper plane frontier between groups. Other methods such as K-nearest neighbours (KNN), and decision trees define more complex frontiers that are heavily based on data.
Complex methods tend to have the problem of overfitting as they are very data dependent. This is why we chose the simplest method (LDA). We validated this choice in a preliminary study done on three patients (Machado, 2021), where the LDA classification turned out to be sufficient for group separation, with the advantage of a high interpretability.
The LDA method consists in determining a linear frontier for group separation according to the feature values. Assuming normal distribution, the LDA predictor computes the posterior probability (P(k|x)) of an element x being a part of a group k (G/G or W/W) using Bayes rule with Gaussian distribution density P(x|k) given by: with d the number of features, and Σ k and μ k respectively the covariance and the mean of the features of group k. Considering the prior probability P k = n k ∕n of a class k as the number of samples in the class n k divided by the total number of samples in all classes n, and a normalisation constant P(x) = ∑ nc k=1 P(x|k)P(k) with n c the number of classes, the posterior probability is given by: The classification of an element is done by choosing the group with the highest posterior probability. The linear frontier between the groups represents equal probabilities of a sample being a part of each class P (G∕G|x) =P(W∕W|x).
We assume that these posterior probabilities might allow us to create a probability map that gives an idea of the percentage of each brain matter between two consecutive contacts (the percentage of grey matter is represented by the posterior probability of G/G, and the percentage of white matter is represented by the posterior probability of W/W). This solution is close to the idea of proximal tissue density proposed by Mercier et al. (2017). The author used the MRI of each patient to quantify the amount of each brain tissue present in the region an contact is inserted in using the number of grey and white matter voxels in the contact proximity. The difference in our case is that we hypothesise that the quantification could be obtained using the posterior probabilities from the prediction using the classifier.
In order to quantify the classification performance, the accuracy rate (ACC) is calculated taking into account the previous MRI classification: where TP and TN represent the true positives and true negatives for which the label according to the LDA classifier is the same as the MRI one, and where FP and FN represent the false positives and false negatives for which the labels differ.

Tissue classification procedure
The overall procedure for tissue classification is shown in Fig. 2. For the classifier training, only the contacts in homogeneous matter have been considered. The extracted features are used to train the classifier.
The classification of each possible contact pair is done using the trained classifier and the extracted features. The feature extraction is done following the same steps as for the classifier training.
The contact pair class prediction, done by the classifier is based on the assignment of a posterior probability that represents the likelihood of the pair being a part of each of the classes. This posterior probability will be studied for each group previously classified (G/G, W/W, G/W, and W/G according to MRI) as they might provide some insight in tissue composition between contact pairs. We expect higher posterior probabilities for the previously classified homogeneous groups than for the heterogeneous groups.

Frequency response identification
The mean of the identified frequency responses of contact pairs for each homogeneous group is shown in Fig. 3.
Baseline signals frequency responses have been obtained from 1284 contact pairs (486 with f s = 1024 Hz, and 798 with f s = 512 Hz). The distribution of pairs per patient is 35 ± 12 for the G/G group and 32 ± 14 for the W/W group. The trend of the data was removed via the subtraction of a polynomial straight-fit line approximation via the Matlab function detrend. From a visual inspection, the magnitude of the two different groups are clearly separated, specially for low frequencies.
The phase is not discriminating between grey and white matters for low frequencies, and for high frequencies the standard error of the mean is high. Therefore, the magnitude is a more robust measure and will be considered for the remainder of our study.  The gain in white matter being superior than the gain in grey matter may seem surprising. When comparing to previous studies Mercier et al. (2017) and Greene et al. (2020), grey matter signals have higher power than the ones in white. The reason to this difference is that here, the gain is the ratio of the Fourier transforms of the cross-covariance and covariance of the voltage of the two contacts. If the gain is smaller than 1 (0 dB) it means that the second voltage is smaller in amplitude than the first one. As we considered the first contact as being the shallower one, and the second as the deeper one on the shaft (ascending order), a gain smaller than 0 dB indicates that the deeper into the brain the contact is, the smaller the voltage. If the order of contacts was inverted (descending order), and the deeper electrodes were considered first, the small frequency gain for the G/G pair would be higher than for the W/W pair, as can be seen in Fig. 4. What can also be seen in the figure is that there is a smaller difference in the frequency response of a W/W pair than a G/G pair when inverting the contact orders. Moreover, the gain in lower frequencies for both ascending and descending orders of the W/W pair is close to 1 (0 dB). This can be explained by looking at the signal correlations in Fig. 1e) and f). The signals of the W/W pair are much more correlated than the ones of the G/G pair.

Feature extraction
As mentioned before, for the analysis of the baseline signals, the extracted features will be calculated using the mean square (MS) and the relative mean square (MS r ).
Looking at the frequency responses in Fig. 3, there are two main frequency bands for which the magnitudes have more or less the same behaviour (0 Hz ≤ b 1 < 30 Hz, and 30 Hz ≤ b 2 ≤ 200 Hz).
Therefore, the four features used for tissue classification using only baseline signals are the MS and MS r for these two bands (MS b 1 , MS b 2 , MS r b 1 , and MS r b 2 ).
All contact pairs with at least one feature with value higher than three scaled median absolute deviations of the feature across all pairs, are considered as outliers and are eliminated. Which results in 1058 pairs to be used for classification. The observed outliers are due to noise commonly observed in electronic measurements.

Classification results
Once the features are extracted, the LDA classifier was trained with 90% of data. This procedure was repeated fifty times, changing the training set each time, in order to guarantee robustness. After each classifier has been trained, the remaining 10% of data were used for prediction. The labels from the LDA classifier are compared to the original labels given from the MRI of the patient in order to calculate the accuracy of the classification, using Eq. 7.
The overall accuracy using only baseline signals is 72 ± 3%. As mentioned, the trained classifier distinguishes only between pairs in homogeneous brain tissues (G/G and W/W). In the next section, we will study the posterior probabilities of our new classifier and how they vary according to previous MRI classification.

Classifier comparison with MRI labelling
In order to understand what happens with the classification of any contact pair (even the heterogeneous ones), one has to look at the probabilities of a pair belonging to the first group (G/G) or the second group (W/W). The higher the probability of a pair belonging to G/G should indicate that there should be more grey matter between the contacts of the pair, so on and so forth. Here, we compare the probabilities of each pair belonging to G/G and W/W according to our new classifier with their previous MRI classification. The results are shown in Fig. 5.
As expected, looking at Fig. 5(a), the contact pairs previously classified as G/G by the MRI have the highest posterior probabilities of belonging to the G/G group (P(G∕G|x)), and the smallest posterior probabilities of belonging to the W/W group (P(W∕W|x)). Exactly the same behaviour can be noticed for the pairs previously classified as W/ W by the MRI. For the previously classified heterogeneous pairs G/W, and W/G, both P (G∕G|x), and P (W∕W|x) have values in between the posterior probabilities observed for the homogeneous groups.
In Fig. 5(b) it can be seen that approximately 74% of the contact pairs previously classified as G/G by the MRI have larger values of P (G∕G|x) than P (W∕W|x). For the previously classified W/W pairs by the MRI, 71% have higher P (W∕W|x) than P (G∕G|x). For both cases the majority of pairs have probabilities between 60% and 80%. For the heterogeneous pairs previously classified as G/W, there is in general higher P (G∕G|x) than P (W∕W|x) (58% of pairs with higher P (G∕G|x) against 45% with higher P (W∕W|x)). For the W/G case both P (G∕G|x) and P (W∕W|x) have a similar distribution (50% of pairs classified as G/G and 50% classified as W/W).
In general, the results show that the contact pairs have a bigger probability of being in grey matter than white matter (51% of all possible contact pairs were classified as being a part of the G/G group as opposed to 49% of the W/W group). This is consistent with the reality, where 52% of the measured contacts are in grey matter as opposed to 48% in white matter. In Fig. 6 an example of the implanted contacts positions for one patient is shown. The dark blue contacts are inserted in grey matter, the light blue contacts are inserted in white matter, and the yellow contacts are not in brain matter. What can be seen in the plot on the right is that the measured contacts (in red) are all located closer to grey matter. The vast majority of consecutive contacts in white matter is actually not recorded.
There is no way of knowing the ground truth for tissue classification of a specific contact, as we only dispose of the MRI. However, there is more white than grey matter in the brain, and the white matter is mostly located in the centre. When white matter contacts are located in this centre, they are easier to classify, and posterior probabilities of the W/W matter group should be significantly higher. Unfortunately, most of the white matter contacts used in this study are not the ones located with the higher certainty, most of them being close to grey matter.

Influence of epileptic tissue
In literature (McCann et al., 2019;Akhtari et al., 2006), it has been shown that the conductivity of epileptic tissues differs from healthy grey and white matter. This fact might affect the frequency responses and induce bias in the classification.
We used a spike detector (Roehri et al., 2019) with default parameters to obtain a spike rate for each channel in the bipolar montage, to have an idea of the influence of epileptic tissues. The spike rate was normalised for each patient, which is equivalent to subtracting the average and dividing by the standard deviation of all pairs. Contact pairs with a normalised spike rate greater than three times the median of spike  rates across all patients were considered to be in an epileptic network. A total of 59 G/G pairs (9%), and 80 W/W pairs (13%) were considered as being in epileptic networks across all patients. In Fig. 7, the distribution of features is shown for electrodes in epileptic and non epileptic networks with the removal of outliers. For both the G/G and W/W pairs, the distribution is similar considering the healthy tissues and tissues with a big spike rate. It is also important to note that pairs with high spike rate account for only 22% of the outliers.
In order to quantify the effect of these contact pairs in the brain tissue classification, a new LDA classifier is trained considering only electrodes in healthy tissue. The accuracy obtained for the classifier is 72 ± 1%. This means that the areas with high spike rates do not affect the classification.

Influence of the anatomic location of contacts
It is interesting to analyse the classification of tissues depending on the brain region the electrode contacts are inserted in. In order to do so, the contact pairs are grouped by brain regions (21 groups: amygdala, angular, calcarine, cingulum, frontal, fusiform, hippocampus, insula, lingual, occiptal, para-hippocampal, paracentral, parietal, postcentral, precentral, precuneus, rectus, rolandic, supp, supra-marginal, and temporal). Each of those groups are separated between G/G and W/W pairs (42 sub-groups) according to the MRI classification. Finally, the median value of each feature is calculated for each sub-group, and is plotted against the feature distribution map in Fig. 8.
When looking at the first feature MSb 1 , the medians values for the G/ G and W/W contact pairs are well separated for most of the regions. For the W/W pairs only 3 out of 21 regions had a median closer to the G/G feature values (precentral, rectus, and supra-marginal). For the G/G pairs, only 2 out of 21 pairs had a median closer to the W/W feature values (amygdala, and para-hippocampal). It is unclear to say whether this misplacement of features on the feature map for some brain regions is caused by a difference of behaviour that is not detected by the classifier, or if it indicates that the miss-classification in the MRI labelling is more common in such zones.

Discussion
We presented a new method for brain tissue classification using SEEG recordings.
Differences between the white and grey matter signals have been previously discussed in Mercier et al. (2017) and Greene et al. (2020). Only the latter presents a tissue classification method using SEEG signals in bipolar montage. The proposed features for classification in Greene et al. (2020) were extracted directly from the power spectrum of the signals and the contact depth. In our study, we propose a different set of features to be used for tissue classification based on the magnitude of the transfer function of a pair of adjacent contacts.
The idea is based on previous studies (Mercier et al., 2017;Nathan et al., 1993;Holdefer et al., 2006;Astrom et al., 2012) that emphasise the difference in conductivity of grey and white matters. Such a difference should be perceived when studying the frequency response, because the differences in voltage depend on the medium conductivity.
Only baseline signals (brain activity while the patient is resting) are considered in this study. The fact that the proposed method allows tissue classification from resting brain activity might not only help with signal interpretability, but also, it can help with the selection of contacts to be recorded, as the grey matter ones are preferred. Usually this process is done by specialists with the help of the MRI images. Our method might allow a quicker and more robust way of selecting contacts to be recorded.

Classification using baseline signals
The classifier was obtained with the extraction of the MS and MS r features of frequency bands for which the magnitudes had similar characteristics in regards to the mean frequency responses of each group (Fig. 3).
The final accuracy obtained was 72 ± 3% when comparing the classifier results to the previous MRI labels. With that, one can conclude that there is important information for brain tissue classification in baseline signals measured in SEEG. Fig. 8. Distribution of features for each pair depending on its MRI classification: G/G in blue and W/W in green. Considering the G/G and W/W groups separately, the contact pairs that belong to the same brain region are grouped, and the median of each feature is calculated for each brain region. The superimposed crosses represent the median values of features classified as G/G in red or W/W in black depending on which of the 21 brain regions the contact pairs were inserted in. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) Considering the approximated spike rates for each patient as an indicative of epileptic tissue, the results indicate that our method is robust to epileptic tissues, as disregarding them does not affect the accuracy of the method.
To our knowledge, Greene et al. (2020) is the only existing study that proposes features extracted from SEEG signals for brain tissue classification. However the classification method used by the authors is different from the one used in this study. In Greene et al. (2020), a Bayesian classifier is used, in which the classification is not only done considering the feature values, but also the overall structure of the brain, and the uncertainty of the parameter estimates. If one wants to compare the discrimination abilities of our features with the ones proposed in Greene et al. (2020), the same classification method needs to be applied and the accuracy must be calculated, using the considered features.
As mentioned before, the features proposed in Greene et al. (2020) are the average shift in the power spectrum compared to the average Fig. 9. Distribution of the features a) extracted from signals in bipolar montage as proposed by Greene et al. (2020), and b) extracted from the frequency responses proposed in this study.
power spectrum over all contacts (in log scale) in the band [1,150] Hz, and the normalised distance between the contact in question and the most peripheral contact on the shaft. Signals were bipolar referenced, and the two features were extracted from them for each patient. As the bipolar montage was used, the resulting label should also be a combination of the two contacts. As in our study, only homogeneous combinations were considered and outliers were removed.
The resulting accuracy using the features proposed by Greene et al. (2020) with the LDA classifier is 60 ± 4%. The distributions of the features proposed in Greene et al. (2020) and the ones proposed in our study are shown in Fig. 9.
This shows that when comparing between features, the ones proposed in this study considering frequency responses seem to be the most discriminant. However, the classification method proposed by Greene et al. (2020) in which the brain structure and uncertainties are considered, is more complete than the LDA one.

Classifier comparison with MRI labelling
The posterior probabilities of a contact pair being a part of either the G/G or the W/W group have been analysed for all possible contact pairs (homogeneous and heterogeneous ones, according to MRI classification). We were interested to see how the posterior probabilities changed according to previous classification in order to gather information on the amount of grey or white tissue between an contact pair.
The overall results for homogeneous pairs are as expected. Higher posterior probabilities were found for a pair belonging to G/G if previously classified as G/G, as well as for a pair belonging to W/W if previously classified as W/W. For the heterogeneous pairs, it is harder to tell whether the posterior probabilities are representative of the amount of each tissue present between the contacts, as it varies for each pair, so no particular distribution was expected for these cases. However, the percentage of pairs classified as G/G and W/W is equivalent to the percentage of contacts in grey and white matter according to the MRI.
The problem discussed in Tohka (2014) about the partial volume effect, where voxels in the MRI image may contain several types of tissues, is more prominent in the frontiers between grey and white matter. The pairs of contacts for which one can be certain of the homogeneity of the tissue are the ones located in white matter distant from grey matter. As in our study the majority of signals measured in distant white matter were hardly available, we have limited information on the possible use of the posterior probabilities as a direct measurement of the amount of each tissue in between two contacts.
Looking specifically at the homogeneous groups, the confusion matrix obtained comparing the predicted classes to the MRI classification (considered here as the true class), is presented in Fig. 10. Even though not a lot of signals were recorded in distant white matter, the distribution of G/G and W/W pairs is almost uniform (52% of G/G pairs and 48% of W/W pairs). The sensitivity of the classifier, also known as the ability of the classifier to correctly classify G/G pairs is 0.726. The specificity of the classifier, or the ability to correctly classify W/W pairs is 0.718. Therefore, the classifier has the ability of classifying both true positives and true negatives. However, even though close to 72% of the contact pairs are correctly classified, there is still 28% of miss classifications. This is why, the classifier is more appropriate for support decision to coregistration of CT scan (with implanted SEEG electrodes) with preoperative MRI. It might be enhanced either considering more contacts in distant white matter, or considering a Bayesian classifier with prior information as the one proposed by Greene et al. (2020). The method can be implemented in routine SEEG software, to do a first pass of contact classification.

Perspectives of future applications of the method
As mentioned, the proposed method has only been applied in baseline signals collected during wakefulness while the patient was resting. Studies suggest differences in the power spectrum of signals measured during sleep when compared to wakefulness (Gennaro, 2003;Amzica, 1998). These differences can be mainly perceived for smaller frequencies. Furthermore, recent findings suggest the coexistence of wakefulness and sleep in cases of sleep deprivation and focal lesions (Yuval et al., 2017;Russo et al., 2021), in which some areas of the brain present sleep-like behaviours and others do not. Given these different dynamics, it would be interesting to test the robustness of the tissue classification method for these cases as well, as they might impact the frequency responses.
We also only considered the monopolar common reference montage, in which a single contact located in distant white matter was used as reference for all measurements. In Greene et al. (2020) the differences in the power spectral densities of signals measured in white and grey matter are a lot clearer when considering bipolar reference (subtraction of the signals of adjacent contacts). Therefore, using different references might affect the identified frequency responses and the obtained classification accuracies. However, as the analysis done here uses signals from paired contacts, both of them need to have a common reference, which excludes the possibility of using bipolar montage. Nevertheless, the robustness of the method in regards to the reference location could be studied in the future by using different contacts as common reference.

Conclusion
In this article we have presented a new method for brain tissue classification using the frequency response obtained from the measured SEEG signals of contact pairs. The results show a good potential for tissue classification using only baseline signals (72 ± 3% accuracy when compared to MRI classification). In addition, our results show that the method is robust to epileptic tissues, and achieves the same accuracy for tissue classification with and without considering the epileptic networks. With this performance, the tissue classification method could be used to support brain tissue classification via the coregistration of CT scan (with implanted SEEG electrodes) with preoperative MRI, helping not only with signal interpretation, but also in the choice of contacts to be recorded. When comparing to the features presented in Greene et al. (2020), ours have a better discriminant power. However, the Bayesian classification method proposed by the authors Greene et al. (2020) is more robust as it considers prior knowledge in brain tissue distribution. This classifier could be used in the future together with the features proposed in this article to enhance classification performance. Moreover, the posterior probabilities obtained with our classifier for each pair could give an idea of the tissue composition between a pair of contacts. To achieve this, more studies need to be done with signals measured in distant white matter.

Declaration of interest
None.