A method for constructing a multimodal teaching knowledge graph based on medical imaging reports

By combining ResNet and BERT to extract features in medical imaging reports, and using multi-modal Transformer and anatomical pseudo-label generation technology, the problem of low efficiency and accuracy in the construction of multi-modal knowledge graphs is solved, and strong generalization capabilities and High-precision multi-modal entity extraction improves the teaching efficiency of medical imaging reports.

CN118468996BActive Publication Date: 2024-09-27CENT SOUTH UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410942880.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-09-27
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

When building multi-modal knowledge graphs with existing technologies, there are problems with poor construction efficiency, accuracy and generalization performance. Especially in medical imaging reports, target detection methods are computationally intensive and prone to errors, end-to-end The method learns insufficient global features, resulting in inaccurate correlation between visual areas and text.

Method used

A multi-modal teaching knowledge graph construction method based on medical imaging reports is adopted, through clinical report entity relationship extraction model and imaging report cross-modal entity alignment model, combined with ResNet and BERT to extract image and text features, and multi-modal Transformer is used to model vision and text features, and improve the model's robustness and localization accuracy through anatomical pseudo-label generation and contrastive learning.

Benefits of technology

It realizes multi-modal entity extraction with strong generalization ability and robustness when the amount of data is small, improves the positioning accuracy of visual entities and the model's ability to understand the data, and enhances the construction of multi-modal knowledge graphs. Accuracy and teaching efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468996B
    Figure CN118468996B
Patent Text Reader

Abstract

In an embodiment of the present invention, a method for constructing a multimodal teaching knowledge graph based on medical imaging reports is provided, which belongs to the field of data processing technology, and specifically includes: obtaining text entities and relationships; obtaining visual features, obtaining text features; using a linear layer to map visual and text features to feature spaces of the same dimension, splicing the mapped features and adding a learnable embedding; further iterating the parameters of the anatomical label generator according to the gradient feedback of the image report cross-modal entity alignment model for the real label prediction loss; training the image report cross-modal entity alignment model through comparative learning; inputting the learned embedding into the prediction module of the trained image report cross-modal entity alignment model, marking the visual entity area corresponding to the text entity in the image picture; constructing a multimodal knowledge graph according to the visual entity area, text entity and relationship. Through the scheme of the present invention, the construction efficiency, accuracy and generalization performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method for constructing a multimodal teaching knowledge graph based on medical imaging reports. Background Art

[0002] A multimodal knowledge graph is a knowledge graph that combines multiple modalities. Compared with the structured text data of traditional knowledge graphs, multimodal knowledge graphs can represent knowledge more comprehensively.

[0003] An important step in building a multimodal knowledge graph is to link visual entities to text entities. Currently, there are two approaches to related research: one is to detect objects in images, calculate the similarity between the detected object labels and text, and align the visual objects and text in the image; the other is an end-to-end method, which inputs text and images into the model at the same time, and locates the objects in the image that match the text after multimodal feature processing. However, both methods currently have some shortcomings:

[0004] (1) Object detection methods generate candidate boxes, which increases the computational complexity of the model and introduces an additional classification process, which can easily cause error propagation. Secondly, matching the labels and text of the detection boxes will introduce irrelevant noise, affecting the final alignment performance. In addition, the imbalance of training samples may also cause the model to perform poorly for types with fewer samples.

[0005] (2) The end-to-end method reduces the propagation of errors compared to the previous target detection method. Then, compared to the method of obtaining visual targets through target detection and then matching, multimodal fusion can make full use of text context information, such as location description, texture description, etc. However, most of the current end-to-end methods are still pre-trained visual language models that learn global features, which are not specific to the fine-grained features of visual entities, resulting in inaccurate correlation between visual areas and text. In addition, the current visual language models are all trained based on large amounts of data, and their performance is insufficient when training with less data.

[0006] It can be seen that there is an urgent need for a method to construct a multimodal teaching knowledge graph based on medical imaging reports that is efficient, accurate and has strong generalization capabilities. Summary of the invention

[0007] In view of this, an embodiment of the present invention provides a method for constructing a multimodal teaching knowledge graph based on medical imaging reports, which at least partially solves the problems of poor construction efficiency, accuracy and generalization performance in the prior art.

[0008] The embodiment of the present invention provides a method for constructing a multimodal teaching knowledge graph based on medical imaging reports, including:

[0009] Step 1, input the report text in the medical imaging report into the clinical report entity relationship extraction model to obtain text entities and relationships;

[0010] Step 2: ResNet is used to extract the image features of the image pictures in the medical imaging report, which are converted into a one-dimensional sequence and then input into the visual Transformer to obtain the visual features. BERT is used to obtain the text token sequence in the report text, which is then encoded by the language Transformer to obtain the text features.

[0011] Step 3: Use a linear layer to map the visual and text features to a feature space of the same dimension, concatenate the mapped features and add a learnable embedding, input them into a multimodal Transformer, use a self-attention mechanism to model the global and local connections between the visual and text features and record them by the learnable embedding;

[0012] Step 4, input the sample image and the enumerated anatomical description text into the anatomical label generator, generate the anatomical pseudo-label corresponding to the anatomical description text and form a pseudo-label pair, and then input the pseudo-label pair into the image report cross-modal entity alignment model, and further iterate the parameters of the anatomical label generator according to the gradient feedback of the image report cross-modal entity alignment model for the true label prediction loss;

[0013] Step 5: Select multiple normal anatomical images as negative samples, and use the entity areas in the training images corresponding to the description text as positive samples, and train the image report cross-modal entity alignment model through comparative learning;

[0014] Step 6: Input the learned embedding into the prediction module of the trained image report cross-modal entity alignment model, obtain the regional coordinates of the visual entity through two ReLU activation functions and a fully connected layer, and mark the visual entity area corresponding to the text entity in the image;

[0015] Step 7: Construct a multimodal knowledge graph based on the visual entity regions, text entities, and relationships corresponding to the text entities.

