Skip to main content
Nature Communications logoLink to Nature Communications
. 2026 Mar 31;17:4662. doi: 10.1038/s41467-026-71234-0

Decoupling simultaneous motor imagination and execution via orthogonal ECoG neural representations

Leonardo Pollina 1, Lucas Struber 2, Valeria de Seta 1,3, Eleonora Russo 4, Serpil Karakas 2, Stephan Chabardes 2,5, Tetiana Aksenova 2, Guillaume Charvet 2, Solaiman Shokur 1,4,6,#, Silvestro Micera 1,4,6,✉,#
PMCID: PMC13201640  PMID: 41917049

Abstract

The brain coordinates multiple parallel motor programs, ensuring synergy and preventing interference during movements. Yet, performance often degrades when brain–machine interfaces are used during concurrent tasks or ongoing movements. We suggest that latent neural representations may represent a strategy to solve this issue. In this study, we addressed this question using neural signals from a tetraplegic individual with partial residual motor function, implanted with a wireless epidural electrocorticography (ECoG) device. By adapting dimensionality reduction techniques, we found that motor execution and motor imagery span partially overlapping subspaces in mesoscale neural signals, shaped by specific frequency band contributions. Despite substantial shared variance, we show that identifying orthogonal, condition-specific dimensions enables successful decoding of executed and imagined movements, even when performed simultaneously. These findings show that ECoG signals can expose separable neural subspaces, allowing executed and imagined actions to be harnessed independently and in concert. This opens a promising avenue to develop brain–machine interfaces that can simultaneously control multiple external devices or operate alongside natural movements.

Subject terms: Neural decoding, Biomedical engineering


Neural population activity evolves on low-dimensional manifolds. Here, the authors identify shared and exclusive neural spaces in ECoG signals for motor execution and imagery, and show how these latent structures enable partial demixing of concurrently executed and imagined movements.

Introduction

Motor imagery is the cognitive process in which individuals mentally perform a movement without any physical execution. The relationship between motor execution and motor imagery has been extensively studied. Both engage motor-related brain regions but with different activation patterns1–3. Motor imagery is often considered a conscious parallel to motor preparation, where movements are mentally rehearsed before execution4. However, motor imagery also involves an inhibitory component consisting of the challenge of vividly imagining a movement while consciously suppressing its physical execution5.

In the last decade, research has shifted from studying individual neurons to examining neural populations through large-scale recordings6. This shift has led to the concept of neural manifolds or neural spaces, lower-dimensional representations of neural activity that capture the coordinated dynamics of neural populations7,8. These neural spaces provide valuable insights into how the brain encodes motor behaviors, even when motor processes activate corresponding brain areas without overt movements9,10. The identification of neural spaces has shown that motor preparation and execution occupy distinct, orthogonal subspaces, with activity transitioning between these spaces as movements unfold9,11–13. On the other hand, movement imagination14 involves shared and exclusive spaces with motor execution, with the shared spaces consisting of common dynamics between the two neural processes and exclusive spaces containing neural patterns specific to each. While most of these studies rely on spike sorted or multi-unit activity, whether this geometric relationship between motor execution and imagery is also identifiable at the mesoscale level remains unclear. Addressing this question is particularly relevant for surface-electrode-based brain-machine interfaces (BMIs), such as electrocorticography (ECoG), which represent a compelling alternative to intracortical microelectrodes15–18. These BMIs offer reduced invasiveness and fewer associated side effects while preserving long-term usability19–22. Identifying and leveraging neural spaces with these less invasive techniques could significantly enhance the effectiveness and accessibility of BMIs, broadening their impact for a wider range of patients. Moreover, the use of latent neural spaces both offers greater temporal stability, preserving a subject’s representation even as the activity of individual neurons varies over time,23–25, and allows the bridge across multiple subjects,26,27, thereby enabling the training of more powerful and generalizable cross-subject BMI algorithms.

Most BMIs are designed to decode imagined movements in conditions with minimal or no concurrent physical movement. In certain instances, minor unstructured movements become part of the training signal distribution and are treated as noise by the classifier, thereby still enabling the decoding of motor imagery. While this strategy is appropriate for individuals with complete paralysis, it can be limiting for those with incomplete tetraplegia28. These individuals often retain some motor function, and restricting real movement in favor of motor imagery can hinder natural interaction in daily life. This highlights the need for alternative approaches that allow decoding of imagined actions concurrently with purposeful, goal-directed movements, whether coordinated with or independent from the external end effector controlled by the BMI. We propose that neural spaces capturing distinct representations of motor execution and motor imagery could help address this issue. Specifically, the separation of imagery and execution into orthogonal neural subspaces may help identify a specific neural space where motor imagery decoding could be more robust. This could ultimately allow users to perform physical movements without disrupting simultaneous BMI control through motor imagery. This challenge involves identifying task-null spaces, where neural signals can be modulated voluntarily without interfering with concurrent task-oriented actions29. By disentangling motor imagery from concurrent execution, we identify a candidate execution-null space, where neural modulation could drive an external effector, while performing other activities.

In this study, we addressed the challenge of decoupling motor execution from motor imagination by identifying a potential solution within the neural manifolds framework, which offers a principled approach to uncover condition-specific neural subspaces. To this end, we adapted dimensionality reduction methods originally developed for spiking activity to mesoscale cortical signals recorded from an individual with tetraplegia who retained some residual motor functions. Through this analysis, we identified partially overlapping neural representations of motor execution and imagination. Focusing on the neural subspaces exclusive to each condition, we found that they reliably captured condition-specific patterns with stable and robust dynamics. Using these representations, we were able to disentangle the neural processes underlying execution and imagination, even when they occurred simultaneously. Our findings indicate that this approach could enhance BMI performance by supporting user control of external interfaces via motor imagery alongside ongoing physical movements, without mutual interference.

Results

A recent study has demonstrated that multi-unit neural activity related to motor execution and motor imagination overlaps only partially in the neural space14. As depicted in Fig. 1a, this suggests that the two activities share a common dimension (Dim. 1), while also maintaining exclusive dimensions, Dim. 2 for execution and Dim. 3 for imagination, respectively. We aimed to explore whether this relationship holds in neural spaces identified from mesoscale neural signals, such as those measured via ECoG. In this framework, we define a neural space, or neural manifold, as a space where the axes represent covariance patterns across channels and frequency bands, meaning that each axis represents a linear combination of these original features (Fig. 1b).

Fig. 1. Experimental setup, paradigm and hypothesis.

Fig. 1

a A sketch illustrating the hypothesis where motor imagination and execution share some dimensions, while also evolving on exclusive ones. b A neural manifold spanning ECoG data is defined here as a space constrained by covariance patterns among channel and frequency bands. The blue curved arrow illustrates a latent neural trajectory unfolding over time on the neural manifold, beginning from a baseline state (blue circle). c The WIMAGINE device located on the left hemisphere over M1 and S1. d The experimental setup consisted of the participant in front of a screen displaying the instructions. A progression bar helped the participant timing the movement during the trial. e The paradigm consisted of two right arm movements executed, a reaching movement and a wrist extension movement, and their imaginary counterparts. f EMG activity from an example session of the right lateral deltoid (DEL, to monitor activity when executing the reaching movement) and of the right extensor digitorum (ED, to monitor activity when executing the wrist extension) for executed (green) and imagined (blue) trials. g Example spectrograms illustrating neural activity for an example channel (indicated in c) on M1 during executed and imagined movements. h Normalized enveloped for all frequency bands for the same channel as in (g). The thick lines represent the average across trials, while the shaded area represents the standard error of the mean. REE = reaching executed, WEE = wrist extension executed, REI = reaching imagined, WEI = wrist extension imagined. Green = execution, blue = imagination.

A 34-year-old male with tetraplegia due to an incomplete C6 spinal cord injury was implanted with the chronic wireless ECoG WIMAGINE device30 14 years post-injury over the left primary motor (M1) and sensory cortices (S1) (see Participant in Methods). The reconstructed location of the implant is shown in Fig. 1c. During the experimental sessions, the participant sat in front of a screen displaying movement instructions alongside a progressing bar to help pace the movements (Fig. 1d). The participant was instructed to perform both execution and imagination trials of reaching and wrist extension movements (REE = reaching executed, WEE = wrist extension executed, REI = reaching imagined, WEI = wrist extension imagined, Fig. 1e) with his right arm, which were feasible due to the residual movement abilities of the participant (ASIA score of 5 in the elbow flexors, ASIA score of 3 on the wrist extensors). During the imagination trials, the participant was instructed to remain as still as possible. The right extensor digitorum and the lateral deltoid were chosen as target muscles for the wrist extension and reaching movements, respectively, due to the absence of EMG activity during the opposite action (Fig. S1). Significant muscle activity was observed during execution trials, whereas no major activity was detected during imagination trials (Fig. 1f).

Neural activity was modulated during both execution and imagination trials. The time-frequency decomposition for an example channel (highlighted in Fig. 1c) is shown in Fig. 1g. Notably, a pronounced desynchronization in the high-beta band (around 30 Hz) is observed across all conditions. To identify the neural spaces and perform all subsequent analyses, we divided the spectrum into seven frequency bands (δ: 1–4 Hz, θ: 4–7 Hz, α: 7–13 Hz, low β: 13–22 Hz, high β: 22–37 Hz, low γ: 37–60 Hz, and high γ: 60–250 Hz) and extracted their envelopes. Figure 1h displays the average time-evolving envelope across trials for all frequency bands, corresponding to the same example channel.

Execution and imagination dynamics show partial overlap at the mesoscale level

As a first step, we sought to identify a global low-dimensional latent space that captured most of the variance of both motor execution and imagination activities, originally recorded in a 224-dimensional space (32 channels × 7 frequency bands). To this end, we applied principal component analysis (PCA) separately to the trial-averaged execution and imagination datasets, retaining the number of principal components (PCs) required to explain 99% of the variance in each case. The global latent space was then constructed by concatenating the retained PCs from execution and imagination and orthonormalizing them using singular value decomposition (SVD). This procedure was chosen over applying PCA directly to the concatenated data, as it ensured that both conditions were equally represented in the global latent space by allowing precise control over the proportion of variance captured from each condition.

Once the global latent space was identified, we examined how motor execution and imagination activities were represented within it. To assess their alignment, we defined two sets of PCs, each optimized to capture either execution or imagination activity, and quantified the variance they explained in the complementary condition. Figure 2a, b illustrates the variance explained by each PC when PCA was applied separately to execution and imagination activities. The first few PCs in both conditions capture a significant portion of the variance of their respective conditions for both execution and imagination. However, the later PCs, which explain little to no variance in the condition they were computed on, still account for variance in the opposite condition. This trend is illustrated in Fig. 2c, which shows how cumulative variance is distributed within and across neural spaces. Within the same space (Ex in Ex and Im in Im), a small number of PCs account for nearly all the variance. In particular, 11 PCs were needed to explain 99% of execution variance, while 18 PCs were required for imagination. The higher number of PCs for imagination likely reflects the greater complexity of motor imagery processes. However, when projected onto the other neural space (Ex in Im and Im in Ex), variance was more evenly distributed across all components, resulting in a more gradual accumulation.

Fig. 2. Motor execution and imagination share a neural space while also evolving onto exclusive neural spaces.

Fig. 2

a Variance explained by every principal component (PC) for execution and imagination activity when performing PCA on the execution data projected onto the common latent space. b Same as (a) but when projecting onto the PCs computed on imagination activity. c Progressive cumulative variance across PCs for within vs across spaces. d Observed alignment index computed for both across-space projections together with the mean of control alignment indices aiming at measuring alignment by chance (random spaces) and at evaluating alignment accounted for by trial-inherent variance (shuffled trials). Both controls are performed with N=1000 permutations (one-sided test) and error bars represent 0.5% and 99.5% percentiles. Statistical significance was performed via a permutation test comparing the observed value to the two control distributions. e Decomposition of the latent space in three different spaces capturing only execution activity, only imagination activity, or both. f Decoding accuracies (mean ± standard deviation across cross-validation folds, N = 10) when projecting single trials on the neural spaces identified. Significance against chance was computed via N = 1000 labels shuffling (one-sided test, permutation test). The dashed line represents the theoretical chance level. Confusion matrices for Execution (g) and Imagination (h). *** indicates significance at p < 0.001. REE = reaching executed, WEE = wrist extension executed, REI = reaching imagined, WEI = wrist extension imagined. Green = execution, blue = imagination, gray = shared.

