A brain white matter fiber track prediction method and system based on a pre-trained base model

By using a deep learning method based on a pre-trained model, combined with dMRI data and anatomical constraints, seed points and endpoint information are dynamically selected for fiber trajectory reconstruction, solving the problem of unstable fiber trajectory in existing technologies and achieving efficient and reliable white matter fiber trajectory prediction.

CN122335900APending Publication Date: 2026-07-03SHAANXI NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610280651.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-09
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing fiber tracking algorithms cannot reliably output fiber trajectories, especially when there are significant deviations in fiber trajectories during brain lesions. They also rely on high-quality dMRI data, cannot learn the general structural features of white matter fibers in healthy individuals, have low computational efficiency, and are prone to tracking deviations and false positive results.

Method used

A pre-trained basic model-based approach is adopted. By acquiring the fiber orientation distribution function of dMRI data and combining it with anatomical constraints, fiber tracking is performed. Seed points are dynamically selected, and a deep learning model is used to learn fiber structural features. Trajectory reconstruction is performed based solely on the information of the two fiber endpoints, including data preprocessing, filtering, clustering, standardization, masking, and endpoint prediction adjustment.

Benefits of technology

It improves computational efficiency and model scalability, and can generate biologically reasonable fiber trajectories even in cases of lesions or poor scan quality. It breaks through the dependence of traditional methods on whole-brain diffusion data and achieves efficient fiber trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122335900A_ABST
    Figure CN122335900A_ABST
Patent Text Reader

Abstract

The application belongs to the field of brain white matter fiber track prediction, and relates to a brain white matter fiber track prediction method and system based on a pre-trained basic model. The method adopts an MAE architecture, and performs self-supervised pre-training on large-scale brain fiber track data through a mask-reconstruction mechanism to learn global topology and local geometric features of neural fibers. In the training stage, a hybrid progressive mask strategy is introduced. In the initial stage of the model, continuous segment masks are mainly used, and gradually transition to random point masks, so as to realize hierarchical learning of structural patterns and robust expression of features. After pre-training is completed, the model is fine-tuned, so that only the input of the two end point coordinates of the fiber can reconstruct and predict the intermediate track, and the fiber path inference based on the end point is realized. In the fine-tuning stage, the encoder structure is kept stable, the decoder is guided by the end point features to generate complete tracks conforming to the structural distribution of the brain white matter fiber, and the technical problems existing in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing and deep learning, specifically relating to a method and system for predicting brain white matter fiber trajectories based on a pre-trained basic model. Background Technology

[0002] The human brain's functions rely on a complex network of billions of neurons interconnected by nerve fibers. Unveiling the brain's structural connectivity mechanisms is crucial for understanding cognition and neurological diseases. In in vivo non-invasive research, diffusion magnetic resonance imaging (dMRI) and its fiber tracing techniques have become core tools for mapping white matter fibers. dMRI can indirectly depict the trajectory of white matter fiber bundles by measuring the diffusion anisotropy of water molecules in brain tissue.

[0003] Based on dMRI data, researchers have developed various fiber tracing algorithms, which can be broadly categorized into deterministic tracing and probabilistic tracing. The basic principle of these methods is to perform path integration along the principal direction indicated by the diffusion tensor or fiber orientation distribution function, thereby reconstructing the white matter fiber trajectories connecting different brain regions. However, when the brain is diseased, these fiber trajectories also change accordingly. Significant deviations exist between the fiber trajectories obtained from fiber tracing and those predicted based on cortical surface data, potentially indicating abnormalities in white matter microstructure, connectivity integrity, or fiber trajectory.

[0004] Therefore, existing algorithms can only reconstruct the fiber trajectory of the corresponding individual based on measured dMRI data. They cannot learn the general structural features of white matter fibers in healthy individuals, nor can they generate a complete three-dimensional fiber trajectory solely from the coordinates of the fiber's origin and end points. At the same time, the tracking accuracy of the algorithm is highly dependent on the quality of the dMRI data. In complex structural regions such as fiber crossings and bifurcations, tracking deviations and false positives are prone to occur, making it impossible to stably output reliable fiber trajectories. Summary of the Invention

[0005] To overcome the shortcomings of the existing methods, this invention provides a method and system for predicting brain white matter fiber trajectories based on a pre-trained basic model.

[0006] To achieve the above objectives, the present invention employs the following technical solution: This invention proposes a method for predicting brain white matter fiber trajectories based on a pre-trained basic model, comprising the following steps: Preprocessed dMRI data was acquired and processed to obtain fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. Based on the fiber orientation distribution function and combined with anatomical constraints, fiber tracking based on the iFOD2 algorithm is performed. Seed points are dynamically selected to generate the initial trajectory, and then the fiber trajectory is obtained through filtering, clustering and verification. The fiber trajectory is standardized, and the standardized fiber trajectory data is organized by fiber. After patching, linear embedding, and masking, the deep learning base model is trained. Based on the trained model, endpoint prediction adjustments are made. Taking the fiber start and end points as input, the mapping relationship is learned and optimized to achieve prediction of brain white matter fiber trajectories.

[0007] Preferably, the preprocessed dMRI data are subjected to response function estimation and multi-tissue constrained spherical deconvolution to obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid.

