Establishment method of epilepsy diagnosis system based on time-varying brain network and evoked potential regulation

CN122096701APending Publication Date: 2026-05-29XUANWU HOSPITAL OF CAPITAL UNIV OF MEDICAL SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XUANWU HOSPITAL OF CAPITAL UNIV OF MEDICAL SCI
Filing Date
2026-01-26
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies struggle to capture the dynamic causal flow of neural activity, fail to accurately characterize the transient reorganization characteristics of brain regions in adolescent myoclonic epilepsy patients, and lack multimodal feature integration analysis, resulting in insufficient understanding of JME pathophysiology.

Method used

By applying single-pulse transcranial magnetic stimulation to the left dorsolateral prefrontal cortex of the subject in a resting state, and simultaneously collecting whole-brain electroencephalogram (EEG) signals, a baseline-corrected time-varying directed transfer function matrix was constructed, a time-varying brain network visualization atlas was generated, and inter-group statistical comparisons were performed. Diagnosis was then performed in conjunction with a machine learning classifier.

Benefits of technology

It enables the joint detection of local cortical excitability and dynamic causal connectivity of the whole brain, accurately characterizes abnormal cortical inhibitory function, identifies the flow of abnormal information, improves the objectivity and sensitivity of diagnosis, and provides quantitative basis for individualized diagnosis and treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122096701A_ABST
    Figure CN122096701A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of medical signal processing and neural electrophysiological diagnosis, and particularly relates to a method for establishing an epilepsy diagnosis system based on time-varying brain network and evoked potential regulation. The present application aims to solve the problems that the prior art is difficult to capture the dynamic causal flow of neural activity, cannot accurately depict the transient reorganization characteristics of brain regions of juvenile myoclonic epilepsy (JME) patients, and lacks multi-modal feature integration analysis. The present application comprises the following steps: collecting whole brain electroencephalogram signals; extracting TMS evoked potential waveform after preprocessing; constructing a time-varying adaptive directional transfer function matrix; screening a time-varying brain network visualization atlas; performing baseline correction and superimposed averaging on the evoked potential; identifying the differences in connection and potential between JME patients and healthy controls and different clinical subgroups; and finally integrating the whole process to establish a standardized automated analysis system and a structured database. Through the method, the joint quantification of cortical excitability and time-varying causal connection is realized, and the objectivity, sensitivity and mechanism analysis ability of epilepsy diagnosis are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical signal processing and neurophysiological diagnostic technology, specifically, it relates to a method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation. Background Technology

[0002] With the deepening of research on neuromodulation and brain networks, the exploration of the pathological mechanisms of epilepsy, especially juvenile myoclonic epilepsy (JME), is gradually shifting from a single brain region abnormality to a systemic perspective of dynamic connectivity disorder across the entire brain. As one of the most common idiopathic generalized epilepsy syndromes, JME's typical clinical triad and widespread spike-and-wave discharges dominated by the frontal lobe suggest that the disease is not an isolated cortical dysfunction, but more likely stems from temporal desynchronization and excitation-inhibition imbalance in specific neural circuits. In recent years, although multimodal neuroimaging and electrophysiological techniques have revealed structural and functional connectivity abnormalities among the frontal lobe, thalamus, and subcortical structures in JME patients, these methods are mostly based on static or task-oriented observations, making it difficult to capture millisecond-level neural activity dynamics and the flow of causal information, thus limiting our understanding of the real-time remodeling capabilities of the brain network during the interictal period of JME.

[0003] Transcranial magnetic stimulation combined with electroencephalography (TMS-EEG) offers a unique window for analyzing cortical excitability and effective connectivity between brain regions due to its non-invasiveness, high temporal resolution, and causal intervention characteristics. By stimulating specific target areas (such as the dorsolateral prefrontal cortex) with single-pulse TMS, time-locked evoked potentials (TEPs) can be induced, directly reflecting the local cortical response to perturbations. Simultaneously, the synchronously recorded whole-brain EEG signals can be used to construct stimulation-driven time-varying brain network models, revealing changes in the directionality and intensity of information transmission. Theoretically, this technology can overcome the limitations of traditional resting-state functional connectivity, which only describes correlations, and achieve dynamic characterization of abnormal neural pathways in patients with JME.

[0004] However, current TMS-EEG research in the field of JME is still in its early stages, and a standardized analytical paradigm for this disease has not yet been established. On the one hand, TEP analysis mostly focuses on the motor cortex, lacking a systematic comparison of the excitability characteristics of key cognitive regions such as the prefrontal cortex, and also failing to incorporate clinical subtypes (such as seizure status and medication use) for stratified assessment. On the other hand, brain network modeling generally employs static or low temporal resolution methods, which cannot accurately describe the transient reorganization characteristics of brain region interactions at the millisecond scale in JME patients, especially making it difficult to identify abnormal information outflow or inflow patterns between the frontal lobe and other brain regions. Furthermore, current research has failed to integrate the oscillatory characteristics of TEP with time-varying network topology, resulting in a lack of mechanistic explanation for the intrinsic connection between the two core hypotheses of JME: "high cortical excitability" and "network disconnection." Therefore, there is an urgent need for a method to construct an epilepsy diagnostic system that integrates time-varying brain network modeling and quantitative analysis of evoked potentials, in order to accurately locate the pathophysiological nodes of JME and support individualized diagnosis and treatment strategies.

[0005] Based on this, the present invention proposes a method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation, in order to solve the problems existing in the prior art. Summary of the Invention

[0006] In view of this, the main objective of the present invention is to provide a method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation, aiming to solve the problems of existing technologies that are difficult to capture the dynamic causal flow of neural activity, cannot accurately characterize the transient reorganization characteristics of brain regions in adolescent myoclonic epilepsy patients, and lack multimodal feature integration analysis.

[0007] The technical solution of this invention is implemented as follows:

