Cross-modal sEEG-to-iEEG generation method based on multi-scale condition regularization stream

By using a multi-scale conditionally regularized flow model to generate iEEG signals from sEEG, the problems of high invasiveness and low modeling accuracy in traditional methods are solved, achieving non-invasive, high-fidelity iEEG generation and supporting clinical and research applications.

CN121144700AActive Publication Date: 2025-12-16CHONGQING UNIV OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511237860.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-12-16
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing technologies struggle to generate high-precision intracranial electroencephalogram (iEEG) signals non-invasively or minimally invasively. Traditional methods suffer from high invasiveness risks, low modeling accuracy, high computational complexity, and poor neurophysiological interpretability.

Method used

A method based on multi-scale conditional regularized flow is adopted. By constructing a multi-scale architecture and an inverse transformation module, iEEG signals are generated using synchronously acquired scalp electroencephalogram (sEEG) signals. This includes preprocessing, multi-scale conditional regularized flow model training, and inverse transformation processes, achieving high-fidelity generation of iEEG signals.

Benefits of technology

It enables the non-invasive generation of high-fidelity iEEG signals, reducing medical risks, improving the accuracy and efficiency of signal generation, and providing comprehensive analysis of deep brain functions to support clinical diagnosis and scientific research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144700A_ABST
    Figure CN121144700A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-modal sEEG-to-iEEG generation method based on a multi-scale condition regularization stream, and the method comprises the steps: obtaining sEEG and iEEG signals which are collected synchronously, and carrying out the preprocessing, and obtaining qualified condition input and target signals; then, a multi-scale conditional regularization flow model containing a multi-scale framework, multiple processes and a core reversible transformation module is constructed, and iEEG signal distribution conversion is achieved through reversible channel hybrid operation and a conditional affine coupling layer; training the model by using a maximum likelihood estimation method, and optimizing parameters until convergence; and after a new sEEG signal is preprocessed, inputting the trained model, and generating a corresponding iEEG signal through inverse transformation. According to the method, complex probability distribution is modeled through conditional regularization flow, mode collapse is avoided, nerve activity randomness is reserved, deep temporal lobe full-region iEEG generation is achieved by combining a multi-scale framework with a self-attention mechanism, high-fidelity iEEG is generated in a non-invasive mode, medical risks and cost are reduced, and the method is suitable for large-scale popularization and application. And reliable technical support is provided for epileptic focus positioning and cognitive neuroscience research.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of neural electrophysiological signal processing, and particularly relates to a cross-modal sEEG to iEEG generation method based on a multi-scale conditional regularization flow. BACKGROUND

[0002] In the field of clinical research and neuroscience, there is an urgent need for intracranial electroencephalogram (iEEG); iEEG can directly reflect the electrical activity of brain neurons, providing key information for clinical treatment such as epilepsy focus localization, brain function area division, and in-depth understanding of brain neural activity mechanism. However, current acquisition of iEEG mainly relies on invasive means, such as craniotomy surgery to implant electrodes, which is accompanied by many risks, including infection, bleeding, and nerve damage, severely limiting its widespread application and frequent monitoring in clinical practice. In addition, invasive procedures also face ethical dilemmas, greatly restricting the development of research and application. Therefore, developing a non-invasive or minimally invasive method to accurately generate iEEG signals has immeasurable value for reducing medical risks, promoting neuroscience research, and improving clinical treatment outcomes, which is the core problem that the present application technical solution aims to solve.

[0003] Traditionally, in the field of electroencephalogram processing and generation, there are mainly technical solutions based on neuron group model construction and electroencephalogram forward problem modeling. The method based on neuron group model constructs a basic neuron group model, such as L-P lumped parameter model, to simulate electroencephalogram signal sequences by adjusting the excitability or inhibitory physiological parameters of cell colonies. On this basis, multi-dynamic neuron colony models and multi-channel coupled neuron colony models are extended to try to more realistically simulate the mutual influence of different brain regions and the coupling behavior between neuron groups. However, in the simulation process, the determination of model parameters often relies on complex anatomical information estimation, and it is difficult to accurately reflect individual differences. At the same time, the computational complexity increases exponentially from the basic model to the complex model, and the real-time performance is poor in practical applications. In terms of electroencephalogram forward problem modeling, the forward conduction matrix of the electroencephalogram forward problem is calculated to link the brain source activity and the scalp measurement electrode by constructing an electrode model and a head model, etc. For example, point electrode model (PEM) or complete electrode model (CEM) combined with real head model (MRI) for calculation. However, the existing methods generally do not fully consider the actual factors such as the change of contact conductance between the electrode and the scalp, which limits the modeling accuracy and affects the accurate interpretation and application of electroencephalogram signals.

[0004] With the continuous development of technology, the existing technology has made certain progress in electroencephalogram signal processing and generation. In the aspect of feature extraction and classification, convolutional neural network (CNN) is widely used in electroencephalogram signal classification tasks, such as EEGNet model, which can learn the discriminative features of convolutional layers and show certain time feature perception ability. However, due to the limited perception field, CNN can only extract local time features and is difficult to capture long-term dependencies in electroencephalogram decoding. Although recurrent neural network (RNN) and long short-term memory (LSTM) are proposed to capture time features, they have problems such as non-parallel training and dependence on difficult calculation. In the aspect of electroencephalogram signal generation, some studies simulate the generation of electroencephalogram signals by brain through deep neural networks, such as generative adversarial network (GAN) which uses the game learning between generator and discriminator to generate simulation data. However, the electroencephalogram signals generated by this kind of method often lack neurophysiological interpretability, and the influence of the relative spatial position relationship between the physiological regions of the brain is ignored.

[0005] A generative multi-channel electroencephalogram modeling method based on neuron group model is disclosed in Chinese patent (application number: 202311269930.2), which fuses neuron group model, space-time source model, biophysical volume conduction model and generative adversarial network, aiming to generate multi-channel electroencephalogram signals with neurophysiological interpretability and suitable for brain-controlled intelligent devices, but has serious shortcomings. First, it is not aimed at the specific and clinically valuable cross-modal conversion task of generating intracranial electroencephalogram (iEEG) from scalp electroencephalogram (sEEG), and cannot solve the key problem of high risk of obtaining iEEG signals in clinical practice. Second, in the model construction process, it focuses on the general generation of multi-channel electroencephalogram signals, and there is a gap in the research of using non-invasive sEEG signals as conditional input to accurately generate specific iEEG signals.

[0006] Therefore, the present application discloses a cross-modal sEEG to iEEG generation method based on multi-scale conditional regularization flow, which provides a new and effective way to solve the problem of obtaining iEEG signals in clinical practice, and is expected to cause major changes in the field of neuroscience research and clinical treatment. SUMMARY