[0008] Preferably, the fiber tracking based on the fiber orientation distribution function and combined with anatomical constraints, using the iFOD2 algorithm, and dynamically selecting seed points to generate the initial trajectory, specifically involves: Based on the MRTrix3 tool, with the fiber orientation distribution function as the core input, the anatomical termination rule of fiber tracking is set through anatomical constraints, that is, the fiber trajectory terminates at the boundary of gray and white matter. The iFOD2 algorithm is used to perform whole-brain fiber tracking, and a dynamic seed point strategy is executed simultaneously according to the amplitude of the fiber orientation distribution function. In areas where the fiber orientation distribution function is clear and the fiber orientation is well-defined, the number of seed points is reduced, while in areas where the fiber orientation distribution function is ambiguous and the fiber crossing / branching is complex, the number of seed points is increased. Finally, an initial fiber trajectory dataset with anatomical constraint attributes is generated, that is, the initial trajectory.

[0009] Preferably, the process of further filtering, clustering, and testing to obtain the fiber trajectory specifically involves: Using the initial trajectory dataset as input, the SIFT algorithm is used to perform directional filtering optimization on the dataset to obtain an optimized fiber bundle dataset. Using the optimized fiber bundle dataset as input, the DIPY tool is used to perform fiber bundle clustering analysis on the dataset to obtain a high-confidence fiber bundle dataset. Using the high-confidence fiber bundle dataset as input, anatomy experts perform manual verification based on their anatomical knowledge of brain white matter fibers to remove false positive fibers and obtain the fiber trajectory.

[0010] Preferably, the standardization of fiber trajectories involves organizing the standardized fiber trajectory data fiber by fiber, performing patching, linear embedding, and masking processes, and then training a deep learning base model. Specifically: The standardized fiber trajectory data is divided into several non-overlapping continuous trajectory patches according to the set patch size. Each trajectory patch contains K continuous three-dimensional coordinate points, representing a local structure of the fiber. Through a trainable linear projection layer, the K three-dimensional coordinate points of each patch are flattened and mapped to a high-dimensional feature space, thereby converting each patch into a D-dimensional embedding vector. The embedding vectors of all patches together form a sequence, which serves as the embedding vector sequence for model input. A hybrid progressive masking process is applied to the embedded vector sequence, combining block masking and random point masking strategies. The masking rate is dynamically adjusted from low to high during training. The masked sequence is then input into a Transformer-based encoder to learn the contextual relationships between unmasked trajectory patches. The encoder output and mask labels are input into a lightweight Transformer decoder, which reconstructs the original 3D coordinates corresponding to the masked trajectory patches based on contextual information. By calculating the reconstruction loss between the reconstructed coordinates and the original coordinates, gradient backpropagation is used to optimize the parameters of the encoder, decoder, and embedding layer, training a deep learning base model that learns the local structure and global morphological distribution patterns of brain white matter fibers.

[0011] Preferably, the steps of the hybrid progressive masking process are as follows: The preceding rounds use continuous block masks with a mask probability of 1.0, while the final rounds use random block masks with a probability of 1.0 and continuous block masks with a probability of 0.0. In the transition rounds, the probability of continuous block masks is smoothly reduced from 1.0 to 0.0 using an S-shaped function. Random numbers generated in each batch are compared with the current probability to determine the masking strategy.

