Neural cell membrane potential simulation and inverse problem method based on neural operator
Patent Information
- Application Number
- CN202611192205.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]但是现有神经算子技术直接用于神经细胞膜电位建模仍存在若干不足:其一,膜电位中的动作电位峰值具有窄脉冲、高幅值、强时序约束等特点,普通均方误差或相对误差可能过度关注整体平滑趋势而忽略峰值位置;其二,正向仿真与反向反演常被设计为不同流程,难以在同一数据和模型接口下复用;其三,仅依赖波形误差无法全面反映神经电生理意义,需要结合峰值时间、放电频率、首次脉冲时间和放电间隔等特征评价;其四,不同模型和损失函数之间缺少统一可插拔实验框架,限制了神经算子在神经元仿真任务中的系统比较和工程应用
[0019]1、本发明中,将外部输入电流到膜电位响应的映射直接建模为函数空间算子,通过多种神经算子结构在频域和时域同时捕获全局趋势与局部尖峰特征,一旦训练完成即可快速完成新刺激条件下的连续预测,且对未见过的刺激分布和时间网格具有良好适应性。同时该方法通过统一的数据接口和任务前缀切换机制,使正向仿真与输入电流反演共用同一套模型库和训练流程,从根本上解决了传统方案中正反问题相互割裂的问题,提高了模型在多任务场景下的复用效率,降低了电生理实验解释和神经调控设计中的重复开发成本。
Smart Images