[0016] According to a specific implementation of the embodiment of the present invention, step 1 specifically includes:

[0017] Step 1.1, input the report text into the pre-trained BERT model, obtain the token sequence of the report text, and construct a contextual representation for each token;

[0018] Step 1.2, enumerate the spans in the token sequence and obtain the span features, use the span features to predict the type of each span and the relationship between each span pair, and construct a span graph;

[0019] In step 1.3, the graph neural network is used to recursively update each span representation in the span graph, and the final representation is used to predict the text entities and relations in the report text.

[0020] According to a specific implementation of the embodiment of the present invention, step 2 specifically includes:

[0021] Step 2.1: Input the image into the ResNet network to extract image features, and then use the convolutional layer to reduce the dimension of the features to obtain primary image features;

[0022] Step 2.2: Convert the primary image features after dimensionality reduction into one-dimensional patch sequence features, and add position encoding information to obtain image features;

[0023] Step 2.3, input the processed image features into the visual Transformer encoder, use the visual Transformer to model the global context information of the image, and obtain the visual features;

[0024] Step 2.4, input the report text into the pre-trained BERT model to obtain a text token sequence, and add [CLS] tokens and [SEP] tokens at the beginning and end of the sequence;

[0025] Step 2.5, input the processed text token sequence into the language Transformer encoder, use the language Transformer to model the context information of the text, and obtain the text features.

[0026] According to a specific implementation of the embodiment of the present invention, step 3 specifically includes:

[0027] Step 3.1, input the visual features into the visual linear layer, map the visual features to a feature space with a fixed dimension and the same as the text features through linear mapping, and obtain the mapped visual features;

[0028] Step 3.2, input the text features into the text linear layer, map the text features to a feature space with a fixed dimension and the same as the visual features through linear mapping, and obtain the mapped text features;

[0029] Step 3.3, concatenate the mapped visual features and the mapped text features into a visual-text feature sequence, and add a learnable global representation embedding at the end;

[0030] Step 3.4: Input the concatenated visual-text feature sequence into the multimodal Transformer, use the multi-head attention mechanism to calculate the correlation weights between all features in the visual-text feature sequence, and model the global and local connections between visual features and text features;

[0031] In step 3.5, during the modeling process, the correlation between the recorded text and visual features is represented by a learnable global representation embedding.

[0032] According to a specific implementation of the embodiment of the present invention, step 4 specifically includes:

[0033] Step 4.1, enumerate and generate corresponding anatomical description text according to the pre-defined anatomical types;

[0034] Step 4.2, inputting the generated anatomical description text and the sample image in the training data into the trained anatomical label generator, generating an anatomical pseudo-label corresponding to the description for the image, and obtaining a pseudo-label pair accordingly, wherein the pseudo-label pair includes the anatomical description and the anatomical coordinates;

[0035] Step 4.3, inputting the pseudo-label pairs and the corresponding image report training data into the image report cross-modal entity alignment model in parallel, and training the parameters of the image report cross-modal entity alignment model according to the objective function;

[0036] Step 4.4, obtaining the prediction loss gradient of the image report cross-modal entity alignment model for the real image report label during each training cycle;

[0037] Step 4.5, iteratively optimize the anatomical label generator according to the prediction loss gradient;

[0038] Step 4.6, repeat steps 4.3 to 4.5 until the image report cross-modal entity alignment model converges.

[0039] According to a specific implementation of the embodiment of the present invention, the expression of the objective function is:

[0040]

[0041] in, represents the first batches, Cross-modal entity alignment model for representative image reports The loss function is represents the predictions of the image report cross-modal entity alignment model on the training data, represents the predictions of the image report cross-modal entity alignment model on anatomical pseudo-labeled data, Indicates image pictures, Represents the description text of the sample, Represents anatomical description text, represents the anatomical coordinates in the pseudo-label pair, represents the parameters of the image report cross-modality entity alignment model, Represents the anatomical coordinates in the sample image;

[0042] The expression of the prediction loss gradient is:

[0043] ;

[0044] in, represents the learning rate of the model, represents the gradient during the training of the image report cross-modal entity alignment model, Represents the loss function.

[0045] According to a specific implementation of the embodiment of the present invention, step 5 specifically includes:

[0046] Step 5.1, select anatomical regions in multiple normal images as negative samples, and use the image target regions corresponding to the description text in the training data as positive samples to construct positive and negative sample pair data;

[0047] Step 5.2, inputting the positive and negative sample pair data into the image report cross-modal entity alignment model to obtain the visual features of the positive and negative sample data encoded by the image report cross-modal entity alignment model;

[0048] Step 5.3, use contrastive learning loss to train the image report cross-modal entity alignment model to measure the accuracy and sensitivity of fine-grained alignment of cross-modal data.

[0049] According to a specific implementation of the embodiment of the present invention, step 6 specifically includes:

[0050] Step 6.1, embed the learned global representation into the input prediction module, and first perform nonlinear transformation through two ReLU activation functions;

[0051] Step 6.2, input the embedded representation after the ReLU activation function layer into the fully connected layer of the image report cross-modal entity alignment model, and the fully connected layer maps the embedded representation to the output space of the bounding box coordinates to obtain the region coordinates;

[0052] Step 6.3, the region coordinates represent the visual entity region in the input image that is most relevant to the input text token sequence, and the visual entity region corresponding to the text entity in the image is marked by the region coordinates.

