Multi-level spatial knowledge guided medical image registration model training method

Through the synergy between the multi-scale spatial perception mechanism and the context granularity comparison module, the calculation complexity and data dependence problems of the existing medical image registration model in large-scale three-dimensional image processing are solved, efficient and accurate medical image registration is achieved, registration accuracy and robustness are improved, and suitable for fine classification and diagnostic support.

CN120451233APending Publication Date: 2025-08-08NANJING DRUM TOWER HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510543162.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing medical image registration model based on convolutional neural networks has high computational complexity, strong data dependence and insufficient generalization ability when processing large-scale three-dimensional medical images, especially when capturing complex flow patterns in high-dimensional images, and traditional methods require a large amount of data to be labeled, resulting in poor performance in small sample learning scenarios.

Method used

The synergistic effect of the multi-scale spatial perception mechanism and the context particle size comparison module is adopted to capture medical image features through the multi-scale spatial perception mechanism, and the context particle size comparison module is used to accurately control the scale, combining self-supervised feature extraction, graph construction and information transmission, knowledge distillation and consistency constraints to achieve efficient modeling of multi-scale deformation fields.

Benefits of technology

It significantly improves the accuracy, efficiency and robustness of medical image registration, improves the accuracy and interpretability of pathological image classification, and is suitable for scenarios that require fine classification and diagnostic support. It optimizes deformation field generation through structured registration loss function to ensure the consistency of registration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451233A_ABST
    Figure CN120451233A_ABST
Patent Text Reader

Abstract

The invention provides a medical image registration model guided by multi-level spatial knowledge and a method for training the medical image registration model by using a training module. The adopted training module comprises a data preprocessing module, a multi-scale spatial perception mechanism module, a context granularity comparison module, a level attention feature fusion module and a loss function calculation module. According to the method, efficient modeling of a multi-scale deformation field is realized through the synergistic effect of a multi-scale space sensing mechanism and a context granularity comparison module. The features of the medical image are captured by means of a multi-scale spatial perception mechanism, and the scale of the medical image during registration is accurately controlled by means of a context granularity comparison module, so that the precision, efficiency and robustness of medical image registration are remarkably improved on multiple levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image registration, and in particular to a training method for a medical image registration model guided by multi-level spatial knowledge. Background Art

[0002] Medical image registration guided by multi-level spatial knowledge is the process of aligning medical images from different conditions to the same anatomical structure or coordinate system. It is of great significance for disease diagnosis, treatment, and research, and is widely used in medical imaging. Traditional registration models rely on feature matching and transformation models, but are limited when dealing with complex deformations and high-dimensional data.

[0003] The development of deep learning has made convolutional neural network (CNN)-based registration models a research hotspot. These models can automatically learn image features, improving registration accuracy and efficiency. However, existing CNN methods face challenges when processing large-scale 3D medical images, including high computational complexity, strong data dependence, and insufficient generalization. Furthermore, traditional methods require extensive training with labeled data, which is time-consuming and expensive. This results in poor performance of deep learning models in small-sample learning scenarios.

[0004] Against this backdrop, researchers have begun exploring the application of the Transformer architecture to multi-level medical image registration. Transformers, through their self-attention mechanism, effectively capture long-range dependencies, overcoming the shortcomings of CNNs in extracting local features. While Transformers have achieved remarkable results in tasks such as image classification and segmentation, challenges remain in multi-level medical image registration. For example, existing Transformer architectures often struggle to accurately capture the complex flow patterns in high-dimensional images when processing deformation fields, compromising the accuracy of registration results. Summary of the Invention

[0005] To address the challenges of the prior art, this paper provides a training method for a medical image registration model guided by multi-level spatial knowledge. Its core approach is to efficiently model multiscale deformation fields through the synergy of a multiscale spatial perception mechanism and a contextual granularity comparison module. By capturing the characteristics of medical images with the multiscale spatial perception mechanism and precisely controlling the scale of medical image registration with the contextual granularity comparison module, the method significantly improves the accuracy, efficiency, and robustness of medical image registration at multiple levels.

[0006] A first object of the present invention is to provide a deformable image registration model based on a multi-scale spatial perception mechanism, wherein the training process of the model comprises the following steps:

[0007] Step 1: Data preprocessing:

[0008] Preprocessing of WSIs, including segmentation, filtering, and thresholding, extracts tissue regions of interest and divides them into patches at different resolutions;

[0009] Step 2: Extract image features through multi-scale spatial perception mechanism and build graph neural network:

[0010] Through self-supervised feature extraction and graph construction, image features at different scales are captured, and information is propagated between different scales through the graph neural network (GNN) module to achieve efficient fusion of multi-scale features;

[0011] Step 3: Capture context information at different granularity levels through the context granularity comparison module:

[0012] Use a pre-trained encoder to extract multi-granularity features of image patches, and gradually fuse and encode features at different granularity levels through components such as P-GCN, hierarchical attention layer (HA layer), T-GCN, and global attention layer (GA layer), ultimately generating a packet-level representation for classification;

[0013] Step 4: Knowledge Distillation and Consistency Regularization:

[0014] A (self-)knowledge distillation mechanism is introduced to encourage predictions at different resolutions to reach consistency by minimizing the Euclidean distance between the low-resolution critical grid map and its subsampled counterpart calculated by the high-resolution branch. Knowledge distillation and consistency regularization are used as additional optimization objectives to form the overall optimization problem together with the cross-entropy loss.

[0015] Step 5: The hierarchical attention feature fusion module outputs the registered image.

[0016] Optionally, the calculation formula of the graph neural network (GNN) module is:

[0017] Y=GNN(X;A1,A2,A 1∪2 ,θ GNN )=GNN1(X;A1,A2)·GNN2(X;A 1∪2 )

[0018] It is used to describe how the graph neural network (GNN) module processes the multi-scale patch-level representation X and generates the contextualized feature Y through the cascade of two neural sub-networks GNN1 and GNN2. Where A1 and A2 are adjacency matrices of different scales, A 1∪2 is the fused adjacency matrix;

[0019] Step 6: The loss function calculation module calculates the structured registration loss to measure the effect of image registration.

[0020] A second object of the present invention is to provide a training module for training a multi-level spatial knowledge guided medical image registration model.

[0021] The modules include:

[0022] 1. Data preprocessing module:

[0023] The original WSI is downsampled and tissue segmented to generate image block sets and tissue component sets at different magnifications. The specific steps include:

[0024] Image downsampling: The original WSI is downsampled to multiple resolutions to generate images at different magnifications.

[0025] Tissue segmentation: Use the Otsu algorithm for initial segmentation, remove the background area, and retain the foreground tissue area.

[0026] Image block extraction: Extract non-overlapping image blocks in the segmented foreground area to ensure that there is no overlap between image blocks.

[0027] 2. Multi-scale spatial perception mechanism:

[0028] Use the pre-trained encoder to extract features of the image blocks, which will serve as the initial features of the nodes in the graph. The specific steps include:

[0029] Feature extractor selection: Use a pre-trained encoder, such as ResNet50 or ViT, to extract features of image patches.

[0030] Feature representation: The extracted features are represented as high-dimensional vectors for subsequent graph construction and feature fusion.

[0031] Optionally, the calculation formula of the feature extraction module is:

[0032]

[0033] Among them, Q, K (t) and V (t) denote query, key and value matrices respectively, f q Represents the dimension of the query vector; X1 represents the output of the current layer feature, X (t) Represents a high-level feature map.

[0034] Optionally, the calculation formula expressed as a high-dimensional vector is:

[0035]

[0036] Among them, X(s) represents the feature map of the current layer, Q (s) , K (s) and V (s)denote query, key and value matrices respectively, f q is the dimension of the query vector.

[0037] 3. Contextual Granularity Comparison Module:

[0038] The hierarchical graph construction module includes a organizational graph (TG) and image patch graphs (PGs) at different magnifications, as well as the subordinate relationship edges between them. The specific steps include:

[0039] Organizational chart construction: Using organizational components as nodes, an organizational chart (TG) is constructed to capture the spatial relationships between organizations.

[0040] Image patch graph construction: Image patches at different magnifications are used as nodes to construct image patch graphs (PGs) to capture the spatial relationship between image patches.

