Measuring the Subject Fingerprint in Each EEG Frequency Band with Ecological Ordination

Brain-signal decoders trained on some people and tested on new ones fail badly. On one 123-person emotion EEG benchmark, the best graph neural network falls from 94.5% accuracy within subjects to 31.3% on nine-class emotion across subjects (GNN4EEG). The usual response is to try another classifier. This proposal instead borrows a measurement tool from microbial ecology. Ecologists routinely ask how much of the variation between samples comes from site, from temperature, or from disease. They answer by computing a dissimilarity between every pair of samples and then splitting that dissimilarity by factor with a permutation test called PERMANOVA (permutational multivariate analysis of variance). They inspect the result with principal coordinate analysis (PCoA), which places samples as points in a low-dimensional map that preserves the pairwise distances as closely as possible. We apply this pipeline to EEG split into frequency bands (delta, theta, alpha, beta, gamma). For each band, and for each way of measuring distance between recordings, we ask how much of the between-recording variation is "who the person is" and how much is "what state they are in."

The payoff is a training-free diagnostic. It predicts, before any decoder is built, which bands and which distance measures will transfer to unseen people. It also yields a matching correction: remove each subject's own average position in the ordination space, then decode from what remains. The first claim can be falsified cheaply. The second will be tested against the obvious simpler fix, per-subject normalization. We state upfront that for Euclidean distance the correction is mathematically identical to that normalization, so any benefit has to come from the non-Euclidean distances.

Core Claim