[0053] The multimodal teaching knowledge graph construction scheme based on medical imaging reports in the embodiment of the present invention includes: step 1, inputting the report text in the medical imaging report into the clinical report entity relationship extraction model to obtain text entities and relationships; step 2, using ResNet to extract the image features of the image pictures in the medical imaging report, converting them into a one-dimensional sequence and inputting them into the visual Transformer to obtain visual features, using BERT to obtain the text token sequence in the report text, and then encoding them by the language Transformer to obtain text features; step 3, using a linear layer to map the visual and text features to the feature space of the same dimension, splicing the mapped features and adding a learnable embedding, inputting them into the multimodal Transformer, using the self-attention mechanism to model the global and local connections between the visual and text features and recording them by the learnable embedding; step 4, combining the sample image pictures and the enumerated solutions The anatomical description text is input into the anatomical label generator to generate anatomical pseudo-labels corresponding to the anatomical description text and form pseudo-label pairs, and then the pseudo-label pairs are input into the image report cross-modal entity alignment model, and the parameters of the anatomical label generator are further iterated according to the gradient feedback of the image report cross-modal entity alignment model for the true label prediction loss; step 5, multiple normal anatomical images are selected as negative samples, and the entity areas corresponding to the description text in the training images are used as positive samples, and the image report cross-modal entity alignment model is trained through comparative learning; step 6, the learned embedding is input into the prediction module of the trained image report cross-modal entity alignment model, and the regional coordinates of the visual entity are obtained through two ReLU activation functions and a fully connected layer, and the visual entity area corresponding to the text entity in the image is marked; step 7, a multimodal knowledge graph is constructed according to the visual entity area, text entity and relationship corresponding to the text entity.

[0054] The beneficial effects of the embodiments of the present invention are as follows: through the scheme of the present invention, multimodal entities in image reports are extracted through the designed clinical report entity relationship extraction model CERE and the image report cross-modal entity alignment model RCMA, and at the same time, they have strong generalization ability and robustness when there is little training data; two modules are proposed to improve the performance of visual entity extraction, and an anatomical pseudo-label generation network is used to generate anatomical label pairs for model training, and the model's ability to understand the multi-level features of cross-modal image data is trained to improve the model's robustness to data. The anatomical data of normal images are used as negative samples, and the sensitivity of the model to abnormal image targets and the distinction between normal and abnormal image data are trained by contrastive learning, which improves the accuracy and generalization ability of model positioning. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0056] Figure 1 A schematic diagram of a process of constructing a multimodal teaching knowledge graph based on medical imaging reports provided by an embodiment of the present invention;

[0057] Figure 2 A schematic diagram of a specific implementation process of a method for constructing a multimodal teaching knowledge graph based on medical imaging reports provided by an embodiment of the present invention;

[0058] Figure 3 A schematic diagram of a specific implementation framework of an RCMA model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0060] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0061] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present invention, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.

[0062] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0063] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0064] An embodiment of the present invention provides a method for constructing a multimodal teaching knowledge graph based on medical imaging reports, which can be applied to the construction of a medical teaching knowledge graph in a data processing scenario.

[0065] See also Figure 1 , is a flow chart of a method for constructing a multimodal teaching knowledge graph based on medical imaging reports provided by an embodiment of the present invention. Figure 1 and Figure 2 As shown, the method mainly comprises the following steps:

[0066] Step 1, input the report text in the medical imaging report into the clinical report entity relationship extraction model to obtain text entities and relationships;

[0067] Furthermore, the step 1 specifically includes:

[0068] Step 1.1, input the report text into the pre-trained BERT model, obtain the token sequence of the report text, and construct a contextual representation for each token;

[0069] Step 1.2, enumerate the spans in the token sequence and obtain the span features, use the span features to predict the type of each span and the relationship between each span pair, and construct a span graph;

[0070] In step 1.3, the graph neural network is used to recursively update each span representation in the span graph, and the final representation is used to predict the text entities and relations in the report text.

[0071] In specific implementation, the specific process of text entity and relationship extraction can be as follows:

[0072] Input the report text and use the BERT model in the clinical reporting entity relationship extraction model (CERE) to extract the text using the WordPiece segmentation method. Split into token sequence ,in Indicates the number of tokens after text segmentation, builds a context representation for each Token, and then enumerates the possible spans in the token sequence , the enumeration process is expressed as:

[0073]

[0074] in and Respectively represent the span The start and end indexes of and That is, the span The beginning token and the end token of The entire span The representation is obtained by token weighting. Indicates span Length. represents a feedforward neural network, through Encode the feature vector of the enumeration span .

[0075] Utilizing the extracted span representation Predict the type of each span and the relationship between each span pair. Let E represent the set of entity types and R represent the set of relationship types. First, for each span To predict the entity type, the formula is as follows:

[0076]

[0077] in, It is a feed-forward neural network used to predict the span entity type.

[0078] Then, for each span pair The relationship is classified as follows:

[0079]

[0080] in, is a feed-forward neural network used to predict span-to-relationship types, where Indicates span and The product between express and Probability of all relationships.

[0081] pass and Obtain preliminary predictions of entities and relationships. In order to learn the contextual information between entities and relationships, the span graph is constructed using the preliminary predictions of entities and relationships, and then the graph neural network is used to learn the contextual information of the graph.

[0082] For each span pair ,create Node to The directed edges of the nodes, each edge represents a relationship type, and is connected by The corresponding probabilities in are weighted. Assume Represents the initial span graph, and uses a bidirectional graph convolutional neural network (GCN) to recursively update each span representation. The formula is as follows:

[0083]

[0084] in Indicates Span in layer graph networks The hidden feature vector of Initialize to . is a feedforward neural network with an output dimension similar to After multiple iterations, each span representation will contain The global relationship information of Represents the feature vector of the last layer of GCN output. Using the span context representation extracted by the graph network, the final entities and relations are predicted:

[0085]

[0086]

[0087] is the span Final predicted probability on entity type. is the span The final predicted probability of the relationship type. The final entities and relationships are obtained based on the predicted probability, completing the entity and relationship extraction of the report text.

[0088] Step 2: ResNet is used to extract the image features of the image pictures in the medical imaging report, which are converted into a one-dimensional sequence and then input into the visual Transformer to obtain the visual features. BERT is used to obtain the text token sequence in the report text, which is then encoded by the language Transformer to obtain the text features.