[0041] Dependency edge construction: Dependency edges are established between the organization graph and the image block graph to represent the hierarchical relationship between the organization and the image blocks.

[0042] 4. Hierarchical Attention Feature Fusion Module:

[0043] The pre-trained encoder is used to extract the features of the image blocks as the initial features of the nodes in the graph. Through components such as P-GCN, hierarchical attention layer (HA layer), T-GCN and global attention layer (GA layer), the features of different granularity levels are gradually fused and encoded to finally generate a packet-level representation for classification. The specific steps include:

[0044] P-GCN (Patch Graph Convolutional Network): Encodes the image patch graph to capture the local features between image patches. Optionally, the message passing formula of the P-GCN is:

[0045]

[0046] in, is the input node feature of the l-th layer P-GCN, is the 1-hop neighbor node of node i, is the sum of the features of nodes i and j at layer l, is the fusion feature, MLP l is a multilayer perceptron as a residual connection.

[0047] Hierarchical Attention Layer (HA layer): It performs attention fusion on image patches at different magnifications to capture features at different granularity levels.

[0048] T-GCN (Tissue Graph Convolutional Network): Encodes the tissue graph and captures the global features between tissues.

[0049] Global Attention Layer (GA Layer): Global attention is performed on the features of the tissue map and the image patch map to generate a packet-level representation and produce the registration result.

[0050] This module can effectively improve the accuracy and interpretability of pathological image analysis by capturing and fusing contextual information at different levels of granularity. It is particularly suitable for scenarios that require fine classification and diagnostic support.

[0051] Optionally, the hierarchical attention layer formula is:

[0052]

[0053] in, is the updated organizational component node feature, S i is the image block node feature matrix belonging to tissue component i, α i is the hierarchical attention vector, W k 、W v and W q is a trainable weight matrix.

[0054] Loss function calculation module:

[0055] This module defines a loss function, the structured registration loss, to measure the effectiveness of image registration. It also details a formula for estimating the error by calculating the distance between registered matching features in the full-resolution image. This represents a specific innovative implementation of the present invention in medical image registration error assessment.

[0056] Optionally, the registration error estimate e can be calculated using the following formula:

[0057]

[0058] Among them, w i represents the weight of the i-th feature point, represents the feature of the kth node in feature set 1, represents the kth node feature in feature set 2, n represents the number of matching feature points, and e represents the estimated value of the registration error.

[0059] The beneficial effects of the present invention are:

[0060] 1. The multi-scale spatial perception mechanism of this invention integrates spatial information at different resolutions through self-supervised feature extraction, graph construction and information transfer, as well as knowledge distillation and consistency constraints, to improve the accuracy of pathological image classification. This mechanism can capture global structure and local details at different scales, achieve cross-scale information transfer through graph neural networks, and share knowledge using knowledge distillation techniques, improving the accuracy of low-resolution predictions while also contributing to improved high-resolution predictions.

[0061] 2. The Contextual Granularity Comparison module captures contextual information at different granularity levels by constructing a hierarchical graph structure and using a hierarchical attention graph representation network. This module fuses features from different granularity levels, enabling refined classification and interpretation of pathology images through graph neural networks and attention mechanisms. The module's primary function is to improve the accuracy and interpretability of pathology image analysis through multi-level feature fusion, making it suitable for scenarios requiring refined classification and diagnostic support.

[0062] 3. This paper proposes a structured registration loss function to calculate the image registration loss. This loss function combines Dice loss, Hausdorff distance loss, and Jacobian loss to comprehensively evaluate the accuracy of the registration results. Through the structured registration loss, the generation of the deformation field is optimized to ensure the consistency of the registration results in both local and global structures.

[0063] 4. The present invention, by comprehensively utilizing the above-mentioned methods, has formed an efficient, accurate and widely applicable medical image registration solution, which can effectively overcome the shortcomings of existing technologies and provide more reliable technical support for medical image analysis. The model cleverly uses a multi-scale spatial perception mechanism to capture the characteristics of medical images, and then uses the context granularity comparison module to accurately control the scale of medical image registration, thereby significantly improving the accuracy, efficiency and robustness of medical image registration at multiple levels. Multi-dataset verification: The superior performance of the model was verified on five publicly available datasets (OASIS, IXI, ADNI, LPBA and Mindboggle), and the average Dice score increased by about 2.5%, showing a significant performance improvement. This proves the stability and superiority of the present invention on different datasets. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0065] Figure 1A schematic diagram of the basic process of the multi-scale spatial perception mechanism provided by an embodiment of the present invention.

