Pathological image diagnosis method based on gdkan and multi-order context interaction gate

CN121527083BActive Publication Date: 2026-05-12SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHWEST JIAOTONG UNIV
Filing Date
2026-01-14
Publication Date
2026-05-12

Smart Images

  • Figure CN121527083B_ABST
    Figure CN121527083B_ABST
Patent Text Reader

Abstract

The application provides a pathological image diagnosis method based on a GDKAN and multi-order context interaction gate, and belongs to the technical field of medical image processing and artificial intelligence. The method comprises the following steps: step 1, collecting full-field pathological whole section images; step 2, constructing a self-adaptive grouping dynamic Kolmogorov-Arnold network; step 3, constructing a self-adaptive grouping GDKanstransformer coding module; step 4, establishing a multi-order context interaction gate mechanism; step 5, training to obtain a GDKanstransformer model; and step 6, outputting pathological image lesion recognition results. Through the whole process design of preprocessing-dynamic feature optimization-multi-order context interaction gate fusion-classification optimization, the application realizes the automatic diagnosis of pathological images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing and artificial intelligence, and in particular to a pathological image diagnosis method based on GDKAN (Grouped Dynamic Kolmogorov-Arnold Network) and multi-level contextual interaction gating. Background Technology

[0002] Pathological image diagnosis is the "gold standard" for the diagnosis of clinical diseases (especially tumors), but traditional diagnosis relies on pathologists manually observing whole-field pathology slides (WSI), which has the following core pain points:

[0003] The processing challenges brought about by the characteristics of WSI data: WSI has extremely high resolution and large pixel size, and the images have uneven staining and noise interference. At the same time, pathological tissues have the characteristics of "small distribution differences but high heterogeneity" (like normal cells and diseased cells mixed in all slides), making it difficult for traditional image processing methods to efficiently extract effective features.

[0004] Limitations of existing deep learning models:

[0005] Traditional Transformer models rely on linear mapping to generate self-attention (Q, K, V) weights, which are insufficient for representing the complex nonlinear features of pathological images. In addition, they have a large number of parameters and high computational complexity, making them difficult to adapt to WSI's large-scale data processing.

[0006] The classic Kolmogorov-Arnold network (KAN) is prone to overfitting on pathological images (because it cannot dynamically adjust the model structure according to feature complexity), and the single-view attention mechanism is difficult to take into account the feature fusion of "local lesion details" and "global tissue association".

[0007] Insufficient diagnostic reliability and interpretability: Existing models have a weak ability to focus on key lesion areas, are easily affected by redundant information, and the model decision-making process is not transparent, making it difficult to meet the clinical diagnostic requirements of "traceability and interpretability".

[0008] In summary, existing technologies urgently need an automated pathological image diagnosis scheme that can balance "feature representation capability, computational efficiency, and diagnostic interpretability". Summary of the Invention

[0009] This invention provides a pathological image diagnosis method based on GDKAN and multi-level context interaction gating. Through a full-process design of preprocessing, dynamic feature optimization, multi-level context interaction gating fusion, and classification optimization, it realizes automated diagnosis of pathological images.

[0010] To achieve the above objectives, the present invention adopts the following technical solution:

[0011] Pathological image diagnosis methods based on GDKAN and multi-level contextual interaction gating include:

[0012] Step 1: Collect full-field pathological whole-slice images, and perform color standardization, noise reduction and tissue region segmentation on them in sequence; at a preset magnification, use a fixed step size sliding window to crop the processed image into image blocks of a preset size, and generate image block embedding by linear projection and convolution downsampling of the image blocks to obtain sequence features;

[0013] Step 2: Construct an adaptive grouped dynamic Kolmogorov-Arnold network. Based on the statistics of sequence features, the grouping strategy network adaptively determines the number of groups and channel division. Calculate the pixel or channel-level information entropy of each group feature and obtain the density coefficient. Dynamically allocate the number of basis spline functions to each group within the preset upper and lower bounds of the number of splines. Apply dynamic Kolmogorov-Arnold network operations to the group features. Combine the linear transformation of the operation result with the linear transformation of the group features after activation by the GELU function to obtain the output features of the grouped dynamic Kolmogorov-Arnold network.