[0089] Based on the above embodiment, step 2 specifically includes:

[0090] Step 2.1: Input the image into the ResNet network to extract image features, and then use the convolutional layer to reduce the dimension of the features to obtain primary image features;

[0091] Step 2.2: Convert the primary image features after dimensionality reduction into one-dimensional patch sequence features, and add position encoding information to obtain image features;

[0092] Step 2.3, input the processed image features into the visual Transformer encoder, use the visual Transformer to model the global context information of the image, and obtain the visual features;

[0093] Step 2.4, input the report text into the pre-trained BERT model to obtain a text token sequence, and add [CLS] tokens and [SEP] tokens at the beginning and end of the sequence;

[0094] Step 2.5, input the processed text token sequence into the language Transformer encoder, use the language Transformer to model the context information of the text, and obtain the text features.

[0095] In practice, the specific process of encoding visual and textual features can be as follows:

[0096] Input medical image, represented as ,in Represent the height and width of the input image respectively. Use ResNet convolutional neural network to extract images Image features ,in Respectively represent the number of channels, height and width for extracting image features. Then use one-dimensional convolution (1x1 convolution kernel) to transform the image features Perform dimensionality reduction, reduce the number of feature channels from 2048 to 256, and obtain the image features after dimensionality reduction ,in .

[0097] Next, the image features Divide into multiple fixed-size patches. In the specific implementation, the patch size is 1x1. For each patch, the pixel values ​​inside it are flattened into a one-dimensional vector according to the channel dimension. The one-dimensional vectors of all patches are connected together to form a one-dimensional patch sequence. ,in , In order to preserve the position information of the original image when converting image features into a one-dimensional sequence, position encoding is used to add position information to the data. The sine and cosine functions are used in the specific implementation, and the formula is:

[0098]

[0099]

[0100] in is the patch location, is the dimension index, is the dimension of the input feature. For the input feature, the corresponding position encoding vector is calculated according to the above formula. The position encoding vector is added to the image feature to ensure that the Transformer model can still understand the information of each position in the image when processing a one-dimensional sequence.

[0101] Then the sequence features Input into the visual Transformer, the Transformer encoder will encode the features of each patch and share information between different attention heads to capture global context information, obtain the global representation of the image, and output the final visual features In the specific implementation, the visual Transformer consists of 6 stacked transformer encoder layers, each of which includes a multi-head self-attention and a fully connected feedforward neural network (FFN). The multi-head self-attention has 8 heads, and when processing each patch, it takes into account the information of other patches and captures contextual features. The FFN includes two linear layers and a ReLU activation function. The output channel sizes of the two linear layers are 2048 and 256 respectively. The ReLU activation function learns the complex nonlinear relationship between different patches.

[0102] Input text T into the pre-trained BERT model, use the WordPiece word segmentation method to split text T into word sequences (token sequences), add a "[CLS]" token at the beginning of the sequence, add a "[SEP]" token at the end of the sentence, and convert each token into its corresponding vector representation. Then input the vector sequence into the language transformer, map the vector sequence to the latent space, capture the global dependency in the sequence through the self-attention mechanism, and extract features through the feedforward neural network to obtain text features. ,in is the number of channels, is the number of tokens in the input text. In the specific implementation, the language transformer contains 12 transformer layers, and the output channel size of the feedforward neural network is 768. .

[0103] Step 3: Use a linear layer to map the visual and text features to a feature space of the same dimension, concatenate the mapped features and add a learnable embedding, input them into a multimodal Transformer, use a self-attention mechanism to model the global and local connections between the visual and text features and record them by the learnable embedding;

[0104] Based on the above embodiment, step 3 specifically includes:

[0105] Step 3.1, input the visual features into the visual linear layer, map the visual features to a feature space with a fixed dimension and the same as the text features through linear mapping, and obtain the mapped visual features;

[0106] Step 3.2, input the text features into the text linear layer, map the text features to a feature space with a fixed dimension and the same as the visual features through linear mapping, and obtain the mapped text features;

[0107] Step 3.3, concatenate the mapped visual features and the mapped text features into a visual-text feature sequence, and add a learnable global representation embedding at the end;

[0108] Step 3.4: Input the concatenated visual-text feature sequence into the multimodal Transformer, use the multi-head attention mechanism to calculate the correlation weights between all features in the visual-text feature sequence, and model the global and local connections between visual features and text features;

[0109] In step 3.5, during the modeling process, the correlation between the recorded text and visual features is represented by the learnable global representation embedding.

[0110] In specific implementation, the specific process of visual text feature concatenation and modeling can be as follows:

[0111] Encoding visual features and text features After that, the visual features are input into the visual linear layer, and the linear layer maps the input visual features into a In the feature space of dimension, the mapped visual features are expressed as The text features are input into the text linear layer, and the linear layer maps the input text features into a In the feature space of dimension, the mapped text features are expressed as , in specific implementation .

[0112] The mapped visual features And the mapped text features Put them together to form a dimensional sequence and add a learnable global representation vector To learn the global relationship across modalities. The concatenated visual text feature representation is:

[0113]

[0114] Input visual text features Into the multimodal Transformer, it is encoded through a multi-head self-attention mechanism. The calculation of each attention head is expressed as:

[0115]

[0116] in, They are the query, key, and value projection matrices, which are all obtained by inputting the sequence The weights of these transformations are learned by model training. Is a parameter representing the dimension. The outputs of n attention heads are concatenated together and the final feature representation is obtained through linear transformation:

[0117]

[0118] represents the concatenation calculation of multi-head self-attention, In the specific implementation, the multimodal Transformer consists of 6 transformer encoders, and the number of attention heads is .

[0119] After the multi-head attention mechanism calculates the correlation weights between all features in the sequence, the learnable global representation embedding The global and local connections between visual features and text features are recorded, expressed as:

[0120] ;

[0121] in, and It represents the visual features and text features after the multi-head attention mechanism calculates the relevance weights. It is a vector representation of the connection between visual features and text features after calculating the correlation weights.