To quantify execution-imagination alignment, we used the alignment index proposed in10,11,14, which ranges from 0 (total orthogonality) to 1 (full alignment). This index measures the ratio over a given number of components of variance explained across spaces (such as Im in Ex) relative to the variance explained within the same space (such as Im in Im). Using 11 and 18 dimensions for execution and imagination, respectively, we found alignment indices of 0.74 for imagination on execution and 0.75 for execution on imagination (Fig. 2d). This means that the first 18 PCs computed from execution activity still explain approximately 74% of the variance in imagination activity. Vice versa, the first 11 PCs computed from imagination explain approximately 75% of execution variance.

To interpret the alignment value between execution and imagination spaces, we compared it to two controls derived from random sampling. In the first control, we assessed whether the observed alignment exceeded that expected between random subspaces sharing the same covariance structure as the original data. This control tests whether the observed alignment merely arises from shared covariance constraints rather than genuine similarity. In the second control, we shuffled execution and imagination labels across trials, generating spaces that mix trial conditions while preserving trial-level variability. In this scenario, we expect a relatively high alignment, since the resulting spaces are identical in nature and correspond to an equally mixed set of trial conditions. We found that alignment indices for both execution and imagination were significantly higher than chance (p < 0.001, 1000 random samplings), indicating that execution and imagination occupy partially aligned spaces: more aligned than expected by chance but not perfectly overlapping. As a further validation, repeating the analysis on intertrial activity yielded complete alignment between execution and imagination, not discernible from the shuffled-labels alignment, as expected (Fig. S2).

We then identified the exclusive and shared neural subspaces using a separation procedure similar to14. Briefly, to isolate condition-specific neural patterns, we first extracted the trailing PCs of the opposite condition, retaining only those that explained at most 1% of its variance. This ensured that the resulting components captured activity exclusive to the condition of interest. Since the trailing components for execution and imagination were computed independently, the two sets were not guaranteed to be orthogonal. To address this, we applied a gradient descent–based optimization that produced two orthogonal sets of axes representing the exclusive spaces. The optimization minimized the reconstruction error between projections of the neural activity onto these optimized axes and the corresponding projections onto the original trailing PCs. Finally, the shared space was defined as the null space of the concatenated exclusive spaces, thus capturing the neural variance not accounted for by either exclusive subspace. Importantly, this procedure yielded a complete decomposition of the variance captured by the global latent space into three distinct subspaces: exclusive execution, exclusive imagination, and shared. An illustration of the main conceptual steps, from the original recording space to the global latent space and its decomposition into neural subspaces, is provided in Fig. S3.

Specifically, we identified a 13-dimensional exclusive execution space (hereafter referred to also as execution space) explaining 23.5% of execution variance, a 20-dimensional exclusive imagination space (hereafter referred to also as imagination space) explaining 33.1% of imagination variance, and a 4-dimensional shared space accounting for 75.9% of execution variance and 65.3% of imagination variance (Fig. 2e). We estimated the intrinsic dimensionality of the three spaces by counting components explaining more than 0.1%, 0.5%, or 1% of the variance in execution or imagination activity. To obtain a robust estimate, not affected by the specific set of recorded trials, we repeated the procedure on 1000 bootstrap resamples of the original dataset generated by randomly sampling trials with replacement. The exclusive spaces, particularly the exclusive imagination space, showed significantly higher dimensionality than the shared space (Fig. S4)14. However, the relative difference in dimensionality between exclusive and shared neural spaces decreased as the variance threshold increased, reflecting the presence of more low-variance, potentially noisy, components in the exclusive neural spaces.

Although we successfully identified exclusive and shared neural spaces, it was essential to determine whether the variance they captured reflected mere noise or task-independent activity, rather than task-relevant information. In other words, we asked whether these neural spaces encoded the type of movement performed. To address this, we assessed their behavioral relevance by projecting individual trials onto each space and applying linear discriminant analysis (LDA) to decode the two executed and the two imagined movements10. As a reference, applying the same decoding pipeline directly to the recording space (comprising all channel–frequency band combinations) yielded an accuracy of 93.3 ± 4.4% for execution trials and 77.9 ± 4.4% for imagination trials. When evaluating the neural subspaces, for execution data, decoding accuracy was 90.0 ± 3.5% (mean ± standard deviation across 10 cross-validation folds) when projecting onto the execution space and 85.0 ± 5.6% when projecting onto the shared space (Fig. 2f). For imagination data, accuracy was 81.7 ± 5.1% in the imagination space and 68.0 ± 7.9% in the shared space (Fig. 2f). Accuracies were significantly above chance (p < 0.001, permutation test with label shuffling, 1000 repetitions). The normalized confusion matrices for all classification analyses are displayed in Fig. 2g, h. In contrast, projecting activity onto the opposite neural space resulted in significantly below-chance decoding performance (p < 0.001, permutation test with label shuffling, 1000 repetitions), consistent with previous reports by Jiang and colleagues10. Specifically, execution trials projected onto the imagination space yielded an accuracy of 39.7 ± 7.2%, while imagination trials projected onto the execution space achieved 38.6 ± 5.9%. This effect likely arises from the construction of the exclusive neural spaces, which are optimized to capture only a minimal fraction (≈1%) of variance from the opposite condition, combined with the use of single trials drawn from the same dataset used to compute the trial-averaged trajectories that defined the neural spaces.

Frequency bands contribute differently to neural spaces

The identified execution and imagination manifolds are subspaces of the broader neural space defined by the full spectral content of the neural data. Defined by covariance patterns across channels and frequencies, these spaces let us dissect the individual contributions of each frequency band to each coding modality. To quantify individual feature contributions (i.e., channel × frequency combination) to a given neural subspace, we multiplied the transformation matrix that projects the original recordings into the global latent space by the matrix that projects the global latent space into the target subspace. To enable comparisons across spaces, we normalized the contributions within each space, obtaining the percentage contribution of each feature to that space. Fig. S5 shows the contributions of each channel across all neural spaces and frequency bands, mapped onto the ECoG grid.

We computed the log ratios of the contributions of all features for all combinations of neural spaces (Fig. 3a, b). The log ratios exhibited unimodal distributions in all cases, as confirmed by the Hartigan dip test for unimodality (p = 0.98 for Ex/Im, p = 0.98 for Ex/Sh, p = 0.99 for Im/Sh)31. This indicates that the contributions were generally homogeneously spread across features, rather than being split into distinct sets of features uniquely contributing to specific spaces, which would have resulted in bimodal distributions.

Fig. 3. Different frequency bands contribute differently to the execution, imagination, and shared neural spaces.

Fig. 3

a Distribution of contributions normalized by space. b Log ratio of the three pairwise comparisons highlighting the unimodal distribution of contributions. c Total variance per frequency (sum over channels). d Distributions of contributions per band across channels (N = 32 channels per band) for all neural spaces. Bottom line: Statistical significances (darker color) for all pairwise comparisons (repeated-measures ANOVA followed by post-hoc paired two-sided t-tests, p < 0.001, FDR corrected). e Illustration of channels location over M1 (purple) and S1 (orange). f Distributions of contributions (N = 16 channels for each boxplot) for all neural spaces and frequency bands by dividing M1 and S1 channels. All boxplots in the figure show the median together with the 25% (Q1) and 75% (Q3) quartiles. Whiskers extend up to Q1 −1.5*IQR (lower bound) and up to Q3 + 1.5*IQR (upper bound), where IQR is the inter-quartile range defined as Q3 − Q1. * indicates significance at p < 0.05, ** at p < 0.01, and *** at p < 0.001, mixed-effects ANOVA followed by two-sided post-hoc t-tests, FDR corrected. Green = execution, blue = imagination, gray = shared.

To summarize the overall contribution of each frequency band, we summed the contributions of all channels for each band separately (Fig. 3c). The largest contributions were observed in the delta (19.4% for the exclusive execution space, 18.5% for the exclusive imagination space, and 15.8% for the shared space) and high-gamma bands (32.8% for the exclusive execution space, 28.9% for the exclusive imagination space, and 38.3% for the shared space). When comparing contributions across frequency bands, with channels treated as the repeated-measures unit, a repeated-measures ANOVA revealed a significant main effect of frequency band in all neural subspaces (Ex: F(6,186) = 50.79, p < 0.001; Im: F(6,186) = 47.43, p < 0.001; Sh: F(6,186) = 38.30, p < 0.001). Post-hoc paired t-tests (FDR corrected) confirmed the U-shaped pattern, with delta and high-gamma showing significantly higher contributions than other bands (Fig. 3d).

Our goal was to uncover potential patterns within specific frequency bands across different neural spaces. To achieve this, we categorized the channels based on the two brain regions covered by the implant: M1 and S1 (Fig. 3e). For each frequency band, we performed a mixed-effects ANOVA to test if a main effect of the cortical region, of the neural space, or of their interaction was present for a given frequency band. We found a significant effect of the neural space for all frequency bands with the exception of low gamma (δ: F(2,60) = 4.66, p = 0.018; θ: F(2,60) = 15.63, p < 0.001; α: F(2,60) = 17.35, p < 0.001; βlow: F(2,60) = 53.76, p < 0.001; βhigh: F(2,60) = 4.29, p = 0.021; γhigh: F(2,60) = 13.49, p < 0.001; p-values FDR corrected across frequency bands, Fig. 3f). Notably, post-hoc paired t-tests (FDR corrected for neural spaces and frequency bands) revealed that contributions in the alpha and low beta bands were significantly higher in the imagination space compared to both the execution and shared spaces (α(Ex − Im): t(31) = −6.54, p < 0.001; α(Im − Sh): t(31) = 5.16, p < 0.001; βlow(Ex−Im): t(31) = −8.54, p < 0.001; βlow(Im−Sh): t(31) = 8.57, p < 0.001). In delta and theta, the shared space had the lowest contributions (δ(Ex−Sh): t(31) = 2.57, p = 0.022, δ(Sh−Im): t(31) = 2.69, p = 0.019; θ(Ex − Sh): t(31) = 3.64, p = 0.002, θ(Sh − Im): t(31) = 6.04, p < 0.001). In high beta, the execution space was the one with the lowest contributions (βhigh(Ex − Im): t(31) = −3.53, p = 0.002, βhigh(Ex − Sh): t(31) = −2.53, p = 0.022).

Moreover, for theta, high beta, low gamma, and high gamma, we also found a significant effect of the brain region. In theta, low gamma and high-gamma (θ: F(1,30) = 10.48, p = 0.010; γlow: F(1,30) = 7.59, p = 0.017; γhigh: F(1,30) = 24.00, p < 0.001; all p-values FDR corrected across frequency bands), the contributions to S1 were higher than the ones to M1, while for high-beta (βhigh: F(1,30) = 8.74, p = 0.014) M1 showed higher contributions than S1. Finally, high gamma was the only frequency band in which the interaction between neural space and region was significant (F(2,60) = 6.47, p = 0.020). Differences across neural spaces revealed statistical differences only in S1, where contributions to the exclusive imagination space were lower than execution and shared spaces (Ex-Im: t(15) = 3.88, p = 0.004; Im-Sh: t(15) = −4.34, p = 0.003).

Neural spaces maintain stable task-relevance across months

The analysis in Fig. 2 explores the relationship between neural spaces underlying execution and imagination activity by pooling trials from the entire dataset. To assess the stability of this relationship and its robustness across datasets acquired over multiple days, sometimes spanning several months (Table S1), we employed a leave-one-session-out (LOSO) approach. In this method, illustrated in Fig. 4a, neural spaces (including the global latent space and the three neural subspaces) were identified using pooled trials from three of the four sessions available (sessions 1, 3, 4, and 6, Tables S1, S2). The spaces identified were then evaluated for their relevance on the left-out session.