[0012] Preferably, the endpoint prediction adjustment based on the trained model specifically includes: Preserve the three-dimensional coordinates of the starting point of the fiber trajectory, P_start = and the three-dimensional coordinates of the endpoint P_end = ( Information, masking the coordinates of all intermediate points, is used as the input condition for the model; based on the pre-trained model, the encoder is retained as the feature extraction backbone network, and the trajectory regression decoder is reconstructed; the trajectory regression decoder is responsible for mapping the high-level features output by the encoder back to a three-dimensional coordinate sequence corresponding to a fixed length N. ;in, These represent the X, Y, and Z coordinates of the fiber trajectory starting point in a three-dimensional Cartesian coordinate system. These are the X-axis, Y-axis, and Z-axis coordinates of the fiber trajectory endpoint in the same three-dimensional Cartesian coordinate system.

[0013] This invention proposes a brain white matter fiber trajectory prediction system based on a pre-trained basic model, comprising: The data acquisition module is used to acquire preprocessed dMRI data, process the preprocessed dMRI data, and obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. The fiber trajectory generation module is used to perform fiber tracking based on the iFOD2 algorithm, based on the fiber direction distribution function and combined with anatomical constraints. It dynamically selects seed points to generate an initial trajectory, and then obtains the fiber trajectory through filtering, clustering and verification. The fiber trajectory training module is used to standardize the fiber trajectory, organize the standardized fiber trajectory data by fiber, and train the deep learning basic model after processing by patching, linear embedding, and masking. The fiber trajectory prediction module is used to make endpoint prediction adjustments based on the trained model. It takes the fiber start and end endpoints as input, learns the mapping relationship and optimizes it to realize the prediction of brain white matter fiber trajectory.

[0014] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement a method for predicting brain white matter fiber trajectories based on a pre-trained basic model.

[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a brain white matter fiber trajectory prediction method based on a pre-trained base model.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention proposes a method for predicting brain white matter fiber trajectories based on a pre-trained baseline model. It utilizes structural information from a large amount of dMRI data from healthy individuals, employing a masked autoencoder (MAE) to learn the structural features of the fibers. Traditional fiber tracing methods reconstruct white matter fiber trajectories connecting different brain regions by scattering seed points and performing path integration along the principal direction indicated by the diffusion tensor or fiber orientation distribution function. Unlike traditional methods, this invention relies solely on information from the fiber's endpoints, reconstructing the fiber trajectory by learning the mapping relationship between the endpoints. This avoids inputting diffuse data from the entire brain, significantly improving computational efficiency and model scalability. Specifically, fine-tuning is performed on a pre-trained model, retaining the trained encoder, and using the positions of the fiber's endpoints as input. A regression decoder generates a complete three-dimensional trajectory, achieving fiber trajectory generation using only the two endpoints of the fiber located in the gray matter cortex, thus solving the problems existing in current technologies.

[0017] This invention proposes a brain white matter fiber trajectory prediction system based on a pre-trained basic model. By dividing the system into a data acquisition module, a fiber trajectory generation module, a fiber trajectory training module, and a fiber trajectory prediction module, the system learns and optimizes mapping relationships to achieve brain white matter fiber trajectory prediction. The modular approach ensures that each module is independent, facilitating unified management of all modules. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of the brain white matter fiber trajectory prediction method based on a pre-trained basic model according to the present invention.

[0020] Figure 2 This is an overall flowchart of the method of the present invention.

[0021] Figure 3 This is a schematic diagram of the deep learning model structure used in this invention.

[0022] Figure 4 This is a loss curve diagram for training the basic model of this invention.

[0023] Figure 5 This is a loss curve during model fine-tuning in this invention.

[0024] Figure 6 This is a prediction diagram of the fiber trajectory in coordinate space according to the present invention.

[0025] Figure 7 This is an example prediction diagram of the fiber trajectory of the present invention in real brain space.

[0026] Figure 8 This is a diagram of the brain white matter fiber trajectory prediction system based on a pre-trained basic model, as described in this invention.

[0027] Figure 9 This is a schematic diagram of the structure of an electronic device according to the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0029] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0030] The present invention will now be described in further detail with reference to the accompanying drawings: Example 1 The basic idea of ​​this invention is to model the spatial structure of brain white matter fibers using structural information from large-scale dMRI data of healthy individuals through a masked autoencoder (MAE) model. Traditional fiber tracing methods reconstruct the trajectories of white matter fibers connecting different brain regions by scattering seed points and performing path integration along the principal direction indicated by the diffusion tensor or fiber orientation distribution function. Unlike traditional methods, this invention relies only on information from the fiber endpoints, reconstructing fiber trajectories by learning the mapping relationship between endpoints, thus avoiding the input of full fiber data and significantly improving computational efficiency and model scalability. Therefore, the method of this invention uses deep learning algorithms to learn the structural features of brain fibers using dMRI data from a large number of individuals and applies this knowledge to predict fiber trajectories. First, a masked autoencoder (MAE) is used to pre-train the model on diffusion magnetic resonance imaging data from a large-scale healthy population. By reconstructing masked trajectory nodes, the model learns the structural features of fiber trajectories. Based on this, fine-tuning is performed, using the coordinates of the fiber's origin and end points as conditions, and a regression decoder generates a complete three-dimensional trajectory, such as... Figure 1 As shown, the steps of this method are as follows: S1. Obtain the preprocessed dMRI data, process the preprocessed dMRI data to obtain the fiber orientation distribution functions of white matter, gray matter and cerebrospinal fluid; Response function estimation and multi-tissue constrained spherical deconvolution were performed on the preprocessed dMRI data to obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid.

[0031] S2. Based on the fiber orientation distribution function and combined with anatomical constraints, fiber tracking based on the iFOD2 algorithm is performed. Seed points are dynamically selected to generate the initial trajectory, and then the fiber trajectory is obtained through filtering, clustering and verification. The fiber tracking based on the fiber orientation distribution function and combined with anatomical constraints, using the iFOD2 algorithm, dynamically selects seed points to generate the initial trajectory, specifically as follows: Based on the MRTrix3 tool, with the fiber orientation distribution function as the core input, the anatomical termination rules for fiber tracking are set through anatomical constraints (the fiber trajectory must terminate at the boundary of gray and white matter). The iFOD2 algorithm is used to perform whole-brain fiber tracking, and a dynamic seed point strategy is executed simultaneously according to the amplitude of the fiber orientation distribution function. Seed point seeding is reduced in areas where the fiber orientation distribution function is clear and the fiber orientation is well-defined, while seed point seeding is increased in areas where the fiber orientation distribution function is ambiguous and the fiber crossing / branching is complex. Finally, an initial fiber trajectory dataset with built-in anatomical constraint attributes is generated, i.e., the initial trajectory.

[0032] The fiber trajectory is then obtained through filtering, clustering, and testing, specifically as follows: Using the initial trajectory dataset as input, the SIFT algorithm is used to perform directional filtering optimization on the dataset to obtain an optimized fiber bundle dataset. Using the optimized fiber bundle dataset as input, the DIPY tool is used to perform fiber bundle clustering analysis on the dataset to obtain a high-confidence fiber bundle dataset. Using the high-confidence fiber bundle dataset as input, anatomy experts perform manual verification based on their anatomical knowledge of brain white matter fibers to remove false positive fibers and obtain the fiber trajectory.