[0122] Step 4, input the sample image and the enumerated anatomical description text into the anatomical label generator, generate the anatomical pseudo-label corresponding to the anatomical description text and form a pseudo-label pair, and then input the pseudo-label pair into the image report cross-modal entity alignment model, and further iterate the parameters of the anatomical label generator according to the gradient feedback of the image report cross-modal entity alignment model for the true label prediction loss;

[0123] Based on the above embodiment, step 4 specifically includes:

[0124] Step 4.1, enumerate and generate corresponding anatomical description text according to the pre-defined anatomical types;

[0125] Step 4.2, inputting the generated anatomical description text and the sample image in the training data into the trained anatomical label generator, generating an anatomical pseudo-label corresponding to the description for the image, and obtaining a pseudo-label pair accordingly, wherein the pseudo-label pair includes the anatomical description and the anatomical coordinates;

[0126] Step 4.3, inputting the pseudo-label pairs and the corresponding image report training data into the image report cross-modal entity alignment model in parallel, and training the parameters of the image report cross-modal entity alignment model according to the objective function;

[0127] Step 4.4, obtaining the prediction loss gradient of the image report cross-modal entity alignment model for the real image report label during each training cycle;

[0128] Step 4.5, iteratively optimize the anatomical label generator according to the prediction loss gradient;

[0129] Step 4.6, repeat steps 4.3 to 4.5 until the image report cross-modal entity alignment model converges.

[0130] Furthermore, the expression of the objective function is

[0131]

[0132] in, represents the first batches, Cross-modal entity alignment model for representative image reports The loss function is represents the predictions of the image report cross-modal entity alignment model on the training data, represents the predictions of the image report cross-modal entity alignment model on anatomical pseudo-labeled data, Indicates image pictures, Represents the description text of the sample, Represents anatomical description text, represents the anatomical coordinates in the pseudo-label pair, represents the parameters of the image report cross-modality entity alignment model, Represents the anatomical coordinates in the sample image;

[0133] The expression of the prediction loss gradient is:

[0134] ;

[0135] in, represents the learning rate of the model, represents the gradient during the training of the image report cross-modal entity alignment model, Represents the loss function.

[0136] When implementing it, some anatomical types are first defined in advance. , such as "left lung", "right lung", "right lower lung area", "left hilar structure", "left costophrenic angle", "left hemi-diaphragm", etc., by enumerating these anatomical types Generate corresponding anatomical description text . Randomly select several anatomical description texts , the generated anatomical description text And the image to be trained Input the trained anatomical label generation network. In the specific implementation, the anatomical label generation network adopts the same architecture as the radiology report cross-modal entity alignment model (RCMA). The collected anatomical labels and corresponding anatomical description texts are input into an anatomical label generation network with an RCMA architecture for pre-training, and the trained model is used as the anatomical label generator. ,in It is the parameter of the anatomical label generation network, and the accuracy of label generation is generally required to be above 80%.

[0137] Via the Anatomy Label Generator Generate image for image and enter the anatomical description text Corresponding anatomical pseudo labels , get <anatomical description, anatomical coordinates> pseudo label pair < , >, expressed as:

[0138]

[0139] Pair the image and the generated pseudo-label > and corresponding imaging report training data< >Parallel input RCMA model Conduct training, including The box label representing the main task of the RCMA model in the above steps, It is the parameter that needs to be optimized in the RCMA model. Anatomical pseudo-label data is used to supervise the RCMA model to improve the understanding of anatomical features. The loss of anatomical prediction is used to optimize the robustness of the RCMA model in understanding image data and improve the generalization ability.

[0140] In the specific implementation, the RCMA model and anatomy label generator As two branches jointly trained, first input image and text to the training framework, the framework will select candidate anatomical types from the set Enumerate anatomical types to generate corresponding anatomical description text , input to the anatomical label generator Generate pseudo label pairs in >, then the pseudo label pair and training data < > Input them into the RCMA model for training and train the RCMA network The objective function of the parameters is as follows:

[0141]

[0142] in represents the first batches, Represents the RCMA model in the above steps The loss function is represents the prediction of the RCMA model on the training data, Represents the predictions of the RCMA model on the anatomical pseudo-labeled data.

[0143] When implementing, obtain the RCMA model The predicted loss gradient for the real image report label during each training cycle is expressed as:

[0144]

[0145] The predicted loss gradient Feedback to the anatomical label generation network , used to iteratively optimize the anatomical label generation network and update the parameters of the label generation network , objective function:

[0146]

[0147] By using The computational graph is used to calculate the The derivative of , derive the derivative to update Improve the quality of anatomical pseudo labels generated by the network, hoping that the generated pseudo labels can increase the prediction accuracy of the optimized RCMA model for the real image report labels. Iterate and train these two network branches until the RCMA model converges.

[0148] Step 5: Select multiple normal anatomical images as negative samples, and use the entity areas in the training images corresponding to the description text as positive samples, and train the image report cross-modal entity alignment model through comparative learning;

[0149] Furthermore, the step 5 specifically includes:

[0150] Step 5.1, select anatomical regions in multiple normal images as negative samples, and use the image target regions corresponding to the description text in the training data as positive samples to construct positive and negative sample pair data;

[0151] Step 5.2, inputting the positive and negative sample pair data into the image report cross-modal entity alignment model to obtain the visual features of the positive and negative sample data encoded by the image report cross-modal entity alignment model;

[0152] Step 5.3, use contrastive learning loss to train the image report cross-modal entity alignment model to measure the accuracy and sensitivity of fine-grained alignment of cross-modal data.

[0153] In specific implementation, the anatomical region can be extracted from the additionally collected normal images as negative samples, which is expressed as , the training data and description text Corresponding image target area As positive samples, the selected anatomical image features and visual text features in the training data< > Projected together into the same feature space, the projected anatomical image feature negative sample is expressed as:

[0154] Visual Text Features >The feature representation after multimodal transformer projection is:

[0155]

[0156] in The vector representation is a learnable global representation embedding modeled by a multimodal transformer, which records the global and local connections between visual features and text features. The feature vector of the added CLS tag represents the semantic features of the entire sentence text, which can also be expressed as .

[0157] The contrastive learning loss is used to improve the accuracy and sensitivity of visual entity localization in the RCMA model. >, in training, the model is made to improve the similarity of positive sample vectors as much as possible, and for negative samples < >, during training, the model is made to reduce the similarity of negative sample vectors as much as possible, and the contrast loss function is designed as follows:

[0158]

[0159] in is the visual feature of the selected anatomical negative sample after encoding mapping, is the visual feature of the positive sample of the image, N represents the number of negative samples, is the temperature parameter. In the specific implementation, N=5.

[0160] The model is trained end-to-end using the loss function:

[0161]

[0162] in, and is a hyperparameter, represents the training loss of the image report cross-modal entity alignment model, represents the anatomical label prediction loss, represents the contrastive learning loss, Represents the overall loss of the training model. , .

[0163] Step 6: Input the learned embedding into the prediction module of the trained image report cross-modal entity alignment model, obtain the regional coordinates of the visual entity through two ReLU activation functions and a fully connected layer, and mark the visual entity area corresponding to the text entity in the image;

[0164] Based on the above embodiment, step 6 specifically includes:

[0165] Step 6.1, embed the learned global representation into the input prediction module, and first perform nonlinear transformation through two ReLU activation functions;

[0166] Step 6.2, input the embedded representation after the ReLU activation function layer into the fully connected layer of the image report cross-modal entity alignment model, and the fully connected layer maps the embedded representation to the output space of the bounding box coordinates to obtain the region coordinates;

[0167] Step 6.3, the region coordinates represent the visual entity region in the input image that is most relevant to the input text token sequence, and the visual entity region corresponding to the text entity in the image is marked by the region coordinates.

[0168] When implementing it, Figure 3 As shown, the learned global representation can be embedded into Input prediction module, which consists of two ReLU activation functions and a fully connected layer. The vector is nonlinearly transformed through two ReLU activation functions, and the embedded representation is input into the fully connected layer, which maps the embedded representation to the output space of the bounding box coordinates to obtain the region coordinate box=(x, y, w, h), where (x, y) is the coordinate of the upper left corner of the target box, and w and h are the width and height of the target box.

[0169] Call the ImageDraw function in Python's image tool library PIL, pass the image and coordinate box as parameters to the function, and visualize the visual entity area corresponding to the text description on the image.

[0170] Loss function for training RCMA model The specific expressions are as follows:

[0171]

[0172] in represents the coordinates predicted during model training, Represents the real coordinates with annotations. Is smooth loss, is the GIoU loss. Smoothing The loss is used when the error is small loss, and when the error is larger, Loss, which can reduce the impact of outliers on the model to a certain extent. Smoothing The loss mathematical expression is as follows:

[0173]

[0174] in, Represents the error between the model's predicted box and the true box. When smooth The loss is used , then the loss function is smooth at z = 0, and It is also convex when it is close to 0, so it is insensitive to outliers; when When smooth The loss is , at this time the loss function is closer to loss, can provide A larger loss gradient helps converge faster.

[0175] GIoU loss It is an optimization of IoU loss, which solves the problem of high sensitivity to the position, size and shape of the bounding box. The formula is as follows:

[0176]

[0177] in, is the bounding box predicted by the model, is the true bounding box, is the area of ​​the smallest convex polygon that encloses these two boxes, is the area of ​​the intersection of these two boxes.

[0178] GIoU loss can be understood as the complementary part of IoU loss, which introduces a term , which is used to measure the degree of alignment of the bounding boxes. A value of 0 indicates that the two boxes are completely aligned, a positive value indicates that the two boxes are not completely aligned, and a negative value indicates that the two boxes overlap but are not aligned. Therefore, the GIoU loss can better consider the position and shape information between the bounding boxes, making the loss function more stable for bounding boxes of different shapes and sizes.

[0179] Step 7: Construct a multimodal knowledge graph based on the visual entity regions, text entities, and relationships corresponding to the text entities.

[0180] In specific implementation, a multimodal knowledge graph can be constructed based on the visual entity area, text entity and relationship corresponding to the text entity. At the same time, medical imaging reports, such as chest X-rays, chest CT and other data with image pictures and report texts, can also be collected, and the report text can be input into the CERE model to extract the entities and relationships in the report. The visual entity in the image is located for the disease entity, and the sentence where the disease entity is located, that is, the description text, is obtained. The description text and the image picture are input into the trained RCMA model, and the visual target corresponding to the description text is marked on the image picture through the RCMA model, realizing the entity linking of the image text data, organizing and associating multimodal data, clinical cases and related knowledge points. Accurately describe complex clinical features through visual information, thereby enhancing teaching efficiency, and improving the efficiency of case analysis teaching through case retrieval and knowledge point push, helping students better understand medical imaging features and deepen their understanding of medical knowledge.

[0181] The present embodiment provides a method for constructing a multimodal teaching knowledge graph based on medical imaging reports. The method constructs a span graph by predicting the type of each span in the report text and the relationship between each span pair, recursively updates each span representation through a graph neural network, and uses the final representation to predict entities and relationships in the report; obtains visual features and text features of the imaging report by using a visual encoder and a text encoder; connects the visual features and text features and adds a learnable global representation embedding; uses a multimodal Transformer to model the global and local connections between visual and text features with multi-head attention, which are recorded by a global representation embedding; uses the global representation embedding to mark the visual target area corresponding to the image text description; inputs the image picture and the anatomical description text into the anatomical label generator to generate anatomical pseudo-labels, uses the anatomical pseudo-label training to enhance the model's understanding of anatomical knowledge, and uses the model's training loss feedback to further iterate the anatomical label generator to improve generation accuracy; collects normal anatomical images as negative samples, and uses the target area in the image picture corresponding to the text as a positive sample, and improves the similarity between the text and the target area through comparative learning, thereby increasing the distinction from irrelevant anatomical images. Through the two modules, the model's accuracy in extracting visual entities is enhanced, and multimodal knowledge extraction is achieved for the construction of graphs and the establishment of retrieval systems. Through the solution of the present invention, the accuracy of multimodal image knowledge graph construction and the efficiency of case retrieval, knowledge point push, and analysis teaching are improved.