[0066] Figure 2 A schematic diagram of the structure of a context granularity comparison module provided in an embodiment of the present invention.

[0067] Figure 3 Schematic diagram of a deformable multi-level medical image registration model based on a multi-scale spatial perception mechanism provided by an embodiment of the present invention.

[0068] Figure 4 Schematic diagram of a multimodal, multi-level medical image registration system based on a contextual granularity comparison module provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0070] A first object of the present invention is to provide a deformable image registration model based on a multi-scale spatial perception mechanism, wherein the training process of the model comprises the following steps:

[0071] Step 1: Data preprocessing:

[0072] Preprocessing of WSIs, including segmentation, filtering, and thresholding, extracts tissue regions of interest and divides them into patches at different resolutions;

[0073] Step 2: Extract image features through multi-scale spatial perception mechanism and build graph neural network:

[0074] Through self-supervised feature extraction and graph construction, image features at different scales are captured, and information is propagated between different scales through the graph neural network (GNN) module to achieve efficient fusion of multi-scale features;

[0075] Step 3: Capture context information at different granularity levels through the context granularity comparison module:

[0076] Use a pre-trained encoder to extract multi-granularity features of image patches, and gradually fuse and encode features at different granularity levels through components such as P-GCN, hierarchical attention layer (HA layer), T-GCN, and global attention layer (GA layer), ultimately generating a packet-level representation for classification;

[0077] Step 4: Knowledge Distillation and Consistency Regularization:

[0078] A (self-)knowledge distillation mechanism is introduced to encourage predictions at different resolutions to reach consistency by minimizing the Euclidean distance between the low-resolution critical grid map and its subsampled counterpart calculated by the high-resolution branch. Knowledge distillation and consistency regularization are used as additional optimization objectives to form the overall optimization problem together with the cross-entropy loss.

[0079] Step 5: The hierarchical attention feature fusion module outputs the registered image.

[0080] Optionally, the calculation formula of the graph neural network (GNN) module is:

[0081] Y=GNN(X;A1,A2,A 1∪2 ,θ GNN )=GNN1(X;A1,A2)·GNN2(X;A 1∪2 )

[0082] It is used to describe how the graph neural network (GNN) module processes the multi-scale patch-level representation X and generates the contextualized feature Y through the cascade of two neural sub-networks GNN1 and GNN2. Where A1 and A2 are adjacency matrices of different scales, A 1∪2 is the fused adjacency matrix;

[0083] Step 6: The loss function calculation module calculates the structured registration loss to measure the effect of image registration.

[0084] A second object of the present invention is to provide a training module for training a multi-level spatial knowledge guided medical image registration model.

[0085] The modules include:

[0086] 1. Data preprocessing module:

[0087] The original WSI is downsampled and tissue segmented to generate image block sets and tissue component sets at different magnifications. The specific steps include:

[0088] Image downsampling: The original WSI is downsampled to multiple resolutions to generate images at different magnifications.

[0089] Tissue segmentation: Use the Otsu algorithm for initial segmentation, remove the background area, and retain the foreground tissue area.

[0090] Image block extraction: Extract non-overlapping image blocks in the segmented foreground area to ensure that there is no overlap between image blocks.

[0091] 2. Multi-scale spatial perception mechanism:

[0092] Use the pre-trained encoder to extract features of the image blocks, which will serve as the initial features of the nodes in the graph. The specific steps include:

[0093] Feature extractor selection: Use a pre-trained encoder, such as ResNet50 or ViT, to extract features of image patches.

[0094] Feature representation: The extracted features are represented as high-dimensional vectors for subsequent graph construction and feature fusion.

[0095] Optionally, the calculation formula of the feature extraction module is:

[0096]

[0097] Among them, Q, K (t) and V (t) denote query, key and value matrices respectively, f q Represents the dimension of the query vector; X1 represents the output of the current layer feature, X (t) Represents a high-level feature map.