Fig. 4. Neural spaces remain overall stable when used on new sessions of data across months.

Fig. 4

a A sketch illustrating the approach followed in this analysis, that is a leave-one-session-out (LOSO) approach. Neural manifolds were identified and decoders were trained on three sessions, then the session left out was used as the test set. b Dimensions of the three neural spaces identified for every combination of sessions. c Variance explained by the three neural spaces for all combinations of sessions. d Variance explained by the common latent space between execution and imagination when projecting the execution data (left) or the imagination data (right) of the session left out. e Variance explained by the three neural spaces identified when projecting execution data (left) and imagination data (right) of the session left out onto the three neural spaces identified over the remaining sessions. Each circle (N = 4) represents a different LOSO combination. f Decoding accuracy obtained when performing a 10-folds cross-validation within the execution data (left) or imagination data (right) from the left-out session projected onto the neural spaces identified over the remaining sessions. Each circle represents the average balanced accuracy across the 10 folds for a given left-out session. The dashed line represents the theoretical chance level. Individual significance against chance was assessed against a null distribution obtained via label shuffling (one-sided permutation test, N = 1000, FDR corrected across spaces). *** indicates significance at p < 0.001. g Decoding of single movements when projecting the execution data from the left-out session onto the exclusive execution space (green), the exclusive imagination space (blue), and the shared space (gray). Decoders were trained on the trials of the three sessions used to identify the neural spaces and tested on the trials of the session left out. Empty bars represent the accuracies of the individual LOSO folds. The colored bar represents the mean ± the standard deviation across the N = 4 LOSO combinations. The dashed line indicates the theoretical chance level. Significance against chance was assessed by comparing the average LOSO accuracy to the average chance distribution obtained via label shuffling (N = 1000 repetitions, one-sided test, permutation test, FDR corrected across neural spaces). Decoding on Ex space: p = 0.001; on Sh space: p = 0.001. h Same as (g) but decoding the imagination data from the left-out session projected onto the neural spaces identified from the remaining sessions. Decoding on Im space: p = 0.001; on Sh space: p = 0.001. Green = execution, blue = imagination, gray = shared.

We first started by assessing whether the relationship between execution and imagination activity remained stable regardless of the combination of sessions used. The dimensionality of the latent space was 40 ± 3 (mean ± standard deviation) dimensions, demonstrating overall consistency across the tested combinations (Fig. 4b). Similarly, the dimensionality of the neural subspaces remained stable, with 14±1 dimensions for the exclusive execution space, 20 ± 2 dimensions for the exclusive imagination space, and 4 ± 1 dimensions for the shared space. The execution space accounted for 26.62 ± 4.21% of the variance in execution data, while the imagination space explained 36.46 ± 6.34% of the variance in imagination activity. The shared space explained 72.66 ± 4.14% and 61.90 ± 6.41% of execution and imagination activity, respectively (Fig. 4c). Complementary results from a similar analysis, including neural spaces identified from individual sessions, are presented in Fig. S6.

We then evaluated how the neural spaces generalized across days, finding that the global latent space (Fig. 4d) explained 84.8 ±4.9% of the variance in execution activity not used to define the space, and 71.5 ± 7.9% of the variance in imagination activity. Further projecting the neural activity from the left-out session onto the individual neural subspaces (Fig. 4e) revealed that the execution variance captured by the global latent space was distributed as follows: 21.1 ± 3.1% explained by the exclusive execution space, 11.0 ± 4.8% by the exclusive imagination space, and 67.9 ± 7.6% by the shared space. A Friedman test revealed a significant main effect of subspace (χ2(2) = 8.0, p = 0.018). However, post-hoc pairwise comparisons using Wilcoxon signed-rank tests with FDR correction did not reveal any significant differences, likely due to the small sample size (N = 4 sessions). For imagination activity, the variance explained by the global latent space was divided into 23.5 ± 5.8% explained by the exclusive execution space, 22.7 ± 6.8% explained by the exclusive imagination space, and 53.9 ± 11.4% explained by the shared space. These results suggest that the exclusive imagination space acts as a stable functional null space for execution activity, capturing low execution-related variance and, therefore, remaining partially orthogonal to it. In contrast, this asymmetry does not hold for the exclusive execution space, as both exclusive spaces explain comparable amounts of imagination-related variance. To examine this further, we performed a cross-validation decoding analysis in which trials from the left-out session were projected onto the different neural subspaces. For execution trials, decoding accuracy reached 84.0 ± 7.3% (mean ± standard deviation across sessions) in the exclusive execution space, 76.0 ± 3.2% in the exclusive imagination space, and 87.8 ± 6.1% in the shared space. When decoding imagination trials, accuracies were 58.4 ± 5.7% in the exclusive execution space, 64.7 ± 5.3% in the exclusive imagination space, and 72.4 ± 13.6% in the shared space (Fig. 4f). All decoding accuracies were significantly above chance (p < 0.001, permutation test against chance distribution obtained via label shuffling, FDR corrected). A Friedman test revealed a significant main effect of subspace for both execution activity decoding (χ2(2) = 8.0, p = 0.018) and imagination activity decoding (χ2(2) = 6.5, p = 0.039), but post-hoc Wilcoxon signed-rank tests (FDR corrected) did not reveal significant differences in any pairwise comparison.

Finally, we tested whether classifiers trained on neural spaces could generalize across sessions. To do this, classifiers were trained on the projections of the trials used to identify the neural spaces and evaluated on the trials from the left-out session, thereby implementing a proper leave-one-session-out (LOSO) cross-validation. A robust and stable neural representation would support accurate generalization to the unseen session. For execution trials (Fig. 4g), projection onto the exclusive execution space yielded an average decoding accuracy of 72.8 ± 6.1%, onto the exclusive imagination space 53.1 ± 8.7%, and onto the shared space 79.0 ± 10.4%. Only the execution and shared spaces achieved accuracies significantly above chance (Ex: p = 0.001; Sh: p = 0.001; permutation test with chance distribution obtained via label shuffling, N = 1000, FDR corrected). For imagination trials (Fig. 4h), decoding accuracy reached 52.7 ± 6.5% when projecting onto the exclusive execution space, 62.7 ± 3.3% onto the exclusive imagination space, and 61.4 ± 6.0% onto the shared space. In this case, only the imagination and shared spaces yielded accuracies significantly above chance (Im: p = 0.001; Sh: p = 0.001).

Notably, when tested with their corresponding neural activity, the exclusive spaces exhibited greater stability across LOSO folds, as reflected by their smaller standard deviations, compared to the opposite and shared spaces.

The exclusive imagination neural space generalizes to unseen imagined movements

Having defined execution and imagination neural subspaces from an equal set of executed and imagined movements, we then asked how these spaces adapt when considering imagined movements that cannot be physically executed. Although this breaks the symmetry of directly comparing the same movements, it carries strong translational value. For individuals with residual motor abilities, isolating an imagination-specific space, while excluding variance shared with execution, could be especially useful for BMIs. Moreover, testing how this space accommodates new imagined movements reveals its capacity to generalize beyond the movements used for its identification. To address this, the participant was asked to imagine two additional movements: grasping (GRI), still involving the upper limb, and walking (WLI), involving the lower limbs. We examined how the exclusive imagination space differed when identifying the neural subspaces by adding new movements either sequentially or directly to the original repertoire of imagined reaching and wrist extension (Fig. 5a, Table S2).

Fig. 5. The exclusive imagination space expands modularly to capture additional imagined movements.

Fig. 5

a Schematic of the imagination spaces considered in this analysis. Neural imagination spaces were defined in contrast to the execution space identified with two executed movements: reaching and wrist extension. The original exclusive imagination space (Im2) was built using imagined reaching and wrist extension. Adding another upper-limb movement (imagined grasping) yielded Im3, while further including a lower-limb movement (imagined walking) yielded Im4. Movements could be added gradually (Im2 → Im3 → Im4) or directly (Im2 → Im4). b EMG activity from an example session during imagined grasping and walking trials for the target muscles shown in Fig. 1 f. DEL: lateral deltoid, ED: extensor digitorum. c Time-frequency decomposition for the same example channel as in Fig. 1 g. d Principal angles between Im2, Im3, and Im4. The shaded area indicates the 1% and 99% percentiles of a chance distribution generated using the Tensor Maximum Entropy method. Black triangles indicate significance via permutation test (FDR controlled at 1%). e Dimensionality of exclusive execution, exclusive imagination, and shared spaces when using only imagined reaching and wrist extension versus adding imagined grasping and/or imagined walking. f Schematic of the generalization analysis: neural spaces identified with only the two original movements (reaching and wrist extension) were tested with data from the two unseen imagined movements (grasping, walking). g Variance of imagined grasping and walking explained by the global latent space (bar plot) and by individual neural spaces (pie charts) identified with only the original two movements. h Decoding accuracies (mean ± standard deviation across N = 10 cross-validation folds) when projecting individual trials of all four imagined movements onto neural spaces identified with only the original two movements. The same folds were used across neural spaces. The dashed line represents the theoretical chance level. Significance of accuracies was tested against a chance distribution (1000 label-shuffling repetitions, one-sided permutation test, FDR corrected). *** indicates significance at p < 0.001. Differences across spaces were tested with a Friedman test (χ2(2) = 15.8, p < 0.001) followed by FDR-corrected post-hoc two-sided Wilcoxon tests (Ex–Im: W = 0, p = 0.003; Ex–Sh: W = 0, p = 0.003). i Confusion matrices from the decoding analysis. REI = reaching imagined, WEI = wrist extension imagined, GRI = grasping imagined, WLI = walking imagined. Green = execution, blue = imagination, gray = shared.

As expected, EMG activity of the lateral deltoid and extensor digitorum remained flat during these imagined movements (Fig. 5b). The time–frequency decompositions for the two added movements are shown in Fig. 5c for the same example channel as in Fig. 1h (see Fig. S7 for the corresponding neural activity envelopes).

We first tested whether including new movements would misalign the exclusive imagination spaces by computing principal angles, which quantify the orientation between neural spaces, with smaller angles indicating stronger alignment. Angles were calculated between spaces defined with the original two movements (Im2: reaching, wrist extension), with grasping added (Im3), and with both grasping and walking added (Im4). To test whether the alignment exceeded chance, we disrupted the covariance structure of the additional movements using Tensor Maximum Entropy (TME) surrogates32, while keeping reaching and wrist extension fixed. Observed angles were consistently smaller than chance (Im2→Im3: 7/19 angles significantly smaller than chance; Im3→Im4: 17/20 angles; Im2→Im4: 14/20 angles; p < 0.01, FDR corrected), aside from the expected overlap in early components from the constant movements, confirming robust alignment of the exclusive imagination spaces (Fig. 5d).

The dimensionality of the three neural subspaces when including additional imagined movements are shown in Fig. 5e. With two imagined movements, the exclusive execution, exclusive imagination, and shared spaces were 13D, 20D, and 4D, respectively (Fig. 2e). Adding imagined grasping left these values largely unchanged (exclusive execution: 14D, exclusive imagination: 20D, shared: 3D). In contrast, including imagined walking increased the dimensionality of the imagination space (exclusive imagination: 25D, exclusive execution: 14D, shared: 4D).

We next tested how the neural spaces identified with two movements would generalize to additional unseen movements. Specifically, the three subspaces derived from imagined reaching and wrist extension were used to project data from imagined grasping and walking (Fig. 5f). The global latent space captured ∼80% of the variance of these unseen movements, which decomposed into 16% in the exclusive execution space, 16% in the exclusive imagination space, and 68% in the shared space (Fig. 5g). To assess discriminability, all single trials from the four imagined movements were projected onto each subspace and classified using a 10-fold cross-validation ensuring the same folds were used across neural spaces. The decoding accuracies were 33.7 ± 4.9% (mean ± standard deviation across folds) in the exclusive execution space, 57.9 ± 4.1% in the exclusive imagination space, and 55.4 ± 5.3% in the shared space (Fig. 5h, i). All accuracies were significantly above chance (p < 0.001, permutation test with label shuffling, 1000 repetitions, FDR corrected). Decoding accuracies differed across neural subspaces (Friedman test: χ2(2) = 15.8, p < 0.001). Post-hoc Wilcoxon signed-rank tests (FDR corrected) showed that both the shared and exclusive imagination spaces outperformed the execution space (Ex–Im: W = 0, p = 0.003; Ex–Sh: W = 0, p = 0.003). The reciprocal confusion between REI and WEI observed in Fig. 5i when projecting onto the exclusive execution space is consistent with the cross-space decoding behavior described above for the neural spaces identified in Fig. 2 and reflects the construction of the exclusive neural spaces.