[0182] The present invention will be further described below in conjunction with an embodiment. In order to evaluate the performance of the method of the present invention in multimodal knowledge extraction, experiments were conducted on the MS_CXR dataset.

[0183] MS_CXR is a multimodal X-ray image dataset with fine-grained annotations. It annotates eight radiology-related text descriptions of fine-grained objects on the image images. There are a total of 1,162 annotated imaging reports.

[0184] The training set / validation set / test set split ratio in the experiment is 80%, 5%, and 15%. The model with the best performance on the validation set is retained during training, and the final performance of the model is verified on the test set. The intersection-over-union accuracy (ACC@0.5) with a threshold of 0.5 and the mean intersection-over-union (mIoU) are used as evaluation indicators, and the calculation formula is as follows:

[0185]

[0186] in , denote the true bounding box and the predicted bounding box respectively. ACC@0.5 means The prediction of is judged as correct, otherwise it is judged as wrong, and the prediction accuracy of the model is calculated. The mean intersection over union (mIoU) represents the sum of all Take the average value to evaluate the overall positioning accuracy of the model.

[0187] This framework is implemented using PyTorch. It is trained using a GeForce RTX 4090 GPU. The pre-trained models BERT and ResNet-50 are used. Dropout is used for regularization in the pre-trained language model encoder, and the dropout ratio is set to [0.1, 0.2]. The batch size during training is set to 8, the learning rate is set to 1e-5, the epoch is set to 100, and the AdamW optimizer is used.

[0188] As shown in Table 1, the model of this method is compared with the medical visual language model (BioViL), the global local medical image recognition model (GLoRIA), the multi-task reference visual grounding model (RefTR), and the transformer visual grounding model (VGTR). RCMA performs well in the experiment and achieves the best performance in both indicators. ACC and mIoU are improved by 20% and 13% respectively compared with the VGTR model. This improvement proves that the RCMA model is very powerful for visual entity extraction performance. The reasons are as follows: 1) The RCMA model uses the transformer module to extract visual and text features, and uses the transformer to model the connection between visual and text features. Since the transformer can easily handle sequences of different lengths, it reduces redundant preprocessing and transformation, and improves the performance and efficiency of reasoning. 2) The anatomical knowledge enhances the RCMA model. The visual features of the image are complex and diverse, but the anatomical features are relatively stable. The anatomical knowledge generation module is used to assist the RCMA model in improving its understanding of the anatomical knowledge in the medical image, and improves the model's ability to understand medical image data with different distributions, thereby improving the generalization ability. 3) Enhance accuracy through contrastive learning. Image features are diverse, and some abnormal features are very subtle and complex. This makes it difficult for the model to learn this feature distribution when there are fewer training samples. The model learns to distinguish the differences between normal image features and abnormal image features, improves the model's sensitivity to abnormal lesions, and alleviates the weak generalization ability caused by the lack of abnormal samples.

[0189] Table 1

[0190]

[0191] This embodiment conducts an ablation experiment to verify the effectiveness of each part of the framework. The present invention uses the following settings to train the model and reuses the same parameters as above:

[0192] a, w / o anatomical knowledge: no use of anatomical label generator;

[0193] b, w / o contrastive learning: contrastive learning without using normal anatomical data;

[0194] Table 2 shows the results of the ablation experiment, which was conducted on the MS_CXR dataset. First, after comparing the complete model with setting (a), it was found that the anatomical knowledge enhancement strategy improved the overall performance (ACC+2.4%). This proves that the use of anatomical knowledge can enhance the model's understanding of image data, thereby improving the robustness of the model, and the increase in mIoU (+0.0226) also proves the ability to improve positioning accuracy. Secondly, after comparing the complete model with setting (b), it was found that the contrastive learning strategy improved the overall performance (ACC+3.6%) and mIoU also increased (+0.013), allowing the model to learn to distinguish the difference between normal image features and abnormal image features. Improving the model's sensitivity to abnormal features is helpful for visual entity positioning. Without using the anatomical knowledge generation module and the contrastive learning module, the performance of the model in the test dropped significantly (ACC-8.39%), indicating that the two modules in the method have a complementary effect on the improvement of the model, and the results of (a) and (b) also prove the effectiveness of each module.

[0195] Table 2

[0196]

[0197] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof.