[0014] Step 3: Construct an adaptive grouped GDKansformer encoding module, with the Transformer encoding block as the main body. Use the output features of the grouped dynamic Kolmogorov-Arnold network as nonlinear mapping units to replace the traditional linear mapping to generate the query matrix, key matrix, and value matrix of self-attention. Calculate scaled dot product attention based on the query matrix and key matrix. After splitting the value matrix according to the attention head, perform nonlinear interpolation on each head value matrix through the grouped dynamic Kolmogorov-Arnold network. Concatenate the interpolated head value matrix with the corresponding attention result to obtain the GDKansformer encoded output features.

[0015] Step 4: Establish a multi-level context interaction gating mechanism. Perform spatial feature enhancement operations on the output features of GDKansformer encoding. After convolution and batch normalization to suppress redundant channel features, the enhanced features are obtained by combining global average pooling and GELU function activation. The enhanced features are then processed by one-dimensional convolution and Softmax to generate gating weights. Based on these weights, pixel-level non-local context and adaptive local context features are aggregated to obtain the output features of the multi-level context interaction gating mechanism.

[0016] Step 5: Perform global average pooling on the output features of the multi-level context interaction gating mechanism, input the pooling result into the fully connected layer and obtain the pathological image category prediction probability through Softmax; during the training phase, the total loss function is constructed based on cross-entropy loss and combined with L2 weight decay regularization, and all learnable parameters of the model are optimized end-to-end to obtain the GDKansformer model.

[0017] Step 6: Input the full-field pathological slice image to be diagnosed into the GDKansformer model and output the pathological image lesion recognition results.

[0018] In this instruction manual, step 1 involves cropping the processed image into a preset size image block using a fixed step-size sliding window. Specifically, the cropping operation is performed only on the tissue region obtained after tissue region segmentation, excluding the background region in the full-view pathological whole-section image, to obtain a preset size image block containing only the tissue.

[0019] In this specification, step 2, which calculates the pixel or channel-level information entropy of each group feature, specifically involves: performing a softmax operation on each group feature determined by the grouping policy network to obtain the activation intensity distribution of the group feature; and calculating the pixel or channel-level uncertainty of the group feature based on the activation intensity distribution using the information entropy formula, where uncertainty is the information entropy.

[0020] In this specification, step 2, which obtains the density coefficient based on information entropy, specifically involves: calculating the maximum and minimum values ​​of the information entropy for all grouped features; performing a max-min normalization operation on the information entropy of each grouped feature to obtain the density coefficient corresponding to that grouped feature.

[0021] In this specification, step 2 combines the linear transformation of the computation result with the linear transformation of the grouped features after activation by the GELU function to obtain the adaptive grouped dynamic Kolmogorov-Arnold network output features. Specifically, the linear transformation is performed on the result after applying the dynamic Kolmogorov-Arnold network operation to obtain the first linear output; the original grouped features are processed by the GELU function and then subjected to a linear transformation to obtain the second linear output; the first linear output and the second linear output are added together to obtain the grouped dynamic Kolmogorov-Arnold network output features.

[0022] In this specification, step 3 involves performing nonlinear interpolation on each head value matrix using an adaptive grouped dynamic Kolmogorov–Arnold network. Specifically, each head value matrix is ​​input into the grouped dynamic Kolmogorov–Arnold network constructed in step 2, and the elements of the head value matrix are nonlinearly fitted using the dynamically assigned basis spline functions in the network to obtain the fitted head value matrix, which is the interpolated head value matrix.

[0023] In this specification, step 4 performs spatial feature enhancement on the encoded output features of step 3. Specifically, it performs batch normalization on the GDKansformer encoded output features, and then compresses the channel dimensions through convolution to obtain compressed features; it performs global average pooling on the compressed features to obtain channel global features; it calculates the difference between the compressed features and the channel global features, multiplies the difference by the preset channel weight coefficients, adds the difference to the compressed features, and then uses the GELU function to obtain the enhanced features.

[0024] In this specification, step 4, which aggregates pixel-level non-local context and adaptive local context features, specifically involves: the adaptive local context features being the features obtained by processing the enhanced features through depthwise separable convolution and group convolution; the pixel-level non-local context features being the features obtained by processing the enhanced features through global average pooling and convolution; and the multi-level context features being weighted and summed based on gated weights to obtain the aggregated features.

[0025] In this manual, step 5 involves constructing the total loss function using L2 weight decay regularization. Specifically, this involves: forming a parameter set from all learnable parameters of the model, calculating the square of each parameter in the parameter set and summing the results, and then multiplying the sum by the preset regularization coefficient to obtain the L2 weight decay regularization term. The total loss function is the sum of the cross-entropy loss and the L2 weight decay regularization term.