Ordination and variance partitioning have never been applied to multi-band neural recordings. The fields are disjoint in the retrieved literature: the microbiome studies stay within 16S and ITS sequencing data, and EEG studies either flatten features into classifiers or pass them through neural networks. Prior EEG work has, however, found hints of what such an analysis would show. Exploring EEG Features in Cross-Subject Emotion Recognition evaluated 18 features band by band under leave-one-subject-out testing and found beta and gamma features, especially Hjorth mobility (a simple measure of a signal's dominant frequency), more transferable than lower bands. That study inferred transferability only through classifier accuracy.

Our claim is that a simple quantity accounts for this pattern and generalizes it. The quantity is the fraction of distance variance explained by emotional state after subject identity has been accounted for, computed per band and per distance. It should rank feature configurations by their cross-subject accuracy, and it should do so better than the equivalent univariate statistic averaged over individual features.

A second, riskier claim concerns relative band power. Relative power, the share of a channel's total power falling in each band, sums to one, exactly like taxon relative abundances. Distances designed for such proportions, such as Bray-Curtis, may therefore separate the subject fingerprint from state more cleanly than Euclidean distance on differential entropy. Differential entropy is the standard per-band feature used in GNN4EEG.

Research Program

Every recording segment is first summarized per band in three ways, each paired with a natural distance. The first summary is differential entropy per channel, compared with Euclidean distance. The second is relative band power per channel, compared with Bray-Curtis dissimilarity. The third is the band-limited channel-by-channel correlation (connectivity) matrix, compared with one minus the correlation between the matrices' upper triangles. The connectivity construction follows the multi-spectrum approach of Resting-State Multi-Spectrum Functional Connectivity Networks, which built one correlation network per frequency sub-band but then reduced each to clustering coefficients for an SVM.

To avoid pseudoreplication, segments are averaged to one point per subject-by-clip pair. Is Limited Participant Diversity Impeding EEG-based Machine Learning? warns directly about this issue: it found that adding segments per person adds almost no information about new people.

For each band and distance we run PERMANOVA with two factors, subject and emotion label. Emotion is permuted only within subjects, the standard "strata" design used for repeated measures. From this we read off $R^2_{\text{subj}}$, the fraction of total squared distance explained by subject identity. We also read off the conditional state fraction:

$$ \rho = \frac{SS_{\text{state}\mid\text{subj}}}{SS_{\text{total}} - SS_{\text{subj}}}, $$

where $SS$ denotes a sum of squared pairwise distances in the PERMANOVA decomposition. $SS_{\text{state}\mid\text{subj}}$ is the part explained by emotion once subject block means are removed. $\rho$ is therefore the share of within-person variation that tracks emotional state.

This mirrors how the eelgrass wasting-disease study apportioned microbiome variation to region (11%), temperature (4%), and lesion prevalence (3%). The musk deer and Hu sheep studies supply the same method with ordination plus permutation testing. Those studies also constrain us. Visual clusters in a PCoA plot can mislead, so every plotted separation is paired with a permutation p-value. Bray-Curtis can produce negative eigenvalues when the map is computed. We therefore report the size of the negative eigenvalues and repeat the analysis with a Lingoes-corrected version and with square-root-transformed distances.

The correction step uses PCoA directly. We double-centre the squared-distance matrix to obtain an inner-product matrix, subtract each subject's block mean in that space, and take the leading eigenvectors as subject-centred coordinates. A held-out subject is centred using only their own unlabeled data, then projected into the training coordinates. Decoding uses a nearest-neighbour or linear classifier on these coordinates.

The Euclidean case of this procedure reduces exactly to subtracting each subject's feature mean. It therefore serves as our built-in ablation: the question is whether subject-centring under Bray-Curtis or connectivity distance adds anything beyond ordinary normalization.

Baselines

The naive reference point is chance accuracy together with broadband features. Broadband features pool all frequencies before computing distances, which is known to hide opposing band-specific power shifts (Spectral Changes in Cortical Surface Potentials during Motor Movement). In fMRI, broadband analysis scored 59.5% against 86.5% for sub-band analysis on the Duke-UNC MCI cohort (Multi-Spectrum Functional Connectivity). We include broadband as a configuration in every analysis to confirm the band split matters in EEG too.

The strongest existing methods are the ones reported on our benchmarks. On FACED nine-class cross-subject classification, the best reported result is RGNN at 31.3% accuracy (GNN4EEG). RGNN is a graph network regularized against subject shift and trained on five-band differential entropy. On leave-one-subject-out testing, the best reported mean accuracies are 59.06% on DEAP and 83.33% (AUC 0.904) on SEED, from L1-selected band features with an SVM (Exploring EEG Features in Cross-Subject Emotion Recognition).

We will rerun RGNN through the GNN4EEG toolkit with its nested cross-validation splits. We will reimplement the SVM pipeline on the same subject folds and features. Every method gets the same hyperparameter-search budget within the inner folds.

Beating these baselines has two meanings. For the diagnostic, success means $\rho$ ranks configurations by held-out accuracy with Spearman correlation clearly above both the univariate baseline and the subject-fraction-alone baseline, with confidence intervals obtained by resampling subjects. For the correction, success means subject-centred non-Euclidean coordinates exceed per-subject-normalized Euclidean features by more than the fold-to-fold standard deviation. Matching or exceeding 31.3% on FACED would be a bonus, not the core requirement.

The key ablation is Euclidean-centred PCoA. It is identical to per-subject z-scoring without the variance scaling, so it isolates whether the choice of distance, rather than the centring, carries any gain.

Why not just…?

Why not just run leave-one-subject-out classification for every band and pick the best? This is the most serious alternative for band selection, and it is what the cross-subject feature study effectively did. Our answer is partial. PERMANOVA needs no classifier, no hyperparameters, and no nested folds. It also separates two failure modes that accuracy merges: a band can transfer poorly because the subject fingerprint dominates, or because the band carries little state signal at all. If $\rho$ does not predict accuracy, the diagnostic has no value and we will say so. If it does, it earns its place as a fast screen and an explanation, not as a replacement for held-out testing.

Why not just normalize features per subject? This is a real threat to the correction step. For Euclidean distance, our correction is exactly this normalization. The proposal only has something new if Bray-Curtis or connectivity distances, centred per subject, beat normalized differential entropy. That is the ablation above, and we treat a null result there as the likely outcome and as a publishable constraint.

Why not just compute a per-feature ANOVA or intraclass correlation and average it? Univariate statistics ignore covariance across channels and cannot express connectivity-matrix or compositional distances. They are, however, cheaper and easier to interpret. We compute them for every configuration. If their averaged F-ratio predicts accuracy as well as $\rho$, the multivariate distance machinery is unnecessary, and we will report that.

Why not just use PCA on vectorized features? PCA is PCoA with Euclidean distance, so it is already inside the comparison as the Euclidean arm. The file's evidence that Euclidean geometry is inadequate comes from sparse microbiome data and may not carry over to EEG. We test that transfer rather than assume it.

Proposed Experiments and Decisive Checks

The primary dataset is FACED: 123 subjects and 28 clips, large enough for stable variance estimates per subject. DEAP (32 subjects) and SEED (15 subjects, three sessions) provide replication. SEED additionally allows a session factor to be partitioned alongside subject. The analysis grid crosses six band settings (five bands plus broadband) with three feature-and-distance pairs, and reports $R^2_{\text{subj}}$, $\rho$, and permutation p-values for each cell.

A central confound must be addressed. In FACED every subject sees the same clips, so "state" also contains stimulus-evoked responses. We will therefore also partition by clip identity and report emotion variance beyond clip where the design permits.

There are three decisive checks. First, the diagnostic must reproduce the known pattern that beta and gamma transfer better (Exploring EEG Features in Cross-Subject Emotion Recognition) without seeing any held-out labels. It must then rank all 18 configurations by leave-one-subject-out accuracy better than the univariate and subject-fraction-alone baselines. Second, subject-centred PCoA with non-Euclidean distances must beat the Euclidean-centred ablation under matched classifiers and folds. Third, the variance fractions must remain stable when the number of subjects is subsampled. Following the finding in Is Limited Participant Diversity Impeding EEG-based Machine Learning? that performance plateaus around several hundred participants, we will report how many subjects are needed before $\rho$ stabilizes.

Failure on the first check ends the diagnostic claim. Failure on the second reduces the contribution to a measurement study, which would still be the first to quantify the subject fingerprint band by band.