For subsequent analyses, the neural spaces optimized to include all four imagined movements alongside the same executed movements were used (Fig. 6a). The neural spaces were jointly re-identified from scratch within the same optimization framework; as a result, the newly identified exclusive execution and exclusive imagination spaces were orthogonal by construction. Figure 6b shows the full variance decomposition across the three orthogonal subspaces: the 14D exclusive execution space accounted for 17.0% of execution variance, the 25D exclusive imagination space 27.3% of imagination variance, and the 4D shared space 81.4% and 72.0% of execution and imagination variance, respectively (individual PCAs are shown in Fig. S8). We then assessed the behavioral relevance of these spaces via decoding (Fig. 6c). As a reference, applying the same decoding pipeline directly to the recording space to classify the four imagined movements yielded an accuracy of 67.3 ± 4.5%. When evaluating the neural spaces, for execution trials, accuracies were 90.0 ± 4.7% in the exclusive execution space and 88.0 ± 3.8% in the shared space. For imagined trials, accuracies were 71.6 ± 4.4% and 56.0 ± 3.4% for the exclusive imagination and shared spaces, respectively. All accuracies were significantly above chance (p < 0.001, permutation test with label shuffling, 1000 repetitions). Corresponding confusion matrices are shown in Fig. 6d and Fig. 6e for execution and imagination, respectively. Consistent with the results obtained when considering only two imagined movements, projecting activity onto the opposite neural space yielded significantly below-chance decoding accuracies. Specifically, execution trials projected onto the imagination space resulted in an accuracy of 44.8 ± 7.8% (p < 0.05), while imagination trials projected onto the execution space achieved 20.8 ± 2.8% (p < 0.01).

Fig. 6. New neural spaces are identified when using a richer repertoire of imagined movements.

Fig. 6

a Imagined walking and grasping were added to the repertoire of imagined movements, hence breaking the symmetry with the executed movements (equal to Im4 in Fig. 5). b Full decomposition of the neural variance into three orthogonal neural subspaces (as in Fig. 2). c Decoding accuracies (mean ± standard deviation across N = 10 cross-validation folds) when projecting all single trials on relevant neural subspaces. The dashed line represents chance level (50% for execution decoding, now 25% for imagination decoding). Significance was assessed against a chance distribution (1000 label-shuffling repetitions, one-sided test, permutation test). *** indicates significance at p < 0.001. Confusion matrices from the decoding analysis for (d) execution, and (e) imagination. REE = reaching executed, WEE = wrist extension executed, REI = reaching imagined, WEI = wrist extension imagined, GRI = grasping imagined, WLI = walking imagined. Green = execution, blue = imagination, gray = shared.

Exclusive neural spaces enable the separation of concurrent imagination and execution activity

Once the neural spaces for both execution and imagination were identified, we hypothesized that the exclusive neural subspaces could effectively disentangle the corresponding activities during concurrent execution and imagination. To test this, the participant took part in additional dual-task sessions (see Tables S1, S2, S3), where he was instructed to perform a movement while simultaneously imagining another. The participant was explicitly instructed to execute both tasks concurrently rather than sequentially.

Within the full experimental paradigm, several execution-and-imagination pairings were possible. In particular, we compared the encoding of different imagined actions while the participant performed the same physical action, and the encoding of different executed actions while he imagined the same action. There were three possible combinations involving the execution of a reaching movement: reaching while imagining a wrist extension, imagining grasping, or imagining walking (Fig. 7a, case 1). Two combinations were considered when performing the wrist extension movement: extension while imagining reaching or imagining walking. The combination of executing a wrist extension while imagining grasping was excluded, as it was deemed too counterintuitive and unnatural (Fig. 7a, case 2). Among these combinations, we also focused on the comparison between imagining walking while executing a reaching movement or a wrist extension (Fig. 7a, case 3).

Fig. 7. The exclusive neural spaces can help disentangle execution and imagination activity when performed simultaneously.

Fig. 7

a Experimental paradigm concerning the dual tasks approach. Note that there was no dual task involving the execution of the wrist extension while imagining grasping because it was considered counterintuitive. b Sketch illustrating our hypothesis seeing the exclusive spaces as a potential tool to help disentangle executory and imaginary components when dual-tasking. c Recorded EMG activity of the lateral deltoid (DEL) and extensor digitorum (ED) during an example session of dual tasks. The muscle targeting the executed movement is shown in green, while the non-target muscle of each executed movement is presented in blue. d Variance explained by the latent space found on the single tasks from Fig. 6 (bar plot) and subdivision of the explained variance into the three different neural spaces (pie chart). e Decoding accuracies (mean ± standard deviation across N = 10 cross-validation folds) obtained when projecting the dual task data onto the different neural spaces, and then cross-validating within the dual task data. The same folds were used across neural spaces. The dashed line represents the theoretical chance level. Individual decoding accuracy significance was assessed against a chance distribution (1000 label-shuffling repetitions, one-sided permutation test). Significant differences across neural spaces were assessed via a Friedman test (case 3: χ2(2) = 13.4, p = 0.001) followed by post-hoc two-sided Wilcoxon signed-rank tests, FDR corrected (case 3(Ex–Im): W = 1.5, p = 0.009; case 3(Im–Sh): W = 0.0, p = 0.005). f Decoding accuracies obtained when projecting the dual task data onto the different neural spaces, training a classifier onto the single tasks, and testing it on the dual task data. Bars represent the point accuracy value obtained when using all training and test data. Error bars represent the 95% confidence interval by bootstrapping the balanced accuracies (N = 1000). The dashed line represents the theoretical chance level. Individual accuracies were tested against chance as in (e) (case 1: p(Im) = 0.003; case 3: p(Ex) = 0.001, p(Sh) = 0.001). Significant differences across neural spaces were assessed via a two-sided paired permutation test (FDR corrected) where individual predicted labels were randomly swapped across spaces. Case 1: p(Ex-Im) = 0.003; p(Im-Sh) = 0.016. Case 2: p(Ex-Im) = 0.006; p(Ex-Sh) = 0.04. Case 3: p(Ex-Im) = 0.001; p(Im-Sh) = 0.001.g Illustration of average neural trajectories on the three first components of the exclusive imagination space (combination 1, top) or the exclusive execution space (combination 3, bottom). For each combination, the neural trajectories of the movements of interest during the single task (continuous lines) are shown together with the neural trajectories of the corresponding movements during dual-tasks (dashed lines). * indicates significance at p < 0.05, ** at p < 0.01, and *** at p < 0.001. REE = reaching executed, WEE = wrist extension executed, WEI = wrist extension imagined, GRI = grasping imagined, WLI = walking imagined. Green = execution, blue = imagination, gray = shared.

In cases 1 and 2, where the executed movements remain constant, and the imagined movements change, we expect to distinguish the imagined movements by projecting the neural data onto the exclusive imagination space. Conversely, in case 3, where the executed movements change while the imagined movement remains constant, we expect that the exclusive execution space will enable us to distinguish between the two executed movements. Figure 7b illustrates our hypothesis.

Examples of neural activity across all frequency bands and movement combinations are shown in Fig. S9. EMG activity of the target muscles highlighted the strong modulation of the muscle engaged in executed movements and the lack of activity in the other target muscle (Fig. 7c). When projecting the trial-averaged neural activity from dual-task trials onto the neural subspaces previously identified from the single-task datasets, we found that the global latent space explained 90% of the variance. Of this, 14% was explained by the exclusive execution space, 16% by the exclusive imagination space, and the remaining 72% by the shared space (Fig. 7d).

To assess whether different movements could be decoded, we employed two distinct approaches. In both cases, dual-task neural activity was projected onto neural spaces derived from the single-task dataset. The first approach focused on evaluating the reliability of the neural representations themselves by performing cross-validation within the projected dual-task data, allowing classifiers to learn from the new data distribution. The same fold splits were used across neural spaces. Figure 7e presents the results obtained by applying this approach separately for the three movement sets. In case 1 (executed reaching, three-class problem), decoding was significantly above chance in all spaces (p < 0.001, permutation test with 1000 shuffles, FDR corrected), with mean accuracies of 57.1 ± 7.5% in the exclusive execution space, 54.6 ± 5.5% in the exclusive imagination space, and 62.0 ± 4.5% in the shared space. A Friedman test revealed a significant effect of neural space (χ2(2) = 9.8, p = 0.007), although no significant differences were observed in pairwise post hoc comparisons. In case 2 (executed wrist extension, binary classification), all spaces again supported decoding above chance (p < 0.001). Accuracies were 70.5 ± 4.7%, 67.6 ± 7.3%, and 75.5 ± 8.9% for the execution, imagination, and shared spaces, respectively. In case 3 (imagined walking), decoding of executed movements was above chance in all spaces (p < 0.001; execution: 79.5 ± 4.9%, imagination: 63.0 ± 9.5%; shared: 83.1 ± 8.0%). A Friedman test confirmed a strong effect of neural space (χ2(2) = 13.4, p = 0.001), and post-hoc Wilcoxon signed-rank tests showed that the imagination space performed significantly worse than both the execution and shared spaces, consistently with our hypothesis (Ex–Im: W = 1.5, p = 0.009; Im–Sh: W = 0.0, p = 0.005).

In the second decoding approach, we tested whether a classifier trained on the single-task data could generalize to the dual-task condition by recovering similar neural dynamics. Specifically, a classifier trained on the single-task dataset was applied to the projected dual-task data without retraining. Figure 7f shows the decoding results for this approach. In case 1 (executed reaching), significant decoding accuracy was reached only when projecting onto the exclusive imagination space, where accuracy was 46.3% (95% CI: [42.2, 50.6]; p = 0.003, permutation test with 1000 shuffles, FDR corrected). No significant decoding was observed in the exclusive execution space (33.6%, 95% CI: [29.5, 37.6]) or in the shared space (38.2%, 95% CI: [33.9, 42.1]). Differences in decoding accuracy across spaces were assessed with a paired permutation test (N = 1000), in which predictions were randomly swapped between spaces on a trial-by-trial basis and the resulting difference in balanced accuracy was recomputed. P-values were FDR-corrected. Decoding in the imagination space was higher than in the execution (p = 0.003) and shared (p = 0.016) spaces. In case 2 (executed wrist extension), none of the spaces supported significant decoding, although the imagination space was the one yielding the highest accuracy (58.2%, 95% CI: [54.0, 62.1]; p = 0.07 when compared to chance level, FDR corrected). When comparing decoding performance across neural spaces, the execution space (46.9%, 95% CI : [42.4, 51.7]) yielded significantly lower accuracies than both the imagination space (p = 0.006) and the shared space (53.8%, 95% CI : [51.0, 56.6]; p = 0.04). In case 3 (imagined walking), decoding was significant in the exclusive execution space (71.7%, 95% CI: [66.7, 76.0]; p = 0.001) and in the shared space (75.3%, 95% CI: [71.1, 79.3]; p = 0.001). The decoding in the imagination space showed a trend towards significance (55.5%, 95% CI: [49.7, 60.9]; p = 0.053). In this case, permutation tests revealed that decoding accuracy in the imagination space was significantly lower than in both the execution space (Ex–Im: p = 0.001) and the shared space (Sh–Im: p = 0.001). Results were consistent across time window lengths and levels of variance retained. Notably, in the imagined walking condition (case 3, where executed movements were decoded), the exclusive execution space outperformed the shared space when less variance was retained during classifier training, suggesting it isolates highly task-relevant variance (Fig. S10 and Table S4).