[0026] In this instruction manual, the full-field pathological slice image to be diagnosed in step 6 is a full-field pathological slice image corresponding to at least one of the organs of lung cancer, breast cancer, and colorectal cancer. The output lesion identification results include whether there is a tumor lesion and the corresponding tumor pathological subtype.

[0027] In summary, the present invention has at least the following beneficial effects:

[0028] Enhancing feature representation and discrimination capabilities: Through GDKAN's dynamic nonlinear fitting (adaptively adjusting spline functions and node density based on information entropy), GDKansformer's long-distance dependency modeling, and multi-order contextual interaction gating (MCIG) multi-order contextual feature aggregation, the model can more accurately capture subtle features of lesions in pathological images (such as abnormal cell morphology and disordered tissue structure), strengthen the feature expression of key lesion areas, and reduce the interference of redundant information from normal tissues;

[0029] Enhancing model interpretability: GDKAN makes the model's processing of features with different complexities more transparent through grouped computation and dynamic node allocation (such as more spline functions corresponding to lesion areas to enhance fitting); MCIG's multi-level context interaction gating mechanism can clearly distinguish the contribution of different levels of context (local / global) to the diagnostic results, helping clinicians to trace the basis of model decision-making.

[0030] Reduce computational costs and parameter size: The feature grouping strategy of adaptive grouping GDKAN reduces the dimension of a single group of features, and dynamic node allocation avoids invalid parameter redundancy for low-complexity features; at the same time, GDKAN replaces some linear mapping modules in Transformer, significantly reducing the overall number of model parameters and computational complexity, which can be adapted to the efficient processing of large-scale WSI and is easy to deploy on the server side.

[0031] Expanding clinical applicability: The model does not rely on prior knowledge of pathological images of specific organs. It can be adapted to pathological diagnosis scenarios of multiple organs (such as lung, breast, and colon) through end-to-end training. Furthermore, the training process introduces a regularization mechanism (L2 weight decay) to improve generalization ability and reduce diagnostic bias caused by differences in data distribution, thus possessing potential for clinical promotion. Attached Figure Description

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

[0033] Figure 1 This is a flowchart illustrating the pathological image diagnosis method based on GDKAN and multi-level context interaction gating involved in this invention.

[0034] Figure 2 This is a schematic diagram of the adaptive grouped dynamic Kolmogorov–Arnold network involved in this invention.

[0035] Figure 3 This is a schematic diagram of the multi-level context interaction gating involved in this invention. Detailed Implementation

[0036] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0037] The following disclosure provides many different implementations or examples for carrying out different structures of the embodiments of the present invention. To simplify the disclosure of the embodiments of the present invention, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the embodiments of the present invention. Furthermore, reference numerals and / or reference letters may be repeated in different examples of the embodiments of the present invention; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0038] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0039] like Figure 1 As shown, this embodiment provides a pathological image diagnosis method based on GDKAN and multi-level context interaction gating, including the following steps:

[0040] Step 1: Collect full-field pathological whole-slice images, and perform color standardization, noise reduction and tissue region segmentation on the full-field pathological whole-slice images in sequence; at a preset magnification, use a fixed step size sliding window to crop the processed full-field pathological whole-slice images into image blocks of a preset size, and generate image block embedding by linear projection and convolution downsampling of the image blocks to obtain sequence features.

[0041] Step 2: Construct an adaptive grouped dynamic Kolmogorov-Arnold network. The sequence features obtained in Step 1 are adaptively grouped by the grouping strategy network to determine the number of groups and channel division. Calculate the pixel or channel-level information entropy of each group feature, obtain the density coefficient based on the information entropy, and dynamically allocate the number of basis spline functions to each group within the preset upper and lower bounds of the number of splines. Apply dynamic Kolmogorov-Arnold network operations to the group features, and combine the linear transformation of the operation result with the linear transformation of the group features after activation by the GELU function to obtain the output features of the grouped dynamic Kolmogorov-Arnold network.

[0042] Step 3: Construct the GDKansformer encoding module, with the Transformer encoding block as the main body. Use the output features of the grouped dynamic Kolmogorov-Arnold network obtained in Step 2 as nonlinear mapping units to replace the traditional linear mapping to generate the query matrix, key matrix, and value matrix of self-attention. Calculate the scaled dot product attention based on the query matrix and key matrix. After splitting the value matrix according to the attention head, perform nonlinear interpolation on each head value matrix through the adaptive grouped dynamic Kolmogorov-Arnold network. Concatenate the interpolated head value matrix with the corresponding attention result to obtain the GDKansformer encoded output features.

