Large model continuous optimization method and device based on single diagnosis and treatment experience learning
Through the continuous optimization method of large models based on single diagnosis and treatment experience learning, the problem of model parameter optimization and scalability in deep learning technology is solved, the refined analysis of medical data and the continuous optimization of the model are achieved, and the accuracy and stability are improved. sex, providing technical support for the medical field.
Patent Information
- Application Number
- CN202410731125.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-08
AI Technical Summary
Deep learning technology is difficult to optimize model parameters, resulting in the inability of the model to continuously learn and optimize the scalability of the model.
Using a large model continuous optimization method based on single diagnosis and treatment experience learning, preprocessing is performed by obtaining original images, using an encoder network to extract features, generate low-dimensional representation vectors, maximize mutual information between vectors, and fuse image and non-image data. Construct a heterogeneous multi-graph progressive embedding learning model, optimize node embedding representation, calibrate model parameters, combine historical and new knowledge with online and offline parameter adjustment modules, and calculate average cross-entropy loss to achieve continuous learning and optimization of the model.
It achieves refined and personalized analysis of medical images and data, improves the accuracy and stability of the model, solves the problem of model parameter optimization and scalability, and supports the sustainable development of the medical field.
Smart Images

Figure CN118748077A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a method and device for continuous optimization of a large model based on single diagnosis and treatment experience learning. Background Art
[0002] In the modern medical field, with the continuous advancement of technology, the types and quantities of medical data are growing rapidly. These data include not only traditional medical imaging data, such as X-rays, CT scans, and MRI images, but also a large amount of non-image data, such as patients' electronic medical records, laboratory test results, physiological signals, etc. These data provide doctors with a rich source of information, helping them to understand the patient's condition more comprehensively and make more accurate diagnoses.
[0003] Traditional data analysis methods can often only process a single type of data and cannot fully utilize the complementarity between multimodal data. In recent years, the development of deep learning technology has provided new ideas for solving the problem of effectively extracting and fusing these multimodal information to support clinical decision-making. By building a deep neural network model, it is possible to automatically learn how to extract useful features from multimodal data and fuse these features to support more complex decision-making tasks.
[0004] However, how to optimize the model parameters, enable the model to continue learning, and optimize the scalability of the model are still issues to be solved. Summary of the invention
[0005] In an embodiment of the present application, by providing a large model continuous optimization method based on single diagnosis and treatment experience learning, the problem that the current deep learning technology is unable to optimize the model parameters, enable the model to continuously learn, and optimize the scalability of the model is solved.
[0006] In a first aspect, an embodiment of the present application provides a large model continuous optimization method based on single diagnosis and treatment experience learning, the method comprising: obtaining an original image of a sample patient, and performing a preprocessing step on the original image; wherein the preprocessing step is: mapping the image domain of the original image to a virtual image domain, and mapping the virtual image domain to a standard anatomical image domain; using an encoder network to perform an encoding step on the image after the preprocessing step, to obtain a space for storing image features processed by the encoder network; for two random images of the same sample patient, using an encoder network to generate their low-dimensional representation vectors, and maximizing the mutual information between the vectors through multi-instance contrast learning loss; calculating the average of multiple images of the sample patient, and fusing the multiple images into a comprehensive image; and performing a multi-dimensional image analysis on the non-image data in the comprehensive image. The method comprises the following steps: performing row clustering to divide patients with similar characteristics into different categories, thereby obtaining a characterization result of the patient data; wherein each category corresponds to a different set of nodes; constructing a model of heterogeneous multi-graph progressive embedding learning based on the characterization result of the patient data; calculating the cosine similarity of non-image data, and generating a unified node embedding representation using image and non-image data, and optimizing the embedding representation through a loss function and a consensus regularization loss; calibrating model parameters and calculating gradients to enable the model to quickly learn new knowledge; using an online parameter efficient adjustment module and an offline parameter efficient adjustment module to establish an expression to fuse historical knowledge and new knowledge; calculating the average cross entropy loss and combining the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to construct an integrated strategy, so that the model can fuse historical knowledge and new knowledge in continuous learning.
[0007] In combination with the first aspect, in a possible implementation manner, the expression of the preprocessing step is: Among them, i is the sample patient, b i represents the preprocessed image with standard anatomical coordinates, T opt represents the modified mapping function used for optimization, represents the first fixed mapping function, which is used to map the image domain of the original image to the virtual image domain, T s represents a second fixed mapping function for mapping the virtual image domain to the standard anatomical image domain, represents the original image of the sample patient; the expression of the encoding step of the image after the preprocessing step using the encoder network is: Where f(·) is the encoder network, is the space used to store the features of the original image, F img represents the number of original features of each image, represents the number of images, is the space used to store image features after being processed by the encoder network, and Fz represents the number of features after each image transformation.
[0008] In combination with the first aspect, in a possible implementation, for two random images of the same sample patient, using an encoder network to generate their low-dimensional representation vectors, and calculating the mutual information between the vectors that maximizes the similarity loss, including: establishing an expression for generating their low-dimensional representation vectors using the encoder network: in, represents two random images of sample patients, Represents two representation vectors corresponding to two random images; according to the formula Calculate the similarity loss between the sample patient's image and other patients' images to maximize the mutual information between vectors; where, represents the similarity loss of sample patients, represents the cosine similarity between two representation vectors, τ is the temperature hyperparameter, N represents the number of mini-batch images, and k represents the image number of the patient currently being processed.
[0009] In combination with the first aspect, in a possible implementation, calculating the average value of multiple images of the sample patient and fusing the multiple images into a comprehensive image includes: according to the formula Multiple images are fused into a composite image; where zi represents the composite image of sample patient i, The low-dimensional representation vector representing the kth image of sample patient i, K represents the number of images of sample patient i.
[0010] In combination with the first aspect, in a possible implementation, according to the formula Construct a model for heterogeneous multi-graph progressive embedding learning; To build multiple networks, V is the node set of patients, r is the parameter representing the relationship type, ε is the set of all edges with relationship type r, X is a matrix used to encode the attribute information of the node. The dimension of the matrix is in represents the number of nodes, F represents the attribute dimension of each node, represents the subgraph corresponding to the first relationship type, Represents the subgraphs corresponding to different relationship types, represents the last subgraph, R represents the number of relationship types; according to the formula Calculate the cosine similarity of r-type features of non-image data; where A (r) (i, j) is a binary group, ρ (r) (i, j) is the cosine similarity of the r-type non-image features between patients i and j, θ (r) is the threshold hyperparameter for each relationship type r; in, is the i-th row of the cosine similarity of the r-type features of the non-image data, representing the non-image feature vector of a specific patient, represents the feature vector of node j under relationship type r; the image feature vector and non-image feature vectors Connect and build multiple networks Among them, multiple networks A matrix used to encode the attribute information of a node In the multiple networks constructed For each relationship type Defining an encoder in, represents the node feature matrix, represents the adjacency matrix, represents a matrix consisting of all node embedding vectors, where each embedding vector has a dimension of d; each encoder receives node features and an adjacency matrix as input, and outputs a node embedding matrix H(r) under a relation type r; the expression of the embedding matrix is: According to the formula Construct a loss function to optimize the embedding representation of nodes under different relationship types; is the loss function corresponding to the relationship type r, i=1 is the initial value of the positive sample, |V| represents the total number of nodes in the network, j=1 is the initial value of the negative sample, For node v i The embedding representation under the relation type r is obtained by the relation-specific node encoder g r (·) is generated with dimension Represents node v j The corrupted embedding representation under relation type r, s (r) represents the summary vector under the relationship type r, and D is the discriminant function used to evaluate the similarity between the node embedding and the summary vector; according to the formula Calculate the consensus regularization loss; where l cs represents the consensus regularization loss, O represents the consensus embedding, and H (r) represents the relation-specific embedding matrix, represents the corrupted relation-specific embedding matrix and Q represents the attention pooling function.
[0011] In combination with the first aspect, in a possible implementation, the calibration model parameters and the calculated gradient enable the model to quickly learn new knowledge, including: the expression of the calibration model parameters is: h′←(1-λ(e))h+λ(e)σ(eW1)W2; wherein h′ represents the output adjusted by the Prefix module, h represents the input of the model or the output of the intermediate layer, λ(e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function; W q represents the weight of the query, The transposed matrix representing the key weight, W2 = P v , P v represents the weight of the value, i means traversal The i-th element of the vector, j represents traversal The jth element of the vector, C represents the context vector; calculate the loss function L with respect to the Prefix parameter P v The expression of the gradient is: It indicates that the output h′ after model calibration is relative to the Prefix parameter P v The gradient of represents the gradient of the loss function L relative to the output h′ after model calibration; the output of the model after calibration is expressed as: h′←(1-λ(e))h+σ(s k ·eW1)(s v ·W2); where h′ is the calibrated model output representation, λ(e) is a small positive number close to 0, h is the original output representation of the model, and s k is the scaling parameter of the Adapter module, s v is the scaling parameter of the Prefix module, (e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function.
[0012] In combination with the first aspect, in a possible implementation, the use of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to integrate the historical knowledge and the new knowledge includes: the expression integrating the historical knowledge and the new knowledge is: in, represents the offline parameter efficient adjustment module, α is the weight coefficient, Represents an online parameter efficient adjustment module.
[0013] In combination with the first aspect, in a possible implementation, the calculation of the average cross entropy loss and the construction of an integrated strategy combining the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module enable the model to integrate historical knowledge and new knowledge in continuous learning, including: according to the formula Calculate the average cross entropy loss; where, is the optimized loss function, is the new task dataset, x is the input data, y is the corresponding true label, is the cross entropy loss function, θ is the weight parameter of the model, and φ is the bias parameter of the model; according to the formula f ens (o on , o off ):=max(σ(o on ),σ(o off ))Build an integrated strategy; where f ens is the integrated function, o on The prediction results of the online parameter efficient adjustment module for the inference sample, o off It is the prediction result of the offline parameter efficient adjustment module for the inference sample, σ is the softmax function, and max() is the selection function.
[0014] In a second aspect, an embodiment of the present application provides a large-model continuous optimization device based on single diagnosis and treatment experience learning, the device comprising: a preprocessing module, used to obtain the original image of the sample patient and perform a preprocessing step on the original image; wherein the preprocessing step is: mapping the image domain of the original image to the virtual image domain, and mapping the virtual image domain to the standard anatomical image domain; an encoding step module, used to use an encoder network to perform an encoding step on the image after the preprocessing step, and obtain a space for storing image features processed by the encoder network; a generation module, used to use the encoder network to generate low-dimensional representation vectors for two random images of the same sample patient, and maximize the mutual information between vectors through multi-instance contrast learning loss; a fusion image module, used to calculate the average of multiple images of the sample patient, and fuse the multiple images into a comprehensive image; a clustering module, used to perform clustering on non-image data in the comprehensive image; Row clustering, dividing patients with similar characteristics into different categories, so as to obtain the characterization results of patient data; wherein each category corresponds to a different set of nodes; a construction module, used to construct a model of heterogeneous multi-graph progressive embedding learning based on the characterization results of the patient data; a representation module, used to calculate the cosine similarity of non-image data, and use image and non-image data to generate a unified node embedding representation, and optimize the embedding representation through a loss function and a consensus regularization loss; a learning module, used to calibrate model parameters and calculate gradients so that the model can quickly learn new knowledge; a fusion knowledge module, used to use the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to fuse historical knowledge and new knowledge; a construction integration strategy module, used to calculate the average cross entropy loss and combine the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to construct an integration strategy, so that the model can fuse historical knowledge and new knowledge in continuous learning.
[0015] In conjunction with the second aspect, in a possible implementation manner, the expression of the preprocessing step is: Among them, i is the sample patient, b i represents the preprocessed image with standard anatomical coordinates, T opt represents the modified mapping function used for optimization, represents the first fixed mapping function, which is used to map the image domain of the original image to the virtual image domain, T s represents a second fixed mapping function for mapping the virtual image domain to the standard anatomical image domain, represents the original image of the sample patient; the expression of the encoding step of the image after the preprocessing step using the encoder network is: Where f(·) is the encoder network, is the space used to store the features of the original image, F img represents the number of original features of each image, represents the number of images, is the space used to store image features after being processed by the encoder network, F z Represents the number of features after each image transformation.
[0016] In combination with the second aspect, in a possible implementation, for two random images of the same sample patient, using an encoder network to generate their low-dimensional representation vectors, and calculating the mutual information between the vectors that maximizes the similarity loss, including: establishing an expression for generating their low-dimensional representation vectors using the encoder network: in, represents two random images of sample patients, Represents two representation vectors corresponding to two random images; according to the formula Calculate the similarity loss between the sample patient's image and other patients' images to maximize the mutual information between vectors; where, represents the similarity loss of sample patients, represents the cosine similarity between two representation vectors, τ is the temperature hyperparameter, N represents the number of mini-batch images, and k represents the image number of the patient currently being processed.
[0017] In conjunction with the second aspect, in a possible implementation, calculating the average value of multiple images of the sample patient and fusing the multiple images into a comprehensive image includes: according to the formula Multiple images are fused into a composite image; where zi represents the composite image of sample patient i, The low-dimensional representation vector representing the kth image of sample patient i, K represents the number of images of sample patient i.
[0018] In combination with the second aspect, in a possible implementation, according to the formula Construct a model for heterogeneous multi-graph progressive embedding learning; To build multiple networks, V is the node set of patients, r is the parameter representing the relationship type, ε is the set of all edges with relationship type r, X is a matrix used to encode the attribute information of the node. The dimension of the matrix is in represents the number of nodes, F represents the attribute dimension of each node, represents the subgraph corresponding to the first relationship type, Represents the subgraphs corresponding to different relationship types, represents the last subgraph, R represents the number of relationship types; according to the formula Calculate the cosine similarity of r-type features of non-image data; where A(r)(i, j) is a two-tuple, ρ(r)(i, j) is the cosine similarity of r-type non-image features between patients i and j, and θ(r) is the threshold hyperparameter for each relationship type r; in, is the i-th row of the cosine similarity of the r-type features of the non-image data, representing the non-image feature similarity of a specific patient.
[0019] quantity, represents the feature vector of node j under relationship type r; the image feature vector and non-image feature vectors Connect and build multiple networks Among them, multiple networks A matrix used to encode the attribute information of a node F=(F z +F non-img ); In the multiple networks constructed For each relationship type Defining an encoder in, represents the node feature matrix, represents the adjacency matrix, represents a matrix consisting of all node embedding vectors, where each embedding vector has a dimension of d; each encoder receives node features and adjacency matrix as input, and outputs node embedding matrix H(r) under relationship type r; the expression of embedding matrix is: According to the formula Construct a loss function to optimize the embedding representation of nodes under different relationship types; is the loss function corresponding to the relationship type r, i=1 is the initial value of the positive sample, |V| represents the total number of nodes in the network, j=1 is the initial value of the negative sample, is the embedding representation of node vi under relation type r, generated by the relation-specific node encoder gr(·), with dimension Represents node v j The corrupted embedding representation under relation type r, s (r) represents the summary vector under the relationship type r, and D is the discriminant function used to evaluate the similarity between the node embedding and the summary vector; according to the formula Calculate the consensus regularization loss; where l cs represents the consensus regularization loss, O represents the consensus embedding, and H (r) represents the relation-specific embedding matrix, represents the corrupted relation-specific embedding matrix and Q represents the attention pooling function.
[0020] In combination with the second aspect, in a possible implementation, the calibration model parameters and the calculated gradient enable the model to quickly learn new knowledge, including: the expression of the calibration model parameters is: h′←(1-λ(e))h+λ(e)σ(eW1)W2; wherein h′ represents the output adjusted by the Prefix module, h represents the input of the model or the output of the intermediate layer, λ(e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function; W q represents the weight of the query, The transposed matrix representing the key weight, W2 = P v , P v represents the weight of the value, i means traversal The i-th element of the vector, j represents traversal The jth element of the vector, C represents the context vector; calculate the loss function L with respect to the Prefix parameter P v The expression of the gradient is: It indicates that the output h′ after model calibration is relative to the Prefix parameter P v The gradient of represents the gradient of the loss function L relative to the output h′ after model calibration; the output of the model after calibration is expressed as: h′←(1-λ(e))h+σ(s k ·eW1)(s v ·W2); where h′ is the calibrated model output representation, λ(e) is a small positive number close to 0, h is the original output representation of the model, and s k is the scaling parameter of the Adapter module, s v is the scaling parameter of the Prefix module, (e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function.
[0021] In conjunction with the second aspect, in a possible implementation, the use of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to integrate historical knowledge and new knowledge includes: the expression integrating historical knowledge and new knowledge is: in, represents the offline parameter efficient adjustment module, α is the weight coefficient, Represents an online parameter efficient adjustment module.
[0022] In combination with the second aspect, in a possible implementation, the calculation of the average cross entropy loss and the combination of the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module are used to construct an integrated strategy so that the model can integrate historical knowledge and new knowledge in continuous learning, including: according to the formula Calculate the average cross entropy loss; where, is the optimized loss function, is the new task dataset, x is the input data, y is the corresponding true label, is the cross entropy loss function, θ is the weight parameter of the model, and φ is the bias parameter of the model; according to the formula f ens (o on , o off ):=max(σ(o on ),σ(o off ))Build an integrated strategy; where f ens is the integrated function, o on The prediction results of the online parameter efficient adjustment module for the inference sample, o off It is the prediction result of the offline parameter efficient adjustment module for the inference sample, σ is the softmax function, and max() is the selection function.
[0023] In the third aspect, an embodiment of the present application provides a large-model continuous optimization server based on single diagnosis and treatment experience learning, including a memory and a processor; the memory is used to store computer-executable instructions; the processor is used to execute the computer-executable instructions to implement the method described in the first aspect or any possible implementation method of the first aspect.
[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects:
[0025] The embodiment of the present application provides a large model continuous optimization method based on single diagnosis and treatment experience learning. The method can standardize and normalize image data by mapping the original image to a virtual image domain and then mapping it to a standard anatomical image domain, so that subsequent image analysis is more accurate and consistent. The encoder network is used to encode the preprocessed image, and the key features of the image can be extracted and stored in a low-dimensional space. This not only reduces the complexity of the data, but also improves the efficiency of subsequent processing. By generating a low-dimensional representation vector of the image and maximizing the mutual information between the vectors, the model's understanding of the image content can be enhanced, so that the model can better learn the intrinsic structure and relationship of the image. By fusing multiple images into a comprehensive image and clustering non-image data, patients with similar features can be divided into different categories, thereby realizing refined and personalized analysis of patient data. A model for heterogeneous multi-graph progressive embedding learning is constructed based on the characterization results of patient data, which can comprehensively consider image and non-image data, generate a unified node embedding representation, and improve the comprehensive analysis ability of the model. By calculating the cosine similarity of non-image data and using image and non-image data to generate a unified node embedding representation, calibrating model parameters and calculating gradients at the same time, the model can quickly learn new knowledge and continuously optimize performance. The online parameter efficient adjustment module and the offline parameter efficient adjustment module are used to establish expressions to integrate historical knowledge and new knowledge. In the process of continuous learning of the model, historical knowledge and new knowledge can be effectively combined to achieve continuous optimization and upgrading of the model. By calculating the average cross entropy loss and combining the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to build an integrated strategy, the model can integrate historical knowledge and new knowledge in continuous learning, improving the stability and generalization ability of the model. The large model continuous optimization method based on single diagnosis and treatment experience learning uses a series of technical means to achieve refined and personalized analysis of medical images and data, improve the accuracy and stability of the model, and provide strong technical support for the continuous development of the medical field, thereby solving the problem that the current deep learning technology cannot optimize the model parameters, enable the model to continuously learn, and optimize the scalability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments of the present invention or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 A flowchart of a large model continuous optimization method based on single diagnosis and treatment experience learning provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of unified representation modeling of multimodal domain experience based on constructing heterogeneous multi-graph progressive embedding learning provided in an embodiment of the present application;
[0029] Figure 3 A first schematic diagram of a large-model continuous optimization framework of a continuous learning paradigm provided in an embodiment of the present application;
[0030] Figure 4 A second schematic diagram of a large-model continuous optimization framework of a continuous learning paradigm provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of a large-scale model continuous optimization device based on single diagnosis and treatment experience learning provided in an embodiment of the present application;
[0032] Figure 6 A schematic diagram of a large model for continuous optimization of a server based on learning from a single diagnosis and treatment experience provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] The following describes some of the techniques involved in the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, some descriptions of well-known functions and structures are omitted in the following description.
[0035] The present application embodiment provides a large model continuous optimization method based on single diagnosis and treatment experience learning, such as Figure 1 As shown, the method includes steps S101 to S110. Among them, Figure 1 This is only an execution order shown in the embodiment of the present application, and does not represent the only execution order of a large model continuous optimization method based on a single diagnosis and treatment experience learning. In the case that the final result can be achieved, Figure 1 The steps shown may be performed in parallel or reversed.
[0036] S101: Acquire the original image of the sample patient and perform a preprocessing step on the original image, wherein the preprocessing step is: map the image domain of the original image to the virtual image domain, and map the virtual image domain to the standard anatomical image domain.
[0037] Specifically, since medical images contain noise information due to differences in medical equipment and variations in the physical size of each patient, a preprocessing step is required. The expression of the preprocessing step is: Where i is the sample patient, bi represents the preprocessed image with standard anatomical coordinates, T opt represents the modified mapping function used for optimization, represents the first fixed mapping function, which is used to map the image domain of the original image to the virtual image domain, T s represents a second fixed mapping function for mapping the virtual image domain to the standard anatomical image domain, Represents the original image of a sample patient.
[0038] Furthermore, the virtual image domain is an intermediate state, the standard anatomical image domain is a predefined anatomical image space for unified comparison and analysis, and the modified mapping function for optimization is an optimization step introduced in the preprocessing step, which is used to adjust or optimize the mapping process to better adapt to specific images or analysis requirements. The above steps convert the original image into a preprocessed image with standard anatomical coordinates through a series of mapping functions. This conversion helps to achieve more accurate and consistent analysis and diagnosis in subsequent medical image analysis. At the same time, the introduced optimized mapping function also provides a certain flexibility for the preprocessing process, which can be adjusted and optimized according to different needs.
[0039] S102: using an encoder network to perform an encoding step on the image after the preprocessing step, to obtain a space for storing image features processed by the encoder network.
[0040] The expression for the encoding step using the encoder network on the image after the preprocessing step is: Where f(·) is the encoder network, is the space used to store the features of the original image, F img represents the number of original features of each image, represents the number of images, is the space used to store image features after being processed by the encoder network, F z Represents the number of features after each image transformation. Specifically, the expression for the encoding step can also be understood as the representation of the image obtained by pre-training the encoder with a natural image dataset (such as the ImageNet dataset).
[0041] Specifically, the encoder network is used to encode the preprocessed image to extract the features of the image and store these features in a specific space, which is used to store the features of the original image. It can be understood as a multidimensional array. The role of the encoder network f(·) is to transform or encode the input features to extract more useful information or features. The encoder network is usually composed of a series of neural network layers (such as convolutional layers, pooling layers, fully connected layers, etc.), which gradually transform and abstract the input data. is another multidimensional array used to store the image features after being processed by the encoder network. z represents the number of features for each image, which may be different from the original number of features F img The encoder network converts the input feature space into Mapping to the output feature space Specifically, for each image feature in the input space, the encoder network will output a new feature representation, which is stored in the output feature space, i.e., the new space. The features in the new space are usually more abstract and useful, and can be used for subsequent image processing tasks such as classification, recognition, retrieval, etc.
[0042] S103: For two random images of the same sample patient, use the encoder network to generate their low-dimensional representation vectors, and maximize the mutual information between the vectors through multi-instance contrastive learning loss.
[0043] Specifically, the multi-instance contrastive learning loss treats each single instance as a different “class” and treats this contrastive learning as a dictionary lookup task, in which an encoder is trained to perform a dictionary lookup, where the encoded query is compared to the encoded sample.
[0044] The expression for generating its low-dimensional representation vector using the encoder network is established as: in, represents two random images of sample patients, Represents two representation vectors corresponding to two random images.
[0045] Specifically, R represents the space of original image features, and Represents the space of low-dimensional vectors. img and F z They represent the number of original features and the number of features of the low-dimensional vector respectively. The low-dimensional vector can be understood as the transformed feature vector.
[0046] According to the formula Calculate the similarity loss between the sample patient's image and other patients' images to maximize the mutual information between vectors. represents the similarity loss of sample patients, represents the cosine similarity between two representation vectors, τ is the temperature hyperparameter, N represents the number of mini-batch images, and k represents the image number of the patient currently being processed.
[0047] Specifically, the temperature hyperparameter is used to control the degree of smoothing of the similarity distribution. Indicates the similarity between the two images of the current patient after exponentialization and temperature scaling. The larger the value, the more similar the two images are. Represents the sum of the similarities between all other patient images and the current patient image, after exponentialization and temperature scaling. The larger this value is, the less similar the current patient image is to other patient images. The smaller the value of, the higher the similarity between the two images of the current patient, and the lower the similarity with other patients' images, thus maximizing the mutual information between vectors.
[0048] The above method converts images into low-dimensional representation vectors through an encoder network and uses multi-instance contrastive learning loss to maximize the mutual information between these vectors. This helps to better utilize these vectors in subsequent tasks, such as classification, recognition, or retrieval. By maximizing the mutual information between vectors, images of the same patient can be closer in the vector space, while images of different patients can be further away, thereby improving the performance of the model.
[0049] S104: Calculate the average value of multiple images of the sample patient and fuse the multiple images into a comprehensive image.
[0050] According to the formula Multiple images are fused into a composite image. Where zi represents the composite image of sample patient i, The low-dimensional representation vector representing the kth image of sample patient i, K represents the number of images of sample patient i.
[0051] Specifically, the composite image is a comprehensive representation vector that fuses the information of multiple images and can reflect the common features or trends of multiple images.
[0052] S105: Clustering the non-image data in the comprehensive image, and classifying patients with similar characteristics into different categories, thereby obtaining a characterization result of the patient data. Each category corresponds to a different set of nodes. Specifically, each category can represent a subset of patients with the same characteristics.
[0053] Specifically, non-image medical data contains various types of patient information, such as demographic characteristics, personal and family history lists, and laboratory test results, each of which provides unique clinical information. That is, each type of non-image feature has a different connection with the target disease. How to extract meaningful relationships between patients is a key research in constructing heterogeneous multi-graph progressive embedding learning based on patient data. Since non-image features can be divided into multiple types according to their characteristics, classifying the features is the first step in relationship extraction. Although it is simple to classify non-image features using domain knowledge, domain knowledge may not always be available, and it is not easy to discover implicit correlations between features. Therefore, in order to automatically classify various types of non-image features, it is only necessary to classify the non-image tabular data. Using K-means clustering algorithm, F non-img The characteristics of the dimension are divided into Set, that is
[0054] S106: Construct a model for heterogeneous multi-graph progressive embedding learning based on the characterization results of patient data.
[0055] Specifically, the representation result of patient data is the category information after clustering. "Heterogeneous" means that the model will process different types of data, such as image data and non-image data, and "multi-graph" means that the model will construct multiple subgraphs to represent different types of relationships respectively.
[0056] Figure 2 A schematic diagram of unified representation modeling of multimodal domain experience based on constructing heterogeneous multi-graph progressive embedding learning provided in an embodiment of the present application.
[0057] S107: Calculate the cosine similarity of non-image data, and use image and non-image data to generate a unified node embedding representation, and optimize the embedding representation through a loss function and a consensus regularization loss.
[0058] Specifically, the calculated similarity can help understand the similarity between different patients on specific features. In order to integrate image and non-image data into a unified framework, the image feature vectors and non-image feature vectors are connected to construct a multi-network. This multi-network contains all the information of the patient and is used for subsequent embedding learning. The loss function ensures that the embedding representation of the node under different relationship types is accurate, while the consensus regularization loss ensures that the embedding representation under different relationship types is consistent.
[0059] According to the formula Construct a model for heterogeneous multi-graph progressive embedding learning. To build multiple networks, V is the node set of patients, r is the parameter representing the relationship type, ε is the set of all edges with relationship type r, X is a matrix used to encode the attribute information of the node. The dimension of the matrix is in represents the number of nodes, F represents the attribute dimension of each node, represents the subgraph corresponding to the first relationship type, Represents the subgraphs corresponding to different relationship types, represents the last subgraph, and R represents the number of relationship types.
[0060] According to the formula Calculate the cosine similarity of r-type features of non-image data. Among them, A (r) (i, j) is a binary group, ρ (r) (i, j) is the cosine similarity of the r-type non-image features between patients i and j, θ (r) is the threshold hyperparameter for each relationship type r.
[0061] in, The i-th row is the cosine similarity of the r-type features of the non-image data, representing the non-image feature vector of a specific patient, Represents the feature vector of node j under relationship type r.
[0062] The image feature vector and non-image feature vectors Connect and build multiple networks Among them, multiple networks A matrix used to encode the attribute information of a node F=(F z +F non-img ).
[0063] Specifically, when building a multi-network Based on this, a deep multi-graph information maximization technique is used to learn from heterogeneous types of relations between nodes. The core idea of deep multi-graph information maximization is to learn a consensus embedding of a single node about multiple relation types, while training each relation type specific node embedding to maximize the mutual information with the relation type specific summary vector.
[0064] In the multiple networks constructed For each relationship type Defining an encoder in, represents the node feature matrix, represents the adjacency matrix, represents a matrix consisting of all node embedding vectors, where each embedding vector has dimension d.
[0065] Each encoder receives node features and adjacency matrix as input and outputs node embedding matrix H under relation type r (r) The expression of the embedding matrix is:
[0066] According to the formula Construct a loss function to optimize the embedding representation of nodes under different relationship types. is the loss function corresponding to the relationship type r, i=1 is the initial value of the positive sample, |V| represents the total number of nodes in the network, j=1 is the initial value of the negative sample, For node v i The embedding representation under the relation type r is generated by the relation-specific node encoder gr(·) and has the dimension Represents node v j The corrupted embedding representation under relation type r, s (r) represents the summary vector under relation type r, and D is the discriminant function used to evaluate the similarity between node embedding and summary vector. Specifically, D is the patch summary representation of The discriminant function for scoring, i.e., the positive patch summary pair The scores were higher, among which is node v i However, the encoder g is trained independently r (·) (which contains relevant information about each relation type r) cannot fully benefit from the reusability of the network.
[0067] Therefore, consensus regularization is proposed based on deep multi-graph information maximization technology, aiming to minimize the relationship-specific embedding, i.e. and consensus embedding O∈R |V|×d The difference between them. Where d represents the dimension of embedding
[0068] According to the formula Calculate the consensus regularization loss. Among them, l cs represents the consensus regularization loss, O represents the consensus embedding, and H (r) represents the relation-specific embedding matrix, represents the corrupted relation-specific embedding matrix and Q represents the attention pooling function.
[0069] S108: Calibrate model parameters and calculate gradients to enable the model to quickly learn new knowledge.
[0070] Specifically, the efficient parameter adjustment modules differ in the speed at which they acquire new knowledge, leading to differences in performance. In theory, a module that adapts to new tasks too quickly can lead to overfitting and cause more severe catastrophic forgetting, while a slower adaptation speed can maintain the stability of the model but limit its plasticity. Therefore, adjusting the adaptation speed of different efficient parameter adjustment modules is crucial to unify them into an efficient and robust continuous learning method.
[0071] To this end, this application calibrates the parameter efficient adjustment module to keep its adaptation speed consistent. In addition, since the new and old tasks share the same parameter efficient adjustment module θ pet , so the new task has pet The changes made will cause the old tasks to be forgotten. Therefore, slowing down θ pet Changes in θ, such as reducing the learning rate, can help alleviate catastrophic forgetting. A linear probing followed by fine-tuning strategy is used to calibrate θ. pet Relative to φ new Specifically, at the beginning of training, only φ new , while freezing θ pet Then in φ new After being fully learned and the loss is significantly reduced, the joint learning φ new and θ pet φ new Specific set of parameters introduced for new tasks.
[0072] The expression for calibrating the model parameters is: h′←(1-λ(e))h+λ(e)σ(eW1)W2. Among them, h′ represents the output adjusted by the Prefiix module, h represents the input of the model or the output of the intermediate layer, λ(e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function.
[0073] W q represents the weight of the query, The transposed matrix representing the key weight, W2 = P v , P v represents the weight of the value, i means traversal The i-th element of the vector, j represents traversal The j-th element of the vector, C, represents the context vector.
[0074] Because P k Usually contains much fewer tokens than the input C, so λ(e) is usually a small positive number close to 0, which affects the P of the Prefix token. vGradient. Token is a basic unit in the text. Therefore, P v The gradient of W is obviously smaller than that of down =W1 and W up =W2 parameterized corresponding to Adapter's W up , for P k and W down Similar conclusions can be drawn. Then, it can be easily observed that Prefix adapts to new tasks much slower than Adapter. Compensate its gradient and add two learnable scaling parameters s k and v To align the Prefix with the Adapter, we can calibrate the expression of the Prefix and obtain the following expression.
[0075] Calculate the loss function L with respect to the Prefix parameter P v The expression of the gradient is: It indicates that the output h′ after model calibration is relative to the Prefix parameter P v The gradient of It represents the gradient of the loss function L with respect to the calibrated output h′ of the model.
[0076] The output expression of the calibrated model is: h′←(1-λ(e))h+σ(s k ·eW1)(s v ·W2). Where h′ is the output representation of the calibrated model, λ(e) is a small positive number close to 0, h is the original output representation of the model, and s k is the scaling parameter of the Adapter module, s v is the scaling parameter of the Prefix module, (e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function.
[0077] The adaptation speed of the calibrated Prefix is almost the same as that of the Adapter, and its performance is improved to be comparable to that of the Adapter. For other parameter efficient adjustment modules, they can also be specifically analyzed and then their adaptation speeds can be calibrated to be consistent with that of the Adapter. By adjusting the adaptation speed of the parameter efficient adjustment module and calibrating its adaptation speed relative to the classifier, the constructed framework achieves a better and more consistent balance of stability and plasticity with various parameter efficient adjustment modules.
[0078] The above steps propose a method to calibrate model parameters to quickly learn new knowledge, and give an expression for calculating the gradient of the loss function with respect to specific parameters. This approach may help the model adapt quickly and make accurate predictions when faced with new data. At the same time, by calculating the gradient, these parameters can be optimized to minimize the loss function, thereby improving the performance of the model.
[0079] S109: Use the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to integrate historical knowledge and new knowledge.
[0080] Specifically, the number of efficient adjustment modules θ pet The goal is to continuously adapt to new tasks, making the model more proficient at handling new tasks. However, this adaptation process may cause the model to gradually forget how to handle older tasks. To address this problem, an additional expert is created for older tasks to complement the expert for new tasks, drawing inspiration from the human brain's complementary learning system, which involves the hippocampus quickly learning new knowledge and the neocortex integrating learned knowledge in an offline manner over time. This is done by attaching an online parameter efficient tuning module to the model after it has learned the first task. That is, θ in the baseline pet Copy as offline parameter efficient adjustment module To achieve this, when the model learns a new task through the accumulation function, The knowledge learned will be accumulated slowly.
[0081] The expression for integrating historical knowledge and new knowledge is: in, represents the offline parameter efficient adjustment module, α is the weight coefficient, Represents an online parameter efficient adjustment module.
[0082] Specifically, Represents the output or result of an efficient offline parameter adjustment module, usually based on historical data or previously learned knowledge. Represents the output or result of an online parameter efficient tuning module, usually based on real-time data or the latest learned knowledge.
[0083] Specifically, the weight coefficient α is used to control the degree of fusion between the two, and the value range of the weight coefficient α is usually between 0 and 1. When α is close to 1, the influence of new knowledge is greater, and the model will rely more on the online parameter efficient adjustment module. When α is close to 0, the influence of historical knowledge is greater, and the model will rely more on the offline parameter efficient adjustment module. This fusion strategy can be used in a variety of scenarios, especially when the model needs to quickly adapt to new environments or new data. By adjusting the value of α, a balance can be found between historical knowledge and new knowledge to achieve optimal performance.
[0084] Furthermore, when the model needs to adapt to new data in real time, the output of the online parameter adjustment module can be considered more by increasing the value of α. When migrating from one domain to another, the influence of historical knowledge and new domain knowledge can be balanced by adjusting the value of α. When facing noisy data or outliers, the robustness of the model can be enhanced by reducing the value of α to rely more on historical knowledge. In short, this fusion strategy provides the model with the ability to flexibly switch between historical knowledge and new knowledge.
[0085] S110: Calculate the average cross entropy loss and build an integrated strategy based on the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module, so that the model can integrate historical knowledge and new knowledge in continuous learning.
[0086] Specifically, you can use and Get two experts for the new and old tasks, use and The two expert models constructed are good at handling new tasks and old tasks respectively. However, the task to which the sample belongs is unknown during the reasoning process. Therefore, instead of using only the online or offline expert model for reasoning, their outputs are integrated to obtain the prediction of the reasoning sample.
[0087] When the unnormalized negative log probability is defined as an energy function, the classifier can be viewed as an energy model. The optimization goal of the energy model is to minimize the energy of the model on the data distribution of the task it is learning. Therefore, by constantly minimizing φ on new tasks new The energy of is used to calculate the average cross entropy loss.
[0088] According to the formula Calculate the average cross entropy loss. Among them, is the optimized loss function, is the new task dataset, x is the input data, y is the corresponding true label, is the cross entropy loss function, θ is the weight parameter of the model, and φ is the bias parameter of the model. Specifically, max() is a function that filters out the logits of old categories. Even if old data is not used in the training process, the old data in φ new The energy on will also be very high. and contain relatively more novel and historical knowledge, respectively. In theory, The energy generated by samples for newer tasks should be less than The energy generated by the ensemble is the same as that generated by the ensemble, and vice versa. Therefore, the prediction result with the lowest energy can be selected as the final prediction for the inference sample. However, in practice, it is found that and Normalizing the resulting energies will produce more robust results. Therefore, an integration strategy is constructed according to the following formula.
[0089] According to the formula f ens (o on , o off ):=max(σ(o on ),σ(o off ))Build an integrated strategy. Among them, f ens is the integrated function, o on It is the prediction result of the online parameter efficient adjustment module for the inference sample, 0 off is the prediction result of the offline parameter efficient adjustment module for the inference sample, σ is the softmax function, and max() is the selection function. Specifically, o on and off It can also be understood as the output of the online and offline expert models of the reasoning sample, that is, and
[0090] Specifically, the integration function first applies a softmax function to the prediction results of each module to convert the original output of the model into a probability distribution. Then, the max() function is used to select the maximum value of the two probability distributions as the final prediction result. This integration strategy is based on the assumption that if both the online and offline modules give a high probability prediction for a certain category, then this category is more likely to be correct. In each training step, the average cross entropy loss is calculated to update the parameters of the model, and an integration strategy is used to combine the prediction results of the online and offline modules. In this way, the model can retain and utilize useful information learned from historical data while learning new knowledge.
[0091] Figure 3 The first schematic diagram of the large model continuous optimization framework of the continuous learning paradigm provided in the embodiment of the present application is Figure 4 The second schematic diagram of the large model continuous optimization framework of the continuous learning paradigm provided in the embodiment of the present application is as follows Figure 3 and Figure 4 As shown, in the proposed learning-fusion-generalization computational paradigm, the model uses Learn a new task and accumulate the knowledge learned In the proposed learning-fusion-generalization computational paradigm, the two experts favored by the new and old tasks are generalized to obtain the final prediction of the inference sample. As long as the parameter adjustment module is compatible with the model, the proposed learning-fusion-generalization computational paradigm can be applied to the pre-trained large model in any network architecture. The online parameter efficient adjustment module is attached to the pre-trained large model to quickly adapt to new tasks, while the offline parameter efficient adjustment module slowly accumulates the learned knowledge. During inference, the set of predictions from the online and offline parameter efficient adjustment modules is used as the final prediction.
[0092] The present application also provides a large model continuous optimization device 500 based on single diagnosis and treatment experience learning, such as Figure 5 As shown, the device includes: a preprocessing module 501, an encoding step module 502, a generation module 503, an image fusion module 504, a clustering module 505, a construction module 506, a representation module 507, a learning module 508, a fusion knowledge module 509 and a module 510 for building an integrated strategy.
[0093] The preprocessing module 501 is used to obtain the original image of the sample patient and perform a preprocessing step on the original image. The preprocessing step includes: mapping the image domain of the original image to the virtual image domain, and mapping the virtual image domain to the standard anatomical image domain.
[0094] The encoding step module 502 is used to use the encoder network to perform an encoding step on the image after the preprocessing step, and obtain a space for storing image features processed by the encoder network.
[0095] The generation module 503 is used to generate low-dimensional representation vectors of two random images of the same sample patient using an encoder network, and maximize the mutual information between the vectors through multi-instance contrast learning loss.
[0096] The image fusion module 504 is used to calculate the average value of multiple images of the sample patient and fuse the multiple images into a comprehensive image.
[0097] The clustering module 505 is used to cluster the non-image data in the comprehensive image, and classify patients with similar characteristics into different categories, so as to obtain the characterization results of the patient data, wherein each category corresponds to a different node set.
[0098] The construction module 506 is used to construct a model for heterogeneous multi-graph progressive embedding learning based on the characterization results of the patient data.
[0099] The representation module 507 is used to calculate the cosine similarity of non-image data, and generate a unified node embedding representation using image and non-image data, and optimize the embedding representation through a loss function and a consensus regularization loss.
[0100] The learning module 508 is used to calibrate model parameters and calculate gradients so that the model can quickly learn new knowledge.
[0101] The fusion knowledge module 509 is used to use the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to fuse historical knowledge and new knowledge.
[0102] The integrated strategy building module 510 is used to calculate the average cross entropy loss and build an integrated strategy based on the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module, so that the model can integrate historical knowledge and new knowledge in continuous learning.
[0103] Some modules in the apparatus described in the present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0104] The devices or modules described in the above application embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described in various modules according to their functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, the module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0105] The methods, devices or modules described in this application can be implemented in a computer-readable program code mode. The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor, a logic gate, a switch, an application-specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC), a programmable logic controller and an embedded microcontroller. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a pure computer-readable program code mode, the controller can be completely implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included in it for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0106] like Figure 6 As shown, an embodiment of the present application also provides a large model continuous optimization server based on single diagnosis and treatment experience learning, including a memory 601 and a processor 602; the memory 601 is used to store computer executable instructions; the processor 602 is used to execute computer executable instructions to implement a large model continuous optimization method based on single diagnosis and treatment experience learning described above in the embodiment of the present application.
[0107] An embodiment of the present application also provides a computer-readable storage medium, which stores executable instructions. When a computer executes the executable instructions, it can implement the large model continuous optimization method based on single diagnosis and treatment experience learning described above in the embodiment of the present application.
[0108] It can be known from the description of the above implementation mode that a person skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, or it can be reflected in the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the method described in the embodiment of the present application.
[0109] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations.
[0110] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.
Claims
1. A large model continuous optimization method based on single diagnosis and treatment experience learning, characterized in that: include: Acquire the original image of the sample patient, and perform a preprocessing step on the original image; wherein the preprocessing step is: mapping the image domain of the original image to the virtual image domain, and mapping the virtual image domain to the standard anatomical image domain; Performing an encoding step on the image after the preprocessing step using an encoder network to obtain a space for storing image features processed by the encoder network; For two random images of the same sample patient, an encoder network is used to generate their low-dimensional representation vectors, and the mutual information between the vectors is maximized through multi-instance contrastive learning loss; Calculate the average of multiple images of the sample patient and fuse the multiple images into a comprehensive image; Clustering the non-image data in the comprehensive image, dividing patients with similar characteristics into different categories, thereby obtaining the characterization results of the patient data; wherein each category corresponds to a different set of nodes; Building a heterogeneous multi-graph progressive embedding learning model based on the characterization results of the patient data; Calculate the cosine similarity of non-image data and use image and non-image data to generate a unified node embedding representation, and optimize the embedding representation through the loss function and consensus regularization loss; Calibrating model parameters and calculating gradients enables the model to quickly learn new knowledge; Use online parameter efficient adjustment module and offline parameter efficient adjustment module to build expressions to integrate historical knowledge and new knowledge; The average cross entropy loss is calculated and the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module are combined to construct an integration strategy, so that the model can integrate historical knowledge and new knowledge in continuous learning.
2. The method according to claim 1, characterized in that The expression of the preprocessing step is: Among them, i is the sample patient, b i represents the preprocessed image with standard anatomical coordinates, T opt represents the modified mapping function used for optimization, represents the first fixed mapping function, which is used to map the image domain of the original image to the virtual image domain, T s represents a second fixed mapping function for mapping the virtual image domain to the standard anatomical image domain, represents the original image of the sample patient; The expression of the step of encoding the image after the preprocessing step using the encoder network is: f(·): Where f(·) is the encoder network, is the space used to store the features of the original image, F img represents the number of original features of each image, |v| represents the number of images, is the space used to store image features after being processed by the encoder network, F z Represents the number of features after each image transformation.
3. The method according to claim 2, characterized in that For two random images of the same sample patient, the encoder network is used to generate their low-dimensional representation vectors, and the mutual information between the vectors that maximizes the similarity loss is calculated, including: The expression for generating its low-dimensional representation vector using the encoder network is established as: in, represents two random images of sample patients, Represents two representation vectors corresponding to two random images; According to the formula Calculate the similarity loss between the sample patient's image and other patients' images to maximize the mutual information between vectors; where, represents the similarity loss of sample patients, represents the cosine similarity between two representation vectors, τ is the temperature hyperparameter, N represents the number of mini-batch images, and k represents the image number of the patient currently being processed.
4. The method according to claim 3, characterized in that: The step of calculating the average value of multiple images of the sample patient and fusing the multiple images into a comprehensive image includes: According to the formula Merge multiple images into a composite image; where z i represents the composite image of sample patient i, The low-dimensional representation vector representing the kth image of sample patient i, K represents the number of images of sample patient i.
5. The method according to claim 4, characterized in that According to the formula Construct a model for heterogeneous multi-graph progressive embedding learning; To build multiple networks, V is the node set of patients, r is the parameter representing the relationship type, ε is the set of all edges with relationship type r, X is a matrix used to encode the attribute information of the node. The dimension of the matrix is in represents the number of nodes, F represents the attribute dimension of each node, represents the subgraph corresponding to the first relationship type, Represents the subgraphs corresponding to different relationship types, represents the last subgraph, and R represents the number of relationship types; According to the formula Calculate the cosine similarity of r-type features of non-image data; where A (r) (i,j) is a binary group, ρ (r) (i, j) is the cosine similarity of the r-type non-image features between patients i and j, θ (r) is the threshold hyperparameter for each relationship type r; in, The i-th row is the cosine similarity of the r-type features of the non-image data, representing the non-image feature vector of a specific patient, represents the feature vector of node j under relationship type r; The image feature vector and non-image feature vectors Connect and build multiple networks Among them, multiple networks A matrix used to encode the attribute information of a node F=(F z +F non-img ); In the multiple networks constructed For each relationship type Define an encoder g r (·): in, represents the node feature matrix, represents the adjacency matrix, represents a matrix consisting of all node embedding vectors, where each embedding vector has a dimension of d; Each encoder receives node features and adjacency matrix as input and outputs node embedding matrix H under relation type r (r) ; The expression of the embedding matrix is: According to the formula Construct a loss function to optimize the embedding representation of nodes under different relationship types; is the loss function corresponding to the relationship type r, i=1 is the initial value of the positive sample, |V| represents the total number of nodes in the network, j=1 is the initial value of the negative sample, For node v i The embedding representation under the relation type r is obtained by the relation-specific node encoder g r (·) is generated with dimension Represents node v j The corrupted embedding representation under relation type r, s (r) represents the summary vector under the relation type r, and D is the discriminant function used to evaluate the similarity between the node embedding and the summary vector; According to the formula Calculate the consensus regularization loss; where l cs represents the consensus regularization loss, O represents the consensus embedding, and H (r) represents the relation-specific embedding matrix, represents the corrupted relation-specific embedding matrix and Q represents the attention pooling function.
6. The method according to claim 5, characterized in that The calibration of model parameters and calculation of gradients enable the model to quickly learn new knowledge, including: The expression for calibrating the model parameters is: h′←(1-λ(e))h+λ(e)σ(eW1)W2; where h′ represents the output after adjustment by the Prefix module, h represents the input of the model or the output of the intermediate layer, λ(e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function; W q represents the weight of the query, The transposed matrix representing the key weight, W2 = P v , P v represents the weight of the value, i means traversal The i-th element of the vector, j represents traversal The jth element of the vector, C, represents the context vector; Calculate the loss function L with respect to the Prefix parameter P v The expression of the gradient is: Indicates that the output h' after model calibration is relative to the Prefix parameter P v The gradient of Represents the gradient of the loss function L relative to the output h' after model calibration; The output expression of the calibrated model is: h′←(1-λ(e))h+σ(s k ·eW1)(s v ·W2); where h′ is the calibrated model output representation, λ(e) is a small positive number close to 0, h is the original output representation of the model, and s k is the scaling parameter of the Adapter module, s v is the scaling parameter of the Prefix module, (e) is the weight factor, e is the embedding vector, W1 is the first weight matrix, W2 is the second weight matrix, and σ represents the softmax function.
7. The method according to claim 6, characterized in that The method of using the online parameter efficient adjustment module and the offline parameter efficient adjustment module to establish an expression to integrate historical knowledge and new knowledge includes: The expression for integrating historical knowledge and new knowledge is: in, represents the offline parameter efficient adjustment module, α is the weight coefficient, Represents an online parameter efficient adjustment module.
8. The method according to claim 7, characterized in that The calculation of the average cross entropy loss and the combination of the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module are used to construct an integrated strategy, so that the model can integrate historical knowledge and new knowledge in continuous learning, including: According to the formula Calculate the average cross entropy loss; where, is the optimized loss function, is the new task dataset, x is the input data, y is the corresponding true label, is the cross entropy loss function, θ is the weight parameter of the model, and φ is the bias parameter of the model; According to the formula f ens (o on ,o off ):=max(σ(o on ),σ(o off ))Build an integrated strategy; where f ens is the integrated function, o on The prediction results of the online parameter efficient adjustment module for the inference sample, o off It is the prediction result of the offline parameter efficient adjustment module for the inference sample, σ is the softmax function, and max() is the selection function.
9. A large-model continuous optimization device based on single diagnosis and treatment experience learning, characterized in that: include: A preprocessing module is used to obtain the original image of the sample patient and perform a preprocessing step on the original image; wherein the preprocessing step is: mapping the image domain of the original image to the virtual image domain, and mapping the virtual image domain to the standard anatomical image domain; An encoding step module is used to use an encoder network to encode the image after the preprocessing step to obtain a space for storing image features processed by the encoder network; The generation module is used to generate low-dimensional representation vectors of two random images of the same sample patient using an encoder network and maximize the mutual information between the vectors through multi-instance contrastive learning loss; A fusion image module is used to calculate the average value of multiple images of sample patients and fuse the multiple images into a comprehensive image; A clustering module is used to cluster the non-image data in the comprehensive image and classify patients with similar characteristics into different categories, thereby obtaining a representation result of the patient data; wherein each category corresponds to a different set of nodes; A construction module, used to construct a model of heterogeneous multi-graph progressive embedding learning based on the characterization results of the patient data; The representation module is used to calculate the cosine similarity of non-image data and generate a unified node embedding representation using image and non-image data. The embedding representation is optimized through a loss function and a consensus regularization loss. The learning module is used to calibrate model parameters and calculate gradients so that the model can quickly learn new knowledge; A fusion knowledge module, used to establish an expression to fuse historical knowledge and new knowledge using an online parameter efficient adjustment module and an offline parameter efficient adjustment module; An integrated strategy module is constructed to calculate the average cross entropy loss and combine the prediction results of the online parameter efficient adjustment module and the offline parameter efficient adjustment module to construct an integrated strategy, so that the model can integrate historical knowledge and new knowledge in continuous learning.
10. A large model continuous optimization server based on single diagnosis and treatment experience learning, characterized in that: including memory and processor; The memory is used to store computer executable instructions; The processor is used to execute the computer executable instructions to implement the method according to any one of claims 1 to 8.