[0007] Based on the above technical problems, the present application discloses a cross-modal sEEG to iEEG generation method based on multi-scale conditional regularization flow, preferably comprising:

[0008] S1, obtaining the sEEG signal and iEEG signal collected synchronously, preprocessing the sEEG signal and iEEG signal to obtain the preprocessed sEEG conditional input signal and iEEG target signal;

[0009] S2, a multi-scale conditional regularization flow model is constructed, the model comprising a multi-scale architecture, a multi-flow process and a core reversible transformation module, the multi-scale architecture comprising a plurality of hierarchical scales, each hierarchical scale corresponding to a plurality of flows, each flow integrating a reversible channel mixing operation and the core reversible transformation module, the core reversible transformation module taking the pre-processed sEEG conditional input signal as a regulation basis to realize conversion of an iEEG signal distribution;

[0010] S3, the pre-processed sEEG conditional input signal and the iEEG target signal are input into the constructed multi-scale conditional regularization flow model, a maximum likelihood estimation method is used to train the model, the model parameters are optimized, and a trained multi-scale conditional regularization flow model is obtained;

[0011] S4, an sEEG signal to be processed is obtained, pre-processed and input into the trained multi-scale conditional regularization flow model, and a corresponding iEEG signal is generated through an inverse transformation process of the model.

[0012] Preferably, the pre-processing in S1 comprises wavelet denoising, downsampling, data segmentation and normalization operation; the wavelet denoising adopts discrete wavelet transform, a symmetrical wavelet is selected to decompose the sEEG signal and the iEEG signal to obtain approximation coefficients and detail coefficients, the approximation coefficients are retained and the detail coefficients are threshold processed by a soft threshold method, and then the denoised signal is reconstructed by inverse discrete wavelet transform; the downsampling operation adjusts the sampling rate of the iEEG signal to be consistent with the sampling rate of the sEEG signal; the data segmentation adopts a sliding window method to divide the denoised and downsampled signal into a plurality of signal segments with a fixed time length; the normalization operation adopts Z-score normalization, and the formula is: wherein X is an original signal segment, μ is a mean value of X, σ X is a standard deviation of X, so that the mean value of each signal segment after normalization is zero and the standard deviation is one.

[0013] Preferably, in S2, the multi-scale architecture is constructed, specifically: the number of hierarchical scales is set as N s , the pre-processed iEEG target signal X t is taken as the input, wherein C out is the number of iEEG signal channels, and L is the signal time length; for the kth hierarchical scale, the output signal y (k-1) of the previous hierarchical scale (k-1) is taken as the input, wherein C (k-1) is the number of channels of the output signal of the hierarchical scale k-1; a plurality of flows corresponding to each hierarchical scale process the input signal to obtain a tensor y (k) , which is split along the channel dimension, wherein C k Number of channels of the hierarchical scale k output signal, extract a subset of channels As a component of the latent variable, where Remaining channels As input to the next hierarchical scale k+1, where The coarsest hierarchical scale N s Final output after processing Also as a component of the latent variable, where The complete model latent variable is obtained by concatenating the latent variable components extracted from all hierarchical scales And Where

[0014] Preferably, the integration process of the flow in S2 is specifically: the reversible channel mixing operation is a reversible 1x1 convolution operation, for the input signal x' of the flow step, where C is the number of input signal channels, and y=W x ′ is obtained by reversible 1x1 convolution operation, where is a learnable weight matrix, and W is initialized as an orthogonal matrix; the core reversible transformation module is a conditional affine coupling layer, which receives the output y of the reversible 1x1 convolution operation, splits y along the channel dimension into x a and x β two parts, where x a is kept as an identity transformation, and x β is subjected to affine transformation based on the sEEG conditional input signal X c , where C in is the number of sEEG signal channels, and the identity-transformed x a and the affine-transformed result are concatenated to obtain the output of the flow, the formula is: z=concatenate(x a , z β ), where z β is the result of the affine transformation of x β .

[0015] Preferably, the affine transformation process of x β in the conditional affine coupling layer includes: processing x cond and the sEEG conditional input signal X a through a conditional neural network g c to output a translation parameter τ and a logarithmic scale parameter σ, where The affine transformation satisfies: z β = (x β + τ) ⊙ exp(σ), where ⊙ represents element multiplication; in order to ensure numerical stability, the translation parameter τ is scaled by using a hyperbolic tangent function, and a scaled translation parameter τ scaled is obtained scaled = 1 h × tanh(τ raw ), where τ raw is the initial output translation parameter of g cond , and the value range of τ is [-1, 1]; the numerical limit is performed on the logarithmic scale parameter σ, and a numerical clipping processed logarithmic scale parameter σ clipped is obtained clipped = Clip(σ raw , -5, 5), where σ raw is the initial output logarithmic scale parameter of g cond , and the value range of σ is [-5, 5].

[0016] Preferably, the structure of the conditional neural network g cond includes a first convolutional layer, a second convolutional layer, a multi-head self-attention mechanism layer and a third convolutional layer connected in sequence; the convolutional kernel size of the first convolutional layer is 3, the convolutional kernel size of the second convolutional layer is 1, and the first convolutional layer and the second convolutional layer are both connected with a ReLU activation function, satisfying f ReLU (x) = max(h, x), where x is the output feature map of the convolutional layer; the multi-head self-attention mechanism layer adopts a scaled dot-product attention mechanism, and captures multiple relationships between the input data and the conditional data through multiple groups of independent query vectors Q, key vectors and value vectors V, where the output satisfies where d model is the input feature dimension, d k is the dimension of the key vector, and d v is the dimension of the value vector, and softmax(·) is a normalization function; the convolutional kernel size of the third convolutional layer is 3, and the output is the translation parameter τ and the logarithmic scale parameter σ.

[0017] Preferably, the Jacobian matrix logarithmic determinant of the reversible 1x1 convolution operation in the flow satisfies the formula: where L is the time length of the signal, and det(·) is a matrix determinant calculation function; the Jacobian matrix logarithmic determinant of the conditional affine coupling layer satisfies the formula: where σ ijLet σ be the element in the i-th row and j-th column of the logarithmic scaling parameter; the total logarithmic determinant of the Jacobian matrix for a single process is the sum of the logarithmic determinants of the Jacobian matrices of the invertible 1×1 convolution operation and the conditional affine coupling layer, as shown in the formula:

[0018] Preferably, the model training process in S3 includes: denoting the preprocessed sEEG conditional input signal as X. c The iEEG target signal is denoted as X. t The model transforms X through a series of reversible transformations. c X is a condition t The complex distribution is transformed into a standard multivariate Gaussian distribution. I is the identity matrix, and the latent variable Z = f(X) is obtained. t X c ), where f represents the forward transformation of the model; the objective function for model training is to maximize X. t In X c The log-likelihood under the given conditions satisfies the formula: Where p Z (Z) represents the log probability density of the latent variable Z under a standard multivariate Gaussian distribution, M represents the total number of basic invertible transformations in the forward transformation, and z h =X t , z i The i-th fundamental invertible transformation is applied to z i-1 The output, Let g be the Jacobian matrix of the i-th fundamental invertible transformation; by optimizing this objective function, update the conditional neural network g in the model. cond The model is trained by assigning weights W to the invertible 1×1 convolution.

[0019] Preferably, the AdamW optimizer is used during model training, and the optimizer's parameter updates satisfy the formula: Where θ represents the model parameters to be optimized, t represents the number of training iterations, t represents the learning rate, and m represents the training rate. t For first-order momentum, v t ε is the second-order momentum, λ is a small constant to prevent the denominator from being zero, and λ is the weight decay coefficient. At the same time, an early stopping strategy is implemented by monitoring the performance indicators of the model on the validation set (including the Pearson correlation coefficient of the time waveform and the cosine similarity of the power spectral density). When the performance indicators of the validation set do not improve within a set number of training rounds, the model training is stopped and the current optimal model parameters are saved.

[0020] Preferably, the inverse transformation process in S4 includes: transforming the standard multivariate Gaussian distribution p... Z(Z) latent variable samples Z are randomly selected; according to the channel splitting rules of the multi-scale architecture during model training, the selected Z is divided into latent segments corresponding to each level scale. From the coarsest level N of the model s Begin by analyzing the potential fragments corresponding to this hierarchical scale. Applying the inverse transformation of this scale process step, through with W -1 Multiply, W -1 Let W be the inverse matrix. Perform the inverse operation on the affine coupling layer, satisfying the formula: x β =exp(-σ)⊙(z) β -τ), to obtain the inverse transform output of this scale; for the k-th level scale, the potential fragment corresponding to this scale is... The output of the inverse transform of the (k+1)th level scale is concatenated and used as the input of the kth level scale, and its inverse transform process is applied. After completing the inverse transform of all levels scales in sequence, the generated iEEG signal corresponding to the sEEG signal to be processed is obtained, and the formula is: X t =f -1 (Z;X c ), where f -1 X represents the inverse transform of the model. c This is the result of preprocessing the sEEG signal to be processed.

[0021] Compared with the prior art, the technical solution of this application has the following technical effects:

[0022] This application effectively solves the problems of "pattern collapse" and lack of signal randomness in traditional EEG signal generation technologies. When generating iEEG signals, traditional GAN, VAE and other models are often limited to fixed patterns and cannot cover the diverse activity states of the brain. Moreover, deterministic mapping is difficult to reflect the inherent randomness of neural activity. This application directly models the complex conditional probability distribution between sEEG and iEEG through a multi-scale conditional regularized flow model. By capturing the signal probability characteristics with the help of reversible transformation, it can generate diverse iEEG signals and restore the randomness of brain activity, providing a reliable solution for accurately acquiring deep EEG signals.

[0023] This application overcomes the limitation of existing technologies that can only generate iEEG signals from local brain regions, achieving the generation of iEEG signals from the entire deep temporal lobe. Existing technologies, limited by their model architecture, can only reconstruct iEEG signals from local areas such as the medial temporal lobe, failing to meet the needs for analyzing neural activity across the entire deep temporal lobe. The multi-scale architecture of this application, through multi-level processing, progressively captures signals from fine-grained temporal features to global signal patterns, and combines self-attention mechanisms to capture inter-regional correlations. It can generate complete iEEG signals from the deep temporal lobe based on sEEG signals, providing support for a comprehensive analysis of deep brain function.

[0024] The application solves the problems of low signal fidelity and dependence on manual feature extraction in traditional electroencephalogram inverse solution methods. Traditional equivalent current dipole method and current distribution source reconstruction method are difficult to accurately restore neural dynamics due to difficulty in estimating the number of dipoles or inconsistency between prior constraints and real activities; traditional machine learning methods also require manual feature extraction and have limited nonlinear modeling capability. The application is based on a multi-scale conditional regularization flow model of deep learning, which can automatically learn the mapping relationship between sEEG and iEEG without human intervention, and the generated iEEG signal has high fidelity in time waveform and spectral characteristics, effectively restoring the details of neural activity.

[0025] In clinical and scientific research scenarios, the application solves the problems of high risk and high cost of obtaining iEEG signals. In clinical practice, iEEG requires surgical implantation of electrodes, which has risks such as infection and immune response, and is very costly, limiting its widespread application. The application generates iEEG from non-invasive sEEG, eliminating the need for invasive procedures and significantly reducing medical risks and costs. At the same time, the generated high-fidelity iEEG signal can replace real invasive signals and be used in scenarios such as epilepsy focus localization and cognitive neuroscience research, providing a safe and convenient signal source for related fields and promoting clinical diagnosis and scientific research.

[0026] The above description is only a summary of the technical solutions of the application. In order to more clearly understand the technical means of the application, the content of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the application more obvious and easy to understand, the following will describe the preferred embodiments of the application in detail with reference to the accompanying drawings.

[0027] According to the detailed description of the specific embodiments of the application below in combination with the drawings, those skilled in the art will more clearly understand the above and other purposes, advantages and features of the application. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and those skilled in the art can also obtain other drawings without creative labor based on these drawings. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual proportion.

[0029] According to the description of the drawings in the file and the corresponding technical content, the titles of the drawings are as follows:

[0030] Figure 1 Flowchart of sEEG to iEEG generation method based on multi-scale conditional regularization flow;

[0031] Figure 2 A schematic diagram of the multi-scale architecture for the training and generation process of the NeuroFlowNet model.

[0032] Figure 3 A schematic diagram of the architecture of the Flow Step in the NeuroFlowNet model at training and generation time.

[0033] Figure 4 A three-dimensional anatomical view of the intracranial electrode trajectories for subjects S1, S6, S9.

[0034] Figure 5 A time waveform comparison plot of real and generated iEEG signals for different mesial temporal lobe regions.

[0035] Figure 6 A power spectral density comparison plot of real and generated iEEG signals for each mesial temporal lobe region.

[0036] Figure 7 A scatter plot fit comparison plot of normalized real and generated alpha band power.

[0037] Figure 8 A Bland-Altman plot of real and generated alpha band power difference.

[0038] Figure 9 A circular plot comparison of real and generated iEEG signal inter-channel functional connectivity patterns. DETAILED DESCRIPTION

[0039] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. In the following description, specific details such as specific configurations and components are provided only to help a comprehensive understanding of the embodiments of the present application. Therefore, it should be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, in order to be clear and concise, the description of known functions and structures in the embodiments is omitted.