[0033] S3. Standardize the fiber trajectory, organize the standardized fiber trajectory data by fiber, and train the deep learning base model after Patch processing, linear embedding, and masking. The process of standardizing fiber trajectories involves organizing the standardized fiber trajectory data fiber by fiber, performing patching, linear embedding, and masking, and then training a deep learning base model. Specifically: The standardized fiber trajectory data is divided into several non-overlapping continuous trajectory patches according to the set patch size. Each trajectory patch contains K continuous three-dimensional coordinate points, representing a local structure of the fiber. Through a trainable linear projection layer, the K three-dimensional coordinate points of each patch are flattened and mapped to a high-dimensional feature space, thereby converting each patch into a D-dimensional embedding vector. The embedding vectors of all patches together form a sequence, which serves as the embedding vector sequence for model input. A hybrid progressive masking process is applied to the embedded vector sequence, combining block masking and random point masking strategies. The masking rate is dynamically adjusted from low to high during training. The masked sequence is then input into a Transformer-based encoder to learn the contextual relationships between unmasked trajectory patches. The encoder output and mask labels are input into a lightweight Transformer decoder, which reconstructs the original 3D coordinates corresponding to the masked trajectory patches based on contextual information. By calculating the reconstruction loss between the reconstructed coordinates and the original coordinates, gradient backpropagation is used to optimize the parameters of the encoder, decoder, and embedding layer, training a deep learning base model that learns the local structure and global morphological distribution patterns of brain white matter fibers.

[0034] The steps of the hybrid progressive masking process are as follows: The preceding rounds use continuous block masks with a mask probability of 1.0, while the final rounds use random block masks with a probability of 1.0 and continuous block masks with a probability of 0.0. In the transition rounds, the probability of continuous block masks is smoothly reduced from 1.0 to 0.0 using an S-shaped function. Random numbers generated in each batch are compared with the current probability to determine the masking strategy.