Finally, Fig. 7g shows the smoothed, averaged neural trajectories of single-task movements and their dual-task counterparts, projected onto the neural spaces of interest for the two movement combinations with significant decoding performance (cases 1 and 2). These projections reveal similar dynamical patterns between single- and dual-task activity, particularly evident for the executed movements in case 3.

Discussion

In the context of BMIs, a key challenge lies in disentangling the neural activities underlying motor imagination and execution, particularly when they occur simultaneously, as this overlap can lead to neural cross-talk and compromise the independent control of external devices. Addressing this challenge has important implications in improving BMI control in individuals with residual motor function. To tackle this, we turned to mesoscale signals and adapted the neural manifold framework, originally developed for spiking activity, to ECoG recordings. This allowed us to validate and extend prior findings on the structure of motor representations, and to demonstrate the suitability of mesoscale neural dynamics for coordinated and independent control in BMI applications.

When transitioning from spiking activity to mesoscale activity, it remains unclear whether neural representations identified at higher definition generalize to the mesoscale level when recording from broader areas and at a lower spatial resolution. For instance, differences were observed when considering a preserved manifold encoding a repertoire of movements, where temporal dynamics were maintained in spiking activity8,33 but not necessarily in ECoG recordings34. Our findings succeed in extending a manifold approach to mesoscale neural dynamics measured via ECoG, providing insights into the relationship between the encoding of motor execution and imagination. In agreement with studies on spiking activity that explore motor execution and its relationship to motor imagination14, and observation10, we also identify a subspace of shared covariance between execution and imagination (Fig. 2). We found that the exclusive spaces, especially imagination, had significantly higher dimensionality than the shared neural space (Fig. S4), suggesting that they capture more intricate patterns and dynamics, as previously suggested14. Decoding analyses (Fig. 2f, h) confirmed that these subspaces retain behaviorally relevant information, emphasizing their functional significance. It is worth noting that our decoding efforts aimed primarily to demonstrate the presence of task-related information, and further refinement of models could potentially improve decoding performance within these neural spaces.

The adaptation of this framework to mesoscale neural dynamics also involves defining neural spaces as covariance patterns across channels and frequency bands. We observed a U-shaped pattern of frequency contributions (Fig. 3c, d), with delta and high-gamma bands showing the highest contributions. This is consistent with previous studies that highlight the role of these frequency bands in motor control22,34 and their correlations with underlying neuronal population dynamics35–39. When comparing the frequency band contributions across spaces (Fig. 3f), we found that the imaginary space exhibited significantly higher contributions in the alpha and low-beta bands. These findings align with studies that have identified modulations in these bands for motor imagery decoding in BMIs1,40,41. We also examined contributions from the M1 and S1 regions. Notably, there was little difference between their contributions, supporting the idea of a role for the primary somatosensory cortex in cognitive imagery and motor production without sensation42. A significant interaction between neural spaces and brain regions was observed for high gamma activity, reinforcing its key role in motor modulation1,34. In this case, the shared and exclusive execution spaces showed higher contributions than the exclusive imagination space only for the channels located over S1, which might highlight the absence of sensory feedback during the imaginary process. From the distribution of contributions on the ECoG grid (Fig. S5), a localized increase in the contribution from the more lateral channels in S1 appears for the low-gamma band, which may be associated with a more localized modulation of the hand and arm regions within the somatotopic organization of the sensorimotor cortex. In this study, we chose to analyze the combined regions to maintain a higher dimensionality in the original recording space and to incorporate potential covariance patterns between regions that may be essential for identifying neural spaces, but we acknowledge that an alternative approach could be to perform the whole analysis onto the two regions separately.

A key focus of our analysis was assessing the stability and robustness of neural spaces across different sessions recorded in different days (Fig. 4a). The partial overlap between the neural representations of motor execution and motor imagery remained consistent across session combinations (Fig. 4b, c) and within individual sessions (Fig. S6). However, when applied to data recorded on different days, neural spaces faced challenges in consistently capturing variance, highlighting the complexity of generalizing these representations over time. We found that the global latent space was relatively stable for execution activity, explaining a large fraction of variance in held-out sessions, but exhibited reduced stability for imagination activity. This asymmetry may reflect a combination of gradual neural drift affecting both conditions and the intrinsically higher session-to-session variability of motor imagery. In this context, learning-related effects are unlikely to be a primary contributor, as no feedback was provided to the participant and sessions were separated by several months.

There are two essential properties of these neural subspaces: they are orthogonal to each other and representative of their corresponding activity, capturing task-relevant variance. These properties are independent. The exclusive imagination space remained partially orthogonal to execution activity, capturing consistently less execution-related variance than the other spaces (Fig. 4e). In contrast, the exclusive execution space failed to maintain full orthogonality to imagination activity, capturing a large portion of imagination-related variance. This asymmetry likely reflects the greater variability of motor imagery compared to execution, which is generally more stable across sessions.

Under these conditions, explaining a large fraction of variance does not necessarily imply preservation of task-relevant structure. Consistent with this, the within-session decoding analysis (Fig. 4f) showed that execution decoding performance decreased when data were projected onto the exclusive imagination space. However, accuracy remained significantly above chance, suggesting only partial orthogonality: even a small fraction of variance in the opposite space carried behaviorally relevant information. Conversely, although both exclusive spaces captured comparable amounts of imagination-related variance, decoding performance was substantially higher when projecting onto the imagination space. This can indicate that the imagination space preferentially captured variance components that were more stable across sessions and more specifically aligned with the imagined movement condition. Despite this, both exclusive spaces exhibited robust decoding performance when classifiers were tested across sessions (Fig. 4g, h), indicating that task-relevant information was well preserved. Their performance was comparable to, and in some cases exceeded, that of the shared space, even though the latter accounted for a larger proportion of variance. While we recognize that greater stability might have been achieved by applying session alignment, we opted for a simpler approach tailored to translational applications14,27,43. The goal of this approach is to mimic the process of identifying neural spaces in calibration sessions, allowing them to be directly applied in future BMI sessions. Moreover, recent evidence suggests that accumulating data across multiple sessions could help establish a more stable, time-independent neural representation. This, in turn, may facilitate the development of generalizable classification boundaries that remain consistent over time22.

We investigated the generalization ability of the exclusive imagination space by assessing how it changed when new movements were added to the repertoire used to define it. Our results (Fig. 5d) showed that progressively including new movements led to the identification of similarly oriented neural spaces. However, the degree of overlap depended on the nature of the added movement: while including imagined grasping resulted in partial but aligned changes that primarily affected higher-order dimensions, incorporating imagined walking induced a more global yet still aligned reshaping of the imagination space, influencing also its dominant dimensions. In addition, a modular composition was suggested by the increase in dimensionality observed when imagined walking was used in the identification of the neural spaces. We speculate that including imagined grasping to reaching and wrist extension did not increase dimensionality because it belongs to the upper-limb network, whose activity was already largely captured by neural modes spanning the reaching and wrist extension movements. In contrast, incorporating walking required the space to expand and include new neural modes associated with lower-limb activity (Fig. 5e). Decoding results (Fig. 5h-i) further showed that the exclusive imagination space yielded the best discriminability, even when tested with unseen movements. This indicates that the space captured not only movement-related variance for the defining set of movements, but also condition-related variance linked to the imagination process. From a translational perspective, this suggests that exclusive spaces can generalize to unseen movements without substantial changes in orientation. Ideally, with a carefully chosen repertoire, one could define a global imagination space spanning many movements and robust to the addition of others without recomputation. However, in this study, we tested only a limited set of imagined movements, and executed movements were constrained by our participant’s residual functions. Further work, including more movements (both imagined and executed), will be required to validate our findings.

Imagined grasping and walking presented a strong neural modulation, as observed in their time-frequency decompositions (Fig. 5c). This stronger modulation may stem from their inclusion in the participant’s BMI training protocol. An additional explanation is that these movements may represent attempted rather than purely imagined actions, meaning the participant actively tried to execute them, but failed due to the spinal lesion. Attempted movements conceptually lie between executed and imagined ones: they lack sensory feedback typical of execution, but also lack the inhibitory control characteristic of motor imagery5. However, considering the generalization results in Fig. 5h, it is reasonable to conclude that these movements more closely follow the dynamical structure of imagination. From an application perspective, attempted movements can be treated as imagined movements in future BMIs developed under our framework, since both constitute “mental tasks” to be decoded alongside goal-directed executed movements.

In Fig. 7, we showed the potential of condition-specific neural spaces as effective tools for separating execution and imagination activities when they occur simultaneously. As mentioned above, this becomes directly relevant in scenarios where a participant with residual movements engages in a BMI task. The objective is to decode imagined movements while allowing concurrent execution of other movements, ultimately improving motor control and enhancing the overall BMI experience. These findings, presented in Fig. 7e, align with the stability analysis results shown in Fig. 4. Given the challenge of maintaining orthogonality to imagination activity when projecting new data onto the execution space, we observed significant decoding performance even when projecting trials onto the exclusive execution space in cases 1 and 2 (reaching executed and wrist extension executed). This effect emerged when the classifier was allowed to adapt to the data distribution of the dual-task condition, suggesting that neural representations onto the execution space still contained behaviorally relevant information about the imagined movements. Importantly, this effect may reflect a combination of residual coupling between execution and imagination representations and task-dependent modulation of execution activity. Dual-task conditions are cognitively more demanding, and subtle but systematic variations in the execution of an otherwise identical movement may occur depending on the concurrently imagined movement. Such variations could be captured by the execution space and thereby support decoding across different imagined conditions. In contrast, the exclusive imagination space remained more orthogonal to execution activity, which markedly reduced the ability to decode the two executed movements when projected onto it (case 3). Moreover, it is noteworthy that the decoding performances of the exclusive spaces were comparable to those of the shared space, despite the shared space capturing more variance. This suggests that the exclusive spaces are more task-relevant than the shared space, a trend that aligns with other decoding results presented in this study (Figs. 2f, 4h, 6c). Crucially, the results in Fig. 7f reveal that the neural patterns identified by the classifiers in the single-task datasets can also be detected and utilized when applied to dual-task data. Although decoding was unsuccessful when the wrist extension was executed (case 2), the overall decoding patterns across all three cases were consistent with our hypothesis of disentanglement through neural spaces.

This study indicates that a neural manifold approach can be adapted to mesoscale neural activity, enabling the identification of spaces related exclusively to motor execution and imagination. In doing so, we reinforce the view that manifold-based approaches are broadly applicable across BMI recording modalities, from multiunit activity to ECoG. In line with this, recent work has also shown that signals similar to ECoG, such as those obtained with stereoelectroencephalography (sEEG), can be used to extract motor-related latent spaces44,45. Beyond advancing basic understanding, our framework shows promise for improving BMIs by disentangling concurrent imagined and executed movements. Several challenges remain in terms of clinical translation. Robust long-term generalization across days and months needs to be improved, and validation in additional patients will be necessary. Electrode placement may also influence cortico-cortical covariance patterns, potentially altering the geometric properties of the identified spaces. Another important next step will be to evaluate the feasibility of this framework in real-time decoding scenarios, in which classifiers must operate on short, continuously updated time windows rather than full movement trajectories. In such settings, task-dependent changes in neural activity arising from closed-loop BMI control will need to be taken into account. Neurofeedback and closed-loop control have been shown to enhance BMI performance by promoting more consistent voluntary modulation of neural signals and constraining population dynamics toward stable neural representations1,22,46–49. In particular, recent work by Natraj and colleagues22 demonstrated that neural representations of imagined movements are more stable in closed-loop than in open-loop settings, largely due to a reduction in neural variance. Within our framework, such variance reduction could be especially beneficial, as the long-term maintenance of orthogonality between execution and imagination spaces depends critically on the consistency of motor imagery–related neural activity across days. A reduction in neural variability would therefore be expected to support the identification of a more stable exclusive imagination space, potentially improving both orthogonalization over time and suitability for online BMI applications. Future work should also compare this geometric framework with alternative approaches. More complex decoders and artificial neural networks could model execution and imagination spaces. While our approach is a principled method for identifying linear, interpretable neural spaces, representational orthogonality can be enforced also in recurrent neural networks50. Although such models risk reducing interpretability, they could capture non-linear relationships and leverage transfer learning to address generalization across subjects and sessions.