[0008] The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation includes the following steps:

[0009] Step 1: Apply single-pulse transcranial magnetic stimulation to the left dorsolateral prefrontal lobe of the subject in a resting state, and simultaneously collect whole-brain electroencephalogram (EEG) signals to obtain time-locked raw EEG data;

[0010] Step 2: Preprocess the collected raw EEG data to output a cleaned event-related potential data sequence;

[0011] Step 3: Construct the time-varying directed transfer function matrix after baseline correction;

[0012] Step 4: Select the connection edge with the largest absolute value in the time-varying ADTF matrix after baseline correction at each time stamp, and draw a dynamic network diagram after verifying it in combination with spatial proximity and anatomical rationality, and generate a time-varying brain network visualization map.

[0013] Step 5: Extract TMS evoked potentials and perform baseline correction;

[0014] Step 6: Perform between-group statistical comparisons;

[0015] Step 7: Establish standardized analysis processes and databases.

[0016] In a preferred embodiment of the present invention, the process of acquiring the raw EEG data in step 1 includes:

[0017] In a resting state, a single-pulse transcranial magnetic stimulation was applied to the F3 position of the left dorsolateral prefrontal cortex of the subject, and whole-brain electroencephalogram (EEG) signals were collected simultaneously.

[0018] Perform stimulus intensity sampling;

[0019] Raw EEG data with time lock was acquired using a 21-electrode cap.

[0020] In a preferred embodiment of the present invention, step 2, the process of preprocessing the acquired raw EEG data, includes:

[0021] Set the filter bandwidth to 3-30Hz and extract the data segment from 1000 milliseconds before each stimulus point to 2000 milliseconds after the stimulus point;

[0022] Segments containing eye movement, electromyography artifacts, or baseline drift exceeding ±100 microvolts are manually removed, retaining clean data segments.

[0023] In a preferred embodiment of the present invention, the process of constructing the baseline-corrected time-varying directed transfer function matrix in step 3 includes:

[0024] For each retained data segment, the coefficients of its time-varying multivariate adaptive autoregressive model are calculated in the 3-30Hz frequency band. The model order is automatically determined by the Akaike Information Criterion in the range of 2 to 20.

[0025] Based on this model, the time-varying adaptive directional transfer function matrix for each timestamp is calculated to generate a high-dimensional connection dynamic graph;

[0026] The time-varying ADTF matrix of individuals was averaged across data segments during the period from 360 ms to 40 ms before stimulation. The average baseline ADTF matrix was then obtained by averaging the time-varying ADTF matrix of each time stamp during this period.

[0027] The time-varying ADTF matrix of the individual perturbation was obtained by averaging the time-varying ADTF matrix across data segments over a period of 80 to 2000 milliseconds after stimulation.

[0028] Subtracting the mean baseline matrix from the perturbation dynamic matrix yields the time-varying ADTF matrix after individual baseline correction.

[0029] In a preferred embodiment of the present invention, the time-varying multivariate adaptive autoregressive model uses the Kalman filter algorithm to estimate the model coefficients in real time, and the time-varying multivariate adaptive autoregressive model is as follows:

[0030] ;

[0031] Where X(t) is the 21-channel EEG signal vector at time t, and A k p(t) is the time-varying k-order autoregressive coefficient matrix, p(t) is the time-varying model order, and E(t) is the residual vector.

[0032] In a preferred embodiment of the present invention, the time-varying adaptive orientation transfer function from source channel j to target channel i at frequency f and time t is defined as follows:

[0033] ;

[0034] Here, H(f,t) is the transfer function matrix at frequency f and time t.

[0035] In a preferred embodiment of the present invention, the generation process of the time-varying brain network visualization atlas in step 4 includes:

[0036] For the individual baseline-corrected time-varying ADTF matrix, at each sampling timestamp from 80 milliseconds to 2000 milliseconds, significant connection edges with large positive values ​​or small negative values ​​are selected from the matrix, and the number of selected connections does not exceed 8% of the theoretical maximum number of connections;

[0037] Dynamic brain network diagrams are drawn based on connection strength and direction, with red indicating enhanced connections, green indicating weakened connections, and arrows indicating the direction of information flow;

[0038] The network graphs were overlaid and statistically analyzed according to the research groups to generate a time-varying brain network connectivity pattern diagram at the population level.

[0039] In a preferred embodiment of the present invention, step 5, which involves extracting TMS evoked potentials and performing baseline correction, includes:

[0040] For each data segment, the mean potential value from 2000 ms to 1000 ms before stimulation was calculated in the 3-30 Hz frequency band and used as the baseline potential.

[0041] The potential response from 0 ms to 500 ms after stimulation is calculated as the dynamic potential; the baseline potential is subtracted from the dynamic potential to obtain the time-varying TEP of a single data segment.

[0042] The time-varying TEPs of the data segment are superimposed and averaged to obtain the average TMS evoked potential waveform at the individual level.

[0043] In a preferred embodiment of the present invention, step 6, which involves performing statistical comparisons between groups, includes:

[0044] Independent samples t-tests and FOR corrections were performed on the baseline-corrected time-varying ADTF matrices of the JME patient group and the healthy control group to screen out matrix elements with P values ​​less than 0.01 and identify statistically significant effective connections.

[0045] Based on the sign of the difference between the two groups, time-varying brain network diagrams of JME patients with over- or under-connected networks relative to healthy controls were drawn.

[0046] Independent samples t-tests were performed on the two groups of TEP amplitudes to determine the time windows and electrode distributions with significant differences.

[0047] One-way ANOVA FDR correction was performed on the time-varying ADTF matrix among the three groups: the JME seizure group, the seizure-free medication group, and the seizure-free no-medication group. Differential connections with P values ​​less than 0.01 were also screened, and a comparison chart of connection strength among the three groups was plotted.