[0043] Step 4: Establish a multi-level context interaction gating mechanism. Perform spatial feature enhancement operations on the GDKansformer encoded output features obtained in Step 3. After convolution and batch normalization to suppress redundant channel features, combine global average pooling and GELU function activation to obtain enhanced features. Generate gating weights by one-dimensional convolution and Softmax on the enhanced features. Aggregate adaptive local context and pixel-level non-local context features based on the gating weights to obtain the output features of the multi-level context interaction gating mechanism.

[0044] Step 5: Perform global average pooling on the output features of the multi-level context interaction gating mechanism obtained in Step 4. Input the pooling result into the fully connected layer and obtain the pathological image category prediction probability through Softmax. During the training phase, the total loss function is constructed based on cross-entropy loss and combined with L2 weight decay regularization. End-to-end optimization is performed on all learnable parameters of the model.

[0045] Step 6: Deploy the optimized GDKansformer model from Step 5 to the server. For the full-view pathological whole-slice image to be diagnosed, perform the following steps in sequence: preprocessing and sequence feature generation from Step 1, adaptive grouping dynamic Kolmogorov-Arnold network operation from Step 2, GDKansformer encoding from Step 3, multi-level context-gated aggregation from Step 4, and classification operation from Step 5. Output the pathological image lesion recognition results.

[0046] In some embodiments, step 1 involves cropping the processed image into a preset size image block using a fixed step window. Specifically, this means performing the cropping operation only on the tissue region portion obtained after tissue region segmentation, excluding the background region in the full-view pathological whole-section image, and obtaining a preset size image block containing only tissue.

[0047] In some embodiments, the calculation of pixel or channel-level information entropy for each group feature in step 2 specifically involves: performing a softmax operation on each group feature determined by the grouping policy network to obtain the activation intensity distribution of the group feature; and calculating the pixel or channel-level uncertainty of the group feature based on the activation intensity distribution using the information entropy formula, where uncertainty is the information entropy.

[0048] In some embodiments, the density coefficient is obtained based on information entropy in step 2, specifically by: calculating the maximum and minimum values ​​of the information entropy of all grouped features; performing max-min normalization on the information entropy of each grouped feature to obtain the density coefficient corresponding to that grouped feature.

[0049] In some embodiments, step 2 combines the linear transformation of the computation result with the linear transformation of the grouped features after activation by the GELU function to obtain the adaptive grouped dynamic Kolmogorov-Arnold network output features. Specifically, the linear transformation is performed on the result after applying the dynamic Kolmogorov-Arnold network operation to obtain a first linear output; the original grouped features are processed by the GELU function and then a linear transformation is performed to obtain a second linear output; the first linear output and the second linear output are added to obtain the grouped dynamic Kolmogorov-Arnold network output features.

[0050] In some embodiments, in step 3, nonlinear interpolation is performed on each head value matrix using a grouped dynamic Kolmogorov-Arnold network. Specifically, each head value matrix is ​​input into the grouped dynamic Kolmogorov-Arnold network constructed in step 2, and the elements of the head value matrix are nonlinearly fitted using the dynamically assigned base spline functions in the network to obtain the fitted head value matrix, which is the interpolated head value matrix.

[0051] In some embodiments, step 4 performs spatial feature enhancement on the encoded output features of step 3, specifically: performing batch normalization on the GDKansformer encoded output features, and then compressing the channel dimension through convolution to obtain compressed features; performing global average pooling on the compressed features to obtain channel global features; calculating the difference between the compressed features and the channel global features, multiplying the difference by the preset channel weight coefficients and adding it to the compressed features, and then using the GELU (Gaussian Error Linear Unit, a commonly used non-linear activation function in deep learning) activation function to obtain enhanced features.

[0052] In some embodiments, step 4 involves aggregating adaptive local context and pixel-level non-local context features. Specifically, the adaptive local context features are features obtained by processing the enhanced features through depthwise separable convolution and group convolution; the pixel-level non-local context features are features obtained by processing the enhanced features through global average pooling and convolution; and the multi-level context features are weighted and summed based on gated weights to obtain the aggregated features.

[0053] In some embodiments, step 5 combines L2 weight decay regularization to construct the total loss function. Specifically, this involves: forming a parameter set from all learnable parameters of the model, calculating the square of each parameter in the parameter set and summing them, and then multiplying the summation result by a preset regularization coefficient to obtain the L2 weight decay regularization term; the total loss function is the sum of the cross-entropy loss and the L2 weight decay regularization term.