[0098] Among them, X1 represents the output of the current layer feature, X (t) Represents a high-level feature map.

[0099] Optionally, the calculation formula expressed as a high-dimensional vector is:

[0100]

[0101] Among them, X(s) represents the feature map of the current layer, Q (s) , K (s) and V (s) denote query, key and value matrices respectively, f q is the dimension of the query vector.

[0102] 3. Contextual Granularity Comparison Module:

[0103] The hierarchical graph construction module includes a organizational graph (TG) and image patch graphs (PGs) at different magnifications, as well as the subordinate relationship edges between them. The specific steps include:

[0104] Data preprocessing: The original WSI is downsampled and the tissue is segmented to generate a set of image blocks and a set of tissue components at different magnifications.

[0105] Organizational chart construction: Using organizational components as nodes, an organizational chart (TG) is constructed to capture the spatial relationships between organizations.

[0106] Image patch graph construction: Image patches at different magnifications are used as nodes to construct image patch graphs (PGs) to capture the spatial relationship between image patches.

[0107] Dependency edge construction: Dependency edges are established between the organization graph and the image block graph to represent the hierarchical relationship between the organization and the image blocks.

[0108] 4. Hierarchical Attention Feature Fusion Module:

[0109] The pre-trained encoder is used to extract the features of the image blocks as the initial features of the nodes in the graph. Through components such as P-GCN (graph convolution layer), hierarchical attention layer (HA layer), T-GCN (tissue convolution layer) and global attention layer (GA layer), the features of different granularity levels are gradually fused and encoded, and finally a packet-level representation for classification is generated. The specific steps include:

[0110] P-GCN (Patch Graph Convolutional Network): Encodes the image patch graph to capture the local features between image patches. Optionally, the message passing formula of the P-GCN is:

[0111]

[0112] in, is the input node feature of the first layer P-GCN, is the 1-hop neighbor node of node i, is the sum of the features of nodes i and j at layer 1, It is the fusion feature, and MLP1 is the multi-layer perceptron as the residual connection.

[0113] Hierarchical Attention Layer (HA layer): It performs attention fusion on image patches at different magnifications to capture features at different granularity levels.

[0114] T-GCN (Tissue Graph Convolutional Network): Encodes the tissue graph and captures the global features between tissues.

[0115] Global Attention Layer (GA Layer): Global attention is performed on the features of the tissue map and the image patch map to generate a packet-level representation and produce the registration result.

[0116] This module can effectively improve the accuracy and interpretability of pathological image analysis by capturing and fusing contextual information at different levels of granularity. It is particularly suitable for scenarios that require fine classification and diagnostic support.

[0117] Optionally, the hierarchical attention layer formula is:

[0118]

[0119] in, is the updated organizational component node feature, S i is the feature matrix of the image block node belonging to tissue component i, x′ p represents the processed feature vector, Represents the connection or affiliation between nodes, α i is the hierarchical attention vector, W k 、W v and W q is a trainable weight matrix.

[0120] Loss function calculation module:

[0121] This module defines a loss function, the structured registration loss, to measure the effectiveness of image registration. It also details a formula for estimating the error by calculating the distance between registered matching features in the full-resolution image. This represents a specific innovative implementation of the present invention in medical image registration error assessment.

[0122] Optionally, the registration error estimate e can be calculated using the following formula:

[0123]

[0124] where w i represents the weight of the i-th feature point, represents the feature of the kth node in feature set 1, represents the kth node feature in feature set 2, n represents the number of matching feature points, and e represents the estimated value of the registration error.

[0125] By introducing the Hierarchical Visual Transformer (H-ViT) and a multi-scale spatial perception mechanism, this paper captures both short- and long-range deformation features at different scales. This is then processed using a contextual granularity comparison module, resulting in a more accurate representation of the deformation field. Compared to existing CNN and Transformer methods, this paper achieves higher registration accuracy and faster inference speed when processing large-scale medical images.

[0126] Experimental data verification:

[0127] 1: Training and validation of medical image registration models guided by multi-level spatial knowledge