[0048] Analysis of variance was performed on the three groups of TEP amplitudes to extract the time and space parameters corresponding to the main effects and interaction effects that were statistically significant.

[0049] In a preferred embodiment of the present invention, the method further includes introducing a machine learning classifier, using the frontal region N100 amplitude, the rate of change of fronto-parietal connectivity strength, and time-varying global efficiency as input features, training a support vector machine model to distinguish JME patients from healthy controls, and using cross-validation accuracy as a system performance evaluation index.

[0050] Compared with existing technologies, this invention provides a method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation, which has the following beneficial effects:

[0051] 1. This method achieves joint detection of local cortical excitability and dynamic causal connectivity of the whole brain by applying single-pulse transcranial magnetic stimulation to the dorsolateral left prefrontal lobe in a resting state and simultaneously acquiring high-density electroencephalogram (EEG) signals.

[0052] 2. This method, through quantitative analysis of TMS evoked potentials, can accurately characterize the abnormal cortical inhibitory function in the frontal region and other related brain regions of adolescent myoclonic epilepsy patients, revealing the spatiotemporal distribution characteristics of their high reactivity.

[0053] 3. This method, by using a time-varying adaptive directional transfer function model, overcomes the limitation of traditional static functional connectivity which only describes correlations, and constructs a dynamic effective connectivity map with millisecond-level accuracy. It enables real-time tracking of the evolution of information flow direction and intensity, and can effectively identify the abnormal information output enhancement or feedback inhibition weakening phenomenon dominated by the frontal lobe in JME patients.

[0054] 4. This method eliminates interference from the individual's intrinsic connectivity background through a baseline correction strategy, highlighting the stimulus-induced net connectivity changes and significantly improving detection sensitivity.

[0055] 5. This method integrates the evoked potential characteristics with dynamic network topology parameters to establish a mechanistic correlation model of "local excitation-global disconnection", which not only deepens the understanding of JME pathophysiology, but also provides a quantitative basis for individualized diagnosis and treatment.

[0056] 6. By establishing longitudinal comparisons across different clinical subgroups, the study revealed the trajectory of the impact of disease activity and treatment intervention on brain network plasticity, which helps in assessing disease progression and the risk of discontinuing medication. The entire diagnostic system is built on standardized, automated, and reusable technical processes, possessing good clinical applicability and potential for widespread adoption. It addresses the core challenges in current epilepsy diagnosis, such as the lack of dynamic causal analysis methods, one-sided excitability assessment, and insufficient multimodal data fusion, significantly improving the objectivity, sensitivity, and mechanistic analysis capabilities of the diagnosis. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0058] Figure 1 This is a schematic diagram of the overall technical architecture of the method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation according to the present invention.

[0059] Figure 2 This is a flowchart illustrating the logical process of multi-group statistical comparison and difference connection identification in this invention.

[0060] Figure 3 This is a logical flowchart of the visualization of time-varying brain networks and the generation of time-varying effective connection dynamic graphs in this invention;

[0061] Figure 4 This is a flowchart illustrating the logical process of EEG signal preprocessing and data segment selection in this invention.

[0062] Figure 5 This is a time-varying EEG network connectivity enhancement diagram after TMS stimulation in healthy controls and adolescent myoclonic epilepsy patients in Example 1 of the present invention.

[0063] Figure 6This is a time-varying EEG network connectivity reduction diagram after TMS stimulation in healthy controls and adolescent myoclonic epilepsy patients in Example 1 of the present invention.

[0064] Figure 7 This is an information flow diagram showing statistically significant differences in the time-varying EEG network connectivity between adolescent myoclonic epilepsy patients and healthy controls after TMS stimulation, as described in Example 1 of the present invention.

[0065] Figure 8 Example 1 of the present invention: Mean TEP plots of 21 leads in a group of adolescents with myoclonic epilepsy and a healthy control group;

[0066] Figure 9 The image shows the average TEP curves in lead F3 of the adolescent myoclonic epilepsy patient group and the healthy control group in Example 1 of this invention.

[0067] Among them: Figure 5 In the text, HC represents healthy controls, JME represents juvenile myoclonic epilepsy, red indicates enhanced connections, and black arrows indicate the direction of information flow.

[0068] exist Figure 6 In the text, HC represents healthy controls, JME represents juvenile myoclonic epilepsy, green indicates weakened connections, and blue arrows indicate the direction of information flow.

[0069] exist Figure 7 In the diagram, red represents enhanced connections, green represents weakened connections, arrows indicate the direction of information flow, and P < 0.05;

[0070] exist Figure 8 In the diagram, one color represents one lead. Detailed Implementation

[0071] The principle and usage of the method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation will be further explained in detail below with reference to the accompanying drawings and embodiments of the present invention.

[0072] As per the instruction manual Figures 1-9 As shown, a method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential modulation is presented. This method is based on single-pulse transcranial magnetic stimulation combined with 21-channel EEG acquisition. Through data acquisition, refined preprocessing, baseline-corrected time-varying directed transfer function modeling, dynamic network visualization, evoked potential extraction, and multi-dimensional inter-group statistical comparisons, a standardized and automated clinical diagnostic and research analysis platform is formed. The specific establishment process includes the following steps:

[0073] Step 1: Collect electroencephalogram (EEG) data;

[0074] In a resting state, a single-pulse transcranial magnetic stimulation was applied to the left dorsolateral prefrontal lobe of the subject, and whole-brain electroencephalogram (EEG) signals were collected simultaneously to obtain time-locked raw EEG data.

[0075] Step 1.1: Thirty patients meeting the diagnostic criteria for juvenile myoclonic epilepsy (JME) were enrolled in the JME patient group and further divided into a JME seizure group, a JME seizure-free medication group, and a JME seizure-free no-medication group based on their seizure history and medication status over the past two years. Thirty healthy controls matched for gender, age, and education were recruited and included in the healthy control group. All participants signed informed consent forms and had no contraindications to transcranial magnetic stimulation. Specifically, this included:

[0076] During the data collection process, the sample (case) selection methods and criteria are as follows:

[0077] Patients with jerkylosing spondylitis (JME) who visited the Department of Neurology and Department of Pediatrics at XX Hospital between December 2012 and December 2022 were included in this study. Patients meeting the inclusion and exclusion criteria for JME were enrolled in the JME patient group, with a planned enrollment of 30 patients. Based on the presence or absence of seizures in the past two years and whether or not they were taking antiepileptic drugs, JME patients were divided into a JME seizure group, a JME without seizures and medication group, and a JME without seizures and no medication group. Thirty healthy individuals matched for gender, age, and education level were recruited and included in the healthy control group. All participants signed informed consent forms before enrollment.

[0078] Inclusion criteria for the JME patient group: meeting the diagnostic criteria for juvenile myoclonic epilepsy; age 8–45 years; right-handed; not taking antipsychotic medication before enrollment; and normal cranial MRI examination.

[0079] Exclusion criteria for the JME patient group: ≥1 episode of status epilepticus within 6 months prior to enrollment; severe physical diseases such as heart, liver, and kidney; other organic neurological diseases; other mental disorders such as substance abuse or drug dependence; implantation of pacemakers, intracardiac wires, vagus nerve stimulators, cochlear implants, medical pumps, or other metal implants or foreign bodies; pregnancy; significant developmental delays compared to peers before the onset of the disease; history of craniocerebral surgery; scalp abnormalities such as eczema, skin lesions, or skull defects.

[0080] Inclusion criteria for the healthy control group: age 8-45 years; right-handed; no history of febrile seizures or epileptic seizures in the individual or their immediate or extended family members; no use of any antiepileptic or antipsychotic drugs before enrollment; and no positive findings on neurological examination.

[0081] Exclusion criteria for the healthy control group: those with severe physical diseases such as heart, liver, and kidney; those with organic brain diseases; those with other mental disorders such as psychoactive substances or drug dependence; those with implanted pacemakers, cardiac wires, vagus nerve stimulators, cochlear implants, medical pumps, or other metal implants or foreign bodies; pregnant women; those with significantly delayed neurodevelopment compared to their peers; those with a history of craniocerebral surgery; and those with abnormal conditions such as eczema, skin lesions, or skull defects on the scalp.

[0082] Step 1.2: Record general information;

[0083] Record general information such as the subject's gender, age, education level, whether they are left- or right-handed, reproductive history, family history, etc., as well as disease information such as age of onset, symptoms, frequency of attacks, drug treatment, and auxiliary examinations.

[0084] Step 1.3: Perform transcranial magnetic stimulation;

[0085] Step 1.2.1: Determination of resting motion threshold;

[0086] A Magstim RAPID2 transcranial magnetic stimulation (TMS) device, equipped with an 87mm outer diameter butterfly coil and a maximum stimulation output intensity of 2.0 Tesla, was used. Subjects were instructed to sit comfortably and relax completely. During stimulation, the coil plane was tangent to and parallel to the scalp, with the coil handle facing the occipital side. The coil was at a 45° angle to the subject's sagittal plane. Single-pulse TMS stimulation was performed on the left side of each subject's scalp, approximately 2cm anterior and 2cm lateral to the left of the Cz point on the international EEG 10-20 system. Initially, the optimal stimulation site for eliciting the motor evoked potential (MEP) of the abductor pollicis brevis muscle was identified using 100% of the maximum output intensity and marked on the scalp. TMS was then performed at this optimal site, starting at 100% of the maximum output intensity and gradually decreasing the intensity in 5% increments. Ten consecutive magnetic stimulations were given at each intensity until no MEP could be elicited after 10 stimulations. Then, the stimulation intensity was gradually increased at 1% intervals until the minimum stimulation intensity that could induce ≥50μv MEP in 6 out of 10 stimulations was found. This minimum stimulation intensity is the resting motor threshold (rMT) of the left hemisphere of the subject and is expressed as a percentage of the maximum output of the magnetic stimulator.

[0087] Step 1.3.2: Stimulation site and stimulation coil;

[0088] Position the device at the left middle frontal gyrus (F3), aligning the point of strongest magnetic stimulation output, located on the midline of the butterfly coil, with the target point on the subject's scalp. The coil plane should be tangent to and parallel to the scalp, and the coil handle should face the occipital side. The stimulation coil is a Magstim air-cooled coil.

[0089] Step 1.3.3: Stimulation parameters;

[0090] Single pulse, 4.0s interval, 150 pulses; stimulation intensity: randomized grouping according to 110% of the resting motion threshold (rMT).

[0091] Step 1.4: Acquire transcranial magnetic stimulation-synchronized electroencephalogram (EEG);

[0092] All subjects were seated comfortably and wore 21-lead integrated powdered silver chloride EEG electrode caps (manufactured by Wuhan Greentech Co., Ltd.). The electrode arrangement followed the international 10-20 system, with a total of 21 electrodes. The ground electrode was GRN, located at the midpoint of the line connecting Fpz and Fz, and the reference electrode was REF, located at the midpoint of the line connecting Cz and Pz. A conversion line connected to a 32-channel magnetic stimulation-compatible EEG amplifier (manufactured by Beijing Yunshen Technology Co., Ltd., sampling rate 1024Hz) to acquire EEG signals. Subjects were required to remain awake and relaxed throughout the experiment. Resting-state EEG signals were first acquired for 10 minutes, including 5 minutes with eyes open and 5 minutes with eyes closed. Then, perturbed EEG signals were acquired while the subjects remained awake and with eyes closed, wearing headphones playing white noise. EEG data was acquired simultaneously with stimulation, and the magnetic stimulation triggered a tagging device to automatically mark and accurately record the timestamp of each stimulus.