[0035] The endpoint prediction adjustment based on the trained model specifically includes: Preserve the three-dimensional coordinates of the starting point of the fiber trajectory, P_start = and the three-dimensional coordinates of the endpoint P_end = ( Information, masking the coordinates of all intermediate points, is used as the input condition for the model; based on the pre-trained model, the encoder is retained as the feature extraction backbone network, and the trajectory regression decoder is reconstructed; the trajectory regression decoder is responsible for mapping the high-level features output by the encoder back to a three-dimensional coordinate sequence corresponding to a fixed length N. ;in, These represent the X, Y, and Z coordinates of the fiber trajectory starting point in a three-dimensional Cartesian coordinate system. These are the X-axis, Y-axis, and Z-axis coordinates of the fiber trajectory endpoint in the same three-dimensional Cartesian coordinate system.

[0036] S4. Based on the trained model, make endpoint prediction adjustments. Using the fiber start and end points as input, learn the mapping relationship and optimize to achieve brain white matter fiber trajectory prediction.

[0037] The method is described in detail below: Step 1. Use FSL software to preprocess the raw diffusion MRI data in the HCP dataset. The preprocessing includes skull removal, motion correction, eddy current correction, tissue segmentation and surface reconstruction to generate five-tissue segmentation images (5TT images, including cortical gray matter, subcortical gray matter, white matter, cerebrospinal fluid, lesions or other tissues) for anatomical constraints. Preprocess these images to obtain the preprocessed dMRI data. Step 2. Based on the preprocessed dMRI data, the response function was estimated and multi-tissue constrained spherical deconvolution (MSMT-CSD) was performed using MRtrix3 software to obtain the fiber orientation distribution function (FOD) of white matter, gray matter and cerebrospinal fluid. Step 3. Using MRtrix3, leveraging FOD results and combining them with anatomical constraints (ACT), the streamlines are guided to terminate at the correct location (gray-white matter boundary) using anatomical information, avoiding entry into cerebrospinal fluid or gray matter. Fiber tracing is performed based on the iFOD2 algorithm, dynamically selecting seed points according to FOD amplitude. Fewer seeding points are planted in areas with clear FOD (clear fiber direction), and more seeding is planted in areas with ambiguous FOD (complex intersections and bifurcations), generating initial trajectories. Approximately 1 million trajectories are traced for each individual. The SIFT algorithm is then used for filtering to obtain a more biologically plausible fiber bundle dataset. DIPY clustering confidence index is then used to remove outliers. Finally, the dataset is verified by anatomical experts to remove false positive fibers as much as possible.

[0038] Step 4. Standardize the fiber trajectories obtained in Step 3. First, use linear interpolation to uniformly resample adjacent nodes, sampling each fiber trajectory at equal intervals to a fixed length (e.g., 100 nodes) to ensure consistent point counts between different fibers. Then, output the length-standardized 3D coordinate data as a text file for subsequent input and training of deep learning models.

[0039] Step 5. Organize the standardized fiber trajectory data from Step 4 into individual fibers, ensuring that each fiber contains a fixed number of trajectory points, and input it into the deep learning base model for training to learn the structural features of brain white matter fibers.

[0040] The specific processing procedure in step 5 is as follows: Steps 5.1 and 4 standardize the fiber trajectory data, dividing each fiber into several patches according to patch size (e.g., 7 points per patch), and mapping them to a high-dimensional feature space through linear embedding to prepare for subsequent encoder processing. It should be noted that, to emphasize the importance of the fiber's beginning and end endpoint position information and to facilitate subsequent prediction of intermediate trajectories based on the endpoints, 6 zero points are added at each of the fiber's beginning and end.

[0041] Specifically, the standardized fiber trajectory data from step 4 is divided into several non-overlapping continuous trajectory patches according to a set patch size. Each trajectory patch contains K continuous 3D coordinate points, representing a local structure of the fiber. Through a trainable linear projection layer, the K 3D coordinate points of each patch are flattened and mapped to a high-dimensional feature space, thereby converting each patch into a D-dimensional embedding vector. The embedding vectors of all patches together form a sequence, which serves as the embedding vector sequence for model input.

[0042] Step 5.2: Perform hybrid progressive masking on the divided patches. Input the masked patches into the encoder, and reconstruct the masked trajectory patches through the decoder. Optimize the model parameters using reconstruction loss, enabling the model to learn the local and global structural distribution patterns of the fibers, providing a foundation for subsequent endpoint prediction fine-tuning.

[0043] Specifically, the embedded vector sequence undergoes a hybrid progressive masking process, which combines block masking and random point masking strategies. During training, the masking rate is dynamically adjusted from low to high. The masked sequence is then input into a Transformer-based encoder to learn the contextual relationships between unmasked trajectory patches. The encoder's output, along with the masking labels, is input into a lightweight Transformer decoder. The decoder's task is to reconstruct the original 3D coordinates corresponding to the masked trajectory patches based on contextual information. By calculating the reconstruction loss between the reconstructed coordinates and the original coordinates, and by using gradient backpropagation to optimize the parameters of the encoder, decoder, and embedding layer, the model can learn the local structure and global morphological distribution patterns of brain white matter fibers.

[0044] The steps of the hybrid progressive masking process further include: (1) setting a total number of training rounds; (2) in the first N rounds, all individuals use a continuous 50% block mask, that is, the probability of using the block mask is set to 1.0, and the model is forced to perform block mask reconstruction; (3) in the last M rounds, the probability of using the continuous block mask is set to 0.0, and the probability of using the random block mask is set to 1, that is, all individuals use the random block mask, and the model is forced to perform random mask reconstruction, with the proportion of random mask blocks to the total number of blocks being 75%; (4) in the intermediate transition rounds, the probability of using the continuous block mask is smoothly reduced from 1.0 to 0.0 through an S-shaped function; (5) in each batch, a random number is generated and compared with the currently calculated probability of use to determine whether the batch adopts a block mask strategy or a random mask strategy.

[0045] Step 6. Fine-tune the base model trained in Step 5. Specifically, take the start and end points of the fibers as input and output the complete brain fiber trajectory. The model learns the mapping relationship from the endpoints to predict the complete fiber trajectory, and optimizes the model through the endpoint-to-trajectory reconstruction loss, enabling it to reconstruct the complete fiber trajectory with only endpoint information.

[0046] The specific processing procedure in step 6 is as follows: In the fine-tuning stage, only the three-dimensional coordinates of the starting point P_start of the fiber trajectory are retained. and the three-dimensional coordinates of the endpoint P_end = ( Information, masking the coordinates of all intermediate points, is used as the input condition for the model. Based on the pre-trained model, the encoder is retained as the feature extraction backbone network, and the trajectory regression decoder is reconstructed. The trajectory regression decoder is responsible for mapping the high-level features output by the encoder back to the three-dimensional coordinate sequence corresponding to the fixed length N in step 4. .

[0047] On the one hand, this invention utilizes a deep learning model to learn the structural features of fibers, enabling fiber prediction to not only rely on traditional anatomical information but also automatically learn the structural patterns of fibers from data. On the other hand, by fine-tuning the model with endpoint information as input, it breaks through the limitation of traditional methods that require input of whole-brain diffusion information, further improving the efficiency of the model in large-scale data processing.

[0048] The specific implementation process is as follows: A prototype system was implemented using Python. The algorithm development and testing data came from dMRI data in the HCP dataset. The entire process of this invention can be found in the appendix. Figure 2 , Figure 2 For the specific structure of the model used, please refer to the appendix. Figure 3 In the pre-training stage of the basic model, after the fiber trajectory coordinates are embedded in blocks, they are processed by fixed / random masking, and the trajectory is reconstructed by the encoder and decoder to complete self-supervised learning. In the fine-tuning stage, the pre-trained encoder parameters are fixed, only the start and end information of the trajectory is retained, and the decoder is fine-tuned to achieve complete trajectory prediction driven by the start and end points. The specific implementation steps are as follows: 1. The raw diffusion MRI data in the HCP dataset were preprocessed using FSL software. The preprocessing included skull removal, motion correction, eddy current correction, tissue segmentation, and surface reconstruction to generate five-tissue segmentation images (5TT images, including cortical gray matter, subcortical gray matter, white matter, cerebrospinal fluid, lesions, or other tissues) for anatomical constraints and preprocessed dMRI data. 2. Based on the preprocessing results, the response function was estimated and multi-tissue constrained spherical deconvolution (MSMT-CSD) was performed using MRtrix3 software to obtain the fiber orientation distribution functions (FOD) of white matter, gray matter, and cerebrospinal fluid. 3. Using MRtrix3, fiber tracing based on the iFOD2 algorithm was performed using FOD results and combined with anatomical constraints (ACT). Seed points were dynamically selected to generate initial trajectories. The dataset of fiber bundles with biological rationality was obtained by filtering with SIFT algorithm, calculating the cluster confidence index with DIPY, and manual operation by experts. Approximately 1,000 fiber trajectories were obtained for each brain.

[0049] 4. Standardize the obtained fiber trajectories. Resample and transform the original VTK format fiber bundle file, then output it as a TXT file. Specifically, the program inserts 20 points at equal intervals between every two points in the fiber bundle, then calculates a suitable sampling interval to sample each fiber trajectory at equal intervals to a fixed length (e.g., 100 nodes). The standardized 3D coordinate data is then output as a text file for subsequent input and training of deep learning models.

[0050] 5. The standardized fiber trajectory data is organized fiber by fiber to ensure that each fiber contains a fixed number of trajectory points. This data is then input into the deep learning base model for training to learn the structural features of brain white matter fibers.

[0051] The specific processing procedure in step 5 is as follows: Step 5.1 After data standardization in Step 4, the fiber trajectory data is divided into patches. To emphasize the importance of the fiber's beginning and end endpoint positions, six zero points are added to each end of the fiber, ensuring that the first and last patches only contain endpoint information. Then, every seven trajectory points form a patch, resulting in a total of 12 patches. Each patch is then mapped to a high-dimensional feature space. This process is achieved through linear embedding. Each patch is transformed into a high-dimensional feature vector through a fully connected layer (linear layer). The specific dimensions of the fully connected layer are [21, 768], providing feature input for subsequent encoder processing. The purpose of this step is to transform the original low-dimensional coordinates into high-dimensional features suitable for deep learning models, facilitating the model's capture of complex structural relationships in the data and preparing for subsequent self-attention (encoder) processing.

[0052] Step 5.2 performs hybrid progressive masking on the partitioned patches. Specifically, in the early stages of training (e.g., the first 10 epochs), most individuals in the input fibers are masked using continuous segment masking (randomly and continuously masking half of the points in the fiber), while a small number of individuals are masked using random masking (randomly masking 75% of the patch). The purpose of this stage is to allow the model to gradually learn the basic structural patterns, avoiding over-reliance on the masked parts in the early stages of training. With a small proportion of random masking, the model can rely on more raw data for training, ensuring that it learns the basic features of the data. As training progresses, the proportion of random masking for individuals will gradually increase. This means that in the later stages, more patches will be masked, and the model needs to recover more and more information. This design is intended to enable the model to gradually strengthen its ability to recover data details when dealing with increasingly complex data, thereby improving the model's generalization ability.

[0053] The unmasked patch is processed by an encoder, the core of which consists of six consecutive TransformerBlocks. Each Block contains the following components: a multi-head self-attention mechanism (6 attention heads), a multilayer perceptron (MLP with a scaling ratio of 4), layer normalization, and residual connections. Both the input and output dimensions of the encoder are 768-dimensional. The decoder is responsible for reconstructing the masked trajectory portion, employing a shallower 4-layer Transformer architecture. The decoder has a 192-dimensional embedding dimension. It first projects the encoder output to a low-dimensional space through a linear layer, then concatenates it with the mask tokens to form a complete sequence. The decoder also includes multi-head self-attention (4 attention heads) and an MLP module, but with a smaller parameter scale. Finally, a linear prediction layer maps the features back to the original patch dimension (21 dimensions), completing the reconstruction from high-dimensional features to trajectory coordinates.

[0054] The basic model loss function is:

[0055] for:

[0056] in, For the coordinates of the predicted point, These are the actual coordinate values. Calculate the average MSE across the three coordinate dimensions of each point.

[0057] Mask region weighting:

[0058] in, The mask matrix consists of 0s and 1s, where 1 indicates that the point is masked and needs to be reconstructed. B represents the batch size. The training loss curve of the base model is shown below. Figure 4As shown, block masks are used for epochs 0-10, random masks are used for epochs 91-100, and mixed masks are used for epochs 11-90.

[0059] 6. Fine-tune the base model trained in step 5. Specifically, fix the encoder parameters of the base model, take the start and end points of the fiber as input, and output a high-dimensional feature representation through the encoder. The trajectory regression decoder is responsible for mapping the high-dimensional features output by the encoder back to the three-dimensional coordinate sequence corresponding to the fixed length N in step 4. The model outputs the complete brain fiber trajectory. Using the same loss function as the base model, the decoder parameters are updated by calculating the loss against the original complete fiber trajectory data. Ultimately, the model learns the mapping relationship from endpoints to predict the complete fiber trajectory, optimizing the model through endpoint-to-trajectory reconstruction loss, enabling it to reconstruct the complete fiber trajectory with only endpoint information. Figure 5 The loss curve of the model during the fine-tuning phase. Figure 6 This is a predicted graph of the fiber trajectory in coordinate space. The solid blue line represents the actual fiber trajectory, and the dashed red line represents the predicted fiber trajectory. Green dots mark the fiber start point, and red squares mark the fiber end point. Overall, the predicted trajectory extends along the direction of the actual trajectory. Figure 7 This is an example prediction map of fiber trajectories in real brain space; white represents real fiber trajectories, and red represents predicted fiber trajectories.

[0060] As can be seen from the specific embodiments described above, the method of learning a high-dimensional structural representation of fibers using a base model and then fine-tuning the base model can effectively achieve the task of predicting fiber trajectories using only the information of the fiber's two endpoints. In the base model training phase, self-supervised pre-training is performed on large-scale brain fiber data through a mask-reconstruction mechanism to learn the global topology and local geometric features of neural fibers. In the fine-tuning phase, by adjusting the decoder, the model can utilize the learned structural features to learn the mapping relationship from the endpoints to predict the complete fiber trajectory, thus achieving the task of predicting brain fiber trajectories using only the fiber's two endpoints.

[0061] Therefore, this invention, through self-supervised learning to master the distribution patterns of fiber structures, enables the model to make reasonable inferences based on global context when facing complex situations such as fiber crossings, significantly improving the accuracy and biological rationality of trajectory reconstruction. The conditional generation framework only requires the coordinates of the start and end points to generate a complete trajectory, and can still reconstruct fiber paths that conform to anatomical priors even when individual data is incomplete due to lesions or scan quality issues. This method deeply integrates deep learning with brain connectomics research, providing a new paradigm for fiber trajectory prediction, offering reliable data support and technical references for neurosurgical navigation and basic research related to brain diseases, and possessing broad application prospects. The advantages of this invention are as follows: On the one hand, by using a deep learning model to learn the structural features of fibers, fiber prediction not only relies on traditional anatomical information but can also automatically learn the structural patterns of fibers from data; on the other hand, by fine-tuning the model with information from two endpoints in gray matter as input, it overcomes the limitation of traditional methods that require input of whole-brain diffusion information.

[0062] Example 2 This invention proposes a brain white matter fiber trajectory prediction system based on a pre-trained base model, such as... Figure 8 As shown, it includes: The data acquisition module is used to acquire preprocessed dMRI data, process the preprocessed dMRI data, and obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. The fiber trajectory generation module is used to perform fiber tracking based on the iFOD2 algorithm, based on the fiber direction distribution function and combined with anatomical constraints. It dynamically selects seed points to generate an initial trajectory, and then obtains the fiber trajectory through filtering, clustering and verification. The fiber trajectory training module is used to standardize the fiber trajectory, organize the standardized fiber trajectory data by fiber, and train the deep learning basic model after processing by patching, linear embedding, and masking. The fiber trajectory prediction module is used to make endpoint prediction adjustments based on the trained model. It takes the fiber start and end endpoints as input, learns the mapping relationship and optimizes it to realize the prediction of brain white matter fiber trajectory.

[0063] Example 3 Please see Figure 9 As shown, the present invention also provides an electronic device 100 for a brain white matter fiber trajectory prediction method based on a pre-trained basic model; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0064] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the brain white matter fiber trajectory prediction method based on a pre-trained basic model described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0065] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.