[0054] In some embodiments, the full-field pathological slice image to be diagnosed in step 6 is a full-field pathological slice image corresponding to at least one organ among lung cancer, breast cancer, and colorectal cancer, and the output lesion identification result includes whether there is a tumor lesion and the corresponding tumor pathological subtype.

[0055] The technical concept of this invention is as follows:

[0056] like Figure 1 As shown, the pathological image diagnosis method based on GDKAN and multi-order context interaction gating includes: first, preprocessing the input pathological slice image and performing 16× downsampled image patch embedding to form sequence features; second, constructing an adaptive grouped dynamic Kolmogorov-Arnold network (GDKAN) layer, grouping the features by channel dimension, and adaptively allocating the base spline function and node density within each group according to information entropy to obtain a dynamically fitted nonlinear mapping, and reconstructing the Q, K, and V weight matrices in the self-attention module or interpolating the V matrix to alleviate distribution overfitting and To reduce computational cost, a GDKansformer encoding module is constructed, combining multi-head self-attention and grouped dynamic KAN to model long-distance dependencies and extract multi-scale semantics. Subsequently, a multi-level context interaction gating (MCIG) mechanism is introduced to sequentially enhance spatial features and suppress redundant interactions unrelated to lesions. Then, context interaction and discriminative capabilities are strengthened through gating aggregation of adaptive local context and pixel-level non-local context multi-level features. Finally, the fused features are input into a classifier to output the diagnostic results of the pathological image. End-to-end optimization is performed during the training phase using supervised losses such as contrastive / cross-entropy. This invention effectively improves the feature representation capability and interpretability of pathological images through dynamic fitting and feature grouping synergy, significantly reducing model parameter size and computational complexity. It is suitable for intelligent assisted diagnosis and clinical application of multi-organ pathological images.

[0057] The method specifically includes the following steps:

[0058] S1. Collect whole-slide images (WSI) of the entire field of view, and perform color normalization, noise reduction, and tissue region segmentation on the images. Using a fixed-step sliding window, crop image patches of size 224×224 at 20× magnification. Generate patch embeddings through linear projection and 16× convolutional downsampling to obtain the sequence input:

[0059] ;

[0060] in, This is the preprocessed full pathological image. Embed sequence features for image patches.

[0061] Image height, Image width, The number of image channels. The side length of each image patch, This represents the number of image blocks after division.

[0062] S2. Construct an adaptive grouped dynamic Kolmogorov-Arnold network, such as Figure 2 As shown, based on the Kolmogorov-Arnold representation theorem, using a K-layer Kolmogorov-Arnold Network (KAN) as the nonlinear approximation unit, its overall mapping is:

[0063] ;

[0064] in, For the input vector, The number of layers in KAN. Indicates the first One KAN layer, The composition of functions; the first The set of learnable operators for a layer Composed of several univariate spline functions composition:

[0065] ; For the first The set of learnable operators for a layer The input dimension, i.e., the first The input feature dimension of a layer network (i.e., the total number of input nodes). For the first The set of learnable operators for a layer The output dimension, i.e., the first... The output feature dimension of the layer network (i.e., the total number of output nodes);

[0066] Therefore, from the first layer to the first The matrix form of the layer is:

[0067] ;

[0068] Furthermore, each output node is an element-wise superposition of the input nodes' functions:

[0069] ;

[0070] in, Indicates the connection of the first Layer Nodes To the Layer Nodes Learnable univariate functions Refers to the first The number of nodes in the layer Refers to the first The number of nodes in a layer.

[0071] To avoid overfitting KAN on pathological images, which have relatively small distributional differences but high heterogeneity, and to take into account its nonlinear representation capabilities in complex regions, a dynamic node allocation based on information entropy is introduced: first, softmax is applied to the features to obtain the activation intensity distribution. Calculate the uncertainty of pixels

[0072] ;

[0073] The total number of pixels for a single group feature. Information entropy represents the uncertainty / complexity of quantifying the "activation intensity distribution," and then max-min normalization is performed to obtain the density coefficient. and within the preset upper and lower boundaries Number of splines in the internal dynamic allocation layer:

[0074] ;

[0075] in, Indicates the use of the first The number of nodes in the layer For the first The entropy value corresponding to each point.

[0076] Therefore, the first layer to the first The dynamic structure of the layer is as follows:

[0077] ;

[0078] Consider input tensors (Batch size) , number of tokens Feature dimension The number of groups is adaptively determined by the grouping strategy. And the division of each group of channels, according to the feature dimension Average score Group:

[0079] ;

[0080] For the first Sub-feature blocks, Then, the tokens are concatenated and flattened in the batch dimension:

[0081] ;

[0082] Indicates to The new features obtained by splicing along the token dimension, for Applying a dynamic KAN yields...

[0083] ;

[0084] To improve stability and linear residual mixing capabilities, a grouping calculation strategy is introduced. The overall output of GDKAN is defined as follows:

[0085] ;

[0086] in, This represents the output of GDKAN. Represents a linear mapping. This represents the operation of a single layer of dynamic KAN. The input features obtained from the previous step of grouping, concatenating, and flattening are fed into the dynamic KAN.

[0087] S3. Construct adaptive grouped GDKANsformer encoding blocks, using Transformer encoding as the main structure, and employing the GDKAN network to replace the traditional linear mapping to generate self-attention. Weights are added to enhance the model's non-linear expressive power. Input features Generated by GDKAN:

[0088] ;

[0089] Then, the scaled dot product attention is calculated:

[0090] ;

[0091] in, Indicates by and The resulting attention weight matrix, express and dot product similarity, This means normalizing the scaled similarity, assigning weights to attention, and highlighting key elements. For attention output.

[0092] In multi-head self-attention mechanisms, the content vector of each attention head... Further enhancement using nonlinear interpolation via GDKAN:

[0093]

[0094] This indicates the multi-head self-attention module after introducing GDKAN. For grouped dynamic KAN operations, This means concatenating the outputs of each attention head along the feature dimension to form a multi-head output. For the first Attention output based on size for The result of nonlinear interpolation performed by the GDKAN network is the interpolated value matrix; thus, it adaptively models the complex correlations between different regions, improving the separability of attention weights while enhancing the ability to capture long-distance dependencies in pathological images.

[0095] S4. Establish a multi-level context interaction gating (MCIG) mechanism, such as Figure 3 As shown, after the coded block output, a spatial feature enhancement layer (SE) is introduced to compress redundant channel features. First, the SE operation is used to remove redundant interactions and enhance local differences:

[0096] ;

[0097] The output features of the GDKansformer encoding module (the original features input to the MCIG mechanism); Norm(X) is the batch normalization operation performed on X (used to standardize the feature distribution and improve model stability). The first part is a 1×1 convolution operation (used to compress the feature channel dimension and suppress redundant channel features); the second part is the intermediate feature of Y after batch normalization + 1×1 convolution (the channel dimension has been compressed). is the preset channel weight coefficient (a learnable parameter used to adjust the contribution of the "difference between the feature and the channel's global features" to the final feature); GAP(Y) is the global average pooling operation performed on Y (extracting global features at the channel level, used to calculate feature differences); Z is the output feature after spatial feature enhancement (after...). After calculation, it is activated by the GELU function.

[0098] Then, gated weights are generated through one-dimensional convolution and Softmax to achieve multi-level fusion of channels and space:

[0099] ;

[0100] is a one-dimensional convolution operation (used to transform the dimension of the enhanced feature Z in preparation for generating gated weights); Softmax(⋅) is the Softmax activation function (converts the one-dimensional convolution output into gated weights, satisfying the constraint that the sum of the weights is 1); The gated weight matrix (after Softmax) (Generated for weighted aggregation of multi-level contextual features). , The gating weight adjustment coefficient (a learnable parameter that controls the weight ratio of adaptive local context and pixel-level non-local context respectively); These are intermediate features after gating weight adjustment (used for subsequent feature fusion).

[0101] The final output undergoes multi-level context fusion and gated weighting:

[0102] ;

[0103] This is an adaptive local context feature (obtained from the enhanced feature Z through depthwise separable convolution and group convolution). The output features of the MCIG mechanism (the final features after multi-level context feature fusion and gating weighting, used for subsequent classification).

[0104] This enables dynamic adjustment of channels and space from a multi-scale perspective, effectively highlighting the characteristic expression of key lesion areas and improving the overall characteristic representation capability.

[0105] S5. Classification and Loss Optimization: The classification result is obtained through global average pooling and a fully connected layer.

[0106] ;

[0107] in This is the feature map after upstream encoding. Compress it to the channel dimension. For classification layer parameters, Predicted probabilities for each category. Output during inference. .

[0108] The training objective is based on cross-entropy loss, combined with L2 weight decay regularization:

[0109] ;

[0110] in For batch size, For the first One-hot labels for each sample. To correspond to the prediction, Represents the set of all learnable parameters. is the regularization coefficient.