[0093] Step 2: Preprocess the collected raw EEG data to output a cleaned event-related potential data sequence;

[0094] Raw EEG data were imported into a digital filter with a bandwidth of 3 Hz to 30 Hz and a retention sampling rate of 1024 Hz. Timestamps of all stimulation events were extracted from the labeled leads. Continuous EEG segments from 1000 ms before to 2000 ms after each stimulation point were extracted as independent data segments. All data segments were manually reviewed to remove segments containing obvious eye movement, electromyography artifacts, or severe baseline drift. Finally, 120 to 140 clean data segments were retained for each subject for subsequent analysis.

[0095] Step 3: Construct the time-varying directed transfer function matrix after baseline correction;

[0096] Step 3.1: For each retained data segment, calculate its time-varying multivariate adaptive autoregressive model coefficients in the 3-30Hz frequency band. The model order is automatically determined by the Akaike Information Criterion in the range of 2 to 20.

[0097] Step 3.2: Calculate the time-varying adaptive directional transfer function matrix for each timestamp based on the model to generate a high-dimensional connectivity dynamic graph;

[0098] Step 3.3: Average the 40 time-varying ADTF matrices from the time period from 360 ms to 40 ms before stimulation across data segments to obtain the individual baseline time-varying ADTF matrix, and further average the timestamps of this time period to obtain the average baseline ADTF matrix.

[0099] Step 3.4: Average the 245 time-varying ADTF matrices over the period from 80 ms to 2000 ms after stimulation to obtain the individual perturbation time-varying ADTF matrix;

[0100] Step 3.5: Subtract the mean baseline matrix from the perturbation dynamic matrix to obtain the individual baseline-corrected time-varying ADTF matrix, which reflects the changes in effective connectivity induced by the stimulus.

[0101] Step 4: Generate a time-varying brain network visualization map;

[0102] After baseline correction, the connection edge with the largest absolute value in the time-varying ADTF matrix is ​​selected at each time stamp. After verification by spatial proximity and anatomical rationality, a dynamic network diagram is drawn to generate a time-varying brain network visualization map.

[0103] Step 4.1: For the time-varying ADTF matrix after individual baseline correction, at each sampling timestamp from 80 ms to 2000 ms, filter out significant connection edges in the matrix with larger positive values ​​or smaller negative values. The number of selected connections shall not exceed 8% of the theoretical maximum number of connections.

[0104] Step 4.2: Draw a dynamic brain network diagram based on connection strength and direction. Red indicates enhanced connections, green indicates weakened connections, and arrows indicate the direction of information flow.

[0105] Step 4.3: Overlay and statistically analyze the network graphs according to the research groups to generate a time-varying brain network connectivity pattern diagram at the population level.

[0106] Step 5: Extract TMS evoked potentials and perform baseline correction;

[0107] Step 5.1: For each data segment, calculate the average potential from 2000 ms to 1000 ms before stimulation in the 3-30 Hz frequency band, and use it as the baseline potential;

[0108] Step 5.2: Calculate the potential response from 0 ms to 500 ms after stimulation as the dynamic potential; subtract the baseline potential from the dynamic potential to obtain the time-varying TEP of a single data segment;

[0109] Step 5.3: Overlay and average the time-varying TEPs of 120 to 140 data segments to obtain the average TMS evoked potential waveform at the individual level.

[0110] Step 6: Perform between-group statistical comparisons;

[0111] Step 6.1: Perform independent samples t-tests and FOR corrections on the baseline-corrected time-varying ADTF matrices of the JME patient group and the healthy control group, screen out matrix elements with p-values ​​less than 0.01, and identify statistically significant effective connections.

[0112] Step 6.2: Draw a time-varying brain network diagram of JME patients relative to healthy controls, based on the positive or negative values ​​of the two groups of differences;

[0113] Step 6.3: Perform an independent samples t-test on the two groups of TEP amplitudes to determine the time windows and electrode distributions with significant differences;

[0114] Step 6.4: Perform univariate ANOVA FDR correction on the time-varying ADTF matrix among the three groups: the JME seizure group, the non-seizure medication group, and the non-seizure no-medication group. Similarly, screen for differential connections with a p-value less than 0.01 and draw a comparison chart of connection strength among the three groups.

[0115] Step 6.5: Perform ANOVA on the three groups of TEP amplitudes to extract the time and space parameters corresponding to the main effects and interaction effects that are statistically significant.

[0116] Step 7: Establish standardized analysis processes and databases;

[0117] By integrating all the aforementioned steps 1-6, a reusable automated analysis script is developed, with a built-in default parameter set, quality control module, and visualization engine, supporting batch processing and compatibility with multi-center data formats; a structured database containing no fewer than 60 samples is established, covering clinical phenotypes, stimulation parameters, preprocessing logs, ADTF matrix, TEP waveforms, and statistical results, enabling long-term data storage, secure access, and research sharing.

[0118] The automated analysis script described in step 7 is developed based on the Python programming language. Its core dependency libraries include MNE-Python, NumPy, SciPy, and Pandas. The script is modularly designed into five subsystems: data loading, parameter parsing, process scheduling, quality control feedback, and report generation. It supports both command-line and graphical interface modes.

[0119] Furthermore, the method described in this invention also includes applying a source-tracing algorithm to reconstruct the source space of the acquired EEG signals, back-projecting the potentials recorded by scalp electrodes to grid points in the cerebral cortex, locating the core brain regions that generate abnormal TEP responses and network connections, improving spatial resolution, and compensating for the limitations of 21-channel low-density sampling. Simultaneously, it also includes introducing a machine learning classifier, using frontal N100 amplitude, frontoparietal connection strength change rate, and time-varying global efficiency as input features to train a support vector machine model to distinguish JME patients from healthy controls, with cross-validation accuracy serving as one of the system performance evaluation metrics.