[0040] It should be understood that the "one embodiment" or "the embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "one embodiment" or "the embodiment" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0041] In addition, reference numerals and / or letters can be repeated in different instances in the present application. Such repetition is for the sake of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and / or spatial arrangements discussed.

[0042] The term "and / or", merely describes an associated relationship between associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, B alone, and A and B together. The term "and" in this paper describes another relationship between associated objects, which means that there can be two relationships, for example, A and B, which means that there are two cases of A alone and A and B together. In addition, the character " / " in this paper generally represents an "or" relationship between the associated objects before and after it.

[0043] The term "at least one" in this paper merely describes the relationship between associated objects, which means that there can be three relationships, for example, at least one of A and B, which means that there are three cases of A alone, A and B together, and B alone.

[0044] It should also be noted that in this paper, relationship terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion.

[0045] Embodiment 1

[0046] This embodiment mainly describes a cross-modal sEEG to iEEG generation method based on multi-scale conditional regularization flow, as shown in Figure 1 Specifically, it includes:

[0047] S1, acquiring synchronously collected sEEG signals and iEEG signals, preprocessing the sEEG signals and iEEG signals to obtain preprocessed sEEG conditional input signals and iEEG target signals;

[0048] S2, constructing a multi-scale conditional regularization flow model, the model including a multi-scale architecture, a multi-flow process and a core reversible transformation module, the multi-scale architecture including a plurality of hierarchical scales, each hierarchical scale corresponding to a plurality of flows, each flow integrating reversible channel mixing operations and the core reversible transformation module, the core reversible transformation module taking the preprocessed sEEG conditional input signals as the basis for adjustment to realize the conversion of the iEEG signal distribution;

[0049] S3, input the pre-processed sEEG condition signal and the iEEG target signal into the constructed multi-scale conditional regularization flow model, train the model by using the maximum likelihood estimation method, optimize the model parameters, and obtain the trained multi-scale conditional regularization flow model;

[0050] S4, obtain the sEEG signal to be processed, input it into the trained multi-scale conditional regularization flow model after pre-processing, and generate the corresponding iEEG signal through the inverse transformation process of the model.

[0051] Further, the pre-processing in S1 includes wavelet denoising, downsampling, data segmentation and normalization operation; the wavelet denoising adopts discrete wavelet transform, selects a symmetric wavelet to decompose the sEEG signal and the iEEG signal to obtain approximation coefficients and detail coefficients, retains the approximation coefficients and uses a soft threshold method to perform threshold processing on the detail coefficients, and then reconstructs the denoised signal through inverse discrete wavelet transform; the downsampling operation adjusts the sampling rate of the iEEG signal to be consistent with the sampling rate of the sEEG signal; the data segmentation uses a sliding window method to divide the denoised and downsampled signal into a plurality of signal segments with fixed time length; the normalization operation uses Z-score normalization, and the formula is: Where X is the original signal segment, μ is the mean of X, and σ X is the standard deviation of X, so that the mean of each normalized signal segment is zero and the standard deviation is one.

[0052] Further, the construction of the multi-scale architecture in S2 is as follows: set the number of hierarchical scales as N s , the pre-processed iEEG target signal X t is taken as the input, where C out is the number of iEEG signal channels, and L is the signal time length; for the kth hierarchical scale, the output signal y (k -1) of the previous hierarchical scale (k-1) is taken as the input, where C (k-1) is the number of channels of the output signal of the hierarchical scale k-1; a plurality of processes corresponding to each hierarchical scale process the input signal to obtain a tensor y (k) , which is split along the channel dimension, where C k is the number of channels of the output signal of the hierarchical scale k, and the channel subset is extracted as a component of the latent variable, where the remaining channels are taken as the input of the next hierarchical scale k+1, where the coarsest hierarchical scale Ns Final output after processing Also as a component of latent variables, among which By concatenating the components of the latent variables extracted at all levels of scale, the complete model latent variables are obtained. and in

[0053] Furthermore, such as Figure 2 As shown, the integration process of the process described in S2 is specifically as follows: the reversible channel mixing operation is a reversible 1×1 convolution operation, for the input signal x′ of the process step, where C represents the number of input signal channels, and y = Wx′ is obtained through a reversible 1×1 convolution operation, where The weight matrix is ​​learnable, and W is initialized as an orthogonal matrix; the core invertible transformation module is a conditional affine coupling layer, which receives the output y of an invertible 1×1 convolution operation and splits y into x along the channel dimension. a and x β Two parts, of which For x a Maintaining the identity transformation, for x β Based on sEEG conditional input signal X c Perform an affine transformation, where C in Let x be the number of sEEG signal channels, and then transform x using the identity transformation. a The output of the process is obtained by concatenating the result after the affine transformation with the formula: z = concatenate(x) a , z β ),in z β For x β The result after affine transformation.

[0054] Furthermore, such as Figure 3 As shown, in the conditional affine coupling layer, x β The affine transformation process includes: through a conditional neural network g cond For x a With sEEG conditional input signal X c The process is performed to output the translation parameter τ and the logarithmic scaling parameter σ, where The affine transformation satisfies: z β =(x β +τ)⊙exp(σ), where ⊙ denotes element-wise multiplication; to ensure numerical stability, the translation parameter τ is scaled using the hyperbolic tangent function to obtain the scaled translation parameter τ. scaled The full formula is: τ scaled =1h×tanh(τ)raw ), where τ raw For g cond The initial output translation parameter ensures that the value of τ is within the range of [-1, 1]. Numerical constraints are then applied to the logarithmic scaling parameter σ to obtain the numerically clipped logarithmic scaling parameter σ. clipped The formula is: σ clipped =Clip(σ raw ,-5,5),σ raw For g cond The initial output logarithmic scaling parameter (Clip(·) is the numerical clipping function) is set so that the value of σ is between [-5, 5].

[0055] Furthermore, the conditional neural network g cond The structure includes a first convolutional layer, a second convolutional layer, a multi-head self-attention mechanism layer, and a third convolutional layer connected in sequence; the kernel size of the first convolutional layer is 3, the kernel size of the second convolutional layer is 1, and both the first and second convolutional layers are followed by a ReLU activation function that satisfies f ReLU (x) = max(h,x), where x is the output feature map of the convolutional layer; the multi-head self-attention mechanism layer adopts a scaled dot product attention mechanism, through multiple sets of independent query vectors Q and key vectors. The value vector V captures various relationships between input data and conditional data, among which... Output satisfies Where d model d is the input feature dimension. k Let d be the dimension of the key vector. v τ is the dimension of the value vector, and softmax(·) is the normalization function; the kernel size of the third convolutional layer is 3, and its output is the translation parameter τ and the logarithmic scaling parameter σ.