Some important limitations should be considered when interpreting these results. Firstly, our analysis was restricted to a single patient, and replication in a larger cohort will be essential to establish the generalizability of our findings. Nonetheless, prior work indicates that motor encoding exhibits conserved patterns across individuals of the same species,26,27, supporting the view that similar geometric structures linking execution and imagination are likely preserved. Moreover, our results extend the findings in multiunit activity from two participants in ref. 14, representing a step toward generalizing this geometric relationship between execution and imagination across neural activity scales. Second, the repertoire of movements we tested was limited by experimental constraints and by the participant’s residual functions. While our results suggest that exclusive imagination spaces are robust and adaptable, broader testing with additional executed and imagined movements will be required. Finally, all experiments were conducted in open-loop experimental paradigms. Testing our approach in real-time closed-loop conditions will be a critical step toward assessing its translational potential for BMI applications.

Overall, this work opens new avenues for clinical and neuroengineering applications. By disentangling imagined activity from concurrent execution, it offers a strategy to support mobility and independence in paralyzed patients with residual motor function. Specifically, our study introduces a geometric method to identify an execution-null space, which could be harnessed to control additional degrees of freedom during concurrent movements, representing a promising step toward more versatile and effective motor restoration strategies. Beyond motor restoration, our framework may have broader implications. For example, recent studies on speech neuroprostheses have shown that distinct latent dimensions are required to separate produced from imagined (inner) speech51, and that perceived speech can generate false positives in speech BMIs52. By identifying an exclusive produced speech neural space orthogonal to imagined or perceived speech spaces, our approach could help address these challenges and reduce the risk of decoding inner thoughts or unintended inputs.

Methods

Participant

All data in this study were recorded from a 34-year-old male participant with incomplete tetraplegia resulting from a C6 spinal cord injury. Fourteen years post-injury, the participant was bilaterally implanted in November 2019 with the WIMAGINE epidural chronic wireless ECoG device as part of clinical trial NCT0255052253. The clinical trial was approved by the French authorities: National Agency for the Safety of Medicines and Health Products - Agence nationale de sécurité du médicament et des produits de santé (ANSM) with the registration number: 2015-A00650-49, and the ethical committee (Committee for the Protection of Individuals - Comité de Protection des Personnes - CPP) with the registration number: 15-CHUG-19. Written informed consent was obtained from the participant prior to the study. The participant retained residual movements, particularly in the elbow flexors (American Spinal Injury Association Scale—ASIA score of 5) and wrist extensors (ASIA score of 3)54. This study was carried out 5 years after implantation.

The WIMAGINE device consists of 64 planar electrodes, each 2.3 mm in diameter, with an inter-electrode spacing of 4–4.5 mm30. Due to limited data rates from the restricted radio link and a malfunction of the right implant, 32 electrodes from the left implant were selected in a checkerboard-like pattern for the experimental sessions of the present study. Since the implantation, the participant has been trained to control various real and virtual effectors via a brain-machine interface (BMI), utilizing mental imagery and his residual movements.

Medical reconstruction images providing information on the implant location were obtained using Freesurfer55, BrainStorm56, and MeshLab 57.

The authors affirm that the participant also provided informed consent for publication of the image in Fig. 1d.

Experimental setup

Recordings from seven of eight sessions conducted over 18 months were included in the analysis (Table S1); one session was excluded due to recording issues. Trials in these sessions involved either executed or imagined movements with the right arm. The sessions were divided into two types: single-tasks, which featured only one movement (either executed or imagined), and dual-tasks, which combined one executed movement with one imagined movement. Specifically, sessions 1, 3, 4, and 6 were single-task sessions, while sessions 2, 5, and 8 were dual-task sessions (Table S2).

During the sessions, the participant sat in front of a screen that displayed instructions for each trial. A trial began with a pictogram representing the movement for that trial, initially shown in gray as a Cue signal. After 2 s, the pictogram turned bright blue, signaling the Go phase. The participant then executed or imagined the movement for 4 s, aided by a progression bar displayed below the pictogram to assist with timing. If the movement was completed before the 4 s elapsed, the participant was instructed to hold the final position, both in execution and imagery tasks. Each trial concluded with a 4-second intertrial interval, resulting in a total trial duration of 10 s.

The movements used in the experiment included reaching and wrist extension of the right arm, contralateral to the ECoG implant, which were selected based on the participant’s residual motor capabilities. For imagined movements, the tasks additionally included imagined walking and imagined grasping, which were introduced starting from session 4. Beginning with this session, EMG activity was recorded to monitor the participant’s compliance with the tasks. The EMG signals were collected in bipolar fashion using the Noraxon Delsys system connected to a LabJack data acquisition device, with six channels over the flexor digitorum, extensor digitorum, triceps, biceps, trapezius, and lateral deltoid muscles. The extensor digitorum and lateral deltoid were selected as the target muscles to assess contraction levels during wrist extension and reaching movements, respectively.

Each session was organized into blocks, which varied depending on the type of session. In single-task sessions, three types of blocks were included: one containing executed and imagined trials for reaching movements, another containing executed and imagined trials for wrist extension movements, and a third with only imagined trials for walking and grasping movements. Each block contained either 20 or 30 trials, balanced across conditions and presented in random order.

In dual-task sessions, two types of blocks were used. In the first, executed reaching movements were paired with one of three imagined movements: wrist extension, walking, or grasping. In the second, executed wrist extension movements were paired with either imagined reaching or imagined walking. Trials combining executed wrist extension with imagined grasping were excluded due to the task difficulty. Within each block, every condition was repeated either 10 or 12 times in random order. The order of the blocks was randomized for each session.

Data acquisition and signal preprocessing

Data were acquired using the WIMAGINE implant30. Preprocessing was initially performed by the implant, which applied analog bandpass filtering with a bandwidth of 0.5–300 Hz. After digitization, a digital low-pass FIR filter with a cutoff frequency of 292.8 Hz was applied to further refine the signals.

Subsequently, the ECoG data were processed offline following a similar approach to that described in34. First, signals were bandpass filtered using a 5th-order Butterworth filter with cutoff frequencies of 1–250 Hz. A common median reference filter was then applied across channels to mitigate the effects of shared noise or artifacts. Next, the envelope of the signal was extracted for seven frequency bands spanning the full signal range: δ (1–4 Hz), θ (4–7 Hz), α (7–13 Hz), low β (13–22 Hz), high β (22–37 Hz), low γ (37–60 Hz), and high γ (60–250 Hz). This was achieved by bandpass filtering the signals within the corresponding frequency ranges using a 5th-order Butterworth filter, followed by computing the magnitude of the Hilbert-transformed signal. To reduce noise, particularly in the higher frequency bands, the envelope was smoothed using a 500-millisecond moving mean filter. Data were then subsampled to 100 Hz and mean centered per block.

Trials were then epoched by aligning the signals to the Go signal. For this study, the entire movement period, lasting 4 s, was analyzed. To facilitate the main analysis, trials were concatenated across sessions, creating a single dataset. Trials exhibiting artifacts, characterized by sudden signal jumps, were visually inspected, identified, and excluded using a first-derivative threshold-based approach (derivative ≥ 0.3). More details on the total number of trials analyzed per experimental condition and session are provided in Table S3.

For normalization, signals from each session, channel, and frequency band were z-scored relative to baseline activity to remove session-dependent fluctuations. The baseline was defined as the signal recorded during the 1-second time window spanning [−3.5, −2.5] seconds relative to the Go signal (or [−1.5, −0.5] with respect to the Cue signal). Baseline normalization was performed by subtracting the mean and dividing by the standard deviation of the baseline. To improve robustness, the baseline metrics were computed as the average across all trials within a session.

Neural subspaces identification

The methods used to identify neural subspaces are based on a slight adaptation of those presented by Dekleva and colleagues14. The goal of this procedure was to identify lower-dimensional spaces that selectively capture the variance of execution activity, imagination activity, or their shared components. We started from trial-averaged data matrices for each condition:

DataEx,DataIm∈RMT×Dtot

where M is the number of concatenated movements, T = 400 is the number of time samples per movement (4 seconds), and Dtot = 224 corresponds to the number of neural features (32 channels × 7 frequency bands). These matrices represent the full neural trajectory in the original recording space during either execution or imagination. Identifying subspaces within this high-dimensional space amounts to extracting structured covariance patterns across channels and frequency bands. The procedure involved three PCA-based steps and a final gradient descent-based optimization step:

  1. Construction of a global latent space. The first step was to reduce the dimensionality of the original recording space while ensuring that the resulting latent space captured both execution and imagination activity without bias toward either condition. If we had simply concatenated execution and imagination data and applied PCA, the variance structure of the higher-variance condition would dominate the latent space. To avoid this, we performed PCA separately on execution (DataEx) and imagination (DataIm) activity. For each condition, we retained the number of principal components (PCs) required to explain 99% of the variance, yielding rotation matrices
    WEx∈RDtot×DEx,WIm∈RDtot×DIm,
    To obtain a single latent space spanning both sets of activity, we concatenated the two rotation matrices and performed Singular Value Decomposition (SVD). The left singular vectors defined an orthonormal basis
    L∈RDtot×DL,DL=DEx+DIm

    which we refer to as the global latent space. Finally, we projected the neural data into this latent space, yielding low-dimensional trajectories DataEx_L,DataIm_L.

  2. Identification of exclusive subspaces. To facilitate the identification of neural subspaces exclusive to execution or imagination, we performed a second PCA step on DataEx_L and DataIm_L For example, to isolate a subspace exclusive to imagination, we focused on the trailing PCs computed on DataEx_L. By construction, these PCs explain minimal variance in execution data, while they could potentially capture variance relevant to imagination. We selected DEx−null, the number of PCs explaining less than 1% of execution variance, and formed the execution-null space UEx−null∈RDL×DEx−null. Similarly, to find an execution-exclusive space, we performed the same analysis on the trailing PCs of DataIm_L, yielding the imagination-null space UIm−null∈RDL×DIm−null. This procedure ensures that the exclusive subspaces capture variance minimally present in the opposite condition, aligning with our goal of functional exclusivity.

  3. Extraction of exclusive latent activity. We obtained the exclusive-imagination activity by projecting DataIm_L onto UEx−null. This latent activity represents neural activity specific to imagination in a space where virtually no modulation occurs for execution. A subsequent PCA was performed on this projected activity to retain the leading DExcl−Im components explaining 99% of the variance, yielding WExcl−Im∈RDEx−null×DExcl−Im. This step reduces dimensionality and discards components likely dominated by noise. By multiplying the two rotation matrices,

    UEx−null and WEx−Im, we defined a single transformation projecting imagination activity into a low-dimensional subspace containing variance exclusively relevant to imagination, SExcl−Im∈RDL×DExcl−Im, onto which projecting latent activity from both conditions (DataEx_L, DataIm_L) yields imagination-specific responses. A similar procedure was applied to identify the execution-exclusive subspace.

  4. Orthogonalization of exclusive subspaces. Although SExcl−Im and SExcl−Ex are derived from independent PCAs on the global latent space, they are not guaranteed to be perfectly orthogonal. To refine these subspaces and enforce orthogonality, we used the Python toolbox Pymanopt to optimize the manifolds via gradient descent58. This optimization minimized the sum of squared errors between the exclusive responses obtained in Step 3 and those obtained when projecting DataEx_L and DataIm_L onto subspaces QExcl−Ex and QExcl_Im, which were constrained to be orthogonal components of the same orthonormal matrix defined on a Stiefel manifold, M∈RDL×(DExcl−Ex+DExcl−Im), thereby ensuring orthogonality of the exclusive subspaces.

Finally, the shared subspace QSh, capturing variance common to both execution and imagination neural activity, was determined as the null space of Q=[Qexcl−Ex,Qexcl−Im], where the brackets indicate concatenation. The dimensionality of the latent space was thus decomposed as:

DL=DExcl−Ex+DExcl−Im+DSh.

For the identification of the neural spaces shown in Fig. 2, we evaluated the effect of random initializations in the final gradient-descent optimization step. The optimization consistently converged to two highly overlapping solutions, differing mainly in a single ill-defined component, as shown in Fig. S11.

Note that while approaches such as Canonical Correlation Analysis (CCA) can identify a shared space between conditions, they do not ensure orthogonality between condition-specific subspaces. In contrast, the applied approach defines condition-specific neural subspaces that are both exclusive and orthogonal, while remaining generalizable to multiple movements and not requiring symmetry between the two datasets (Execution and Imagination).

Alignment index and controls

We quantified the similarity between two neural subspaces using the alignment index introduced by11. The alignment index, A, is defined as:

A=Tr(QTCQ)∑l=1Lλl 1

where Q represents the L-dimensional neural subspace onto which the data is projected, C the covariance matrix of the neural data, λl is the lth largest eigenvalue of C, and Tr() is the trace of the matrix. The alignment index A quantifies the fraction of variance of one activity explained by the leading components of the opposite subspace, normalized by the variance captured by an equivalent number of components derived from that same activity. This index ranges from 0 to 1, where 0 represents total orthogonality and 1 signifies complete alignment.

To assess the potential alignment observable by chance, we performed a random selection of neural subspaces following the procedure described in10,11. Specifically, the random subspaces were sampled from a space defined by the real covariance matrix of the neural data. If the observed alignment index exceeds this chance-level control, it indicates that the two subspaces are more aligned than expected from random definitions.

Another critical control for alignment between subspaces involves estimating the level of alignment expected if the only source of misalignment were intrinsic variability across trials. To evaluate this, we computed the alignment index after shuffling the labels between execution and imagination data 1000 times, while maintaining the consistency of the movement label. An alignment index lower than this shuffling control suggests that the two spaces are less aligned than would be expected if there were no distinction between the conditions.

Principal angles

Principal angles provide a way to quantify the alignment in orientation between two d-dimensional vector spaces, by computing up to d angles between pairs of consecutively aligned basis vectors, each drawn from one of the two spaces. If the spaces have different dimensionality, only as many angles as the lower dimensionality can be computed. These vectors lie within the spaces and define a new basis for them, but they are not necessarily the principal components originally defining the spaces. A principal angle equal to 0◦ indicates perfect alignment between the two spaces, whereas an angle close to 90◦ indicates orthogonality. Principal angles have often been used to compare neural spaces that explain neural activity related to different tasks8,34.

Following59, to identify principal angles between two spaces Q1 and Q2, with Q1, Q2 ∈RDtot×Dspace, we performed the SVD of their dot product:

P1SP2=SVDQ1TQ2 2

Here, P1 and P2 ∈RDspace×Dspace are the ordered principal directions (the directions within each neural space that correspond to the principal angles). S is a diagonal matrix containing the ordered Dspace cosines of the principal angles, from which the angles are obtained as:

θ1,..,Dspace=arccosdiagS 3

In our analysis, principal angles were computed between different exclusive imagination spaces. To do this, we first derived the full transformation from the original recording space to each exclusive imagination space, obtained by multiplying the rotation from the recording space to the global latent space with the one from the global latent space to the exclusive imagination space: QWhole−Im = LQExcl−Im, where L∈RDtot×DL and QExcl−Im ∈RDL×DExcl−Im (see Methods, Neural subspaces identification).

To compute a chance distribution of principal angles, we generated surrogate neural activity for the additional imagined movements using the Tensor Maximum Entropy (TME) method implemented in32. Briefly, TME takes as input a 3D data tensor of trial-averaged multi-dimensional neural trajectories across movements, with dimensions NF × NT × NM, where NF is the number of features (here, combinations of channels and frequency bands), NT the number of time points, and NM the number of movements. Null tensors for the additional movement(s) were obtained by preserving the first- and second-order statistics (mean and covariance) across time and movements, but not across features. This procedure disrupts the covariance structure across channels and frequency bands, which underlies the structure captured by the neural spaces. We repeated this procedure 1000 times, using the resulting null tensors to identify neural subspaces and compare them with the observed one. For example, when comparing Im2 (the exclusive imagination space identified with two movements) and Im3 (the exclusive imagination space identified with three movements), we generated null tensors for the additional third movement and then computed the principal angles between the 1000 surrogate spaces and the original Im2 space.

Features contributions to neural subspaces

To understand the contributions of individual channels and frequency bands to a given neural space, we computed the overall transformation matrix that projects the original data into a specific subspace. This was achieved by multiplying the transformation matrix that projects data onto the common latent space with the matrix that projects from the latent space into the specific neural subspace. For example, for execution data:

QWhole−Ex=LQExcl−Ex 4

where L∈RDtot×DL is the transformation matrix projecting data into the global latent space, and QExcl−Ex ∈RDL×DExcl−Ex is the matrix projecting from the global latent space into the Execution-exclusive subspace. To quantify the contribution of each feature (i.e., combinations of channels and frequencies), we calculated the L2-norm of the DExcl−Ex-dimensional vectors in QWhole−Ex. To account for variations in channel activity levels, we scaled these contributions by the amplitude of the average activity across trials, computed using concatenated execution and imagination data. This yielded a vector CEx ∈RDtot, where each entry represents the contribution of a specific channel-frequency combination.

Finally, contributions were normalized within each neural space to express them as percentages:

CEx−norm=CEx∑d=1Dtotcd 5

where cd represents the contribution of the d-th feature. This normalization provided the percentage contribution of each feature to the specific neural space.

To assess whether specific features contributed preferentially to one neural space over another, we performed a log-ratio–based analysis. For each feature, we computed the ratio between its contribution to one neural space and its contribution to another. We then took the logarithm of these ratios and examined the resulting distribution for evidence of bimodality. Under this framework, the presence of a distinct subset of features contributing selectively to one space would manifest as a bimodal log-ratio distribution, with values strongly shifted away from zero. Conversely, if features contributed similarly across neural spaces, the ratios would cluster around unity, yielding a log-ratio distribution centered near zero.

Movement decoding

The data, originally structured as Ntrials × T × Dtot (where T represents the number of timestamps and Dtot is the number of dimensions in the recording space), were first projected onto the neural space of interest. Subsequently, the data were segmented into non-overlapping time windows of 50 milliseconds, with the average computed within each window. This process yielded Ntw time windows, where Ntw is the total number of extracted windows. To create feature vectors, the temporal evolution for each dimension was flattened by concatenating the data across all time windows, resulting in a final structure of Ntrials × [Ntw × Dspace], where Dspace denotes the dimensionality of the neural space of interest.

To reduce the dimensionality of the dataset, PCA was applied to the feature matrix, retaining 99% of the variance. PCA was fitted on the training set and subsequently applied to the test set. A LDA classifier was then employed, and performance was evaluated using balanced accuracy, defined as the average recall across all classes. When specified, a 10-fold stratified cross-validation was used. In the generalization analysis of Fig. 4g, h, we used a leave-one-session-out approach: the training set consisted of all the trials pooled across three sessions, and the test set consisted of the trials of the left-out session. In the generalization analysis of Fig. 7f, we computed point balanced accuracies by using all trials from the relevant single task experiments as training set, and all the relevant trials from the dual task experiments as test set. To measure the stability of the values found, accuracies were bootstrapped (N=1000 resamplings with replacement). Statistical significance of the decoding accuracies was assessed using permutation tests: movement labels were shuffled 1000 times, and the observed accuracies were compared against the resulting null distributions.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Supplementary information

Reporting Summary (2.3MB, pdf)

Source data

Source Data 1 (1.2MB, xlsx)
Source Data 2 (151.2KB, xlsx)

Acknowledgements

The authors sincerely thank the participant for his invaluable time, dedication, and commitment throughout the data collection process. We also extend our gratitude to the multidisciplinary technical and clinical teams at Clinatec (CEA-LETI and CHU-Grenoble Alpes) for their involvement in the BCI &Tetraplegia clinical trial (NCT02550522), which enabled the advancements presented in this work. Finally, we thank Vincent Auboiroux for his assistance in providing medical reconstruction images of the implant location. S.M. and E.R. were supported by the #NEXTGENERATIONEU (NGEU) and funded by the Ministry of University and Research (MUR), National Recovery and Resilience Plan (NRRP), project: MNESYS (PE0000006)—A Multiscale integrated approach to the study of the nervous system in health and disease (DN. 1553 11.10.2022). S.M. also received support from two additional NRRP projects: THE (IECS00000017)—Tuscany Health Ecosystem (DN. 1553 11.10.2022), and BRIEF (IR0000036) –Biorobotics Research and Innovation Engineering Facilities (DN. 103 17.06.2022). L.P., V.d.S., S.M., and S.S. were supported by the Bertarelli Foundation and the Swiss National Science Foundation (Grant Number 10003473). L.S., S.K., S.C., T.A., and G.C. were supported by the CEA (Recurrent Funding), the Carnot Institute CEA-Leti, the French Ministry of Health and Research (PHRC 15-124), and the Fonds de dotation Clinatec (and its sponsors Malakoff Humanis, Covéa and Klésia).

Author contributions

L.P., S.S., and S.M. conceptualized the study. L.P., S.S., S.M., L.S., S.K., T.A., S.C., and G.C. designed the task, implemented, and supervised the experimental setup. L.P., L.S., and V.d.S. collected the data. L.P., L.S., V.d.S., and E.R. analyzed the data. All authors participated in the interpretation of the results. L.P., S.S., and S.M. wrote the manuscript with input from all authors.

Peer review

Peer review information

Nature Communications thanks the anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available.

Data availability

All data supporting the findings of this study are available within the article and its supplementary files. Any additional requests for information can be directed to and will be fulfilled by the corresponding author. Source data are provided with this paper. The neural data (only bandpass filtered in [1,250] Hz as well as fully preprocessed) have been deposited in the Zenodo public database: 10.5281/zenodo.18703800. Source data are provided with this paper.

Code availability

The code supporting the analyses presented in this study is available in the public Zenodo database: 10.5281/zenodo.18317718.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Solaiman Shokur, Silvestro Micera.

Supplementary information

The online version contains supplementary material available at 10.1038/s41467-026-71234-0.