[0120] In a preferred embodiment, the filter in step 2 is a zero-phase digital filter to prevent signal phase distortion, the data segment is strictly aligned with the stimulus marker, the baseline drift discrimination criterion is a slow voltage shift exceeding ±100 microvolts, and artifact removal is performed independently by two trained technicians, with a third expert making the decision in case of disagreement.

[0121] The preprocessing procedure is as follows: Figure 4 As shown, its goal is to maximize the signal-to-noise ratio while preserving the integrity of neurophysiological signals.

[0122] First, a zero-phase Butterworth bandpass filter with cutoff frequencies of 3Hz (high-pass) and 30Hz (low-pass) is applied to effectively remove DC drift, power frequency interference, and high-frequency electromyographic noise, while avoiding the phase delay distortion of event-related potentials introduced by the filter.

[0123] Secondly, timestamps of 150 stimulus events were precisely extracted from a dedicated labeling channel as anchor points for data segmentation. Each data segment was 3000 milliseconds long (-1000 milliseconds to +2000 milliseconds). This window was designed to fully capture TMS evoked potentials (typically in the range of 0-500 milliseconds) and subsequent slow-wave components, and to provide sufficient preceding data for baseline correction.

[0124] During the manual review phase, technicians browsed all 21 channels of signal segment by segment using a dedicated software interface, eliminating substandard segments based on the following criteria:

[0125] 1) Eye movement artifacts manifest as large, slow biphasic deflections in the frontal channels (Fp1, Fp2, F7, F8);

[0126] 2) Electromyographic artifacts in the temporal region or all leads present as high-frequency, random noise;

[0127] 3) Baseline drift refers to a monotonically increasing or decreasing trend of more than ±100 microvolts in the signal within a 1000-millisecond window. This dual review mechanism ensures the consistency and reliability of data quality. Ultimately, 120 to 140 clean segments are retained, which meets the sample size required for statistical analysis while avoiding loss of individual representativeness due to excessive rejection.

[0128] In a preferred embodiment, the time-varying multivariate adaptive autoregressive model described in step 3 uses the Kalman filter algorithm to estimate the model coefficients in real time, the covariance matrix is ​​dynamically updated using the sliding window method, the frequency domain transformation uses the fast Fourier transform, and the standardized ADTF value is calculated using a formula, where the numerator is the information flow intensity from the source node to the target node, and the denominator is the total information content from all source nodes to the target node, thereby eliminating amplitude bias. Furthermore, the optimization process for the model order in step 3 traverses the integer range from 2 to 20, calculates the Akaike Information Criterion value corresponding to each order, and selects the order that minimizes the AIC value as the optimal model complexity to prevent overfitting or underfitting and ensure the stability and physiological interpretability of the ADTF estimation.

[0129] Specifically, the time-varying multivariate adaptive autoregressive (tvMVAR) model is as follows:

[0130] ;

[0131] Where X(t) is the 21-channel EEG signal vector at time t, and A k p(t) is the time-varying k-order autoregressive coefficient matrix, p(t) is the time-varying model order, and E(t) is the residual vector. Model coefficients A k (t) is recursively estimated using Kalman filtering, and its state transition covariance matrix is ​​dynamically updated through a sliding window with a width of 200 milliseconds to adapt to the non-stationary characteristics of the signal. The model order p is globally optimized in the range of 2-20 using the Akaike Information Criterion (AIC): AIC(p) = 2p − 2ln(L), where L is the model likelihood function, and the value of p that minimizes AIC is selected. Subsequently, the time-domain model is transformed to the frequency domain using Fast Fourier Transform (FFT) to obtain the transfer function matrix H(f,t).

[0132] Specifically, the time-varying adaptive directional transfer function (tvADTF) from source channel j to target channel i at frequency f and time t is defined as follows:

[0133] ;

[0134] This normalization eliminates the influence of the target channel's own power on connectivity strength estimation, making it more comparable. Calculations were performed in the 3-30 Hz frequency band, covering the main neural oscillation bands such as θ, α, and β. To distinguish between intrinsic connectivity background and stimulus-evoked responses, the system performed rigorous baseline correction.

[0135] 1) Select 360 to -40 milliseconds before stimulation (320 milliseconds in total) as the baseline period. This window is far from the auditory / tactile interference of the stimulus and is long enough to be stable for estimation.

[0136] 2) Average the tvADTF matrix of the 40 timestamps in this window across data segments to obtain the individual baseline time-varying ADTF matrix;

[0137] 3) Further average these 40 timestamps to obtain a single average baseline ADTF matrix. ;

[0138] 4) Perform the same operation on 245 timestamps from 80 to 2000 milliseconds after stimulation (a total of 1920 milliseconds) to obtain the individual perturbation time-varying ADTF matrix. ;

[0139] 5) Finally, the baseline-corrected time-varying ADTF matrix is: This matrix directly reflects the net change in effective connectivity caused by TMS perturbations and is the core data for subsequent analysis.

[0140] In a preferred embodiment, the selection of significant connections in step 4 is not only based on numerical value, but also requires manual verification in conjunction with spatial proximity and anatomical rationality to eliminate spurious long-distance connections caused by volumetric conduction effects, ensuring that the drawn network diagram truly reflects the functional information transmission paths. This visualization process is as follows: Figure 3 As shown, its purpose is to transform high-dimensional matrix data into an intuitive and interpretable graph. The theoretical maximum number of connections is 2¹ × (2¹ - 1) = 420 (directed). The 8% threshold means that a maximum of 33 connections are displayed per timestamp, effectively avoiding overcrowding of the network graph.

[0141] The screening strategy is as follows:

[0142] 1) For each timestamp's ΔADTF matrix, find the N largest positive connections and the M smallest negative connections (i.e., the largest absolute values) such that N+M ≤ 33;

