Cross-experiment hidden variable alignment method
By preprocessing ECoG signals and mapping low-dimensional latent variables, the problem of disparities in neural data across experiments was solved, achieving unified alignment and sharing of neural data, and improving the stability and accuracy of data analysis and decoding.
Patent Information
- Application Number
- CN202511198850.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-02
AI Technical Summary
Due to differences in environment, subject status, and signal recording conditions, the extraction results of latent variables in cross-experimental neural data are unstable and difficult to directly merge and analyze, especially when recording EEG signals on the scalp, noise and electrode position deviation have a significant impact.
Using ECoG signal data, neural data from different experiments are mapped to a unified low-dimensional space through preprocessing, low-dimensional latent variable extraction, linear transformation, and iterative optimization, thereby achieving the alignment and sharing of latent variables.
It improves the accuracy of cross-experimental data analysis and the stability of decoding models, reduces the need for recalibration due to inter-experimental differences, and enhances the long-term availability of brain-computer interface systems and the data integration capabilities of neuroscience research.
Smart Images

Figure CN121051408A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of neural data analysis, specifically relating to a method for aligning latent variables across experiments. Background Technology
[0002] In neuroscience research and brain-computer interface applications, it is often necessary to compare and integrate neural data from different experimental sessions or different subjects. For example, a subject may repeat the same task experiment on different dates, and researchers hope to compare and analyze the neural activity patterns obtained from each experiment to find common latent states. However, due to differences in the environment, subject status, and signal recording conditions of each experiment, even neural signals collected from different experiments on the same subject under the same task may show significant changes in statistical distribution or characteristics. This cross-experimental difference makes it difficult to directly merge and analyze data from multiple experiments, specifically, the neural features or latent variables extracted from each experiment lack comparability and require recalibration. Traditionally, researchers often attempt to align neural responses from different experiments by normalizing, calibrating, or using partially overlapping stimulus events as a reference. However, these methods often require manual calibration or are ineffective when signal quality is poor.
[0003] Scalp-recorded EEG signals are susceptible to electrode placement deviations and noise level variations across experiments, leading to unstable latent variable extraction results. In contrast, ECoG electrodes, implanted on the surface of the cerebral cortex, offer fixed positions and high signal quality, resulting in better consistency in spatial distribution and signal-to-noise ratio across experiments. Therefore, utilizing ECoG signals to extract and align latent variables holds promise for reducing discrepancies caused by noise and electrode repositioning errors between experiments. However, even under ECoG conditions, neural data from different experiments may still exhibit shifts in overall amplitude, baseline, or statistical characteristics. An automated method is needed to align these latent variable spaces to fully utilize cross-experimental data resources. Summary of the Invention
[0004] This invention addresses the aforementioned shortcomings by providing a cross-experiment latent variable alignment method. This method targets the latent features of neural signals extracted from multiple experiments and performs standardized transformation and matching on the latent variable space to make neural data from different experiments comparable in the same low-dimensional space, thereby improving the accuracy of cross-experiment data analysis and decoding.
[0005] To achieve the above objectives, this invention provides a method for aligning latent variables across experiments, comprising: ECoG signal data from multiple experiments of the subjects were acquired to form multiple sets of neural datasets. Each set of neural datasets was preprocessed to obtain preprocessed neural datasets. Low-dimensional latent variable features are extracted from the preprocessed neural dataset to obtain the latent variable feature space corresponding to multiple experiments. The latent variable feature spaces obtained from multiple experiments are initially aligned and mapped. After completing the initial alignment mapping, the alignment results are verified and optimized to obtain the aligned shared latent variable space; The aligned shared latent variable space is applied to neural data analysis or decoding models across experiments.
[0006] Furthermore, the ECoG signal data comes from ECoG signal data recorded by the same subject in different experimental sessions, or from ECoG signal data of multiple subjects under the same experimental task.
[0007] Furthermore, each neural dataset is preprocessed, including filtering and denoising, removing power frequency interference, normalization, and rereferencing the reference signal.
[0008] Furthermore, feature signal extraction is performed on the preprocessed neural dataset, which includes calculating the power spectrum of multiple frequency bands or the average potential of a set time window.
[0009] Furthermore, the extraction of low-dimensional latent variable features employs principal component analysis, selecting the first few principal components as low-dimensional latent variable features; or an autoencoder model is used to learn the low-dimensional representation of each neural dataset as low-dimensional latent variable features.
[0010] Furthermore, the latent variable feature spaces of the obtained multiple experiments are initially aligned and mapped through linear transformation. The latent variable feature space of one experiment is selected as the reference space, and the latent variable features of other experiments are mapped to the reference space through rotation, scaling and translation transformations, so that the latent variables of different experiments are aligned in the reference space.
[0011] Furthermore, the parameters of the linear transformation are determined by minimizing the differences in the latent variable features between different experiments. Using Procrustes analysis or canonical correlation analysis, the optimal transformation matrix is obtained that makes the distribution of the latent variable feature data of each experiment most similar.
[0012] Furthermore, the latent variable feature spaces obtained from multiple experiments are initially aligned and mapped using an unsupervised domain adaptation algorithm. Through iterative optimization, the distribution of latent variable features from different experiments becomes statistically consistent, resulting in a unified latent variable representation.
[0013] Furthermore, after completing the initial alignment mapping, the alignment results are verified and optimized. The latent variable features of different experiments after alignment are clustered or visualized to check whether the data under the same or similar experimental conditions are clustered. If there are significant differences that have not yet been clustered, the alignment results are adjusted by adjusting the alignment model parameters or introducing labeled corresponding events. The process is iteratively optimized until the latent variable features of each experiment fully overlap in the target space.
[0014] Furthermore, the aligned shared latent variable space can be used to train a unified brain-computer interface decoder, making the decoder applicable to data from multiple experiments; or the aligned shared latent variable space can be used to compare latent variable trajectories under different experimental conditions to obtain common neurodynamic patterns.
[0015] Compared with the prior art, the present invention has the following beneficial effects: Firstly, this invention proposes a systematic method for aligning latent variables across experiments, including data preprocessing, low-dimensional latent variable extraction, latent variable space alignment mapping, alignment result verification and optimization, and the application of a shared latent variable space. This process maps neural data from multiple experiments to a unified low-dimensional latent variable space, solving the problem of direct comparison between data from different experiments and enabling the representation of neural activity under the same reference coordinate system. This method can eliminate the differences in neural data distribution under different experimental conditions (different sessions or different subjects), improving the stability and generalization of data analysis and decoding models. For example, EEG / cortical signals exhibit low signal-to-noise ratios and non-stationarity, with significant differences in data distribution between experiments, requiring alignment to reduce the calibration burden across experiments. This invention, by aligning the latent variable space, achieves statistical consistency across experimental data, significantly reducing the need for recalibration due to inter-experimental differences and improving the stability and long-term availability of brain-computer interface decoding.
[0016] Secondly, the method of this invention provides comprehensive preprocessing steps (filtering and denoising, removal of power frequency interference, normalization, and rereference of the reference signal) to improve the quality of cleaning each group of neural data. By preprocessing each group of ECoG neural data separately, the cleanliness and consistency of the data on which subsequent feature extraction and alignment are based are ensured. Filtering and denoising, and removal of power frequency interference can significantly improve the signal-to-noise ratio of ECoG signals and remove artifacts introduced by the environment and equipment; normalization and rereference eliminate systematic differences in signal amplitude and reference electrodes between different experiments. This preprocessing ensures that the experimental data are comparable and stable before entering the latent variable extraction stage. Compared with data that has not been adequately preprocessed, the neural signals processed by the above steps can improve the reliability of feature extraction, reduce the interference of noise and artifacts on cross-experiment alignment, and lay the foundation for achieving high-quality latent variable alignment.
[0017] Thirdly, this invention proposes two methods for extracting low-dimensional latent variable features: one is Principal Component Analysis (PCA), which selects principal components as low-dimensional latent variables; the other is an autoencoder model, which extracts low-dimensional representations of each dataset through deep learning. This claim applies dimensionality reduction techniques to neural data to obtain the representation of each data set in a low-dimensional space, significantly reducing data dimensionality. The latent variable features extracted using PCA or autoencoders condense the most important change patterns in neural data, filtering out redundant and noise components, making data from different experiments easier to compare and align. The principal components obtained by the PCA method often correspond to the main patterns of whole-brain activity; the autoencoder can capture nonlinear features, further improving the ability to represent complex neural patterns. This low-dimensional representation preserves the key information of neural signals while reducing the difficulty and computational cost of cross-experiment alignment. In existing technologies, direct comparison of high-dimensional neural data often yields poor results due to noise and excessive dimensionality, while this invention obtains a stable latent space through dimensionality reduction, which not only improves the robustness of alignment but also provides the possibility for long-term stable decoding across experiments.
[0018] Fourth, this invention proposes to achieve preliminary alignment of the latent variable feature spaces of different experiments through linear transformation. Using the latent variable space of a particular experiment as a reference coordinate system, the latent variable features of other experiments are mapped into the reference space through linear mapping transformations such as rotation, scaling, and translation. This step establishes a one-to-one coordinate relationship for the latent variables of different experiments, aligning them within the same spatial framework. Using linear transformation to align latent variables has the advantages of simplicity, efficiency, and interpretability. Rotation and translation can eliminate directional differences caused by different observation coordinate systems between experiments; scaling can correct inconsistencies in the amplitude ranges of different datasets, making the feature distributions of each experiment comparable in scale and effectively reducing data differences between subjects. Therefore, the previously dispersed latent variables of each experiment overlap in a common space, creating conditions for subsequent in-depth comparison and joint modeling. Compared to the significant performance degradation of the model across different experiments without alignment, after linear alignment, the data distribution of each experiment is more consistent, improving the accuracy and convergence speed of cross-experiment model training.
[0019] Fifth, this invention adds a step to verify and optimize the initial alignment results. By clustering or visualizing the latent variable features of different experiments after alignment, it checks whether data under the same or similar experimental conditions have clustered together. If significant misalignment is found in data under certain conditions, corrections are made by adjusting the alignment model parameters or introducing labeled corresponding events, and iterative optimization is performed until the alignment effect is satisfactory. This step ensures that the alignment results are objectively evaluated and continuously improved. Through clustering and visualization, it is possible to visually verify whether neural activities of the same type (e.g., the same stimulus or task conditions) overlap in the alignment space; this is equivalent to providing a direct criterion for the success of cross-experiment alignment. If insufficient alignment is found, this invention provides a feedback correction mechanism: adjusting model parameters or using a small number of known corresponding events to reconstrain the alignment process. This iterative optimization ensures that the data under corresponding conditions in each experiment in the final shared latent variable space highly overlaps, eliminating residual differences. Compared with the direct application after a single alignment in existing technologies, this invention, through verification feedback, significantly reduces the risk of erroneous alignment, improves the accuracy and reliability of the alignment space, and makes subsequent analysis and decoding more reliable.
[0020] Sixth, this invention is applicable to the joint analysis of electrocorticography (ECoG) signals and calcium ion imaging data acquired under different experimental conditions. By acquiring neural signal data from multiple experimental sessions, each experimental data is preprocessed and dimensionality reduced to extract low-dimensional latent variables reflecting changes in brain state. An alignment mapping function is constructed to map the latent variables extracted from different experiments to a unified low-dimensional representation space. Finally, comparable analysis of multiple experimental results is performed in a shared space. This method can effectively align brain neural activity characteristics under different anesthesia conditions or experimental settings, achieving functions such as anesthesia state identification, neural oscillation frequency band comparison, and unified analysis of cortical activation patterns. Compared with existing technologies, this invention's method possesses high versatility and automation, significantly improving the comparability and analytical accuracy of cross-experiment neural data, and is suitable for cross-temporal and spatiotemporal modeling scenarios in neuroscience research and brain-computer interface systems.
[0021] Seventh, this invention overcomes the bottleneck of direct comparison of neural data across experiments in existing technologies by aligning ECoG latent variables extracted from multiple experiments. Leveraging the high quality and low noise of ECoG signals, and combining appropriate mathematical transformations and optimization strategies, it achieves a consistent representation of neural latent variables under different experimental conditions. This method helps reduce the recalibration workload of brain-computer interface systems used across different time periods and improves decoding performance; it also provides a new means for integrating data from multiple experiments in neuroscience research. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the cross-experimental latent variable alignment method in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the latent variable alignment of neural data in an embodiment of the present invention. Detailed Implementation
[0023] The following examples illustrate the implementation of the present invention in detail, but they do not constitute a limitation on the invention and are merely illustrative. Furthermore, the advantages of the present invention will become clearer and easier to understand by explaining them.
[0024] The present invention provides a method for aligning latent variables across experiments, comprising the following steps: S1: Data Acquisition and Preprocessing Electrocorticogenomic (ECoG) signal data recorded from the same subject in different experimental sessions, or ECoG signal data from multiple subjects under the same experimental task, were acquired. Each experiment corresponded to a set of temporal neural signals, forming multiple neural datasets. Each neural dataset was preprocessed, including filtering and denoising, removing power frequency interference, normalization, and rereferencing the reference signal, to obtain clean temporal neural signals, i.e., the preprocessed neural dataset. Feature signals were extracted when necessary, such as calculating the power spectrum of multiple frequency bands or the average potential of a specific time window, to reduce data dimensionality and highlight the main variation patterns.
[0025] S2: Latent variable extraction For each preprocessed neural dataset, dimensionality reduction or modeling methods are used to extract low-dimensional latent variables that represent the main neural activity patterns in that experiment. One feasible approach is to perform principal component analysis (PCA) on each dataset and select the top N principal components as latent variable representations; alternatively, deep learning models such as autoencoders can be used to learn the low-dimensional representation of the data for each experiment. These methods yield an N-dimensional latent variable feature space for each experiment, reflecting the main trends in neural signal changes within each experiment. By employing principal component analysis (PCA), factor analysis, or neural network dimensionality reduction methods, latent variables of a predetermined dimension are obtained from the data for each experiment.
[0026] S3: Implicit variable alignment The latent variable feature spaces obtained from multiple experiments are initially aligned and mapped to make the latent variables of different experiments directly comparable. Alignment methods can employ techniques such as linear transformation or statistical matching. For example, the latent variable space of one experiment can be selected as a reference space, and the latent variables of other experiments can be mapped to the reference space through linear transformations (such as rotation, scaling, and translation). The parameters of this linear transformation can be determined by minimizing the differences in corresponding latent variables between different experiments, for example, by using Procrustes analysis or Canonical Correlation Analysis (CCA) to find the optimal transformation matrix that makes the distributions of latent variable data most similar across experiments. Another approach is to use an unsupervised domain adaptation algorithm, which iteratively optimizes the latent variable distributions of different experiments to statistically converge, thus obtaining a unified latent variable representation. The alignment process further improves the consistency of latent variable distributions across different experiments through iterative optimization, which is based on the objective function of minimizing the statistical differences in latent variables among the experiments.
[0027] S4: Alignment Verification and Optimization After completing the initial alignment mapping, the alignment results are validated. For example, the latent variables of different aligned experiments can be clustered or visualized to verify whether data under similar or identical experimental conditions have clustered together. If significant differences are still found, the alignment results can be further fine-tuned by adjusting the alignment model parameters or introducing some labeled corresponding events. Iterative optimization continues until the latent variable features of each experiment fully overlap in the target space.
[0028] S5: Application Aligned shared latent variable spaces can be applied to neural data analysis and decoding models across experiments. For example, aligned data can be used to train a unified brain-computer interface decoder, making it applicable to data from multiple experiments and reducing the need for individual calibration for each experiment. Latent variable trajectories can also be compared under different experimental conditions in neuroscience research to discover common neurodynamic patterns.
[0029] By employing ECoG signals and the aforementioned alignment method, this invention effectively reduces the influence of noise and irrelevant variations between different experiments, highlighting common neural features related to actual function in each experiment, thereby improving the reliability and accuracy of cross-experimental analysis. The method of this invention is applicable to the alignment of latent variables in ECoG data from different subjects under the same task, enabling cross-individual comparison of neural features.
[0030] Example: This embodiment, based on datasets from multiple independent experiments, illustrates how the cross-experimental latent variable alignment method of the present invention can be used to compare neural activity patterns under different experimental conditions.
[0031] The ECoG-calcium imaging combined recording paradigm was adopted in C57BL / 6J mice. Anesthesia was administered as follows: In Experiment A, mice were maintained under deep anesthesia for 30 minutes with continuous inhalation of 1.5% isoflurane; in Experiment B, mice received intraperitoneal injection of a ketamine / xylazine mixture, resulting in anesthesia lasting approximately 20–30 minutes. Due to the different types and administration methods of the anesthetics, the raw manifestations of cortical neural signals in the mice differed in these two experiments, including ECoG baseline potential amplitude, noise level, and calcium fluorescence signal intensity scale. Furthermore, differences in anatomical and signal characteristics among individual mice, as well as variations in the composition of neuronal populations within the imaging field of view, made direct comparison of the data from the two experiments challenging. Under traditional methods, even if two experiments are conducted under similar physiological states (e.g., both under deep anesthesia), their high-dimensional neural data may project to different feature spaces without processing, making direct correspondence difficult. To address the aforementioned challenges in cross-experimental comparisons, the latent variable alignment method provided in this invention eliminates systematic differences between experiments through alignment transformation, mapping neural data from different experiments to a shared low-dimensional representation space, thereby achieving consistent comparison of latent variables.
[0032] In practice, dimensionality reduction is first applied to the data from Experiment A and Experiment B respectively to extract the main low-dimensional latent variable features. For example, the first three principal components are extracted for each experiment to obtain feature sets representing the main neural activity patterns in that experiment. Next, the cross-experiment latent variable alignment algorithm of this invention is used to calibrate the low-dimensional feature spaces of Experiment A and Experiment B. The alignment process can be accomplished by identifying shared baseline patterns or by using mathematical mapping functions: for example, calculating the linear mapping relationship between feature components in corresponding states (such as during deep anesthesia) in the two experiments, or training a transformation model using an adversarial neural network so that the latent variable distribution of Experiment A, after transformation, aligns and coincides with the latent variable distribution of Experiment B.
[0033] In this embodiment, a linear mapping and fine-tuning scheme is assumed: using data from deep anesthesia as a reference, the low-dimensional features of experiment A are mapped to the feature space of experiment B through linear transformations such as rotation and scaling, aligning the feature means of both during the deep anesthesia phase; then, this transformation is also applied to data from other phases of experiment A. After the above processing, when mice in experiments A and B are in similar physiological states (e.g., both under light anesthesia or awakening), their corresponding latent variable feature values will be distributed in neighboring regions of the aligned shared space. This means that neural activity patterns collected from different experiments can be directly compared and analyzed in the same coordinate system.
[0034] The above are merely specific embodiments of the present invention. It should be noted that any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention. Any other aspects not described in detail are prior art.
Claims
1. A method for aligning latent variables across experiments, characterized in that, include: ECoG signal data from multiple experiments of the subjects were acquired to form multiple sets of neural datasets. Each set of neural datasets was preprocessed to obtain preprocessed neural datasets. Low-dimensional latent variable features are extracted from the preprocessed neural dataset to obtain the latent variable feature space corresponding to multiple experiments. The latent variable feature spaces obtained from multiple experiments are initially aligned and mapped. After completing the initial alignment mapping, the alignment results are verified and optimized to obtain the aligned shared latent variable space; The aligned shared latent variable space is applied to neural data analysis or decoding models across experiments.
2. The cross-experimental latent variable alignment method according to claim 1, characterized in that, The ECoG signal data comes from ECoG signal data recorded by the same subject in different experimental sessions, or from ECoG signal data of multiple subjects under the same experimental task.
3. The cross-experimental latent variable alignment method according to claim 1, characterized in that, Each neural dataset is preprocessed, including filtering and denoising, removing power frequency interference, normalization, and rereferencing the reference signal.
4. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, Feature signal extraction is performed on the preprocessed neural dataset. Feature signal extraction includes calculating the power spectrum of multiple frequency bands or the average potential of a set time window.
5. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, The extraction of low-dimensional latent variable features employs principal component analysis, selecting the first few principal components as low-dimensional latent variable features; or it employs an autoencoder model to learn the low-dimensional representation of each neural dataset as low-dimensional latent variable features.
6. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, The latent variable feature spaces of the obtained multiple experiments are initially aligned and mapped through linear transformation. The latent variable feature space of one experiment is selected as the reference space, and the latent variable features of other experiments are mapped to the reference space through rotation, scaling and translation transformations, so that the latent variables of different experiments are aligned in the reference space.
7. The cross-experimental latent variable alignment method according to claim 6, characterized in that, The parameters of the linear transformation are determined by minimizing the differences in the latent variable features between different experiments. The optimal transformation matrix is obtained by using Procrustes analysis or canonical correlation analysis to make the distribution of the latent variable feature data of each experiment most similar.
8. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, The latent variable feature spaces obtained from multiple experiments are initially aligned and mapped using an unsupervised domain adaptation algorithm. Through iterative optimization, the distribution of latent variable features from different experiments becomes statistically consistent, resulting in a unified latent variable representation.
9. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, After completing the initial alignment mapping, the alignment results are verified and optimized. The latent variable features of different experiments after alignment are clustered or visualized to check whether the data under the same or similar experimental conditions are clustered. If there are significant differences that have not yet been clustered, the alignment results are adjusted by adjusting the alignment model parameters or introducing labeled corresponding events. The alignment is iteratively optimized until the latent variable features of each experiment fully overlap in the target space.
10. The cross-experimental latent variable alignment method according to claim 1, 2, or 3, characterized in that, The aligned shared latent variable space can be used to train a unified brain-computer interface decoder, making the decoder applicable to data from multiple experiments; or the aligned shared latent variable space can be used to compare latent variable trajectories under different experimental conditions to obtain common neurodynamic patterns.