[0198] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for constructing a multimodal teaching knowledge graph based on medical imaging reports. It is characterized in that include: Step 1, input the report text in the medical imaging report into the clinical report entity relationship extraction model to obtain text entities and relationships; Step 2: ResNet is used to extract the image features of the image pictures in the medical imaging report, which are converted into a one-dimensional sequence and then input into the visual Transformer to obtain the visual features. BERT is used to obtain the text token sequence in the report text, which is then encoded by the language Transformer to obtain the text features. Step 3: Use a linear layer to map the visual and text features to a feature space of the same dimension, concatenate the mapped features and add a learnable embedding, input them into a multimodal Transformer, use a self-attention mechanism to model the global and local connections between the visual and text features and record them by the learnable embedding; Step 4, input the sample image and the enumerated anatomical description text into the anatomical label generator, generate the anatomical pseudo-label corresponding to the anatomical description text and form a pseudo-label pair, and then input the pseudo-label pair into the image report cross-modal entity alignment model, and further iterate the parameters of the anatomical label generator according to the gradient feedback of the image report cross-modal entity alignment model for the true label prediction loss; Step 5: Select multiple normal anatomical images as negative samples, and use the entity areas in the training images corresponding to the description text as positive samples, and train the image report cross-modal entity alignment model through comparative learning; Step 5.1, select anatomical regions in multiple normal images as negative samples, and use the image target regions corresponding to the description text in the training data as positive samples to construct positive and negative sample pair data; Step 5.2, inputting the positive and negative sample pair data into the image report cross-modal entity alignment model to obtain the visual features of the positive and negative sample data encoded by the image report cross-modal entity alignment model; Step 5.3, use contrastive learning loss to train the image reporting cross-modal entity alignment model to measure the accuracy and sensitivity of fine-grained alignment of cross-modal data; Step 6: Input the learned embedding into the prediction module of the trained image report cross-modal entity alignment model, obtain the regional coordinates of the visual entity through two ReLU activation functions and a fully connected layer, and mark the visual entity area corresponding to the text entity in the image; Step 7: Construct a multimodal knowledge graph based on the visual entity regions, text entities, and relationships corresponding to the text entities.

2. The method according to claim 1, It is characterized in that The step 1 specifically includes: Step 1.1, input the report text into the pre-trained BERT model, obtain the token sequence of the report text, and construct a contextual representation for each token; Step 1.2, enumerate the spans in the token sequence and obtain the span features, use the span features to predict the type of each span and the relationship between each span pair, and construct a span graph; In step 1.3, the graph neural network is used to recursively update each span representation in the span graph, and the final representation is used to predict the text entities and relations in the report text.

3. The method according to claim 2, It is characterized in that The step 2 specifically includes: Step 2.1: Input the image into the ResNet network to extract image features, and then use the convolutional layer to reduce the dimension of the features to obtain primary image features; Step 2.2: Convert the primary image features after dimensionality reduction into one-dimensional patch sequence features, and add position encoding information to obtain image features; Step 2.3, input the processed image features into the visual Transformer encoder, use the visual Transformer to model the global context information of the image, and obtain the visual features; Step 2.4, input the report text into the pre-trained BERT model to obtain a text token sequence, and add [CLS] tokens and [SEP] tokens at the beginning and end of the sequence; Step 2.5, input the processed text token sequence into the language Transformer encoder, use the language Transformer to model the context information of the text, and obtain the text features.

4. The method according to claim 3, It is characterized in that The step 3 specifically includes: Step 3.1, input the visual features into the visual linear layer, map the visual features to a feature space with a fixed dimension and the same as the text features through linear mapping, and obtain the mapped visual features; Step 3.2, input the text features into the text linear layer, map the text features to a feature space with a fixed dimension and the same as the visual features through linear mapping, and obtain the mapped text features; Step 3.3, concatenate the mapped visual features and the mapped text features into a visual-text feature sequence, and add a learnable global representation embedding at the end; Step 3.4: Input the concatenated visual-text feature sequence into the multimodal Transformer, use the multi-head attention mechanism to calculate the correlation weights between all features in the visual-text feature sequence, and model the global and local connections between visual features and text features; In step 3.5, during the modeling process, the correlation between the recorded text and visual features is represented by a learnable global representation embedding.

5. The method according to claim 4, It is characterized in that The step 4 specifically includes: Step 4.1, enumerate and generate corresponding anatomical description text according to the pre-defined anatomical types; Step 4.2, inputting the generated anatomical description text and the sample image in the training data into the trained anatomical label generator, generating anatomical pseudo labels corresponding to the description for the sample image, and obtaining pseudo label pairs accordingly, wherein the pseudo label pairs include anatomical descriptions and anatomical coordinates; Step 4.3, inputting the pseudo-label pairs and the corresponding image report training data into the image report cross-modal entity alignment model in parallel, and training the parameters of the image report cross-modal entity alignment model according to the objective function; Step 4.4, obtaining the prediction loss gradient of the image report cross-modal entity alignment model for the real image report label during each training cycle; Step 4.5, iteratively optimize the anatomical label generator according to the prediction loss gradient; Step 4.6, repeat steps 4.3 to 4.5 until the image report cross-modal entity alignment model converges.

6. The method according to claim 5, It is characterized in that The expression of the objective function is ; in, represents the first batches, Cross-modal entity alignment model representing image reports The loss function is represents the predictions of the image report cross-modal entity alignment model on the training data, represents the predictions of the image report cross-modal entity alignment model on anatomical pseudo-labeled data, Indicates image pictures, Represents the description text of the sample, Represents anatomical description text, represents the anatomical coordinates in the pseudo-label pair, represents the parameters of the image report cross-modality entity alignment model, Represents the anatomical coordinates in the sample image; The expression of the prediction loss gradient is: ; in, represents the learning rate of the model, represents the gradient during the training of the image report cross-modal entity alignment model, Represents the loss function.

7. The method according to claim 6, It is characterized in that The step 6 specifically includes: Step 6.1, embed the learned global representation into the input prediction module, and first perform nonlinear transformation through two ReLU activation functions; Step 6.2, input the embedded representation after the ReLU activation function layer into the fully connected layer of the image report cross-modal entity alignment model, and the fully connected layer maps the embedded representation to the output space of the bounding box coordinates to obtain the region coordinates; Step 6.3, the region coordinates represent the visual entity region in the input image that is most relevant to the input text token sequence, and the visual entity region corresponding to the text entity in the image is marked by the region coordinates.

Citation Information

Patent Citations

  • Transform-based multi-modal knowledge graph dynamic adaptive alignment method

    CN116932777A

  • Medical image report generation method based on visual priori and cross-modal alignment network

    CN117393098A

  • Radiology report generation method and system based on cross-modal fusion and memory supervision

    CN117789911A

  • Self-supervised document representation learning

    US20220382975A1

  • System and method for assessing severity of neutrophilic dermatoses with visible skin manifestation

    WO2023052222A2