[0066] The memory 101 in the electronic device 100 stores multiple instructions to implement a brain white matter fiber trajectory prediction method based on a pre-trained basic model, and the processor 102 can execute the multiple instructions to achieve the following: Preprocessed dMRI data was acquired and processed to obtain fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. Based on the fiber orientation distribution function and combined with anatomical constraints, fiber tracking based on the iFOD2 algorithm is performed. Seed points are dynamically selected to generate the initial trajectory, and then the fiber trajectory is obtained through filtering, clustering and verification. The fiber trajectory is standardized, and the standardized fiber trajectory data is organized by fiber. After patching, linear embedding, and masking, the deep learning base model is trained. Based on the trained model, endpoint prediction adjustments are made. Taking the fiber start and end points as input, the mapping relationship is learned and optimized to achieve prediction of brain white matter fiber trajectories.

[0067] Example 4 If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0068] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0070] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A white matter fiber tract prediction method based on a pre-trained base model, characterized by, Includes the following steps: Preprocessed dMRI data was acquired and processed to obtain fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. Based on the fiber orientation distribution function and combined with anatomical constraints, fiber tracking based on the iFOD2 algorithm is performed. Seed points are dynamically selected to generate the initial trajectory, and then the fiber trajectory is obtained through filtering, clustering and verification. The fiber trajectory is standardized, and the standardized fiber trajectory data is organized by fiber. After patching, linear embedding, and masking, the deep learning base model is trained. Based on the trained model, endpoint prediction adjustments are made. Taking the fiber start and end points as input, the mapping relationship is learned and optimized to achieve prediction of brain white matter fiber trajectories. 2.The white matter fiber tract prediction method based on a pre-trained base model according to claim 1, wherein, Response function estimation and multi-tissue constrained spherical deconvolution were performed on the preprocessed dMRI data to obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid.