References

  • 1.Miller, K. J. et al. Cortical activity during motor execution, motor imagery, and imagery-based online feedback. Proc. Natl. Acad. Sci. USA107, 4430–4435 (2010). [DOI] [PMC free article] [PubMed]
  • 2.Cunnington, R., Iansek, R., Bradshaw, J. L. & Phillips, J. G. Movement-related potentials associated with movement preparation and motor imagery. Exp. Brain Res.111, 429–436 (1996). [DOI] [PubMed] [Google Scholar]
  • 3.Carrillo-de-la Peña, M. T., Galdo-Álvarez, S. & Lastra-Barreira, C. Equivalent is not equal: Primary motor cortex (MI) activation during motor imagery and execution of sequential movements. Brain Res.1226, 134–143 (2008). [DOI] [PubMed] [Google Scholar]
  • 4.Lotze, M. & Halsband, U. Motor imagery. J. Physiol. Paris99, 386–395 (2006). [DOI] [PubMed] [Google Scholar]
  • 5.Solomon, J. P., Kraeutner, S. N., Bardouille, T. & Boe, S. G. Probing the temporal dynamics of movement inhibition in motor imagery. Brain Res.1720, 146310 (2019). [DOI] [PubMed] [Google Scholar]
  • 6.Yuste, R. From the neuron doctrine to neural networks. Nat. Rev. Neurosci.16, 487–497 (2015). [DOI] [PubMed] [Google Scholar]
  • 7.Gallego, J. A., Perich, M. G., Miller, L. E. & Solla, S. A. Neural manifolds for the control of movement. Neuron94, 978–984 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Gallego, J. A. et al. Cortical population activity within a preserved neural manifold underlies multiple motor behaviors. Nat. Commun.9, 4233. issn: 2041-1723. https://www.nature.com/articles/s41467-018-06560-z (2018). [DOI] [PMC free article] [PubMed]
  • 9.Kaufman, M. T., Churchland, M. M., Ryu, S. I. & Shenoy, K. V. Cortical activity in the null space: permitting preparation without movement. Nat. Neurosci.17, 440–448 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Jiang, X., Saggar, H., Ryu, S. I., Shenoy, K. V. & Kao, J. C. Structure in neural activity during observed and executed movements is shared at the neural population level, not in single neurons. Cell Rep.32. issn: 2211-1247. https://www.cell.com/cell-reports/abstract/S2211-1247(20)30991-8 (2020). [DOI] [PubMed]
  • 11.Elsayed, G. F., Lara, A. H., Kaufman, M. T., Churchland, M. M. & Cunningham, J. P. Reorganization between preparatory and movement population responses in motor cortex. Nat. Commun.7, 13239 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Churchland, M. M. et al. Neural population dynamics during reaching. Nature487, 51–56 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Churchland, M. M. & Shenoy, K. V. Preparatory activity and the expansive null-space. Nat. Rev. Neurosci.25, 213–236 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Dekleva, B. M. et al. Motor cortex retains and reorients neural dynamics during motor imagery. Nat. Hum. Behav.8, 729–742 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Herff, C. et al. Brain-to-text: decoding spoken phrases from phone representations in the brain. Front. Neurosci.8, 1662-453X. 10.3389/fnins.2015.00217/full (2015). [DOI] [PMC free article] [PubMed]
  • 16.Metzger, S. L. et al. A high-performance neuroprosthesis for speech decoding and avatar control. Nature620, 1037–1046. issn: 1476-4687. https://www.nature.com/articles/s41586-023-06443-4 (2023). [DOI] [PMC free article] [PubMed]
  • 17.Moses, D. A. et al. Neuroprosthesis for decoding speech in a paralyzed person with anarthria. N. Engl. J. Med.385, 217–227 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Konrad, P. E. et al. First-in-human experience performing high-resolution cortical mapping using a novel microelectrode array containing 1,024 electrodes. J. Neural Eng. issn: 1741-2552. 10.1088/1741-2552/adaeed (2025). [DOI] [PubMed]
  • 19.Larzabal, C. et al. Long-term stability of the chronic epidural wireless recorder WIMAGINE in tetraplegic patients. J. Neural Eng.18, 056026 (2021). [DOI] [PubMed] [Google Scholar]
  • 20.Moly, A. et al. An adaptive closed-loop ECoG decoder for long-term and stable bimanual control of an exoskeleton by a tetraplegic. J. Neural Eng.19, 026021 (2022). [DOI] [PubMed] [Google Scholar]
  • 21.Vansteensel, M. J. et al. Longevity of a brain–computer interface for amyotrophic lateral sclerosis. New Eng. J. Med.391. eprint: 10.1056/NEJMoa2619-626. issn: 0028-4793. https://www.nejm.org/doi/full/10.1056/NEJMoa2314598 (2024). [DOI] [PMC free article] [PubMed]
  • 22.Natraj, N. et al. Sampling representational plasticity of simple imagined movements across days enables long-term neuroprosthetic control. Cell188, 1208–1225.e32 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Bashford, L. et al. Neural subspaces of imagined movements in parietal cortex remain stable over several years in humans. J. Neural Eng.21, 046059 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Degenhart, A. D. et al. Stabilization of a brain–computer interface via the alignment of low-dimensional spaces of neural activity. Nat. Biomed. Eng.4, 672–685 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Losanno, E. et al. An Investigation of Manifold-Based Direct Control for a Brain-to-Body Neural Bypass. IEEE Open Journal of Engineering in Medicine and Biology5. Conference Name: IEEE Open Journal of Engineering in Medicine and Biology, 271–280. issn: 2644-1276. https://ieeexplore.ieee.org/abstract/document/10478790 (2024). [DOI] [PMC free article] [PubMed]
  • 26.Melbaum, S. et al. Conserved structures of neural activity in sensorimotor cortex of freely moving rats allow cross-subject decoding. Nat. Commun.13, 7420. issn: 2041-1723. https://www.nature.com/articles/s41467-022-35115-6 (2022). [DOI] [PMC free article] [PubMed]
  • 27.Safaie, M. et al. Preserved neural dynamics across animals performing similar behaviour. Nature623, 765–771 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Bashford, L. et al. Concurrent control of a brain-computer interface and natural overt movements. J. Neural Eng.15, 066021 (2018). [DOI] [PubMed] [Google Scholar]
  • 29.Dominijanni, G. et al. The neural resource allocation problem when enhancing human bodies with extra robotic limbs. Nat. Mach. Intell.3, 850–860 (2021). [Google Scholar]
  • 30.Mestais, C. S. et al. WIMAGINE: Wireless 64-Channel ECoG Recording Implant for Long Term Clinical Applications. IEEE Transactions on Neural Systems and Rehabilitation Engineering23. Conference Name: IEEE Transactions on Neural Systems and Rehabilitation Engineering, 10–21. issn: 1558-0210. https://ieeexplore.ieee.org/document/6846362/?arnumber=6846362 (2015). [DOI] [PubMed]
  • 31.Hartigan, J. A. & Hartigan, P. M. The dip test of unimodality. Ann. Stat.13, 70–84 (1985). [Google Scholar]
  • 32.Elsayed, G. F. & Cunningham, J. P. Structure in neural population recordings: an expected byproduct of simpler phenomena? Nat. Neurosci.20, 1310–1318. issn: 1097-6256. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5577566/ (2017). [DOI] [PMC free article] [PubMed]
  • 33.Kaufman, M. T. et al. The largest response component in the motor cortex reflects movement timing but not movement type. eNeuro3. issn: 2373-2822. https://www.eneuro.org/content/3/4/ENEURO.0085-16.2016 (2016). [DOI] [PMC free article] [PubMed]
  • 34.Natraj, N., Silversmith, D. B., Chang, E. F. & Ganguly, K. Compartmentalized dynamics within a common multi-area mesoscale manifold represent a repertoire of human hand movements. Neuron110, 154–174.e12 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Gallego-Carracedo, C., Perich, M. G., Chowdhury, R. H., Miller, L. E. & Gallego, J. Local field potentials reflect cortical population dynamics in a region-specific and frequency-dependent manner. eLife11, e73155 (2022). [DOI] [PMC free article] [PubMed]
  • 36.Hall, T. M., de Carvalho, F. & Jackson, A. A common structure underlies low-frequency cortical dynamics in movement, sleep, and sedation. Neuron83, 1185–1199 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Abbaspourazad, H., Choudhury, M., Wong, Y. T., Pesaran, B. & Shanechi, M. M. Multiscale low-dimensional motor cortical state dynamics predict naturalistic reach-and-grasp behavior. Nat. Commun.12, 607 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Ray, S., Crone, N. E., Niebur, E., Franaszczuk, P. J. & Hsiao, S. S. Neural correlates of high-gamma oscillations (60–200 Hz) in Macaque local field potentials and their potential implications in electrocorticography. J. Neurosci.28, 11526–11536 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Buzsáki, G., Anastassiou, C. A. & Koch, C. The origin of extracellular fields and currents—EEG, ECoG, LFP and spikes. Nat. Rev. Neurosci.13, 407–420 (2012). [DOI] [PMC free article] [PubMed]
  • 40.Fahimi Hnazaee, M. et al. Towards predicting ECoG-BCI performance: assessing the potential of scalp-EEG. J. Neural Eng.19, 046045 (2022). [DOI] [PubMed] [Google Scholar]
  • 41.Pistohl, T., Schulze-Bonhage, A., Aertsen, A., Mehring, C. & Ball, T. Decoding natural grasp types from human ECoG. NeuroImage. Neuroergonomics Hum. Brain Action Work59, 248–260 (2012). [DOI] [PubMed] [Google Scholar]
  • 42.Jafari, M. et al. The human primary somatosensory cortex encodes imagined movement in the absence of sensory information. Commun. Biol.3, 1–7 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Dabagia, M., Kording, K. P. & Dyer, E. L. Aligning latent representations of neural activity. Nat. Biomed. Eng.7, 337–343. issn: 2157-846X. https://www.nature.com/articles/s41551-022-00962-7 (2023). [DOI] [PMC free article] [PubMed]
  • 44.Ottenhoff, M. C. et al. Global motor dynamics - Invariant neural representations of motor behavior in distributed brain-wide recordings. J. Neural Eng.21, 1741-2552 (2024). [DOI] [PubMed]
  • 45.Shao, X. et al. Directional hand movement can be classified from insular cortex SEEG signals using recurrent neural networks and high-gamma band features. Sci. Rep.15, 29993 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Ganguly, K., Dimitrov, D. F., Wallis, J. D. & Carmena, J. M. Reversible large-scale modification of cortical networks during neuroprosthetic control. Nat. Neurosci.14, 662–667 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Ganguly, K. & Carmena, J. M. Emergence of a stable cortical map for neuroprosthetic control. PLOS Biol.7, e1000153 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48.Hwang, H.-J., Kwon, K. & Im, C.-H. Neurofeedback-based motor imagery training for brain–computer interface (BCI). J. Neurosci. Methods179, 150–156 (2009). [DOI] [PubMed] [Google Scholar]
  • 49.Zapała, D. et al. The impact of different visual feedbacks in user training on motor imagery control in BCI. Appl. Psychophysiol. Biofeedback43, 23–35 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Tian, K., Zhao, S., Zhang, Y. & Yu, S. Multi-dimensional Neural Decoding with Orthogonal Representations for Brain-Computer Interfaces arXiv:2508.08681 [q-bio]. http://arxiv.org/abs/2508.08681 (2025).
  • 51.Kunz, E. M. et al. Inner speech in motor cortex and implications for speech neuroprostheses. Cell188, 4658–4673.e17 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Schippers, A. et al. Don’t put words in my mouth: speech perception can falsely activate a brain-computer interface. J. Neuroeng. Rehabil.22, 181 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Benabid, A. L. et al. An exoskeleton controlled by an epidural wireless brain-machine interface in a tetraplegic patient: a proof-of-concept demonstration. Lancet Neurol.18, 1112–1122 (2019). [DOI] [PubMed] [Google Scholar]
  • 54.Kirshblum, S. C. et al. International standards for neurological classification of spinal cord injury (revised 2011). J. Spinal Cord. Med.34, 535–546 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Fischl, B. FreeSurfer. NeuroImage. 20 YEARS OF fMRI62, 774–781. issn: 1053-8119. https://www.sciencedirect.com/science/article/pii/S1053811912000389 (2012). [DOI] [PMC free article] [PubMed]
  • 56.Tadel, F., Baillet, S., Mosher, J. C., Pantazis, D. & Leahy, R. M. Brainstorm: a user-friendly application for MEG/EEG analysis. Comput. Intell. Neurosci.2011, eprint: 879716 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Cignoni, P. et al. MeshLab: an Open-Source Mesh Processing Tool. in. 1, 129–136. (2008)
  • 58.Townsend, J., Koep, N. & Weichwald, S. Pymanopt: a Python toolbox for optimization on manifolds using automatic differentiation. J. Mach. Learn. Res.17, 1–5 (2016). [Google Scholar]
  • 59.Björck Golub, G. H. Numerical methods for computing angles between linear subspaces. Math. Comput.27, 579–594 (1973). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Reporting Summary (2.3MB, pdf)
Source Data 1 (1.2MB, xlsx)
Source Data 2 (151.2KB, xlsx)

Data Availability Statement

All data supporting the findings of this study are available within the article and its supplementary files. Any additional requests for information can be directed to and will be fulfilled by the corresponding author. Source data are provided with this paper. The neural data (only bandpass filtered in [1,250] Hz as well as fully preprocessed) have been deposited in the Zenodo public database: 10.5281/zenodo.18703800. Source data are provided with this paper.

The code supporting the analyses presented in this study is available in the public Zenodo database: 10.5281/zenodo.18317718.


Articles from Nature Communications are provided here courtesy of Nature Publishing Group

RESOURCES