[0128] Training configuration: Use NVIDIA A100 GPU, batch size 4, Adam optimizer (initial learning rate 10-4), and train for 200 epochs.

[0129] Dataset: Trained on five public MRI datasets including OASIS, IXI, and ADNI, divided into 80% training set, 10% validation set, and 10% test set.

[0130] Performance indicators: Dice score, Hausdorff distance (HD95), standard deviation of the Jacobian (SDlogJ).

[0131] Table 1 shows a comparison of experimental results. H-ViT achieves a Dice score of 0.876±0.014 on the OASIS dataset, outperforming TransMorph (0.862) and VoxelMorph (0.847). In cross-dataset tests (e.g., ADNI), H-ViT's Dice score improves by over 3% (Table 3), with the percentage of collapsed voxels below 1.5%, demonstrating its robustness.

[0132] 2: Ablation experiments and parameter analysis of a self-supervised deformable registration model show that removing the cross-attention module (retaining only self-attention) results in a 1.5% decrease in Dice score, while increasing the number of cross-attention heads (from 8 to 64) improves accuracy by 0.4%. The optimal parameter configuration is: 64 heads, 2×2×2 voxel block size, and no dropout.

[0133] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, the above is only a preferred embodiment of the present invention. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited to this. Any technical personnel familiar with this technical field is within the technical scope disclosed by the present invention. For ordinary technical personnel in this technical field, changes or replacements that can be easily thought of should be covered within the protection scope of the present invention without departing from the principle of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A multi-level spatial knowledge-guided medical image registration model, characterized by: The context granularity comparison module is used for training. The training method includes the following steps: Step 1) Acquire whole-slice images (WSIs), preprocess the image data, extract the required tissue area, and divide it into patches at different resolutions; Step 2) Extract image features and construct a graph neural network through a multi-scale spatial perception mechanism: Through self-supervised feature extraction and graph construction, image features at different scales are captured, and the graph neural network (GNN) module propagates information between different scales to achieve efficient fusion of multi-scale features. Step 3) Capture contextual information at different granularity levels through the context granularity comparison module: Use a pre-trained encoder to extract multi-granularity features of image patches, and gradually fuse and encode features at different granularity levels through the Patch Graph Convolutional Network (P-GCN), Hierarchical Attention Layer (HA), Organizational Graph Convolutional Network (T-GCN), and Global Attention Layer (GA) components to finally generate a packet-level representation for classification; Step 4) Knowledge distillation and consistency regularization: Knowledge distillation and consistency regularization are used as additional optimization objectives, together with the cross entropy loss to form the overall optimization problem; Step 5) The hierarchical attention feature fusion module outputs the registered image; Step 6) The loss function calculation module calculates the structured registration loss to measure the effect of image registration.

2. The method for training a multi-level spatial knowledge-guided medical image registration model according to claim 1, characterized in that: Step 1) The data preprocessing process includes: 1.1) Image downsampling: downsampling the original WSI to multiple resolutions to generate images at different magnifications; 1.2) Tissue segmentation: Use the Otsu algorithm for initial segmentation, remove the background area through filtering, and retain the foreground tissue area; 1.3) Image block extraction: Extract non-overlapping image blocks in the segmented foreground area to ensure that there is no overlap between image blocks.

3. The training method of the multi-level spatial knowledge-guided medical image registration model according to claim 1, characterized in that: The process of extracting image features through the multi-scale spatial perception mechanism in step 2) is specifically as follows: 2.1) Feature Extractor Selection: Use a pre-trained encoder to extract features of image patches; 2.2) Feature representation: The extracted features are represented as high-dimensional vectors for subsequent graph construction and feature fusion.

4. The method for training a multi-level spatial knowledge-guided medical image registration model according to claim 3, characterized in that: The calculation formula of the feature extraction module is: Among them, Q, K (t) and V (t) denote query, key and value matrices respectively, f q Represents the dimension of the query vector; X1 represents the output of the current layer feature, X (t) Represents a high-level feature map; The calculation formula expressed as a high-dimensional vector is: Among them, X(s) represents the feature map of the current layer, Q (s) , K (s) and V (s) denote query, key and value matrices respectively, f q is the dimension of the query vector.