[0056] Furthermore, the logarithmic determinant of the Jacobian matrix in the invertible 1×1 convolution operation of the process satisfies the formula: Where L is the signal duration, and det(·) is the matrix determinant calculation function; the logarithmic determinant of the Jacobian matrix of the conditional affine coupling layer satisfies the formula: Where σ ij Let σ be the element in the i-th row and j-th column of the logarithmic scaling parameter; the total logarithmic determinant of the Jacobian matrix for a single process is the sum of the logarithmic determinants of the Jacobian matrices of the invertible 1×1 convolution operation and the conditional affine coupling layer, as shown in the formula:

[0057] Furthermore, the model training process described in S3 includes: denoting the preprocessed sEEG conditional input signal as X. c The iEEG target signal is denoted as X.t The model transforms X through a series of reversible transformations. c X is a condition t The complex distribution is transformed into a standard multivariate Gaussian distribution. I is the identity matrix, and the latent variable Z = f(X) is obtained. t X c ), where f represents the forward transformation of the model; the objective function for model training is to maximize X. t In X c The log-likelihood under the given conditions satisfies the formula: Where p Z (Z) represents the log probability density of the latent variable Z under a standard multivariate Gaussian distribution, M represents the total number of basic invertible transformations in the forward transformation, and z h =X t , z i The i-th fundamental invertible transformation is applied to z i-1 The output, Let g be the Jacobian matrix of the i-th fundamental invertible transformation; by optimizing this objective function, update the conditional neural network g in the model. cond The model is trained by assigning weights W to the invertible 1×1 convolution.

[0058] Furthermore, the AdamW optimizer is used during model training, and the optimizer's parameter updates satisfy the formula: Where θ represents the model parameters to be optimized, t represents the number of training iterations, t represents the learning rate, and m represents the training rate. t For first-order momentum, v t ε is the second-order momentum, λ is a small constant to prevent the denominator from being zero, and λ is the weight decay coefficient. At the same time, an early stopping strategy is implemented by monitoring the performance indicators of the model on the validation set (including the Pearson correlation coefficient of the time waveform and the cosine similarity of the power spectral density). When the performance indicators of the validation set do not improve within a set number of training rounds, the model training is stopped and the current optimal model parameters are saved.

[0059] Furthermore, the inverse transformation process described in S4 includes: transforming the standard multivariate Gaussian distribution p... Z (Z) latent variable samples Z are randomly selected; according to the channel splitting rules of the multi-scale architecture during model training, the selected Z is divided into latent segments corresponding to each level scale. From the coarsest level N of the model s Begin by analyzing the potential fragments corresponding to this hierarchical scale. Applying the inverse transformation of this scale process step, through with W -1 Multiply, W -1 Let W be the inverse matrix. Perform the inverse operation on the affine coupling layer, satisfying the formula: x β=exp(-σ)⊙(z) β -τ), to obtain the inverse transform output of this scale; for the k-th level scale, the potential fragment corresponding to this scale is... The output of the inverse transform of the (k+1)th level scale is concatenated and used as the input of the kth level scale, and its inverse transform process is applied. After completing the inverse transform of all levels scales in sequence, the generated iEEG signal corresponding to the sEEG signal to be processed is obtained, and the formula is: X t =f -1 (Z;X c ), where f -1 X represents the inverse transform of the model. c This is the result of preprocessing the sEEG signal to be processed.

[0060] This embodiment details how the application models the complex conditional probability distributions of sEEG and iEEG using a multi-scale conditionally regularized flow model, restoring the randomness of neural activity through reversible transformations to avoid pattern collapse; the multi-scale architecture combined with a self-attention mechanism enables the generation of iEEG signals from the entire deep temporal lobe; it eliminates the need for manual feature extraction, improving signal fidelity; and it generates invasive iEEG from non-invasive sEEG, reducing medical risks and costs, and providing reliable support for clinical diagnosis and neuroscience research.

[0061] Based on Embodiment 1, this embodiment details the specific implementation process and effects of the technical solution of this application. Specifically, this embodiment uses the synchronous sEEG-iEEG dataset disclosed by Boran et al. The dataset records the electrophysiological signals of nine epilepsy patients during a verbal working memory task, including synchronously acquired scalp electroencephalograms (sEEG) and intracranial electroencephalograms (iEEG). The sEEG is recorded using the international 10-20 system, with electrodes placed on the F... p1 F p2 F7, F3, C z P z Standard locations such as O1 and O2; iEEG is acquired through deep microelectrodes implanted in the medial temporal lobe (MTL), covering key brain regions such as the anterior hippocampus (AHL / AHR), amygdala (AL / AR), entorhinal cortex (ECL / ECR), parahippocampal gyrus (PHL / PHR) and lateral nasal region (LR), with each electrode trajectory containing 8 microelectrode contacts.

[0062] The original sEEG signal sampling rate was 256 Hz, and the iEEG signal sampling rate was 4 kHz. To ensure the consistency of the time scale of the signals, the sEEG was resampled to 200 Hz, and the iEEG was resampled to 2 kHz. Considering the differences in electrode implantation position, anatomical coverage, and recorded data quality among subjects, three core subjects (S1, S6, S9) were selected for the experiment, with the following selection criteria: (1) The electrodes covered the key sub-regions of the MTL (such as the anterior hippocampus, amygdala, and entorhinal cortex) comprehensively; (2) The number of single neuron units recorded was sufficient and well isolated, meeting the reliability requirements of statistical analysis; (3) There were few artifacts in the recording session, and the subjects performed stably.

[0063] As shown in Figure 4 , the figure shows the coronal, sagittal, and axial views of the MTL deep electrode trajectories of the three subjects S1, S6, and S9. Different colors are used to mark different anatomical target brain regions: anterior hippocampus (AHL / AHR, red / pale red), amygdala (AL / AR, orange / yellow), entorhinal cortex (ECL / ECR, green / pale green), parahippocampal gyrus (PHL / PHR, purple / magenta), and lateral rhinal region (LR, blue). From the figure, it can be clearly observed that the electrode trajectories of the three subjects were precisely implanted into the target brain regions along the stereotactic path, and the electrode distribution of different subjects covered not only the core functional regions of the MTL but also individualized anatomical differences, providing ideal data support for verifying the generalization ability of the model in different anatomical scenarios.

[0064] To ensure that high-quality signals are used for model training and evaluation, four-step preprocessing operations are performed on the sEEG and iEEG signals:

[0065] Discrete wavelet transform (DWT) is used to select a fourth-order symmetric wavelet (Symlet) for three-level decomposition of the signal, obtaining the approximation coefficients (retaining the main characteristics of the signal) and the detail coefficients (mainly containing noise). The soft threshold method is used to process the detail coefficients, and the threshold is determined by estimating the signal noise level based on the median absolute deviation (MAD) of the detail coefficients. Then, the de-noised signal is reconstructed by inverse discrete wavelet transform (IDWT), effectively removing external interference noise while preserving the physiological characteristics of the electroencephalogram.