[0111] S6. Model Deployment and Inference: The trained adaptive grouping GDKansformer model is deployed to the server. It automatically performs feature extraction, attention aggregation, and classification inference on the input pathological images, and finally outputs the tumor lesion identification results.

[0112] The embodiments described above are for illustrative purposes only and are not intended to limit the invention. Therefore, any changes in numerical values ​​or substitutions of equivalent elements should still fall within the scope of this invention.

[0113] The above detailed description will enable those skilled in the art to understand that the present invention can indeed achieve the aforementioned objectives and has complied with the provisions of the Patent Law.

[0114] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention. The above descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the invention should be included within the scope of protection of the invention.

[0115] It should be noted that the above description of the process is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art can make various modifications and changes to the process under the guidance of this specification. However, these modifications and changes remain within the scope of this specification.

[0116] The basic concepts have been described above. Obviously, for those skilled in the art who have read this application, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore, such modifications, improvements, and corrections still fall within the spirit and scope of the exemplary embodiments of this application.

[0117] Furthermore, this application uses specific terms to describe its embodiments. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different positions in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.

[0118] Furthermore, those skilled in the art will understand that aspects of this application can be described and illustrated through several patentable types or situations, including any new and useful combination of processes, machines, products, or substances, or any new and useful improvements thereof. Therefore, aspects of this application can be implemented entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. All of the above hardware or software can be referred to as a “unit,” “module,” or “system.” Furthermore, aspects of this application can take the form of a computer program product embodied in one or more computer-readable media, wherein computer-readable program code is contained therein.

[0119] The computer program code required for the operation of each part of this application can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, and Python; general programming languages ​​such as C; Visual Basic, Fortran2103, Perl, COBOL2102, PHP, and ABAP; dynamic programming languages ​​such as Python, Ruby, and Groovy; or other programming languages. This program code can run entirely on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as Software as a Service (SaaS).

[0120] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although some currently considered useful embodiments of the invention have been discussed in the foregoing disclosure by way of various examples, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments; rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, although the implementation of the various components described above can be embodied in a hardware device, it can also be implemented as a purely software solution, such as an installation on an existing server or mobile device.

[0121] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this approach of the present application should not be construed as reflecting an intention that the claimed subject matter requires more features than expressly recited in each claim. Rather, the subject of the invention should possess fewer features than in any single embodiment described above.

Claims