[0143] 2) After initial screening, neuroscientists reviewed the data based on anatomical knowledge: for example, long-distance connections crossing the midline (such as from F3 to O2) without clear anatomical pathway support were considered volumetric conduction artifacts and eliminated; strong connections between adjacent electrodes were preserved. Visualization employed a force-guided layout algorithm, arranging the 21 electrode nodes on a two-dimensional plane to simulate their relative positions on the scalp. Connection edges were represented by colored arrows: red arrows indicated ΔADTF > 0, meaning enhanced connectivity after stimulation; green arrows indicated ΔADTF < 0, meaning weakened connectivity. For population analysis, network graphs of all subjects within the same group were overlaid, with the frequency of connections encoded by transparency, ultimately generating a population-level time-varying brain network connectivity pattern diagram to clearly show the patterns of over- or under-connection in JME patients relative to healthy controls.

[0144] In a preferred embodiment, the calculation window for the baseline potential in step 5 is far from the period of stimulation interference to avoid the influence of residual effects. The dynamic potential superposition and averaging process performs a hard threshold truncation of ±150 microvolts on abnormal peaks to prevent individual high-amplitude artifacts from contaminating the overall average waveform. The key lies in accurate baseline correction and robust averaging. The selection of the baseline window (-2000 to -1000 ms) is crucial, as it completely avoids early sensory evoked potentials (typically within 100 ms) that may be caused by stimuli (sound / touch), ensuring that the baseline potential purely reflects the resting state. For each data segment, the mean of all sampling points within this 1000 ms window is first calculated as the baseline offset for that segment. Then, the dynamic potentials from 0 to 500 ms after stimulation are subtracted from this baseline value point by point to obtain the corrected single TEP. Before superposition and averaging, the system performs a hard threshold truncation of ±150 microvolts on all single TEPs: any sampling point outside this range is clamped to ±150 microvolts. This effectively suppresses extreme values ​​caused by occasional electromyographic bursts and ensures the stability of the average waveform. Finally, the arithmetic mean of 120 to 140 corrected single TEPs was calculated to generate a smooth, high signal-to-noise ratio individual-averaged TMS evoked potential waveform. This waveform typically contains characteristic components such as N45, P60, N100, and P180, and its latency and amplitude are the core indicators for quantifying cortical excitability.

[0145] In a preferred embodiment, the independent samples t-test and analysis of variance in step 6 are both performed in the MATLAB Statistical Toolbox. Multiple comparison correction uses the false discovery rate control method, and the significance level is uniformly set to P < 0.01. The effect size is expressed as Cohen's d or η², ensuring the robustness and clinical interpretability of the statistical conclusions. The statistical analysis process specifically includes:

[0146] First, a binary comparison was performed between the JME patient group (n=30) and the healthy control group (n=30). For the time-varying ADTF matrix, a four-dimensional dataset (time × frequency × source × target), the system performed independent samples t-tests at each data point. To control for false positive inflation due to multiple comparisons, the Benjamini-Hochberg false discovery rate (FDR) was used for correction, and connections with a corrected P < 0.01 were considered significant. Positive t-values ​​(JME > control) indicated over-connection in JME patients, and negative t-values ​​indicated under-connection. These differentially connected connections were mapped back to... Figure 3 A visualization framework was used to generate a population comparison map. For TEP, comparisons were performed on 21 electrodes within a 0-500 ms time window, using FDR correction, to identify spatiotemporal clusters (such as the N100 component in the frontal region) with significantly increased TEP amplitude in JME patients.