5. The method for training a multi-level spatial knowledge-guided medical image registration model according to claim 1, characterized in that: Step 4) The knowledge distillation and consistency regularization process specifically introduces a self-knowledge distillation mechanism to encourage predictions at different resolutions to reach consistency, which is achieved by minimizing the Euclidean distance between the low-resolution critical grid map and its sub-sampled counterpart calculated by the high-resolution branch.

6. The method for training a multi-level spatial knowledge-guided medical image registration model according to claim 1, characterized in that: The calculation formula of the graph neural network GNN module in step 5) is: Y=GNN(X;A1,A2,A 1∪2 ,θ GNN )=GNN1(X;A1,A2)·GNN2(X;A 1∪2 ) Among them, it is used to describe how the graph neural network GNN module processes the multi-scale patch-level representation X, and generates the contextualized feature Y through the cascade of two neural sub-networks GNN1 and GNN2. A1 and A2 are adjacency matrices of different scales, and A 1∪2 is the fused adjacency matrix.

7. A training method for a multi-level spatial knowledge-guided medical image registration model, characterized in that It includes data preprocessing module, multi-scale spatial perception mechanism module, context granularity comparison module, hierarchical attention feature fusion module and loss function calculation module; Data preprocessing module: downsamples and segments the original whole-slice images (WSIs) to generate image block sets and tissue component sets at different magnifications; Multi-scale spatial perception mechanism module: uses a pre-trained encoder to extract features of image patches, which will serve as the initial features of nodes in the graph; Contextual granularity comparison module: This module constructs organizational diagrams and image block diagrams at different magnifications, as well as the subordinate relationship edges between them. Hierarchical Attention Feature Fusion Module: This module includes P-GCN, Hierarchical Attention (HA), T-GCN, and Global Attention (GA) components. It uses a pre-trained encoder to extract features from image patches as the initial features of nodes in the graph, gradually fuses and encodes features at different granularity levels, and ultimately generates a packet-level representation for classification. Loss function calculation module: This module defines a loss function, namely the structured registration loss, that is, the registration error estimate e to measure the effect of image registration, and estimates the error by calculating the distance between the registered matching features in the full-resolution image.

8. The training module used for training the multi-level spatial knowledge guided medical image registration model according to claim 7 is characterized by: The specific module structure of the context granularity comparison module is as follows: Organizational chart construction: Using organizational components as nodes, we construct an organizational chart (TG) to capture the spatial relationships between organizations. Image patch graph construction: Image patches at different magnifications are used as nodes to construct image patch graphs (PGs) to capture the spatial relationship between image patches. Dependency edge construction: Dependency edges are established between the organization graph and the image block graph to represent the hierarchical relationship between the organization and the image blocks.

9. The training module used for training the multi-level spatial knowledge guided medical image registration model according to claim 7 is characterized by: The specific components in the hierarchical attention feature fusion module are as follows: P-GCN: Encodes the image block graph to capture the local features between image blocks; the message passing formula of P-GCN is: Among them, x i is the eigenvector of node i, is the set of neighbor nodes of node i, W (1) 、W (2) 、W (3) is a trainable weight matrix, x i ' is the updated feature vector of node i; Hierarchical Attention Layer (HA): performs attention fusion on image patches at different magnifications to capture features at different granularity levels. T-GCN: encodes the organizational graph and captures the global characteristics between organizations; Global Attention Layer (GA): This module performs global attention fusion on the features of the tissue map and the image patch map to generate a packet-level representation and produce the registration result. This module captures and fuses contextual information at different granularity levels. The hierarchical attention layer formula is: in, is the updated organizational component node feature, S i is the feature matrix of the image block node belonging to tissue component i, x′ p represents the processed feature vector, Represents the connection or affiliation between nodes, α i is the hierarchical attention vector, W k 、W v and W q is a trainable weight matrix.

10. The training module used for training the multi-level spatial knowledge guided medical image registration model according to claim 7 is characterized by: The registration error estimation value e in the loss function calculation module is calculated by the following formula: Among them, w i represents the weight of the i-th feature point, represents the feature of the kth node in feature set 1, represents the kth node feature in feature set 2, n represents the number of matching feature points, and e represents the estimated value of the registration error.