1. A pathological image diagnosis method based on GDKAN and multi-level contextual interaction gating, characterized in that, include: Step 1: Collect full-field pathological whole-section images, and perform color standardization, noise reduction, and tissue region segmentation on them in sequence; At a preset magnification, the processed image is cropped into image blocks of a preset size using a fixed step window. The image blocks are then downsampled by linear projection and convolution with a preset factor to generate image block embeddings, thus obtaining sequence features. Step 2: Construct an adaptive grouping dynamic Kolmogorov-Arnold network. Based on the statistics of sequence features, the grouping strategy network adaptively determines the number of groups and channel division. Calculate the pixel or channel-level information entropy of each group feature and obtain the density coefficient. Dynamically allocate the number of basis spline functions to each group within the preset upper and lower bounds of the number of splines. Apply dynamic Kolmogorov-Arnold network operations to the group features. Combine the linear transformation of the operation result with the linear transformation of the group features after activation by the GELU function to obtain the output features of the adaptive grouping dynamic Kolmogorov-Arnold network. Consider input tensor Batch size , number of tokens Feature dimension The number of groups is adaptively determined by the grouping strategy. And the division of each channel group, according to the feature dimension Average score Group: ; For the first Sub-feature blocks, Then, the tokens are concatenated and flattened in the batch dimension: ; Indicates to New features obtained by splicing along the token dimension; The input features are obtained by grouping, concatenating, and flattening and then fed into the dynamic KAN. Step 3: Construct an adaptive grouped GDKansformer encoding module, with the Transformer encoding block as the main body. Use the output features of the adaptive grouped dynamic Kolmogorov-Arnold network as nonlinear mapping units to replace the traditional linear mapping to generate the query matrix, key matrix, and value matrix of self-attention. Calculate scaled dot product attention based on the query matrix and key matrix. After splitting the value matrix according to the attention head, perform nonlinear interpolation on each head value matrix through the grouped dynamic Kolmogorov-Arnold network. Concatenate the interpolated head value matrix with the corresponding attention result to obtain the adaptive grouped GDKansformer encoding output features. Step 4: Establish a multi-level context interaction gating mechanism to perform spatial feature enhancement operations on the output features of GDKansformer encoding. After convolution and batch normalization to suppress redundant channel features, the enhanced features are obtained by combining global average pooling and GELU function activation. The enhanced features are processed by one-dimensional convolution and Softmax to generate gating weights. Based on these weights, pixel-level non-local context and adaptive local context features are aggregated to obtain the output features of the multi-level context interaction gating mechanism. Step 5: Perform global average pooling on the output features of the multi-level context interaction gating mechanism, input the pooling result into the fully connected layer and obtain the pathological image category prediction probability through Softmax; during the training phase, the total loss function is constructed based on cross-entropy loss and combined with L2 weight decay regularization, and all learnable parameters of the model are optimized end-to-end to obtain the GDKansformer model. Step 6: Input the full-field pathological slice image to be diagnosed into the GDKansformer model and output the pathological image lesion recognition results; In step 1, the processed image is cropped into a preset size image block using a fixed step window. Specifically, the cropping operation is performed only on the tissue region obtained after tissue region segmentation to exclude the background region in the full-view pathological whole slice image, resulting in a preset size image block containing only the tissue. In step 2, the pixel or channel-level information entropy of each group feature is calculated. Specifically, a softmax operation is performed on each group feature determined by the grouping strategy to obtain the activation intensity distribution of the group feature. Based on the activation intensity distribution, the pixel or channel-level uncertainty of the group feature is calculated according to the information entropy formula. The uncertainty is the information entropy. In step 2, the density coefficient is obtained based on the information entropy. Specifically, the maximum and minimum values ​​of the information entropy of all grouped features are calculated; the max-min normalization operation is performed on the information entropy of each grouped feature to obtain the density coefficient corresponding to that grouped feature. In step 2, the linear transformation of the operation result and the linear transformation of the grouped features after activation by the GELU function are combined to obtain the output features of the grouped dynamic Kolmogorov-Arnold network. Specifically, a linear transformation is performed on the result after applying the dynamic Kolmogorov-Arnold network operation to obtain the first linear output; the original grouped features are processed by the GELU function and then a linear transformation is performed to obtain the second linear output; the first linear output and the second linear output are added to obtain the adaptive grouped dynamic Kolmogorov-Arnold network output features. In step 4, spatial feature enhancement is performed on the encoded output features of step 3. Specifically, batch normalization is performed on the GDKansformer encoded output features, and then compressed features are obtained by compressing the channel dimension through convolution. Global average pooling is performed on the compressed features to obtain the channel global features; the difference between the compressed features and the channel global features is calculated, the difference is multiplied by the preset channel weight coefficients and added to the compressed features, and then passed through the GELU function to obtain the enhanced features; In step 4, pixel-level non-local context and adaptive local context features are aggregated. Specifically, the adaptive local context features are obtained by processing the enhanced features through depthwise separable convolution and group convolution; the pixel-level non-local context features are obtained by processing the enhanced features through global average pooling and convolution. The two context features are weighted and summed based on gating weights to obtain the aggregated features.

2. The pathological image diagnosis method based on GDKAN and multi-level context interaction gating according to claim 1, characterized in that, In step 3, nonlinear interpolation is performed on each head value matrix using an adaptive grouped dynamic Kolmogorov–Arnold network. Specifically, each head value matrix is ​​input into the grouped dynamic Kolmogorov–Arnold network constructed in step 2, and the elements of the head value matrix are nonlinearly fitted using the dynamically assigned basis spline functions in the network to obtain the fitted head value matrix, which is the interpolated head value matrix.

3. The pathological image diagnosis method based on GDKAN and multi-level context interaction gating according to claim 1, characterized in that, In step 5, the total loss function is constructed by combining L2 weight decay regularization. Specifically, all learnable parameters of the model are grouped into a parameter set, the square value of each parameter in the parameter set is calculated and summed, and then the summation result is multiplied by the preset regularization coefficient to obtain the L2 weight decay regularization term. The total loss function is the sum of cross-entropy loss and L2 weight decay regularization term.

4. The pathological image diagnosis method based on GDKAN and multi-level context interaction gating according to claim 1, characterized in that, In step 6, the full-field pathological whole-slice image to be diagnosed is the full-field pathological whole-slice image corresponding to at least one of the organs of lung cancer, breast cancer, and colorectal cancer. The output lesion identification results include whether there is a tumor lesion and the corresponding tumor pathological subtype.