3. The brain white matter fiber trajectory prediction method based on a pre-trained basic model according to claim 1, characterized in that, The fiber tracking based on the fiber orientation distribution function and combined with anatomical constraints, using the iFOD2 algorithm, dynamically selects seed points to generate the initial trajectory, specifically as follows: Based on the MRTrix3 tool, with the fiber orientation distribution function as the core input, the anatomical termination rule of fiber tracking is set through anatomical constraints, that is, the fiber trajectory terminates at the boundary of gray and white matter. The iFOD2 algorithm is used to perform whole-brain fiber tracking, and a dynamic seed point strategy is executed simultaneously according to the amplitude of the fiber orientation distribution function. In areas where the fiber orientation distribution function is clear and the fiber orientation is well-defined, the number of seed points is reduced, while in areas where the fiber orientation distribution function is ambiguous and the fiber crossing / branching is complex, the number of seed points is increased. Finally, an initial fiber trajectory dataset with anatomical constraint attributes is generated, that is, the initial trajectory. 4.The method of claim 1, wherein, The fiber trajectory is then obtained through filtering, clustering, and testing, specifically as follows: Using the initial trajectory dataset as input, the SIFT algorithm is used to perform directional filtering optimization on the dataset to obtain an optimized fiber bundle dataset. Using the optimized fiber bundle dataset as input, the DIPY tool is used to perform fiber bundle clustering analysis on the dataset to obtain a high-confidence fiber bundle dataset. Using the high-confidence fiber bundle dataset as input, anatomy experts perform manual verification based on their anatomical knowledge of brain white matter fibers to remove false positive fibers and obtain the fiber trajectory. 5.The white matter fiber tract prediction method based on a pre-trained base model according to claim 1, wherein, The process of standardizing fiber trajectories involves organizing the standardized fiber trajectory data fiber by fiber, performing patching, linear embedding, and masking, and then training a deep learning base model. Specifically: The standardized fiber trajectory data is divided into several non-overlapping continuous trajectory patches according to the set patch size. Each trajectory patch contains K continuous three-dimensional coordinate points, representing a local structure of the fiber. Through a trainable linear projection layer, the K three-dimensional coordinate points of each patch are flattened and mapped to a high-dimensional feature space, thereby converting each patch into a D-dimensional embedding vector. The embedding vectors of all patches together form a sequence, which serves as the embedding vector sequence for model input. A hybrid progressive masking process is applied to the embedded vector sequence, combining block masking and random point masking strategies. The masking rate is dynamically adjusted from low to high during training. The masked sequence is then input into a Transformer-based encoder to learn the contextual relationships between unmasked trajectory patches. The encoder output and mask labels are input into a lightweight Transformer decoder, which reconstructs the original 3D coordinates corresponding to the masked trajectory patches based on contextual information. By calculating the reconstruction loss between the reconstructed coordinates and the original coordinates, gradient backpropagation is used to optimize the parameters of the encoder, decoder, and embedding layer, training a deep learning base model that learns the local structure and global morphological distribution patterns of brain white matter fibers. 6.The white matter fiber tract prediction method based on a pre-trained base model according to claim 5, wherein, The steps of the hybrid progressive masking process are as follows: The preceding rounds use continuous block masks with a mask probability of 1.0, while the final rounds use random block masks with a probability of 1.0 and continuous block masks with a probability of 0.