[0147] Secondly, multivariate comparisons were conducted within the JME group, consisting of three subgroups (seizure group, no-seizure drug-treated group, and no-seizure drug-free group, n=10 per subgroup). One-way ANOVA was performed on the time-varying ADTF matrix. Connections with p < 0.01 after FDR correction were included in post-hoc tests (e.g., Tukey HSD) to determine which specific groups showed differences. A three-way ANOVA (group × time × electrode) was also performed on the TEP data to extract main effects and interaction effects. The calculation of effect size (Cohen's d for t-test, η² for ANOVA) provided an assessment of the clinical significance of the differences; for example, d > 0.8 or η² > 0.14 was considered a large effect. Such analyses can reveal, for example, that the frontothalamic connectivity enhancement in the seizure group was significantly higher than that in the no-seizure drug-free group, and that the latter had recovered to near-control levels, providing a quantitative basis for discontinuation decisions.

[0148] Example 1:

[0149] To verify the effectiveness of the method described in this invention, this embodiment is used to verify the method.

[0150] 1. Preliminary experimental results;

[0151] A preliminary study of TMS stimulation and simultaneous EEG acquisition in the left DLPFC of 6 subjects revealed that 3 JME patients (1 male and 2 females) had excessive connectivity between the posterior head and frontal network compared to healthy subjects (1 male and 2 females). Figure 5 , Figure 6 ), and there was a statistically significant difference (P<0.05) ( Figure 7 Furthermore, no obvious adverse reactions were observed during the collection process.

[0152] exist Figure 5 and Figure 6 In the diagram, red indicates enhanced connections, green indicates weakened connections, arrows indicate the direction of information flow, and P < 0.05.

[0153] 2. The average result after TEP aggregation of the two groups of subjects is as follows: Figure 8 and Figure 9 As shown, the oscillation in lead F3 at the stimulation site was more pronounced. Due to the small number of cases enrolled, there were no statistically significant differences in the amplitudes of the various TEP components studied in the preliminary study.

[0154] Based on the above data, it is evident that minimizing external interference during EEG acquisition has a significant impact on the analysis of brain networks and TEP. To address visual interference, subjects were recorded with their eyes closed during TMS to reduce eye movement artifacts and visual evoked potentials. To address auditory interference, the environment was kept quiet during TMS, and subjects wore headphones playing white noise at a volume level where they could not hear the "clicking" sound from the stimulator.

[0155] Preliminary experimental results show that the epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation described in this invention achieves joint quantification of cortical excitability and time-varying causal connections, significantly improving the objectivity, sensitivity, and mechanism analysis capabilities of epilepsy diagnosis.

[0156] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation, characterized in that, Including the following steps: Step 1: Apply single-pulse transcranial magnetic stimulation to the left dorsolateral prefrontal lobe of the subject in a resting state, and simultaneously collect whole-brain electroencephalogram (EEG) signals to obtain time-locked raw EEG data; Step 2: Preprocess the collected raw EEG data to output a cleaned event-related potential data sequence; Step 3: Construct the time-varying directed transfer function matrix after baseline correction; Step 4: Select the connection edge with the largest absolute value in the time-varying ADTF matrix after baseline correction at each time stamp, and draw a dynamic network diagram after verifying it in combination with spatial proximity and anatomical rationality, and generate a time-varying brain network visualization map. Step 5: Extract TMS evoked potentials and perform baseline correction; Step 6: Perform between-group statistical comparisons; Step 7: Establish standardized analysis processes and databases.

2. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, The process of acquiring raw EEG data in step 1 includes: In a resting state, a single-pulse transcranial magnetic stimulation was applied to the F3 position of the left dorsolateral prefrontal cortex of the subject, and whole-brain electroencephalogram (EEG) signals were collected simultaneously. Perform stimulus intensity sampling; Raw EEG data with time lock was acquired using a 21-electrode cap.

3. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, Step 2, the preprocessing of the acquired raw EEG data, includes: Set the filter bandwidth to 3-30Hz and extract the data segment from 1000 milliseconds before each stimulus point to 2000 milliseconds after the stimulus point; Segments containing eye movement, electromyography artifacts, or baseline drift exceeding ±100 microvolts are manually removed, retaining clean data segments.

4. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, Step 3 involves constructing the baseline-corrected time-varying directed transfer function matrix, which includes: For each retained data segment, the coefficients of its time-varying multivariate adaptive autoregressive model are calculated in the 3-30Hz frequency band. The model order is automatically determined by the Akaike Information Criterion in the range of 2 to 20. Based on this model, the time-varying adaptive directional transfer function matrix for each timestamp is calculated to generate a high-dimensional connection dynamic graph; The time-varying ADTF matrix of individuals was averaged across data segments during the period from 360 ms to 40 ms before stimulation. The average baseline ADTF matrix was then obtained by averaging the time-varying ADTF matrix of each time stamp during this period. The time-varying ADTF matrix of the individual perturbation was obtained by averaging the time-varying ADTF matrix across data segments over a period of 80 to 2000 milliseconds after stimulation. Subtracting the mean baseline matrix from the perturbation dynamic matrix yields the time-varying ADTF matrix after individual baseline correction.

5. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 4, characterized in that, The time-varying multivariate adaptive autoregressive model uses the Kalman filter algorithm to estimate the model coefficients in real time. The time-varying multivariate adaptive autoregressive model is as follows: ; Where X(t) is the 21-channel EEG signal vector at time t, and A k p(t) is the time-varying k-order autoregressive coefficient matrix, p(t) is the time-varying model order, and E(t) is the residual vector.

6. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 4, characterized in that, The time-varying adaptive orientation transfer function from source channel j to target channel i at frequency f and time t is defined as follows: ; Here, H(f,t) is the transfer function matrix at frequency f and time t.

7. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, Step 4 describes the process of generating the time-varying brain network visualization atlas, which includes: For the individual baseline-corrected time-varying ADTF matrix, at each sampling timestamp from 80 milliseconds to 2000 milliseconds, significant connection edges with large positive values ​​or small negative values ​​are selected from the matrix, and the number of selected connections does not exceed 8% of the theoretical maximum number of connections; Dynamic brain network diagrams are drawn based on connection strength and direction, with red indicating enhanced connections, green indicating weakened connections, and arrows indicating the direction of information flow; The network graphs were overlaid and statistically analyzed according to the research groups to generate a time-varying brain network connectivity pattern diagram at the population level.

8. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, Step 5, which involves extracting TMS evoked potentials and performing baseline correction, includes: For each data segment, the mean potential value from 2000 ms to 1000 ms before stimulation was calculated in the 3-30 Hz frequency band and used as the baseline potential. The potential response from 0 ms to 500 ms after stimulation is calculated as the dynamic potential; the baseline potential is subtracted from the dynamic potential to obtain the time-varying TEP of a single data segment. The time-varying TEPs of the data segment are superimposed and averaged to obtain the average TMS evoked potential waveform at the individual level.

9. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, Step 6 describes the process of performing statistical comparisons between groups, which includes: Independent samples t-tests and FOR corrections were performed on the baseline-corrected time-varying ADTF matrices of the JME patient group and the healthy control group to screen out matrix elements with P values ​​less than 0.01 and identify statistically significant effective connections. Based on the sign of the difference between the two groups, time-varying brain network diagrams of JME patients with over- or under-connected networks relative to healthy controls were drawn. Independent samples t-tests were performed on the two groups of TEP amplitudes to determine the time windows and electrode distributions with significant differences. One-way ANOVA FDR correction was performed on the time-varying ADTF matrix among the three groups: the JME seizure group, the seizure-free medication group, and the seizure-free no-medication group. Differential connections with P values ​​less than 0.01 were also screened, and a comparison chart of connection strength among the three groups was plotted. Analysis of variance was performed on the three groups of TEP amplitudes to extract the time and space parameters corresponding to the main effects and interaction effects that were statistically significant.

10. The method for establishing an epilepsy diagnostic system based on time-varying brain networks and evoked potential regulation as described in claim 1, characterized in that, The method also includes introducing a machine learning classifier, using frontal region N100 amplitude, frontoparietal connection strength change rate, and time-varying global efficiency as input features to train a support vector machine model to distinguish JME patients from healthy controls, and using cross-validation accuracy as a system performance evaluation index.