[0066] Due to the large difference in sampling rate between the original iEEG and sEEG, the iEEG signal sampling rate is downsampled from 2 kHz to 200 Hz, consistent with the sEEG sampling rate, to eliminate the influence of time resolution difference on model training.

[0067] Each subject contains multiple recording sessions, each session contains multiple trials of speech working memory task. In each session, 90% of trials are randomly selected as training set, and the remaining 10% as validation set. The training set and validation set signals are divided into 1-second (including 200 sample points) signal segments using the sliding window method, where the training set window overlap rate is 90% (to improve data utilization), and the validation set has no overlap (to avoid data redundancy affecting the evaluation results).

[0068] Z-score normalization is performed on each signal segment to make the mean of each segment 0 and the standard deviation 1, avoiding the interference of signal amplitude difference on model parameter optimization and ensuring stable convergence in the training process.

[0069] The multi-scale conditional regularization flow model (NeuroFlowNet) in the embodiment is implemented based on the PyTorch deep learning framework, and the hardware environment is a single NVIDIA RTX4080 GPU with 16GB of memory. The specific implementation and training parameter configuration are as follows:

[0070] The model contains N s levels of scales, each scale corresponds to N steps flows; each flow is composed of a reversible 1x1 convolution and a conditional affine coupling layer, where the weight matrix W of the reversible 1x1 convolution is initialized as an orthogonal matrix (achieved by QR decomposition of a random Gaussian matrix); the conditional neural network g cond of the conditional affine coupling layer contains two initial convolution layers (kernel sizes are 3 and 1 respectively, both connected to ReLU activation functions), a multi-head self-attention layer (using a scaled dot-product attention mechanism, the key vector dimension d k is adaptively adjusted according to the input feature dimension), and a final convolution layer (kernel size is 3).

[0071] The AdamW optimizer is used, the learning rate is set to 1x10 -3 , the weight decay coefficient is 1x10 -2 (prevent model overfitting); the batch size is set to 128, the total number of training epochs is 100, and the early stopping strategy is used, when the performance indicators (time waveform Pearson correlation coefficient, power spectral density cosine similarity) of the validation set do not improve for 10 consecutive epochs, the training is stopped and the current optimal model parameters are saved, to avoid invalid training and overfitting.

[0072] To verify the time domain fidelity of the model generated iEEG signal, the iEEG signal generated by NeuroFlowNet is qualitatively and quantitatively compared with the real iEEG signal.

[0073] As Figure 5As shown, the figure is the superimposed comparison of the iEEG signals (orange curve) generated by different MTL sub-regions (anterior hippocampus AHL / AHR, amygdala AL / AR, entorhinal cortex ECL / ECR, parahippocampal gyrus PHL / PHR) and the real iEEG signals (blue curve) in the 200 ms signal segment of the subject S6. As can be directly observed from the figure, the generated signals and the real signals are highly consistent in waveform form, phase change and time dynamic characteristics: in the superficial brain regions such as amygdala and parahippocampal gyrus, the generated signals accurately reproduce the peak position, oscillation period and transient spike characteristics of the real signals, and the phase and relative amplitude are almost completely consistent; in the deep complex brain regions such as anterior hippocampus and entorhinal cortex, although there are slight differences in the amplitude of some peaks and the details of rapid transients (such as the amplitude of the rapid spike in the real signal is slightly lower in the generated signal), the overall trend is consistent with the real signal, which confirms that the model can learn the complex time domain mapping relationship between sEEG and iEEG.

[0074] From the quantitative point of view, the mean absolute error (MAE), Pearson correlation coefficient (Corr) and cosine similarity are used to evaluate the time waveform performance of different subjects in each MTL region, and the results are shown in the following table;

[0075]

[0076]

[0077] The results show that: in the superficial brain region (such as the PHL region of S9), the correlation coefficient is 0.73±0.20, and the cosine similarity is 0.78±0.17, indicating that the waveform shape and direction consistency is high; while in the deep brain region (such as the AHL region of S1), the correlation coefficient is 0.35±0.28, and the cosine similarity is 0.47±0.24, the performance is relatively low, mainly because the deep brain region signal is attenuated by the skull, cerebrospinal fluid and other tissues, and the deep brain region information contained in the sEEG is less, which makes it difficult for the model to accurately capture the complex dynamics. In some regions (such as the ECL region of S6), moderate correlation (0.49±0.23) and relatively high MAE (53.71±21.22 μV) coexist, which is speculated to be related to the individual difference of signal amplitude and the difference in anatomical position of electrode implantation.

[0078] The spectral characteristics (such as the power distribution of different frequency bands) of the electroencephalogram signal contain important neurophysiological information, and the model's ability to reproduce the iEEG spectral characteristics is verified by power spectral density (PSD) analysis, focusing on the spectral performance of the full frequency band (0.5-50 Hz) and the alpha frequency band (8-13 Hz, related to attention regulation).

[0079] As Figure 6The figure is a PSD waveform comparison between the generated iEEG signals (orange curves) and the real iEEG signals (blue curves) of eight MTL sub-regions of subject S6 (the PSD of each region is the average of all electrodes in the region). As can be clearly seen from the figure, the PSD of the generated signals is highly consistent with the real signals in the full frequency band: in the theta frequency band (4-8 Hz, related to memory encoding) and the alpha frequency band (8-13 Hz), the generated signals accurately reproduce the power peak position and amplitude ratio of the real signals; in the high frequency band (> 30 Hz), the generated signals correctly reproduce the non-periodic 1 / f power attenuation characteristics (a marker of background neural activity) of the real signals, indicating that the model not only captures the main oscillation components, but also reproduces the global characteristics of the brain electrical signal spectrum.

[0080] To further verify the reproduction accuracy of the alpha frequency band (which has significant functional significance), the generated and real alpha band powers were quantitatively analyzed, and the results are shown in Figure 7-8 Figure 7 The figure is a scatter plot of the normalized real alpha power and the generated alpha power, the red dashed line is the ideal curve (y = x), and the green solid line is the linear fitting curve (y = 0.67x + 0.13). The scatter points show a clear positive correlation, and the fitting curve is close to the ideal curve, indicating that the model can reliably capture the relative changes in alpha power. Figure 8 The figure is a Bland-Altman plot, the average difference between the real and generated alpha powers is only 0.01, and the data points are uniformly distributed within the 95% consistency range (upper limit 0.28, lower limit -0.27), without systematic bias, confirming that the model has high estimation accuracy for the alpha frequency band power.

