Multimodal fusion survival prediction method based on Sinkhorn algorithm
By using the alternating column-row normalization operation of the Sinkhorn algorithm in multi-modal fusion, the problems of lack of global structural constraints and high computational complexity in the existing technology are solved, improving the accuracy of cancer survival prediction and the robustness of the model. sex.
Patent Information
- Application Number
- CN202410345919.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-03-26
AI Technical Summary
Existing multimodal fusion methods of histological and genomic features lack global structural constraints in cancer survival prediction, resulting in attention matrix calculation errors, and traditional methods are computationally complex and unlearnable.
The alternating column-row normalization operation based on the Sinkhorn algorithm is used to calculate the Sinkhorn mutual attention matrix of gene features and patch features, introduce global structural constraints, reduce computational complexity and ensure end-to-end learning.
It improves the accuracy and interpretability of multi-modal fusion survival prognosis prediction, reduces the amount of calculation and memory usage, and enhances the robustness and interpretability of the model.
Smart Images

Figure CN117952966B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pathological image processing and survival prediction, and specifically relates to a multimodal fusion survival prediction method based on the Sinkhorn algorithm. Background Art
[0002] Survival prognosis prediction is a complex ordinal regression task that aims to estimate the relative risk of death in cancer prognosis; accurate survival prognosis prediction is crucial for doctors to evaluate the clinical results of disease progression and treatment efficiency. At the current state of the art, manual evaluation of histology and genomics by pathologists is the gold standard for patient triage, risk assessment, and treatment group stratification. Despite recent progress in multimodal learning of histology and genomics, several unresolved issues remain. One of the daunting challenges is to capture key information from heterogeneous modalities for effective fusion, especially how to effectively represent billion-pixel whole-slice images without losing key information. In addition, the visual concept of tumor microenvironment (TME) in pathological images has been shown to be significantly associated with survival analysis of various cancer types. For example, cellular components including fibroblasts and various immune cells can change the behavior of cancer cells. However, the plaques associated with the TME only account for a small proportion of the entire whole-slice image, which leads to fine-grained visual recognition problems that traditional multimodal learning cannot distinguish.
[0003] Attention-based multiple instance learning (MIL) provides a typical solution to identify informative instances, where whole-slice images are represented as a set of instances and an attention score is assigned to each instance as the weight of the selection. In multimodal learning, genomic data has been applied to guide the selection of TME-related instances through a cross-modal mutual attention mechanism, because gene expression may correspond to some morphological features displayed in pathological TME. However, this approach with a local view cannot thoroughly understand the information of TME because it ignores the global latent structure within the modality, such as histological interactions and genomic co-expression within TME. In general, cancer prediction using whole-slice images is both a difficult weakly supervised learning problem and a multimodal learning problem, and is a huge challenge in the characterization of disease progression in many cancer subtypes.
[0004] There are two main methods for multimodal fusion of histological and genomic features: one is to directly calculate the softmax mutual attention of histological and genomic features, and the representative work is MCAT. Specifically, a fixed-weight pre-trained convolutional network and a multi-layer perceptron are used to extract the patch features and genomic features of the initial full-slice image, respectively, and then the "query" features, "key" features and "value" features are obtained through three learnable fully connected layers; the "query" features and the "key" features are matrix multiplied to obtain the initial matrix, which is multiplied by the scaling factor and softmax normalized in the row direction (i.e., the patch number dimension) to obtain the attention matrix; the attention matrix is obtained by the "query" features converted from the genomic features and the "key" features converted from the full-slice image patch features, so it is also called the mutual attention matrix; after the mutual attention matrix is weighted for the "value" features, the new features are obtained and continue to propagate forward in the network model; and the process of obtaining the mutual attention matrix is the multimodal fusion process. The second is to use histological and genomic features to solve the variant problem of optimal transmission, and the representative work is MOTCat. This work proposes a mutual attention framework based on multimodal optimal transfer with global structural consistency, applying instance matching between histology and genomics from a global perspective; Optimal Transfer (OT), as a structural matching method, can generate the optimal matching solution with the minimum overall matching cost based on the local matching cost between histology and genomics instances; therefore, patch instances with high global structural consistency with gene co-expression can be identified to represent the whole slice image; these instances may have stronger associations with TMEs that are helpful for survival prognosis prediction. Compared with the traditional mutual attention mechanism, optimal transfer provides instance matching with global awareness, and during the optimization process, the marginal constraint of equal total mass forces a trade-off between instances within the modality; the optimal matching flow realizes the conversion between multimodalities while maintaining the potential structure, reducing the cross-modal heterogeneity gap.
[0005] However, in the above MCAT method, the "query" feature converted from genomic features and the "key" feature converted from the whole slice image patch feature are calculated independently, and the attention matrix is only softmax normalized in the patch number dimension before weighting the "value" feature. This will lead to several problems. Since there are no additional constraints, each gene may have high attention values only with a few patches. These patches may be caused by image noise and have little relevance to survival prognosis prediction; and softmax normalization will further amplify these erroneous high attention values and smooth potential correct attention. Ideally, a gene should activate all patches that are associated with it in a realistic sense as much as possible, and inhibit patches that are not associated with it or have reverse meanings. This is the global structural constraint required, and the MCAT method lacks this crucial constraint relationship. On the other hand, only normalizing constraints in one dimension will result in a patch and multiple genes having high attention values at the same time, which is contrary to the realistic meaning. For example, it is not desirable for a patch to have high attention with both tumor-promoting genes and tumor-suppressing genes. The MOTCat method proposes a mutual attention framework based on multimodal optimal transfer with global structural consistency. However, due to the ultra-high pixels and large number of patches of the whole slice image, it is difficult to apply optimal transfer to match histological data and genomic data. Although the MOTCat method adopts a micro-batch strategy to approximate the original optimal transfer problem, although it can reduce the complexity of calculation to a certain extent and theoretically guarantee the convergence of the model, it also brings some other problems: First, during the training process, all patches are randomly divided into several subsets to calculate the mutual attention separately, which destroys the global structure of the whole slice image; second, the random division introduces strong randomness, which is easy to cause fluctuations in the model training process, because each calculation result is highly related to the division of the subset. The process of solving the mutual attention requires intercepting variables from the gradient flow for independent calculation, and then feeding the calculation results back to the model in the form of constants, which means that this multimodal interaction based on optimal transfer is not learnable; but in reality, it is hoped that histological features and genomic features can form multimodal mutual attention adaptively through autonomous learning, and the MOTCat method obviously violates this original intention. Summary of the invention
[0006] In view of the problems that the existing multimodal fusion methods of histological features and genomic features either do not consider the global structural constraints of genes and patches, or introduce complex unlearnable concepts, the present invention provides a multimodal fusion survival prediction method based on the Sinkhorn mutual attention mechanism, which comprehensively considers the importance of gene features and patch features, guides patch features by gene features, can greatly reduce the dimension of patch features, reduce the amount of calculation and memory usage, and improve the accuracy of multimodal fusion survival prognosis prediction.
[0007] The first object of the present invention is to provide a multi-modal fusion survival prediction method based on the Sinkhorn algorithm, comprising the following steps:
[0008] Perform threshold segmentation on the digital pathology full-slice images of cancer patients to remove the background area and obtain pathological tissue images; perform gene sequencing on cancer patients to obtain original gene data;
[0009] At a set magnification, the pathological tissue image is divided into patches of the same size and input into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene feature extractor is used to extract gene features;
[0010] Three feature mapping modules are used to convert patch features and gene features into value features, key features, and query features respectively;
[0011] Calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm;
[0012] Perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features;
[0013] The weighted features are input into the patch feature aggregation module, and the query features are input into the gene feature aggregation module for feature aggregation. The features are concatenated into a feature vector and input into the fully connected layer for risk prediction to obtain the prediction results.
[0014] As a preferred technical solution, the patch feature extractor is obtained by pre-training on the ImageNet dataset;
[0015] The patch feature extractor includes a backbone network and a learnable fully connected layer;
[0016] The backbone network adopts the Resnet50 network model.
[0017] As a preferred technical solution, the gene feature extractor is composed of multiple learnable fully connected layers in parallel; the number of the multiple learnable fully connected layers is the same as the number of selected genes.
[0018] As a preferred technical solution, the three feature mapping modules are all composed of learnable fully connected layers;
[0019] The conversion formulas are respectively:
[0020] Q = F Q W Q ,
[0021] K = F K W K ,
[0022] V = F V W V ,
[0023] Among them, F Q is the gene feature, F K and F V are patch features; W Q , W K and W V are the parameters of the three feature mapping modules respectively; Q, K, and V represent the query feature, key feature, and value feature respectively.
[0024] As a preferred technical solution, the calculation formula of the Sinkhorn mutual attention matrix is:
[0025] ,
[0026] Among them, Q is the query feature, K is the key feature, K T is the transposed matrix of the key feature, d is the feature dimension, ReLU is the rectified linear unit function, Sinkhorn is the Sinkhorn algorithm, and A coattn is the Sinkhorn mutual attention matrix;
[0027] The size of the Sinkhorn mutual attention matrix A coattn is M×N and M << N, where M is the number of genes and N is the number of patch blocks.
[0028] As a preferred technical solution, when performing alternating column-row normalization on the Sinkhorn mutual attention matrix, first normalize the columns of the Sinkhorn mutual attention matrix, and then normalize the rows of the Sinkhorn mutual attention matrix until the set number of times is reached;
[0029] Using the Sinkhorn mutual attention matrix as the weight, the weighted feature R is obtained by weighting the value feature, and the formula is:
[0030] R = A coattn V,
[0031] ,
[0032] Among them, R is an M-dimensional column vector; A coattn is the Sinkhorn mutual attention matrix, which is an M×N-dimensional matrix; V is the value feature, which is an N-dimensional column vector; r i is the i-th element value of the weighted feature R; a ij is the Sinkhorn mutual attention matrix A coattn The element value of the i-th row and j-th column of j is the j-th element value of the value feature V.
[0033] As a preferred technical solution, the alternating column and row normalization is expressed as:
[0034] S 0 (A coattn )=exp(A coattn ),
[0035] S k (A coattn )=F r (F c (S k-1 (A coattn ))),
[0036] S(A coattn )=lim(S K (A coattn )),K→∞,
[0037] Among them, A coattn is the Sinkhorn mutual attention matrix, S 0 (·) represents the custom Sinkhorn preprocessing step, exp(·) is the exponential of e for all elements, S k (·) represents the kth alternating column and row normalization, S k-1 (·) indicates the k-1th alternating column and row normalization, F r (·) indicates row normalization, F c (·) indicates column normalization, S K (·) is a total of K alternating row and column normalizations, S(·) is the equivalent convergence operation of alternating row and column normalization;
[0038] The row normalization F r (·) is expressed as:
[0039] ,
[0040] in, Indicates the kth row normalization. It means the k-1th row normalization. is the element division operation, 1 N represents a column vector of all 1s of length N, represents a row vector of all 1s of length M;
[0041] The column normalization F c (·) is expressed as:
[0042] ,
[0043] in, Indicates the kth column normalization, It means the column normalization is performed for the k-1th time.
[0044] As a preferred technical solution, the patch feature aggregation module has the same structure as the gene feature aggregation module, both consisting of a Transformer structure and a MIL structure;
[0045] Input the weighted feature R into the patch feature aggregation module for feature aggregation to obtain the weighted aggregation feature R agg At the same time, the query feature Q is input into the gene feature aggregation module for feature aggregation to obtain the gene aggregation feature Q agg , respectively expressed as:
[0046] R agg = T H-MIL (T H-Tr - R),
[0047] Q agg = T G-MIL (T G-Tr - Q),
[0048] Among them, T H-MIL and T H-Tr They are the MIL structure and Transformer structure of the patch feature aggregation module; T G-MIL and T G-Tr They are the MIL structure and Transformer structure of the gene feature aggregation module;
[0049] The weighted aggregation feature R agg and gene aggregation feature Q agg Splice and get a feature vector F concat , the splicing formula is:
[0050] F concat =Concat(R agg ,Q agg ),
[0051] Among them, Concat(·) is the concatenation operation on the dimension;
[0052] The feature vector F concat Input the fully connected layer to perform risk prediction and obtain the prediction result. The risk prediction formula is:
[0053] T=W p F concat +b p ,
[0054] Among them, T is the prediction result, W p and b p are the parameters of the fully connected layer.
[0055] The second object of the present invention is to provide a multimodal fusion survival prediction system based on the Sinkhorn algorithm, comprising a data acquisition module, a feature extraction module, a feature conversion module, a matrix calculation module, a feature weighting module and an aggregation prediction module;
[0056] The data acquisition module is used to perform threshold segmentation on the digital pathology full-slice image of the cancer patient to remove the background area to obtain the pathology tissue image; perform gene sequencing on the cancer patient to obtain the original gene data;
[0057] The feature extraction module is used to divide the pathological tissue image into patches of the same size under a set magnification, and input the patches into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene features are extracted using the gene feature extractor;
[0058] The feature conversion module is used to use three feature mapping modules to convert patch features and gene features into value features, key features and query features respectively;
[0059] The matrix calculation module is used to calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm;
[0060] The feature weighting module is used to perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features;
[0061] The aggregation prediction module is used to input the weighted features into the patch feature aggregation module, query the features into the gene feature aggregation module for feature aggregation, splice them into a feature vector, and input them into the fully connected layer for risk prediction to obtain a prediction result.
[0062] The third object of the present invention is to provide a computer-readable storage medium storing a program, which, when executed by a processor, implements a multimodal fusion survival prediction method based on the Sinkhorn algorithm.
[0063] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0064] 1. The present invention introduces the Sinkhorn-based alternating row and column normalization operation to fully consider the relative size information of the two dimensions in the multimodal fusion process, prevent a certain patch from having high attention with all genes at the same time, and enhance interpretability and robustness; because the alternating row and column normalization adds global structural constraints to the mutual attention, it can essentially improve the accuracy of multimodal fusion survival prognosis prediction.
[0065] 2. Sinkhorn-based alternating column-row normalization is derived from the optimal transmission problem, has a clear theoretical basis, is compatible with the existing mutual attention calculation method, and can be easily applied to other multimodal fusion methods.
[0066] 3. Existing multimodal fusion methods of histology and genomics follow the most basic mutual attention calculation method, that is, each full-slice image patch feature and gene feature are independently calculated for attention, and then only softmax normalization is performed on the patch number dimension, ignoring the mutual influence between different genes; some existing methods introduce optimal transmission (OT) solutions, but they bring complex calculation processes and destroy end-to-end learning. The alternating column and row normalization based on Sinkhorn in this application can be implemented by only matrix operations, without calling other library functions, greatly reducing the calculation complexity, introducing global structural constraints without almost any additional calculations, and ensuring end-to-end learning, which can improve the accuracy of multimodal fusion survival prognosis prediction.
[0067] 4. The calculated global structurally constrained Sinkhorn mutual attention matrix can be converted into a heat map of different genes on the whole slice image, which has a good visualization effect and can help doctors locate the regions of interest related to gene expression in the whole slice image.
[0068] 5. The patch feature aggregation module of the present invention uses a Transformer structure, which can simultaneously consider the information of all patches in the full slice image without being limited by the local receptive field, so that the global information in the image can be better captured during feature aggregation, which helps to more accurately understand the content of the full slice image.
[0069] 6. The present invention continues the idea of multiple instance learning (MIL) in the field of pathological images. Since a single full-slice image contains tens of thousands of small patches, traditional image processing methods cannot efficiently integrate all image information. Multi-instance learning uses the "weighted" idea to automatically evaluate the importance of each patch, minimize computational redundancy, and make the model more focused on the lesion area, thereby improving the accuracy of survival analysis.
[0070] 7. The present invention uses the Sinkhorn mutual attention matrix to perform weighted operations on value features to achieve multimodal fusion, which has high interpretability; its principle can be understood as calculating the similarity between gene features and patch features, and using the similarity value as a weight to weight the value features to obtain weighted features. Therefore, the importance of gene features and patch features is comprehensively considered, and patch features are guided by gene features, which can greatly reduce the dimension of patch features, reduce the amount of calculation and memory usage. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0072] Figure 1 It is a flow chart of a multi-modal fusion survival prediction method based on the Sinkhorn algorithm in an embodiment of the present invention.
[0073] Figure 2 This is a heat map of tumor suppression genes in the BRCA dataset TCGA-A2-A0CW samples using the method of the present invention.
[0074] Figure 3 This is a heat map of oncogenesis genes in the BRCA dataset TCGA-A2-A0EY samples using the method of the present invention.
[0075] Figure 4 Schematic diagram of the structure of a multimodal fusion survival prediction system based on the Sinkhorn algorithm in an embodiment of the present invention.
[0076] Figure 5 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0078] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0079] Existing multimodal fusion methods of histological features and genomic features either do not consider the global structural constraints of genes and patches, or introduce complex non-learnable concepts. The present invention aims to introduce global structural constraints to the original mutual attention in a concise and effective way, thereby proposing a multimodal fusion survival prediction method based on the Sinkhorn algorithm. This method only requires some simple matrix operations to implement, so it can be inserted into other methods at almost no cost, and does not destroy the gradient flow of the original model. It is a learnable method.
[0080] The Sinkhorn algorithm is an iterative algorithm for solving the matching problem on a positive definite matrix. The algorithm is mainly used to transform a non-negative matrix (usually a probability distribution) into a doubly random matrix (i.e., the sum of the elements in each row and column is 1). The Sinkhorn algorithm is closely related to the optimal transmission problem. It provides a numerical method to approximate the solution to the optimal transmission problem by iteratively scaling the elements of the probability distribution. Therefore, the Sinkhorn algorithm can be regarded as a numerical approximation method for the optimal transmission problem and is widely used to solve optimization problems. Based on this, the present invention uses an alternating column and row normalization operation based on the Sinkhorn algorithm to replace the optimal transmission (OT) solution process in the existing method, and inserts it into the mutual attention mechanism of the existing method to avoid the complex calculation process brought by the OT solution; this can maintain the global structural constraints of multimodal fusion without introducing additional complex calculations, while maintaining a learnable gradient flow and having extremely strong interpretability.
[0081] like Figure 1 As shown, the multi-modal fusion survival prediction method based on the Sinkhorn algorithm in this embodiment includes the following steps:
[0082] S1. Perform threshold segmentation on the digital pathology full-slice image of the cancer patient to remove the background area and obtain the pathological tissue image; perform gene sequencing on the cancer patient to obtain the original gene data;
[0083] S2, under a set magnification, the pathological tissue image is cut into patches of the same size, and the patches are input into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene features are extracted using the gene feature extractor;
[0084] S3, using three feature mapping modules to convert patch features and gene features into value features, key features and query features respectively;
[0085] S4, calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm;
[0086] S5. Perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features.
[0087] S6. Input the weighted features into the patch feature aggregation module, input the query features into the gene feature aggregation module for feature aggregation, splice them into a feature vector, and input them into the fully connected layer for risk prediction to obtain the prediction results.
[0088] In this embodiment, firstly, the digital pathology full-slice image is threshold segmented, most of the white background area is removed, and the effective pathological tissue image is extracted from it, which can save a lot of storage overhead and reduce the noise of the data set; then the pathological tissue image is divided into patches of the same size so that the deep neural network can be used for subsequent processing; at the same time, the genetic data of the cancer patient is obtained by gene sequencing. The genetic data is generally the expression of certain specific genes, and its data type is numerical and non-numerical. Here, the non-numerical data needs to be converted into numerical data, so that all numerical data is obtained, that is, the original genetic data, which can be directly applied to the subsequent post-module. In this embodiment, the pathological tissue image is divided into 256×256 patches at a magnification of 20×.
[0089] Next, we use the patch feature extractor Φ H Extract the features of the patch block; patch feature extractor Φ H It is pre-trained on the ImageNet dataset and includes a backbone network and a learnable fully connected layer. In this embodiment, the backbone network uses the Resnet50 network model as the backbone network, and the learnable fully connected layer reduces the dimension of the patch block from 1024 to 256 to obtain the patch feature.
[0090] The gene feature extractor Φ for extracting gene features G is composed of multiple learnable fully connected layers in parallel, where the number of learnable fully connected layers is the same as the number of selected genes. In this embodiment, 6 genes are selected from the original gene data, so the gene feature extractor Φ G is jointly composed of 6 learnable fully connected layers.
[0091] Furthermore, through three feature mapping modules, the patch feature and the gene feature are respectively converted into a value feature V, a key feature K, and a query feature Q; among them, the three feature mapping modules are all composed of learnable fully connected layers, and the conversion formulas are respectively:
[0092] Q = F Q W Q ,
[0093] K = F K W K ,
[0094] V = F V W V ,
[0095] where F Q is the gene feature, F K and F V are the patch features; W Q , W K and W V are the parameters of the three feature mapping modules respectively; Q, K, and V represent the query feature, the key feature, and the value feature respectively.
[0096] Furthermore, based on the Sinkhorn algorithm, the Sinkhorn mutual attention matrix of the key feature K and the query feature Q is calculated, and the calculation formula is:
[0097] ,
[0098] where K T is the transposed matrix of the key feature, d is the feature dimension, ReLU is the rectified linear unit function, Sinkhorn is the Sinkhorn algorithm, and A coattn is the Sinkhorn mutual attention matrix; since the Sinkhorn normalization requires the matrix to be non-negative, the ReLU function is used to remove the negative elements in the initial attention matrix and set them to 0. The size of the Sinkhorn mutual attention matrix A coattn is M×N and M << N, where M is the number of genes and N is the number of patch blocks.
[0099] Further, in the theory of doubly stochastic matrices, performing alternating column-row normalization on a non-negative square matrix can make the matrix converge to a doubly stochastic matrix, that is, a matrix with row sums and column sums both equal to 1. Since the Sinkhorn mutual attention matrix A coattn has a size of M×N and M<<N, it is impossible to transform it into a strictly doubly stochastic matrix according to this theory, where the sum of one dimension is M / N. However, the original intention of the present invention is to introduce global structural constraints to the mutual attention matrix, that is, to disperse the attention of different gene pairs to patch blocks and avoid over-focusing on a certain gene or a certain patch block; therefore, the present invention uses alternating column-row normalization to operate on the matrix. Although the sum of one dimension of the mutual attention matrix is not 1, after alternating normalization, a large relative numerical gap will still be generated in this dimension, which has achieved the purpose of the present invention, so alternating column-row normalization is still applicable; and alternating column-row normalization is also to ensure that the sum of the weights for weighting the value features is 1. In the present invention, when performing alternating column-row normalization on the Sinkhorn mutual attention matrix, first normalize the columns of the Sinkhorn mutual attention matrix, and then normalize the rows of the Sinkhorn mutual attention matrix until the set number of times is reached. This operation makes the sum of the patch dimension equal to 1, which is compatible with the softmax normalization method in the prior art. The alternating row-column normalization is specifically expressed as:
[0100] S 0 (A coattn )=exp(A coattn ),
[0101] S k (A coattn )=F r (F c (S k-1 (A coattn ))),
[0102] S(A coattn )=lim(S K (A coattn )),K→∞,
[0103] where A coattn is the Sinkhorn mutual attention matrix, S 0 (·) represents a custom Sinkhorn preprocessing step, exp(·) is the exponential of e for all elements, S k (·) represents the k-th time of performing alternating column-row normalization, S k-1 (·) represents the (k - 1)-th time of performing alternating column-row normalization, F r (·) represents row normalization, F c (·) represents column normalization, S K(·) is a total of K alternating row and column normalizations, S(·) is the equivalent convergence operation of alternating row and column normalization;
[0104] Row Normalization F r (·) is further expressed as:
[0105] ,
[0106] in, Indicates the kth row normalization. It means the k-1th row normalization. It is an element division operation. In actual operation, element division is not conducive to the stability of training, so it is changed to be performed in logarithmic space (log); N represents a column vector of all 1s of length N, represents a row vector of all 1s of length M;
[0107] Column Normalization F c (·) is expressed as:
[0108] ,
[0109] in, Indicates the kth column normalization, It means the column normalization is performed for the k-1th time.
[0110] It should also be noted that the number of alternating column and row normalizations is a modifiable hyperparameter, which can be set specifically according to different data sets; in this embodiment, the number of alternating column and row normalizations is 10.
[0111] The Sinkhorn mutual attention matrix is normalized alternately in rows and columns and used as weights to perform a weighted operation on the value feature V to obtain the weighted feature R∈ M×d , the fusion formula is:
[0112] R = A coattn V,
[0113] ,
[0114] Among them, R is an M-dimensional column vector; A coattn is the Sinkhorn mutual attention matrix, which is an M×N-dimensional matrix; V is the value feature, which is an N-dimensional column vector; r i is the i-th element value of the weighted feature R; a ij is the Sinkhorn mutual attention matrix A coattn The element value of the i-th row and j-th column of j is the j-th element value of the value feature V.
[0115] Furthermore, the weighted feature R∈ M×d and query feature Q∈ M×d They are sent to the patch feature aggregation module T H Gene feature aggregation module T G Perform feature aggregation; patch feature aggregation module T H Gene feature aggregation module T G The structures of are the same, consisting of a Transformer structure and an attention-based multiple instance learning (MIL) structure; the Transformer structure performs internal feature interaction, and the MIL structure aggregates features.
[0116] The weighted feature R∈ M×d Input the patch feature aggregation module to perform feature aggregation to obtain the weighted aggregation feature R agg ∈ 1×d , and at the same time, the query feature Q∈ M×d Input the gene feature aggregation module to perform feature aggregation to obtain the gene aggregation feature Q agg ∈ 1×d , respectively expressed as:
[0117] R agg = T H-MIL (T H-Tr - R),
[0118] Q agg = T G-MIL (T G-Tr - Q),
[0119] Among them, T H-MIL and T H-Tr They are the MIL structure and Transformer structure of the patch feature aggregation module; T G-MIL and T G-Tr They are the MIL structure and Transformer structure of the gene feature aggregation module;
[0120] The weighted aggregation feature R agg ∈ 1×d and gene aggregation feature Q agg ∈ 1×d Splice and get a feature vector F concat , expressed as:
[0121] Fconcat =Concat(R agg ,Q agg ),
[0122] Among them, Concat(·) is the concatenation operation on the dimension;
[0123] Finally, the risk prediction is input into the fully connected layer to obtain the prediction result. The risk prediction formula is:
[0124] T=W p F concat +b p ,
[0125] Among them, T is the prediction result, W p and b p are the parameters of the fully connected layer.
[0126] Since the patch feature aggregation module T H Gene feature aggregation module T G They are exactly the same in structure, and the input feature form is also the same (both are M×d), so the obtained aggregated feature form is also the same (both are 1×d).
[0127] In order to verify the method proposed in the present invention, this embodiment uses three cancer data sets from the Cancer Genome Atlas (TCGA) to perform survival prediction experiments; TCGA is a public cancer database that contains matched diagnostic full-slice images and genomic data with marked survival time and review status. The following cancer types were used in the experiment: bladder urothelial carcinoma BLCA (a total of 299 samples), glioblastoma and low-grade glioma GBMLGG (a total of 456 samples), endometrial carcinoma UCEC (a total of 384 samples). For genomic data, the number of unique functional categories was set to the following 6, including tumor suppression, tumor occurrence, protein kinases, cell differentiation, transcription, and cytokine growth. For each cancer data set, a 5-fold cross-validation was performed with a training validation set ratio of 4:1, and the cross-validated consistency index (c-Index) and its standard deviation were used to measure the correct ranking of the risk prediction of cancer patients with known overall survival. The results are shown in Table 1 below:
[0128] Table 1 c-Index results of three methods on BLCA, GBMLGG and UCEC
[0129]
[0130] The methods compared in this experiment include MCAT and MOTCat, which use the same feature extractor and back-end risk prediction structure; in this experiment, this method is called Sinkhorn-10, which means that the Sinkhorn mutual attention matrix is subjected to 10 alternating column and row normalization operations. Since the difference between Sinkhorn-10 and MCAT and MOTCat is only reflected in the calculation method of the multimodal fusion mutual attention matrix of the full-slice image patch features and genomic features, it can intuitively reflect the advantages of the method proposed in the present invention in multimodal fusion. As can be seen from Table 1, the final performance of Sinkhorn-10 exceeds the existing methods on all three data sets, which confirms that the alternating row and column normalization based on Sinkhorn is effective in improving the multimodal fusion effect and can help the multimodal fusion survival prognosis prediction.
[0131] In addition, this embodiment also visualizes the heat map of different genes on the whole slice image obtained by transforming the Sinkhorn mutual attention matrix, which reflects the response degree of each patch block in the image to different genes. Figure 2 and Figure 3 The heat map of Sinkhorn-10 on different genes (tumor suppression genes and oncogenesis genes) of two samples in the BRCA dataset of invasive breast cancer is given. Figure 2 , Figure 3 The original full-slice image, the complete heat map and four highly activated patch blocks are also given. It can be seen that the heat map can better cover the patch blocks related to the corresponding genes in the full-slice image, which can help doctors quickly locate the area of interest in the image and assist doctors in diagnosis.
[0132] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.
[0133] Based on the same idea as the multimodal fusion survival prediction method based on the Sinkhorn algorithm in the above-mentioned embodiment, the present invention also provides a multimodal fusion survival prediction system based on the Sinkhorn algorithm, which can be used to execute the above-mentioned multimodal fusion survival prediction method based on the Sinkhorn algorithm. For ease of explanation, the structural schematic diagram of the embodiment of the multimodal fusion survival prediction system based on the Sinkhorn algorithm only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0134] like Figure 4 As shown, another embodiment of the present invention provides a multi-modal fusion survival prediction system based on the Sinkhorn algorithm, including a data acquisition module, a feature extraction module, a feature conversion module, a matrix calculation module, a feature weighting module and an aggregation prediction module;
[0135] The data acquisition module is used to perform threshold segmentation on the digital pathology full-slice images of cancer patients to remove the background area and obtain pathological tissue images; perform gene sequencing on cancer patients to obtain original gene data;
[0136] The feature extraction module is used to divide the pathological tissue image into patches of the same size at a set magnification, and input them into the patch feature extractor to extract patch features; select multiple genes from the original gene data and use the gene feature extractor to extract gene features;
[0137] The feature conversion module is used to convert patch features and gene features into value features, key features, and query features respectively using three feature mapping modules;
[0138] The matrix calculation module is used to calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm;
[0139] The feature weighting module is used to perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features;
[0140] The aggregation prediction module is used to input the weighted features into the patch feature aggregation module, query the features into the gene feature aggregation module for feature aggregation, splice them into a feature vector, and input them into the fully connected layer for risk prediction to obtain the prediction results.
[0141] It should be noted that the technical features and beneficial effects described in the above-mentioned embodiment of the multimodal fusion survival prediction method based on the Sinkhorn algorithm are applicable to the embodiment of the multimodal fusion survival prediction system based on the Sinkhorn algorithm. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. This is hereby declared. In addition, in the implementation of the multimodal fusion survival prediction system based on the Sinkhorn algorithm in the above-mentioned embodiment, the logical division of each program module is only an example. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, for example, for the convenience of the configuration requirements of the corresponding hardware or the implementation of the software, that is, the internal structure of the multimodal fusion survival prediction system based on the Sinkhorn algorithm is divided into different program modules to complete all or part of the functions described above.
[0142] like Figure 5 As shown, in one embodiment, a computer-readable storage medium is provided, which stores a program in a memory. When the program is executed by a processor, a multi-modal fusion survival prediction method based on the Sinkhorn algorithm is implemented, specifically:
[0143] Perform threshold segmentation on the digital pathology full-slice images of cancer patients to remove the background area and obtain pathological tissue images; perform gene sequencing on cancer patients to obtain original gene data;
[0144] At a set magnification, the pathological tissue image is divided into patches of the same size and input into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene feature extractor is used to extract gene features;
[0145] Three feature mapping modules are used to convert patch features and gene features into value features, key features, and query features respectively;
[0146] Calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm;
[0147] The Sinkhorn mutual attention matrix is normalized alternately by columns and rows, and then weighted fused with the value feature to obtain the weighted feature;
[0148] The weighted features are input into the patch feature aggregation module, and the query features are input into the gene feature aggregation module for feature aggregation. The features are concatenated into a feature vector and input into the fully connected layer for risk prediction to obtain the prediction results.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. Multimodal fusion survival prediction method based on Sinkhorn algorithm, It is characterized in that The steps include: Perform threshold segmentation on the digital pathology full-slice images of cancer patients to remove the background area and obtain pathological tissue images; perform gene sequencing on cancer patients to obtain original gene data; At a set magnification, the pathological tissue image is divided into patches of the same size and input into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene feature extractor is used to extract gene features; Three feature mapping modules are used to convert patch features and gene features into value features, key features, and query features respectively; The three feature mapping modules are all composed of learnable fully connected layers; The conversion formulas are: Q = F Q W Q , K = F K W K , V = F V W V , Among them, F Q is the gene feature, F K and F V is the patch feature; W Q , W K and W V are the parameters of the three feature mapping modules; Q, K and V represent query features, key features and value features respectively; Calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm; The Sinkhorn mutual attention matrix calculation formula is: , Among them, Q is the query feature, K is the key feature, and K T is the transposed matrix of the key feature, d is the feature dimension, ReLU is the linear rectification function, Sinkhorn is the Sinkhorn algorithm, A coattn is the Sinkhorn mutual attention matrix; The Sinkhorn mutual attention matrix A coattn has a size of M×N with M << N, where M is the number of genes and N is the number of patch blocks; Perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features; When performing alternating column and row normalization on the Sinkhorn mutual attention matrix, the columns of the Sinkhorn mutual attention matrix are first normalized, and then the rows of the Sinkhorn mutual attention matrix are normalized until a set number of times is reached; The Sinkhorn mutual attention matrix is used as the weight to weight the value feature to obtain the weighted feature R, the formula is: R = A coattn V, , Among them, R is an M-dimensional column vector; A coattn is the Sinkhorn mutual attention matrix, which is an M×N-dimensional matrix; V is the value feature, which is an N-dimensional column vector; r i is the i-th element value of the weighted feature R; a ij is the Sinkhorn mutual attention matrix A coattn The element value of the i-th row and j-th column of j is the j-th element value of the value feature V; The weighted features are input into the patch feature aggregation module, and the query features are input into the gene feature aggregation module for feature aggregation. The features are spliced into a feature vector and input into the fully connected layer for risk prediction to obtain the prediction results. The patch feature aggregation module has the same structure as the gene feature aggregation module, both consisting of a Transformer structure and a MIL structure.
2. The multimodal fusion survival prediction method based on the Sinkhorn algorithm according to claim 1, It is characterized in that The patch feature extractor is pre-trained on the ImageNet dataset; The patch feature extractor includes a backbone network and a learnable fully connected layer; The backbone network adopts the Resnet50 network model.
3. The multimodal fusion survival prediction method based on the Sinkhorn algorithm according to claim 1, It is characterized in that The gene feature extractor is composed of multiple learnable fully connected layers in parallel; the number of the multiple learnable fully connected layers is the same as the number of selected genes.
4. The multimodal fusion survival prediction method based on the Sinkhorn algorithm according to claim 1, It is characterized in that The alternating column and row normalization is expressed as: S 0 (A coattn )=exp(A coattn ), S k (A coattn )=F r (F c (S k-1 (A coattn ))), S(A coattn )=lim(S K (A coattn )),K→∞, Among them, A coattn is the Sinkhorn mutual attention matrix, S 0 (·) represents the custom Sinkhorn preprocessing step, exp(·) is the exponential of e for all elements, S k (·) represents the kth alternating column and row normalization, S k-1 (·) indicates the k-1th alternating column and row normalization, F r (·) indicates row normalization, F c (·) indicates column normalization, S K (·) is a total of K alternating row and column normalizations, S(·) is the equivalent convergence operation of alternating row and column normalization; The row normalization F r (·) is expressed as: , in, Indicates the kth row normalization. It means the k-1th row normalization. is the element division operation, 1 N represents a column vector of length N that is all 1s, represents a row vector of all 1s of length M; The column normalization F c (·) is expressed as: , in, Indicates the kth column normalization, It means the column normalization is performed for the k-1th time.
5. The multimodal fusion survival prediction method based on the Sinkhorn algorithm according to claim 1, It is characterized in that Input the weighted feature R into the patch feature aggregation module for feature aggregation to obtain the weighted aggregation feature R agg At the same time, the query feature Q is input into the gene feature aggregation module for feature aggregation to obtain the gene aggregation feature Q agg , respectively expressed as: R agg = T H-MIL (T H-Tr - R), Q agg = T G-MIL (T G-Tr - Q), Among them, T H-MIL and T H-Tr They are the MIL structure and Transformer structure of the patch feature aggregation module; T G-MIL and T G-Tr They are the MIL structure and Transformer structure of the gene feature aggregation module; The weighted aggregation feature R agg and gene aggregation feature Q agg Splice and get a feature vector F concat , the splicing formula is: F concat =Concat(R agg ,Q agg ), Among them, Concat(·) is the concatenation operation on the dimension; The feature vector F concat Input the fully connected layer to perform risk prediction and obtain the prediction result. The risk prediction formula is: T=W p F concat +b p , Among them, T is the prediction result, W p and b p are the parameters of the fully connected layer.
6. Multimodal fusion survival prediction system based on Sinkhorn algorithm, It is characterized in that A multimodal fusion survival prediction method based on the Sinkhorn algorithm applied to any one of claims 1-5, comprising a data acquisition module, a feature extraction module, a feature conversion module, a matrix calculation module, a feature weighting module and an aggregation prediction module; The data acquisition module is used to perform threshold segmentation on the digital pathology full-slice image of the cancer patient to remove the background area to obtain the pathology tissue image; perform gene sequencing on the cancer patient to obtain the original gene data; The feature extraction module is used to divide the pathological tissue image into patches of the same size under a set magnification, and input the patches into a patch feature extractor to extract patch features; multiple genes are selected from the original gene data and the gene features are extracted using the gene feature extractor; The feature conversion module is used to use three feature mapping modules to convert patch features and gene features into value features, key features and query features respectively; The matrix calculation module is used to calculate the Sinkhorn mutual attention matrix of key features and query features based on the Sinkhorn algorithm; The feature weighting module is used to perform alternating column and row normalization on the Sinkhorn mutual attention matrix and weight the value features to obtain weighted features; The aggregation prediction module is used to input the weighted features into the patch feature aggregation module, query the features into the gene feature aggregation module for feature aggregation, splice them into a feature vector, and input them into the fully connected layer for risk prediction to obtain a prediction result.
7. A computer-readable storage medium storing a program, It is characterized in that When the program is executed by a processor, the multimodal fusion survival prediction method based on the Sinkhorn algorithm described in any one of claims 1 to 5 is implemented.