0. In the transition rounds, the probability of continuous block masks is smoothly reduced from 1.0 to 0.0 using an S-shaped function. Random numbers generated in each batch are compared with the current probability to determine the masking strategy. 7.The white matter fiber tract prediction method based on a pre-trained base model according to claim 5, wherein, The endpoint prediction adjustment based on the trained model specifically includes: Preserve the three-dimensional coordinates of the starting point of the fiber trajectory, P_start = and the three-dimensional coordinates of the endpoint P_end = ( Information, masking the coordinates of all intermediate points, is used as the input condition for the model; based on the pre-trained model, the encoder is retained as the feature extraction backbone network, and the trajectory regression decoder is reconstructed; the trajectory regression decoder is responsible for mapping the high-level features output by the encoder back to a three-dimensional coordinate sequence corresponding to a fixed length N. ;in, These represent the X, Y, and Z coordinates of the fiber trajectory starting point in a three-dimensional Cartesian coordinate system. These are the X-axis, Y-axis, and Z-axis coordinates of the fiber trajectory endpoint in the same three-dimensional Cartesian coordinate system.

8. A brain white matter fiber trajectory prediction system based on a pre-trained basic model, characterized in that, include: The data acquisition module is used to acquire preprocessed dMRI data, process the preprocessed dMRI data, and obtain the fiber orientation distribution functions of white matter, gray matter, and cerebrospinal fluid. The fiber trajectory generation module is used to perform fiber tracking based on the iFOD2 algorithm, based on the fiber direction distribution function and combined with anatomical constraints. It dynamically selects seed points to generate an initial trajectory, and then obtains the fiber trajectory through filtering, clustering and verification. The fiber trajectory training module is used to standardize the fiber trajectory, organize the standardized fiber trajectory data by fiber, and train the deep learning basic model after processing by patching, linear embedding, and masking. The fiber trajectory prediction module is used to make endpoint prediction adjustments based on the trained model. It takes the fiber start and end endpoints as input, learns the mapping relationship and optimizes it to realize the prediction of brain white matter fiber trajectory.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the brain white matter fiber trajectory prediction method based on a pre-trained basic model as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. When the computer program is executed by the processor, it implements the steps of the brain white matter fiber trajectory prediction method based on a pre-trained basic model as described in any one of claims 1 to 7.