Figure CN122964492A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computational neuroscience technology, specifically a method for simulating and inversely solving neural cell membrane potentials based on neural operators. Background Technology
[0002] Modeling of neural cell membrane potentials is a crucial foundation of computational neuroscience. Typical models include the LIF model, the Hodgkin-Huxley model, the Izhikevich model, and more complex biophysical cell models. These models typically describe the dynamic relationships between ion channels, capacitive currents, external stimulus currents, and membrane potentials using ordinary differential equations or partial differential equations. Traditional simulation methods require stepwise integration along the time axis, which becomes computationally intensive when dealing with large amounts of external input samples, long time series, multi-parameter searches, or complex cell models.
[0003] Neural operators are a class of deep learning models oriented towards function space mappings. Their goal is not merely to learn mappings from finite-dimensional vectors to finite-dimensional vectors, but rather to learn the operator relationships between input and output functions. Specific operator construction methods and features include: Fourier neural operators capture global dependencies through frequency-domain spectral convolution; wavelet neural operators capture local and global structures through multi-scale wavelet coefficients; DeepONet encodes the input function and query location through branch networks and backbone networks, respectively; and Transformer-like structures model long-range dependencies through attention mechanisms. These methods have demonstrated good generalization capabilities in partial differential equation solving, complex dynamical system simulation, and function regression tasks.
[0004] However, existing neural operator techniques still have several shortcomings when directly used for modeling neuronal membrane potentials: First, the action potential peak in membrane potentials has characteristics such as narrow pulse, high amplitude, and strong temporal constraints, and ordinary mean square error or relative error may overemphasize the overall smooth trend while ignoring the peak position; Second, forward simulation and backward inversion are often designed as different processes, making it difficult to reuse them under the same data and model interface; Third, relying solely on waveform error cannot fully reflect the significance of neurophysiology, and it is necessary to combine peak time, firing frequency, first pulse time, firing interval, and other characteristics for evaluation; Fourth, the lack of a unified and pluggable experimental framework between different models and loss functions limits the systematic comparison and engineering application of neural operators in neuron simulation tasks.
[0005] Therefore, there is a need for a neural operator simulation and inverse problem method for neural cell membrane potential timing data that can uniformly process multiple types of neuron data, various stimulus forms, and positive and inverse problem tasks, and explicitly focus on membrane potential waveforms and their pulse-related electrophysiological characteristics during training and evaluation. Summary of the Invention
[0006] The purpose of this invention is to provide a method for simulating and inversely solving neural cell membrane potentials based on neural operators, in order to solve the problems mentioned above.
[0007] The technical solution adopted in this invention is as follows: a method for simulating and inversely solving neural cell membrane potentials based on neural operators, comprising the following steps:
[0008] S1: Construct a neuronal time series dataset. Each sample contains external input current, membrane potential response, and time grid. The data registration and loading module reads the fields and establishes a mapping between names and file paths.
[0009] S2: The forward / inverse problem switching module automatically selects the task based on the dataset name prefix (inverse_): in the forward case, the external current is the input and the membrane potential is the target; in the inverse case, the two are interchanged. The subsequent process uses the same set of model, loss, training and evaluation interfaces.
[0010] S3: The input sequence and the time grid are concatenated at each sampling point to form a point-state input, which forms a joint representation of the batch samples and serves as the unified input of the neural operator model.
[0011] S4: The model factory dynamically loads neural operator models according to the configuration. The neural operator models include Fourier neural operators, wavelet neural operators, DeepONet, and Fourier Transformer. All models provide a unified forward interface to receive concatenated input and output the predicted target trajectory.
[0012] S5: The training module performs batch forward propagation, uses relative L2 loss to calculate the deviation between the prediction and the real target, and uses an optimizer and a platform-type learning rate scheduler based on validation loss to update parameters; after each round of validation, the optimal and latest checkpoints are saved, and early stopping to terminate training is supported, while training loss, validation loss and learning rate are recorded.
[0013] S6: The evaluation module calculates the waveform relative L2 error and extracts the peak time, average discharge frequency, discharge interval coefficient of variation, first pulse time and discharge interval sequence from the predicted and actual membrane potentials. It then compares each item to obtain the pulse time accuracy, frequency error, coefficient of variation error, first pulse time error and interval accuracy.
[0014] S7: The visualization module outputs a comparison chart of the predicted trajectory, the actual trajectory, and the input current; the checkpoint module supports saving and loading the optimal model and the latest model, enabling breakpoint recovery training and engineering deployment.
[0015] In a preferred embodiment, in step S6, the waveform error is relative. L2 error:
[0016]
[0017] Electrophysiological features were extracted from the membrane potential trajectory, including peak time, average discharge frequency, discharge interval coefficient of variation, first pulse time, and discharge interval sequence. By comparing these features between the predicted and actual trajectories, the accuracy of pulse time, average frequency error, discharge interval coefficient of variation error, first pulse time error, and discharge interval accuracy were obtained. Samples without valid discharge events were averaged based on the valid data to avoid interfering with the evaluation results.
[0018] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0019] 1. In this invention, the mapping from external input current to membrane potential response is directly modeled as a function space operator. Through multiple neural operator structures, global trends and local spikes are captured simultaneously in the frequency and time domains. Once trained, it can quickly perform continuous predictions under new stimulus conditions and exhibits good adaptability to unseen stimulus distributions and time grids. Furthermore, this method, through a unified data interface and task prefix switching mechanism, allows forward simulation and input current inversion to share the same model library and training process. This fundamentally solves the problem of separation between forward and inverse problems in traditional solutions, improving the model's reusability in multi-task scenarios and reducing the repetitive development costs in electrophysiological experimental interpretation and neural modulation design.
[0020] 2. In this invention, a joint evaluation mechanism of electrophysiological characteristics is used to simultaneously extract indicators with clear neuroscientific significance, such as peak time, discharge frequency, discharge interval variation coefficient, and first pulse time, from the predicted trajectory and the actual trajectory. This ensures that model optimization not only stays at the level of numerical waveform approximation but also maintains consistency with the intrinsic laws of physiological signals. The entire method is equipped with a complete configurable model factory, adaptive learning rate scheduling, automatic saving of optimal checkpoints, and early termination mechanisms, which improves the reproducibility of experiments and the flexibility of deployment across different neuronal models, and lowers the technical threshold for the widespread application of intelligent simulation tools in the field of computational neuroscience. Attached Figure Description
[0021] Figure 1 This is the overall flowchart of the present invention;
[0022] Figure 2 This is a schematic diagram of the overall system structure in this invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0024] Example:
[0025] Reference Figure 1-2 ,
[0026] Example 1: Forward simulation of membrane potential based on Hodgkin-HuXley step stimulation data:
[0027] The data file in this embodiment contains samples generated by the Hodgkin-Huxley neuron model under step external current stimulation. Each sample includes an external current sequence. The membrane potential sequence V(t) and time grid t specifically include:
[0028] ① Data loading and partitioning: After reading the data, the data loading module will... V(t) is used as the model input and as the training target. The training and test sets are split using random indices.
[0029] ② Input Construction: For each sample, the model input consists of external current and time coordinates:
[0030]
[0031] ③ Model Selection and Structure: The wavelet neural operator WNO was chosen as the model. The model first uses linear layers to upscale the two-dimensional input to hidden channels, then stacks multiple wavelet operator blocks. Each wavelet operator block performs a one-dimensional discrete wavelet transform on the hidden representation, multiplying the low-frequency and high-frequency coefficients by learnable weights, then reconstructs the representation through inverse wavelet transform and adds it to a pointwise convolutional branch. Finally, the projection network outputs the predicted membrane potential.
[0032]
[0033] ④Loss function and optimization: Relative loss function is used during training. loss:
[0034]
[0035] The optimizer can use AdamW, and the learning rate scheduler automatically reduces the learning rate based on the validation loss. The optimal model is saved when the validation loss improves, and the latest model is saved at the end of each training cycle.
[0036] ⑤ Output Results: After training, the relative output is calculated using the test set. The error was calculated, and a comparison graph of the predicted membrane potential, the actual membrane potential, and the input current was plotted.
[0037] Example 2:
[0038] Input current inversion based on membrane potential trajectory: The task of this embodiment is to invert the external input current based on the membrane potential trajectory, specifically including:
[0039] ① Data and Task Identifiers: The data still contains The dataset has three fields: V(t), V(t), and time, but the dataset name uses the inverse problem prefix. For example, based on the forward task hh_step, the inverse problem task is named inverse_hh_step.
[0040] ② Input / Output Switching: After detecting the inverse problem prefix, the positive / negative problem switching module sets the input field to V(t) and the target field to... The main training process remains unchanged; the model still receives input sequences and time grids.
[0041]
[0042] ③ Advantages and Scenarios: The advantage of this implementation is that the forward and inverse problems can share the same model library, loss function library, training module, and evaluation module. For scenarios involving electrical stimulation design and interpretation of experimental data, the trained model can be used to quickly estimate the input current timing required to generate a specific membrane potential response.
[0043] Example 3: Evaluation of Electrophysiological Characteristics
[0044] After the model training is completed, the evaluation module extracts electrophysiological features from the predicted membrane potential and the actual membrane potential.
[0045] ① Trajectory object construction: For each membrane potential trajectory, construct a trajectory object containing a time array, a voltage array, and the stimulation start time and stimulation end time.
[0046] ② Extracted electrophysiological features: The following features were extracted: peak time, average discharge frequency, discharge interval variation coefficient, first pulse time, and discharge interval sequence.
[0047] ③ Evaluation index calculation: For peak time and discharge interval sequence, the accuracy of matching within the preset time tolerance can be calculated; for average frequency, first pulse time and discharge interval variation coefficient, the relative error can be calculated.
[0048] ④ Handling invalid samples: If some samples do not have valid discharge events, they are averaged according to the number of valid tags to avoid invalid samples interfering with the evaluation results.
[0049] ⑤ Evaluation significance: This evaluation method ensures that the model performance is determined not only by numerical waveform errors, but also by the consistency of firing patterns, which is of interest in neuroscience.
[0050] From the above, we can conclude that:
[0051] In this invention, the mapping from external input current to membrane potential response is directly modeled as a function space operator. Through various neural operator structures, global trends and local spikes are captured simultaneously in the frequency and time domains. Once trained, it can quickly perform continuous predictions under new stimulus conditions and exhibits good adaptability to unseen stimulus distributions and time grids. Furthermore, this method, through a unified data interface and task prefix switching mechanism, allows forward simulation and input current inversion to share the same model library and training process. This fundamentally solves the problem of separation between forward and inverse problems in traditional solutions, improving the model's reusability in multi-task scenarios and reducing the repetitive development costs in electrophysiological experimental interpretation and neural modulation design.
[0052] In this invention, a joint evaluation mechanism of electrophysiological characteristics is used to simultaneously extract indicators with clear neuroscientific significance, such as peak time, firing frequency, coefficient of variation of firing interval, and first pulse time, from both predicted and actual trajectories. This ensures that model optimization goes beyond numerical waveform approximation and aligns with the intrinsic laws of physiological signals. The entire method is equipped with a complete configurable model factory, adaptive learning rate scheduling, automatic saving of optimal checkpoints, and early termination mechanisms. This improves the reproducibility of experiments and the flexibility of deployment across different neuronal models, lowering the technical threshold for the widespread application of intelligent simulation tools in computational neuroscience.
[0053] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0054] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for simulating neural cell membrane potential based on neural operators, the method comprising the following steps: S1: Construct a neuronal time series dataset. Each sample contains external input current, membrane potential response, and time grid. The data registration and loading module reads the fields and establishes a mapping between names and file paths. S2: The forward / backward problem switching module automatically selects the task based on the dataset name prefix: in the forward case, the external current is the input and the membrane potential is the target; in the backward case, the two are interchanged. The subsequent process uses the same set of model, loss, training and evaluation interfaces. S3: The input sequence and the time grid are concatenated at each sampling point to form a point-state input, forming a joint representation of the batch samples, which serves as the unified input for the neural operator model; S4: The model factory dynamically loads neural operator models according to the configuration. The neural operator models include Fourier neural operators, wavelet neural operators, DeepONet, and Fourier Transformer. All models provide a unified forward interface to receive concatenated input and output the predicted target trajectory. S5: The training module performs batch forward propagation, uses relative L2 loss to calculate the deviation between the prediction and the real target, and uses an optimizer and a platform-type learning rate scheduler based on validation loss to update parameters; after each round of validation, the optimal and latest checkpoints are saved, and early stopping to terminate training is supported, while the training loss, validation loss and learning rate are recorded. S6: The evaluation module calculates the waveform relative L2 error and extracts the peak time, average discharge frequency, discharge interval coefficient of variation, first pulse time and discharge interval sequence from the predicted and actual membrane potentials. It then compares each item to obtain the pulse time accuracy, frequency error, coefficient of variation error, first pulse time error and interval accuracy. S7: The visualization module outputs a comparison chart of the predicted trajectory, the actual trajectory, and the input current; the checkpoint module supports saving and loading the optimal model and the latest model, enabling breakpoint recovery training and engineering deployment.
2. A method for simulating the inverse problem of neural cell membrane potential based on neural operators, comprising the following steps: S1, the data file always contains three fields: external input current sequence The data loading module maintains the mapping relationship between dataset names and file paths, and provides complete time-series data for each sample after reading the data. S2, the dataset name prefix "inverse_" serves as a task identifier, and the input function in the problem is... The objective function is y(t) = V(t); in the inverse problem, the input function is interchanged with the objective function, i.e., x(t) = V(t). After switching, both share the same training entry point, model interface, and evaluation process. S3, Input Sequence With time grid Combining at each sampling point In batch data, the input tensor shape is B×T, the time grid shape is B×T, and the combination yields a function representation of B×T×2, where B is the batch size and T is the number of time steps. S4: The Fourier neural operator stacks spectral convolutional residual blocks after dimensionality enhancement through a linear network. Each block undergoes a Fast Fourier Transform, retains a preset frequency domain mode, applies learnable weights, undergoes an inverse transform, and is then superimposed with pointwise convolutional branches. Finally, the output is generated by the projection network. The wavelet neural operator separates low-frequency and high-frequency coefficients through discrete wavelet transform, applies learnable transforms to each, reconstructs them through inverse wavelet transform, and superimposes them with pointwise convolutional branches. DeepONet encodes the input function through branch networks and the query time points through the backbone network, generating the output through inner product. The Fourier Transformer embeds the input and time coordinates into a context sequence. S5, the loss function used for training, relative to... Loss is defined as: in For the predicted trajectory, yy represents the actual target trajectory. express Norm; during training, the minimum and maximum values of the target values in the training set can be used to normalize the target trajectory; the optimizer uses AdamW; S6, The electrophysiological characteristics of the test indicators are extracted from the membrane potential trajectory, including peak time, average discharge frequency, discharge interval variation coefficient, first pulse time and discharge interval sequence; By comparing the above characteristics of the predicted and actual trajectories, the pulse timing accuracy, average frequency error, discharge interval variation coefficient error, first pulse timing error, and discharge interval accuracy are obtained. S7, the visualization module draws a comparison chart of the predicted membrane potential trajectory, the actual trajectory, and the external input current; the checkpoint module supports saving and loading the optimal model and the latest model.
