Chronic gastric precancerous lesion recognition method based on topological multi-scale graph neural network
By constructing a topological multi-scale graph neural network and utilizing multispectral endoscopic images and glandular point cloud sets, topological invariant features are calculated, solving the problems of insufficient global topological perception and deformation sensitivity in the identification of precancerous lesions of the stomach in existing technologies, and achieving high-precision lesion identification and localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FIRST AFFILIATED HOSPITAL OF DALIAN MEDICAL UNIV
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies for identifying precancerous lesions of the stomach lack global topological perception, are sensitive to deformation and highly dependent on data, resulting in a high false positive rate and difficulty in achieving high diagnostic accuracy in rare samples.
A topological multiscale graph neural network-based approach is adopted. A topological persistent graph is constructed by decomposing multispectral endoscopic images and assembling gland point clouds. Topological invariant features are calculated, and feature fusion and classification are performed using graph attention and adaptive gating mechanisms to output pathological grading and localization results.
It improves the accuracy and robustness of diagnosis of precancerous lesions of the stomach, reduces sensitivity to deformation, reduces dependence on data volume, and enhances diagnostic performance in rare samples.
Smart Images

Figure CN122156144A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence in medicine. Background Technology
[0002] Precancerous lesions of the stomach are an essential stage in the evolution of gastric cancer. Their core pathological feature is not simply a change in color, but rather the destruction and rearrangement of glandular structures. In terms of spatial heterogeneity, the lesion areas are often focally distributed, with normal glands mixed with atrophic glands. In terms of multi-scale manifestations, precancerous lesions of the stomach are microscopically characterized by abnormal microvascular morphology (NBI pattern) and macroscopically by flattening of folds and thinning of the mucosa. In terms of topological changes, as the disease progresses, the originally regularly arranged gastric pit structures disappear, forming structural "cavities" or "ruptures".
[0003] Currently, most mainstream AI-assisted diagnostic methods for gastroscopy are based on general CNN architectures such as ResNet and EfficientNet. These methods have significant limitations: First, they lack global topological awareness. CNNs, based on convolutional kernels with fixed grids, are good at extracting textures but lack the ability to perceive long-distance geometric relationships (such as the relative positional relationships between glands), making it difficult to capture the overall disordered features of glandular structures in precancerous lesions of the stomach. Second, they are sensitive to deformation. During gastroscopy, the stomach wall deforms with the amount of gas and peristalsis. CNNs cannot effectively handle this non-rigid deformation, leading to a high false positive rate during diagnosis. Third, they are highly dependent on data. Deep CNNs require massive amounts of labeled data, while rare precancerous lesion samples (such as severe dysplasia) are scarce, making it difficult to meet the model training requirements and limiting their application in clinical scenarios. Summary of the Invention
[0004] To overcome the problems of existing gastric precancerous lesion identification technologies, such as lack of global topological awareness, high false positive rate due to deformation sensitivity, and strong data dependence, this invention provides a method for identifying chronic gastric precancerous lesions based on topological multi-scale graph neural networks, comprising the following steps:
[0005] S1. Acquire multispectral endoscopic images under gastroscopy, perform multiscale decomposition and color space transformation on the images, and construct a multi-channel feature map containing texture details and mucosal background.
[0006] S2. Perform instance segmentation and morphological extraction on the glands in the multi-channel feature map to determine the centroid coordinates, contour perimeter and morphological vector of the glands, and form a set of gland point clouds;
[0007] S3. Based on the gland point cloud set, a topological persistent graph of gland structure distribution is constructed through the persistent homology theory, and topological invariant features characterizing the degree of disorder in gland arrangement are calculated.
[0008] S4. Using the centroid of the gland as the node and the spatial neighborhood relationship between glands as the edge, and combining the topological invariant features, construct a multi-scale gland topology graph.
[0009] S5. The multi-scale gland topology map is aggregated and updated using a graph attention mechanism to obtain a lesion feature vector that integrates local gland morphology and global topology distribution.
[0010] S6. Input the lesion feature vector into the classifier and output the pathological grading and lesion area localization results of chronic gastric precancerous lesions.
[0011] Preferably, in step S1, the multispectral endoscopic image is converted to the LAB color space, and the color space is extracted. The channel is used as the luminance component. , Channels are used as chromaticity components;
[0012] right The channel images are decomposed using the Laplacian pyramid to obtain sub-band image sequences at different resolutions;
[0013] right , Perform contrast-limited adaptive histogram equalization on the channel images;
[0014] The processed chroma and luminance components are fused to obtain a multi-channel feature map.
[0015] Preferably, in step S3, the Euclidean distance parameter is defined. The preset threshold is Vietoris-Rips simplification complex is constructed based on distance parameters from gland point cloud sets. ;
[0016] Make distance parameter Increase from 0 to the preset threshold Perform a continuous homology filtering operation to generate nested simple complex sequences;
[0017] Calculate the generation times of the 0-dimensional homology group and the 1-dimensional homology group in a simplex complex sequence. With the moment of extinction In a two-dimensional plane Draw a persistent topological graph for the coordinate points;
[0018] Calculate topological feature entropy :
[0019] ;
[0020] ;
[0021] in, This represents the total number of topological feature points in the topological persistent graph. For the first in the topological persistent graph The normalized lifetime length of each topological feature point For the first The moment of disappearance of a topological feature point For the first The generation time of each topological feature point For the first Original lifetime length of each topological feature point This is the sum of the original lifetime lengths of all topological feature points.
[0022] Preferably, in step S4, the process of constructing a multi-scale gland topology map is as follows:
[0023] Perform Delaunay triangulation on the gland point cloud set to generate an initial adjacency matrix. ;
[0024] When glands When it belongs to the Delaunay edge set, for the initial adjacency matrix Perform weighted adjustment:
[0025] ;
[0026] in, For the corrected topological adjacency matrix, the first... Line number Column elements, and The first , The centroid coordinates of each gland; The Gaussian kernel width parameter, This is the topological influence coefficient. For glands , The persistence strength of components belonging to the same connected component during continuous homology filtering; thus obtaining the topological adjacency matrix. ;
[0027] Use the morphological vector of each gland as the initial feature of the graph node. Combined with the topological adjacency matrix Constructing a multi-scale gland topology map .
[0028] Preferably, the Alpha Shape contour of the gland point cloud set is calculated, and the gland nodes located at the edge of the contour are marked as boundary nodes;
[0029] For boundary nodes, in calculating the topological adjacency matrix When this is the case, boundary constraints are introduced:
[0030] ;
[0031] in, This is an indicator function; it takes a value of 1 when the node is a boundary node, and otherwise... ; This is the boundary penalty coefficient, with a value range of [0.2, 0.5]. This is the set of boundary nodes.
[0032] Preferably, in step S5, the nodes in the multi-scale gland topology graph are calculated. Its neighboring nodes The original attention coefficients between :
[0033] ;
[0034] in, For a leaky ReLU activation function, and They are nodes and eigenvectors, To share the weight matrix, For attention weight vectors, This is a vector concatenation operation;
[0035] Introducing topology bias terms Original attention coefficients Make corrections to obtain nodes. with neighboring nodes Corrected attention coefficient :
[0036] ;
[0037] in, For topological bias weights, To prevent overflow in logarithmic operations, a small constant is selected. ;
[0038] Normalized Corrected Attention Coefficient The normalized attention weights are obtained. :
[0039] ;
[0040] in, For nodes with neighboring nodes Corrected attention coefficients between;
[0041] according to Perform feature weighted summation, use a multi-head mechanism to concatenate features, and update the nodes. The feature vector is :
[0042] ;
[0043] in, ELU is a non-linear activation function. For the first The weight matrix of each attention head; This is a lesion feature vector that integrates local gland morphology and global topological distribution.
[0044] Preferably, in step S6, the pathological grading of precancerous lesions of chronic gastric cancer includes normal gastric mucosa, mild chronic atrophic gastritis, moderate to severe chronic atrophic gastritis, and early gastric cancer; the classifier determines the highest matching pathological grade by calculating the similarity between the lesion feature vector and each category or by outputting the probability distribution; there is a correspondence between the lesion feature vector and the spatial location of the input image, and the classifier selects the lesion location by mapping the source region of the lesion feature vector.
[0045] Preferably, in step S6, the feature fusion formula performed by the classifier is:
[0046] ;
[0047] in, This is the final fused feature vector used for classification. This is the graph-level feature representation updated by the graph attention mechanism. For global texture statistical features of the image, The topological feature vector is calculated based on the topological persistent graph;
[0048] Feature selection via gating mechanisms:
[0049] ;
[0050] ;
[0051] in, This is the weight vector of the gating mechanism, corresponding to... Weights of each feature dimension; For the gated weight matrix, This is the gated bias vector. This is the weighted feature vector after gating. This indicates element-wise multiplication.
[0052] Preferably, the method further includes step S7: calculating the total loss value. The formula is:
[0053] ;
[0054] in, For weighted cross-entropy loss in lesion classification, For balance coefficient, The topology consistency loss is calculated using the following formula:
[0055] ;
[0056] in, To obtain the topological distribution of the input space To the topological distribution of the feature space Transportation plan, For feature points in the topological persistent graph, The graph neural network outputs feature points of a persistent graph in the feature space; repeat steps S1-S7 for iterative training, updating the model parameters until the total loss value is minimized.
[0057] The beneficial effects of this invention are as follows:
[0058] This invention integrates the continuous homology theory in algebraic topology with multi-scale graph neural networks to transform medical images into mathematically robust topological multi-scale gland graphs. By calculating topological invariants, this invention can accurately quantify the "spatial disorder" of glands and the structural "void" effect caused by atrophy, which are difficult for conventional visual models to capture. This characteristic makes it highly robust to non-rigid deformations such as stretching and rotation of endoscopic images, effectively solving the problem of deformation sensitivity of existing CNN models. This invention utilizes strong prior knowledge of mathematical structures to effectively solve the problem of sample scarcity in medical scenarios. Compared with purely data-driven models, this invention can achieve high diagnostic accuracy without massive amounts of labeled data, significantly improving the model's generalization ability and demonstrating excellent performance in the diagnosis of rare precancerous lesion samples. Through multi-scale decomposition and fusion, the application of graph attention mechanisms, and adaptive gating feature selection, this invention can fully integrate local gland morphological features and global topological distribution features, comprehensively capturing multi-dimensional information of lesions, further improving the accuracy and reliability of diagnosis. Attached Figure Description
[0059] Figure 1 This is a schematic diagram of the overall process of an embodiment of the present invention;
[0060] Figure 2 This is a schematic diagram illustrating an example of using the method of the present invention to detect precancerous lesions of the stomach. Detailed Implementation
[0061] Embodiments of the present invention provide a method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network, such as... Figure 1 As shown, it includes the following steps:
[0062] S1. Establish a chronic gastric precancerous lesion identification model, collect multispectral endoscopic images under gastroscopy and input them into the model, perform multi-scale decomposition and color space transformation on the images, and construct a multi-channel feature map containing texture details and mucosal background.
[0063] Convert the original RGB multispectral endoscopic images to the LAB color space and extract... The channel is used as the luminance component. , Channels are used as chromaticity components;
[0064] right The channel images are decomposed using Laplacian pyramids to obtain sub-band image sequences at different resolutions. ,in, The scale level has values of 0, 1, and 2, corresponding to the microvascular texture scale, glandular structure scale, and mucosal background scale, respectively.
[0065] right , The channel images are subjected to contrast-limited adaptive histogram equalization (CLAHE) to enhance the microvascular texture features of the mucosal surface and simulate the visual effect of narrow-band imaging (NBI).
[0066] The enhanced chroma and luminance components are fused to generate an enhanced multichannel feature tensor for subsequent gland segmentation. This allows us to obtain multi-channel feature maps.
[0067] S2. Perform instance segmentation and morphological extraction on the glandular structures in the multi-channel feature map, determine the centroid coordinates, contour perimeter, and morphological vectors of all visible glands, and form a glandular point cloud set. :
[0068] ;
[0069] in, For the first The centroid coordinates of each gland.
[0070] S3. Based on the gland point cloud set, a topological persistent graph of gland structure distribution is constructed through the persistent homology theory, and topological invariant features characterizing the degree of disorder in gland arrangement are calculated.
[0071] The specific process of constructing a topological persistent graph of glandular structure distribution and calculating topological invariant features is as follows:
[0072] Define Euclidean distance parameters The preset threshold is Vietoris-Rips simplification complex is constructed based on distance parameters from gland point cloud sets. ;
[0073] Make distance parameter Increase from 0 to the preset threshold Perform a continuous homology filtering operation to generate a series of nested simple complex sequences;
[0074] Calculate the generation times of the 0-dimensional homology group (connected components) and the 1-dimensional homology group (holes) in a simplex complex sequence. With the moment of extinction In a two-dimensional plane Draw a persistent topological graph for the coordinate points;
[0075] To quantify the disorder of gland distribution, topological feature entropy is calculated based on a topological persistent graph. Topological feature entropy The calculation formula is:
[0076] ;
[0077] ;
[0078] in, This represents the total number of topological feature points in the topological persistent graph. For the first in the topological persistent graph The normalized lifetime length of each topological feature point For the first The moment when a topological feature point disappears, i.e., the distance parameter when the feature disappears during continuous homology filtering. value, For the first The generation time of each topological feature point, i.e., the distance parameter when the feature appears in the continuous homology filtering. value, For the first Original lifetime length of each topological feature point The sum of the original lifetime lengths of all topological feature points; topological feature entropy. The larger the size, the more disordered the distribution of all glands, corresponding to a higher degree of chronic atrophic gastritis.
[0079] Topological invariant features include topological feature entropy, lifetime length, etc.
[0080] S4. Using the centroid of the gland as the node and the spatial neighborhood relationship between glands as the edge, and combining the topological invariant features, construct a multi-scale gland topology graph.
[0081] "Spatial neighborhood relationship between glands" refers to the proximity relationship between different glands in physical space, that is, which glands in the gland point cloud set are close to each other in space.
[0082] The process of constructing a multi-scale gland topology map is as follows:
[0083] Perform Delaunay triangulation on the gland point cloud set to generate an initial adjacency matrix that reflects the biological spatial neighborhood relationships of the glands. ;
[0084] Combining topological invariant characteristics, when glands When it belongs to the Delaunay edge set, for the initial adjacency matrix Perform weighted adjustment:
[0085] ;
[0086] in, For the corrected topological adjacency matrix, the first... Line number The elements of the column represent glands. , Topological connection weights between them; and The first , The centroid coordinates of each gland; The Gaussian kernel width parameter is used to adjust the degree of influence of distance on connection weights; This is the topological influence coefficient, used to balance the contributions of spatial distance and topological features; and It is learned during the iterative optimization process of model training in deep learning, and is not preset; For glands , The persistence strength of components belonging to the same connected component during continuous homology filtering; thus, the topological adjacency matrix is obtained. ;
[0087] The morphological vector of each gland (including area, eccentricity, and histogram of oriented gradients) is used as the initial feature of the graph node. Combined with the topological adjacency matrix Constructing a multi-scale gland topology map .
[0088] Introducing a shrinkage boundary constraint mechanism:
[0089] Computing gland point cloud set The Alpha Shape contour is used to mark gland nodes located at the edges of the contour as boundary nodes;
[0090] For boundary nodes, in calculating the topological adjacency matrix At this time, an edge penalty term is added to suppress pseudo-topological connections at the edges of non-lesion areas, thereby improving the recognition accuracy of focal rhombus contractions. The elements of the topological adjacency matrix after introducing boundary constraints are:
[0091] ;
[0092] in, This is an indicator function used to determine whether a node is a boundary node. It takes a value of 1 if the node is a boundary node, and 0 otherwise. ; This is the boundary penalty coefficient, with a value range of [0.2, 0.5]. This is the set of boundary nodes, specifically the gland nodes located at the edge of the Alpha Shape contour of the gland point cloud.
[0093] S5. The multi-scale gland topology map is aggregated and updated using a graph attention mechanism to obtain a lesion feature vector that integrates local gland morphology and global topology distribution.
[0094] The process of feature aggregation and updating using graph attention mechanisms includes:
[0095] Calculate nodes in a multi-scale gland topology graph Its neighboring nodes The original attention coefficients between :
[0096] ;
[0097] in, For a leaky ReLU activation function, and They are nodes and The feature vector is composed of gland morphology vectors; A shared weight matrix is used for dimensionality transformation and feature extraction of node feature vectors; For attention weight vectors, This is a vector concatenation operation that concatenates feature vectors along their dimensions into a longer feature vector.
[0098] Introducing topology bias terms Original attention coefficients Make corrections to obtain nodes. with neighboring nodes Corrected attention coefficient :
[0099] ;
[0100] in, For topological bias weights, To prevent overflow in logarithmic operations, a small constant is selected. ;
[0101] Normalized corrected attention coefficient The normalized attention weights are obtained. :
[0102] ;
[0103] in, For nodes with neighboring nodes Corrected attention coefficients between;
[0104] according to Perform weighted summation of features, update node features, and use a multi-head mechanism to concatenate the features. The updated node... The feature vector is :
[0105] ;
[0106] in, ELU is a non-linear activation function. For the first The weight matrix of each attention head; This is a lesion feature vector that integrates local gland morphology and global topological distribution.
[0107] S6. Input the lesion feature vector into the classifier and output the pathological grading and lesion area localization results of chronic gastric precancerous lesions.
[0108] The pathological grading of precancerous lesions of chronic gastric cancer includes normal gastric mucosa, mild chronic atrophic gastritis, moderate to severe chronic atrophic gastritis, and early gastric cancer. The classifier determines the highest matching pathological grade by calculating the similarity between the lesion feature vector and each category (SVM) or by outputting the probability distribution (fully connected neural network layer). There is a correspondence between the lesion feature vector and the spatial location of the input image; the classifier maps the source region of the lesion feature vector to select the lesion location.
[0109] The classifier is a multi-class support vector machine (SVM) or a fully connected neural network layer, containing a multi-scale feature fusion module. Its feature fusion formula is as follows:
[0110] ;
[0111] in, This is the final fused feature vector used for classification. This is the graph-level feature representation updated by the graph attention mechanism. For global texture statistical features of the image, The topological feature vectors are calculated based on the topological persistent graph. The generation employs the Persistence Landscape transformation method, which maps a two-dimensional persistent graph into a one-dimensional vector sequence to meet the input requirements of the classifier.
[0112] The multi-scale feature fusion module includes a feature selection unit based on an adaptive gating mechanism:
[0113] ;
[0114] ;
[0115] in, This is the weight vector of the gating mechanism, corresponding to... Weights of each feature dimension; For the gated weight matrix, This is the gated bias vector. This is the weighted feature vector after gating. This indicates element-wise multiplication. The feature selection unit based on the adaptive gating mechanism is used to allow the model to automatically adjust the contribution of texture features, topological features, and graph features according to the lesion type.
[0116] If the input is a certain type of lesion, the model will dynamically adjust the parameters (gating weight matrix, gating bias vector) learned during the iterative optimization process of training so that the elements of the corresponding topological feature dimension in the gating mechanism weight vector will approach the preset value.
[0117] S7. Based on the output of S6 and the lesion feature vector of S5, the total loss value is calculated using a joint optimization strategy of weighted cross-entropy loss function and topological consistency loss function. The formula is:
[0118] ;
[0119] in, The weighted cross-entropy loss for lesion classification is derived from the classifier output in step S6. It is compared with the true label of the sample to calculate the error and is used to solve the problems of sample imbalance and sample scarcity. This is a balancing coefficient used to adjust the weight ratio between classification loss and topological consistency loss; The topology consistency loss is used to constrain the feature space extracted by the network to maintain a similar topology to the original input space, avoiding deviation between the feature space and the original gland distribution topology, thus improving topology robustness. Its calculation method is as follows:
[0120] ;
[0121] in, To obtain the topological distribution of the input space To the topological distribution of the feature space Transportation plan, For feature points in the topological persistent graph, The formula represents the feature points of the persistent graph of the output features of the graph neural network in the feature space; the formula represents the first-order Wasserstein distance (Earth Mover's Distance) between the topological persistent graph of the glandular structure distribution in step S3 and the persistent graph of the output features of the graph neural network in the feature space. Here, the persistent graph of the output features of the graph neural network in the feature space is derived from the topological transformation of the lesion feature vector in step S5.
[0122] Repeat steps S1-S7 to train the model, optimize and update each parameter of the model until the total loss value is reduced to the minimum, and obtain a stable chronic gastric precancerous lesion recognition model.
[0123] Example 2:
[0124] like Figure 2 The diagram illustrates an example of detecting precancerous lesions of the stomach. In the diagram, AC represents a sample with mild to moderate chronic atrophic gastritis and intestinal metaplasia, and DF represents a sample with severe dysplasia (early precancerous lesion). The method of this invention is used to identify the lesions in the above samples:
[0125] S1, Chronic gastric precancerous lesion identification model obtains corresponding... Figure 2 Endoscopic narrow-band imaging (NBI) image of the sample. Although Figure 2 The images displayed are microscopic pathological sections, but step S1 of this invention, through multi-scale decomposition and color space transformation, can enhance the mucosal background and glandular opening features in the endoscopic images, making them as visually similar as possible. Figure 2 The clarity of the gland outline shown in A and D.
[0126] S2, targeting Figure 2 The glandular structures in the H&E stained images shown in A and D are... Figure 2 In scenario A, the system identifies glands as relatively regularly arranged with gaps remaining, and the centroid point cloud of the glands extracted by the algorithm is relatively uniformly distributed. Figure 2In the context of D (see arrow), the glandular structures are noticeably crowded and share walls, exhibiting a complex "back-to-back" morphology. In this step, the instance segmentation of this invention extracts high-density centroid coordinates and records their morphological vectors (e.g., increased eccentricity), forming a dense set of glandular point clouds.
[0127] S3. Analyze the above gland point cloud set using the theory of continuous cohomology: For the corresponding Figure 2 For sample A, due to the relatively ordered distribution of glands, the generated persistent graph contains fewer 1D homology group feature points representing "holes" with shorter lifetimes, resulting in lower calculated topological entropy. For the corresponding... Figure 2 In the D sample, due to the extremely crowded and distorted morphology of the glands, a complex topological connection is formed. The persistent graph contains a large number of long-lived feature points, representing a highly disordered structure, which leads to a significant increase in the calculated topological feature entropy. This mathematical indicator accurately quantifies the "structural heterogeneity" that is visible to the naked eye.
[0128] S4. Construct a multi-scale gland topology map and perform feature fusion. Figure 2 Special staining of B and E in the middle glands utilizes graph attention (GAT) to aggregate geometric location information of the glands and fuse it into a structure similar to... Figure 2 The intestinal metaplasia texture features shown in B-mode (appearing as specific bright blue spots under endoscopy). For Figure 2 In high-risk areas of D, the graph attention network assigns higher weights based on topological bias terms, causing the network to "focus" on these structurally chaotic areas.
[0129] S5. The classifier combines the above features and outputs the diagnostic result: targeting... Figure 2 For inputs matching features A, B, and C, the system outputs "Chronic atrophic gastritis with intestinal metaplasia (low risk)". This is for inputs matching features A, B, and C. Figure 2 For inputs matching features D, E, and F, due to the detection of high topological entropy and abnormal texture distribution, the system outputs "Severe dysplasia / early gastric cancer (high risk)" and selects the corresponding... Figure 2 The lesion area indicated by the white arrow in the middle D indicates that the doctor should perform a targeted biopsy.
[0130] This invention has been described through embodiments. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of this invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.
Claims
1. A method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network, characterized in that, Includes the following steps: S1. Acquire multispectral endoscopic images under gastroscopy, perform multiscale decomposition and color space transformation on the images, and construct a multi-channel feature map containing texture details and mucosal background. S2. Perform instance segmentation and morphological extraction on the glands in the multi-channel feature map to determine the centroid coordinates, contour perimeter and morphological vector of the glands, and form a set of gland point clouds; S3. Based on the gland point cloud set, a topological persistent graph of gland structure distribution is constructed through the persistent homology theory, and topological invariant features characterizing the degree of disorder in gland arrangement are calculated. S4. Using the centroid of the gland as the node and the spatial neighborhood relationship between glands as the edge, and combining the topological invariant features, construct a multi-scale gland topology graph. S5. The multi-scale gland topology map is aggregated and updated using a graph attention mechanism to obtain a lesion feature vector that integrates local gland morphology and global topology distribution. S6. Input the lesion feature vector into the classifier and output the pathological grading and lesion area localization results of chronic gastric precancerous lesions.
2. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S1, the multispectral endoscopic image is converted to the LAB color space, and the color space is extracted. The channel is used as the luminance component. , Channels are used as chromaticity components; right The channel images are decomposed using the Laplacian pyramid to obtain sub-band image sequences at different resolutions; right , Perform contrast-limited adaptive histogram equalization on the channel images; The processed chroma and luminance components are fused to obtain a multi-channel feature map.
3. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S3, the Euclidean distance parameter is defined. The preset threshold is Vietoris-Rips simplification complex is constructed based on distance parameters from gland point cloud sets. ; Make distance parameter Increase from 0 to the preset threshold Perform a continuous homology filtering operation to generate nested simple complex sequences; Calculate the generation times of the 0-dimensional homology group and the 1-dimensional homology group in a simplex complex sequence. With the moment of extinction In a two-dimensional plane Draw a persistent topological graph for the coordinate points; Calculate topological feature entropy : ; ; in, This represents the total number of topological feature points in the topological persistent graph. For the first in the topological persistent graph The normalized lifetime length of each topological feature point For the first The moment of disappearance of a topological feature point For the first The generation time of each topological feature point For the first Original lifetime length of each topological feature point This is the sum of the original lifetime lengths of all topological feature points.
4. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S4, the process of constructing a multi-scale gland topology map is as follows: Perform Delaunay triangulation on the gland point cloud set to generate an initial adjacency matrix. ; When glands When it belongs to the Delaunay edge set, for the initial adjacency matrix Perform weighted adjustment: ; in, For the corrected topological adjacency matrix, the first... Line number Column elements, and The first , The centroid coordinates of each gland; The Gaussian kernel width parameter, This is the topological influence coefficient. For glands , The persistence strength of components belonging to the same connected component during continuous homology filtering; thus, the topological adjacency matrix is obtained. ; Use the morphological vector of each gland as the initial feature of the graph node. Combined with the topological adjacency matrix Constructing a multi-scale gland topology map .
5. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 4, characterized in that, Calculate the Alpha Shape contour of the gland point cloud set and mark the gland nodes located at the edge of the contour as boundary nodes; For boundary nodes, in calculating the topological adjacency matrix When this is the case, boundary constraints are introduced: ; in, This is an indicator function; it takes a value of 1 when the node is a boundary node, and otherwise... ; This is the boundary penalty coefficient, with a value range of [0.2, 0.5]. This is the set of boundary nodes.
6. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S5, the nodes in the multi-scale gland topology graph are calculated. Its neighboring nodes The original attention coefficients between : ; in, For a leaky ReLU activation function, and They are nodes and eigenvectors, To share the weight matrix, For attention weight vectors, This is a vector concatenation operation; Introducing topology bias terms Original attention coefficients Make corrections to obtain nodes. with neighboring nodes Corrected attention coefficient : ; in, For topological bias weights, To prevent overflow in logarithmic operations, a small constant is selected. ; Normalized corrected attention coefficient The normalized attention weights are obtained. : ; in, For nodes with neighboring nodes Corrected attention coefficients between; according to Perform feature weighted summation, use a multi-head mechanism to concatenate features, and update the nodes. The feature vector is : ; in, ELU is a non-linear activation function. For the first The weight matrix of each attention head; This is a lesion feature vector that integrates local gland morphology and global topological distribution.
7. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S6, the pathological grading of chronic precancerous lesions of the stomach includes normal gastric mucosa, mild chronic atrophic gastritis, moderate to severe chronic atrophic gastritis, and early gastric cancer; the classifier determines the highest matching pathological grade by calculating the similarity between the lesion feature vector and each category or by outputting the probability distribution. There is a correspondence between the lesion feature vector and the spatial location of the input image. The classifier maps the source region of the lesion feature vector to select the lesion location.
8. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, In step S6, the classifier performs feature fusion using the following formula: ; in, This is the final fused feature vector used for classification. This is the graph-level feature representation updated by the graph attention mechanism. For global texture statistical features of the image, The topological feature vector is calculated based on the topological persistent graph; Feature selection via gating mechanisms: ; ; in, This is the weight vector of the gating mechanism, corresponding to... Weights of each feature dimension; For the gated weight matrix, This is the gated bias vector. This is the weighted feature vector after gating. This indicates element-wise multiplication.
9. The method for identifying chronic precancerous lesions of the stomach based on a topological multi-scale graph neural network according to claim 1, characterized in that, It also includes step S7: calculating the total loss value. The formula is: ; in, For weighted cross-entropy loss in lesion classification, For balance coefficient, The topology consistency loss is calculated using the following formula: ; in, To obtain the topological distribution of the input space To the topological distribution of the feature space Transportation plan, For feature points in the topological persistent graph, The graph neural network outputs feature points of a persistent graph in the feature space; repeat steps S1-S7 for iterative training, updating the model parameters until the total loss value is minimized.