[0081] From the quantitative statistical results, the PSD correlation coefficient of the full frequency band (0.5-50 Hz) ranges from 0.53±0.25 (S1's PHR region) to 0.84±0.16 (S9's PHL region), the PSD cosine similarity of most regions is above 0.70, and the spectrum composition is stable; the alpha band cosine similarity remains between 0.70 and 0.87, but the correlation fluctuates (e.g., S9's AR region is 0.22±0.54, and S6's AR region is 0.67±0.38), and the average absolute percentage error (MAPE) of alpha power is mostly below 3%, indicating that although the model cannot accurately capture the details of the alpha phase, it can effectively estimate the relative power distribution of the alpha frequency band, meeting the needs of neurophysiological research on oscillation activity analysis.

[0082] ​Besides single-channel signal characteristics, the functional connectivity between EEG signal channels (reflecting collaborative activity among different neural groups) is a key indicator for brain network analysis. This embodiment verifies the model's ability to recover inter-channel functional connectivity patterns by calculating paired Pearson correlation coefficients between iEEG signal channels.

[0083] like Figure 9 As shown in the figure, this is a circular plot of channel correlation between the real iEEG signal (Figure a) and the generated iEEG signal (Figure b) in the subject's S6200 ms segment, showing only the 50 channel pairs with the highest absolute correlation. The figure reveals that the functional connectivity patterns of the generated signals are highly similar to those of the real signals: strong correlations between homologous regions in the left and right hemispheres (such as the AHL and AHR channels) are clearly preserved, reflecting synchronous activity of bilateral brain regions through commissural pathways; strong correlations between anatomically functionally related regions within the same hemisphere (such as the entorhinal cortex and hippocampal channels) are also accurately reproduced, consistent with the neurophysiological connectivity characteristics of critical circuits in memory processing. Whether it is dense connectivity within the parahippocampal gyrus or sparse strong connectivity across more distant regions, the generated signals accurately replicate the spatial distribution patterns of the real signals, confirming that the model can not only generate realistic single-channel signals but also learn and recover the functional connectivity covariance structure at the MTL network system level, preserving the higher-level neurophysiological characteristics of EEG signals.

[0084] Experiments using synchronized sEEG-iEEG data from the MTL region of three epilepsy patients validated the effectiveness of the NeuroFlowNet model in generating high-fidelity iEEG from sEEG. The model accurately reproduced the iEEG temporal waveforms of superficial MTL brain regions (amygdala and parahippocampal gyrus), with a correlation coefficient as high as 0.73±0.20. Even in deep brain regions (anterior hippocampus), it could capture the overall signal trend. The generated signal PSD accurately reproduced the full-band characteristics of the real signal, especially the power peaks of the theta band (memory-related) and the alpha band (attention-related), and there was no systematic bias in the alpha band power estimation. The model could restore the interchannel functional connectivity patterns of the MTL region, and the correlations of homologous regions in the left and right hemispheres and functionally related regions in the same hemisphere were highly consistent with the real signals.

[0085] Meanwhile, the experiment also clarified the limitations of the model in deep brain region generation and subject generalization, and proposed targeted directions for future optimization. Overall, this experiment demonstrated the feasibility of a cross-modal generation framework based on conditional regularization flow in the field of EEG signals, providing reliable experimental evidence for non-invasive analysis of deep brain dynamics, and laying the foundation for subsequent clinical applications and model optimization.

[0086] The embodiment is detailed to describe that the NeuroFlowNet model can accurately generate high-fidelity iEEEG from non-invasive sEEG, and can reproduce key features of iEEEG time waveform in MTL superficial brain area, and full-band spectral features and functional connection mode are highly consistent with real signals, and effectively solve the problem that traditional generation model mode collapses and can only generate signals in local brain area.

[0087] The above merely describes preferred embodiments of the present application, which are not intended to limit the protection scope of the present application. The present application can have various changes and modifications for those skilled in the art; any change, modification, replacement, integration and parameter change of the embodiments within the spirit and principle of the present application, by conventional substitution or capable of realizing the same function without departing from the principle and spirit of the present application, all fall within the protection scope of the present application.

Claims

1. A method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow, characterized in that, include: S1. Acquire synchronously collected sEEG and iEEG signals, preprocess the sEEG and iEEG signals to obtain preprocessed sEEG conditional input signals and iEEG target signals. S2. Construct a multi-scale conditional regularized flow model. The model includes a multi-scale architecture, multiple processes, and a core reversible transformation module. The multi-scale architecture contains several hierarchical scales, each hierarchical scale corresponds to several processes, and each process integrates reversible channel hybrid operation and a core reversible transformation module. The core reversible transformation module uses the preprocessed sEEG conditional input signal as the adjustment basis to realize the transformation of the iEEG signal distribution. S3. Input the preprocessed sEEG conditional input signal and iEEG target signal into the constructed multi-scale conditional regularized flow model, train the model using the maximum likelihood estimation method, optimize the model parameters, and obtain the trained multi-scale conditional regularized flow model. S4. Obtain the sEEG signal to be processed, preprocess it, and input it into the trained multi-scale conditionally regularized flow model. Generate the corresponding iEEG signal through the inverse transformation process of the model.

2. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 1, characterized in that, The preprocessing in S1 includes wavelet denoising, downsampling, data segmentation, and normalization operations. Wavelet denoising employs discrete wavelet transform, selecting symmetric wavelets to decompose the sEEG and iEEG signals, obtaining approximation coefficients and detail coefficients. The approximation coefficients are retained, and the detail coefficients are thresholded using a soft thresholding method. The denoised signal is then reconstructed through inverse discrete wavelet transform. The downsampling operation adjusts the sampling rate of the iEEG signal to match that of the sEEG signal. Data segmentation uses a sliding window method to divide the denoised and downsampled signal into several signal segments of fixed time length. The normalization operation uses Z-score normalization, with the formula: Where X is the original signal segment, μ is the mean of X, and σ X Let X be the standard deviation of X, so that the mean of each signal segment after normalization is zero and the standard deviation is one.

3. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 1, characterized in that, The construction of the multi-scale architecture in S2 specifically involves setting the number of hierarchical scales to N. s For the first level scale, the preprocessed iEEG target signal X t As input, where C out Let L be the number of iEEG signal channels and L be the signal duration; for the k-th level scale, the output signal y is processed from the previous level scale (k-1). (k-1) As input, where C (k-1) Let y be the number of channels for the output signal at level k-1; after processing the input signal through several processes corresponding to each level, the resulting tensor y will be... (k) Split along the channel dimension, where C k To extract a subset of channels for the output signal at level k. As a component of latent variables, among which Remaining channels As the input to the next level scale k+1, where coarsest level N s Final output after processing Also as a component of latent variables, among which By concatenating the components of the latent variables extracted at all levels of scale, the complete model latent variables are obtained. and in 4. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 1, characterized in that, The integration process described in S2 specifically involves: the reversible channel mixing operation being a reversible 1×1 convolution operation, for the input signal x of the process step. ′ ,in C represents the number of input signal channels, and y = Wx′ is obtained through a reversible 1×1 convolution operation, where The weight matrix is ​​learnable, and W is initialized as an orthogonal matrix; the core invertible transformation module is a conditional affine coupling layer, which receives the output y of an invertible 1×1 convolution operation and splits y into x along the channel dimension. a and x β Two parts, of which For x a Maintaining the identity transformation, for x β Based on sEEG conditional input signal X c Perform an affine transformation, where C in Let x be the number of sEEG signal channels, and then transform x using the identity transformation. a The output of the process is obtained by concatenating the result after the affine transformation with the formula: z = concatenate(x) a ,z β ),in z β For x β The result after affine transformation.

5. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 4, characterized in that, The conditional affine coupling layer for x β The affine transformation process includes: through a conditional neural network g cond For x a With sEEG conditional input signal X c The process is performed to output the translation parameter τ and the logarithmic scaling parameter σ, where The affine transformation satisfies: z β =(x β +τ)⊙exp(σ), where ⊙ denotes element-wise multiplication; to ensure numerical stability, the translation parameter τ is scaled using the hyperbolic tangent function to obtain the scaled translation parameter τ. scaled The full formula is: τ scaled =1h×tanh(τ) raw ), where τ raw For g cond The initial output translation parameter ensures that the value of τ is within the range of [-1, 1]. Numerical constraints are then applied to the logarithmic scaling parameter σ to obtain the numerically clipped logarithmic scaling parameter σ. clipped The formula is: σ clipped =Clip(σ raw ,-5,5),σ raw For g cond The initial output logarithmic scaling parameter (Clip(·) is the numerical clipping function) is set so that the value of σ is between [-5, 5].

6. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 5, characterized in that, The conditional neural network g cond The structure includes a first convolutional layer, a second convolutional layer, a multi-head self-attention mechanism layer, and a third convolutional layer connected in sequence; the kernel size of the first convolutional layer is 3, the kernel size of the second convolutional layer is 1, and both the first and second convolutional layers are followed by a ReLU activation function that satisfies f ReLU (x) = max(h, x), where x is the output feature map of the convolutional layer; the multi-head self-attention mechanism layer adopts a scaled dot product attention mechanism, through multiple independent query vectors Q and key vectors K. The value vector V captures various relationships between input data and conditional data, among which... Output satisfies Where d model d is the input feature dimension. k Let d be the dimension of the key vector. v τ is the dimension of the value vector, and softmax(·) is the normalization function; the kernel size of the third convolutional layer is 3, and its output is the translation parameter τ and the logarithmic scaling parameter σ.

7. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 4, characterized in that, The logarithmic determinant of the Jacobian matrix in the invertible 1×1 convolution operation in the process satisfies the formula: Where L is the signal duration, and det(·) is the matrix determinant calculation function; the logarithmic determinant of the Jacobian matrix of the conditional affine coupling layer satisfies the formula: Where σ ij Let be the element in the i-th row and j-th column of the logarithmic scaling parameter σ; The logarithmic determinant of the total Jacobian matrix for a single process is the sum of the logarithmic determinants of the Jacobian matrices of the invertible 1×1 convolution operation and the conditional affine coupling layer, as shown in the formula:

8. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 1, characterized in that, The model training process in S3 includes: denoting the preprocessed sEEG conditional input signal as X. c The iEEG target signal is denoted as X. t The model will transform X through a series of reversible transformations. c X is a condition t The complex distribution is transformed into a standard multivariate Gaussian distribution. I is the identity matrix, and the latent variable Z = f(X) is obtained. t X c ), where f represents the forward transformation of the model; the objective function for model training is to maximize X. t In X c The log-likelihood under the given conditions satisfies the formula: Where p Z (Z) represents the log probability density of the latent variable Z under a standard multivariate Gaussian distribution, M represents the total number of basic invertible transformations in the forward transformation, and z h =X t , z i The i-th fundamental invertible transformation acts on z i-1 The output, Let g be the Jacobian matrix of the i-th fundamental invertible transformation; by optimizing this objective function, update the conditional neural network g in the model. cond The model is trained by assigning weights W to the invertible 1×1 convolution.

9. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 8, characterized in that, The AdamW optimizer is used during model training, and the optimizer's parameter updates satisfy the formula: Where θ represents the model parameters to be optimized, t represents the number of training iterations, t represents the learning rate, and m represents the training rate. t For first-order momentum, v t ε is the second-order momentum, λ is a small constant to prevent the denominator from being zero, and λ is the weight decay coefficient. At the same time, an early stopping strategy is implemented by monitoring the performance indicators of the model on the validation set (including the Pearson correlation coefficient of the time waveform and the cosine similarity of the power spectral density). When the performance indicators of the validation set do not improve within a set number of training rounds, the model training is stopped and the current optimal model parameters are saved.

10. The method for cross-modal sEEG to iEEG generation based on multi-scale conditionally regularized flow according to claim 1, characterized in that, The inverse transformation process in S4 includes: from the standard multivariate Gaussian distribution p Z (Z) latent variable samples Z are randomly selected; according to the channel splitting rules of the multi-scale architecture during model training, the selected Z is divided into latent segments corresponding to each level scale. From the coarsest level N of the model s Begin by analyzing the potential fragments corresponding to this hierarchical scale. Applying the inverse transformation of this scale process step, through with W -1 Multiply, W -1 Let W be the inverse matrix. Performing the inverse operation on the affine coupling layer satisfies the formula: x β =exp(-σ)⊙(z) β -τ), to obtain the inverse transform output of this scale; for the k-th level scale, the potential fragment corresponding to this scale is... The output of the inverse transform of the (k+1)th level scale is concatenated and used as the input of the kth level scale, and its inverse transform process is applied. After completing the inverse transform of all levels scales in sequence, the generated iEEG signal corresponding to the sEEG signal to be processed is obtained, and the formula is: X t =f -1 (Z;X c ), where f -1 X represents the inverse transform of the model. c This is the result of preprocessing the sEEG signal to be processed.

Citation Information

Patent Citations

  • Generative multichannel electroencephalogram modeling method based on neuron group model

    CN117322890A

  • Children epilepsy positioning method based on multi-modal brain image

    CN111369558A

  • Brain data enhancement method and device based on generative artificial intelligence

    CN118216931A

  • Emotion recognition method and system based on multi-modal fusion data enhancement framework

    CN119377876A

  • Multi-scale epileptic seizure cross-object detection method based on power spectral density

    CN120296490A