Chest radiograph report generation method based on knowledge enhancement cross-modal semantic association
By using the knowledge-enhanced cross-modal semantic association method in chest X-ray report generation, combined with retrospective learning and alternating training, the problem of cross-modal semantic differences between images and text in chest X-ray report generation is solved, and rapid and accurate report generation is achieved. and prediction of medical keywords, significantly reducing the workload of doctors.
Patent Information
- Application Number
- CN202410687876.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-27
AI Technical Summary
It is difficult to generate accurate and detailed chest X-ray reports with existing technologies, especially due to the cross-modal semantic differences between images and text, making the chest X-ray report generation task complex and challenging.
Using a cross-modal semantic association method based on knowledge enhancement, the chest X-ray image and report language sequence are encoded through a visual encoder and a language encoder, and medical knowledge is integrated through the medical entity knowledge encoding module, combined with retrospective learning and alternating training strategies, to enhance Cross-modal semantic consistency, ultimately alternating input text to generate decoder reports.
It achieves rapid generation and improved accuracy of chest X-ray reports, can predict and provide corresponding medical keywords, reduce the workload of doctors, and achieves good results in two public chest X-ray report generation data sets.
Smart Images

Figure CN118553369A
Abstract
Description
Technical Field
[0001] The present invention relates to a medical imaging report generation method that intersects the fields of multimodal learning, generative artificial intelligence, and medical imaging analysis, and in particular to a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association. Background Art
[0002] As an important medical image for clinical auxiliary diagnosis of thoracic diseases, chest X-ray provides doctors with rich visual information. With the surge in the number of images, the workload of radiologists is increasing, and the waiting time for patients' reports is also increasing accordingly. Therefore, it is crucial to use artificial intelligence technology to assist in the rapid generation of medical imaging reports.
[0003] Currently, image captioning models based on deep learning encoding-decoding structures have shown strong performance in image captioning tasks. These methods use an encoder to extract and encode deep features of the image, and then use a decoder to accurately decode the visual encoding features to generate subtitles that match the image content. Inspired by the image captioning model, some chest X-ray report generation methods based on the encoding-decoding structure have emerged. It is worth noting that the chest X-ray report generation task is more complex than the image captioning task. It requires the generation of multiple sentences to describe in detail the lesion information present in the image. Each sentence must accurately correspond to the description of the disease condition of a specific organ in the image, highlighting the importance of cross-modal semantic associations in chest X-ray report generation. Due to the cross-modal semantic differences between images and text, it is still challenging to generate accurate and detailed reports to describe chest X-rays. Summary of the invention
[0004] The purpose of the present invention is to propose a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association in response to the deficiencies of the prior art. Specifically, the present invention proposes to match and associate the semantics of the visual sequence and language sequence of the chest X-ray image during the training process. The chest X-ray image and the language sequence of the report are respectively encoded using a visual encoder and a language encoder to obtain a visual sequence and a language sequence. Then, the medical entity knowledge is extracted and fused into the visual sequence and the language sequence through a medical entity knowledge encoding module. Subsequently, the visual sequence and the language sequence after knowledge fusion are alternately input into a text generation decoder to realize report generation, and the report contains medical subject terms in addition to the report text description. In addition, the present invention proposes training strategies such as backtracking learning and alternating training to further enhance the consistency of cross-modal semantics, and has achieved good results in two public chest X-ray report generation data sets.
[0005] A chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association, the technical solution adopted to solve the technical problem includes the following specific steps:
[0006] Step (1), select chest X-ray images and reports containing medical subject terms to form a training data set denoted as {I, T}, where I and T represent the chest X-ray images in the data set and the corresponding reports containing medical subject terms, respectively;
[0007] Step (2) uses the convolutional neural network in the visual encoder to extract convolutional visual features from the chest X-ray image, expands the convolutional visual features and maps them to obtain a visual sequence, which is recorded as Where N is the length of the visual sequence, d model is the characteristic dimension of the model;
[0008] Step (3) uses a language encoder including a self-attention layer and a structured encoding layer to encode the report containing the medical subject terms into a language sequence Where N is the length of the language sequence, which is the same as the length of the visual sequence;
[0009] Step (4), extracting chest X-ray related medical entity knowledge from the medical domain knowledge base, for example, “atelectasis” → “atelectasis refers to a decrease in the volume or air content of one or more pulmonary segments and lobes, usually accompanied by a decrease in the light transmittance of the affected area”;
[0010] Step (5), encode the medical entity knowledge through the word vector mapping network to obtain the word mapping vector and add the position encoding information, and input it into the entity knowledge encoding module for further encoding. Among them, the entity knowledge encoding module includes a self-attention encoding layer and a multi-layer perceptron network to encode the medical entity knowledge and obtain the medical entity knowledge encoding feature Where K represents the amount of medical entity knowledge, d model The dimension of encoding features for medical entity knowledge is the same as the feature dimension of the model. j The encoding feature representing the jth medical entity knowledge is encoded by the following formula:
[0011] e j =Φ knowledge (description j ) (Formula 1)
[0012] Among them, Φ knowledge Represents the entity knowledge encoding module, description j is a detailed description of the jth medical entity knowledge;
[0013] Step (6): Use the fusion module to fuse the visual sequence and the medical entity knowledge encoding features through the cross attention mechanism to obtain the visual sequence after knowledge fusion. The specific formula is as follows:
[0014] v q,i=v i ·W q , e k,j =e j ·W k , e v,j =e j ·W v (Formula 2)
[0015]
[0016]
[0017]
[0018] Among them, W q , W k , W v Represents the linear transformation matrices used to map query vector, key vector and value vector respectively; v i represents the i-th element in the visual sequence, e j Represents the encoding features of the jth medical entity knowledge; v q,i represents the i-th query vector transformed by the corresponding weight matrix, e k,j 、e v,j represents the j-th key vector and value vector transformed by the corresponding weight matrix; is the intermediate feature of the visual sequence elements after the cross-attention mechanism, a i,j is the attention weight, W o is the weight matrix of the knowledge fusion output process, exp represents the exponential function, and T is the transposition operation;
[0019] Step (7) is similar to the knowledge fusion process in step (6). Given a language sequence L, it is fused with the medical entity knowledge in step (5) to obtain the language sequence after knowledge fusion
[0020] Step (8): Use the visual sequence after knowledge fusion or language sequence As prompts, alternate input into the text generation decoder to generate a report containing medical subject headings.
[0021] Specifically: the prompt symbol, the target medical subject word text and the target report text are concatenated and mapped to obtain the symbol mapping information Tok.E, and the position encoding information Pos.E and the character segmentation information Seg.E are added, and the information is input into the multi-layer mask cross attention layer and the linear output layer, and a report containing medical subject words is generated based on the autoregressive generative algorithm;
[0022] Step (9) uses the backtracking learning strategy combined with the alternating learning strategy to learn the parameters of the optimization model, and the visual sequence after knowledge fusion and language sequences Make semantic associations;
[0023] Step (10), during the test, the chest X-ray image to be tested is input into the visual encoder to extract the visual sequence of the image, and after integrating the entity medical knowledge, it is input into the text generation decoder, and the vocabulary of all moments is generated by autoregression, and all the vocabulary are connected in series to obtain a report containing medical subject terms. Among them, the medical subject terms and the report text are connected by splicing operation, and are generated based on the autoregressive generative algorithm. The text generation decoder contains S layers of masked cross-attention layers, and the hidden state of the output can be expressed as the following formula:
[0024] H={h1,h2,…,h t-1}=Layers(T t-1 , P) (Formula 6)
[0025] Among them, P represents the prompt symbol of the decoder generated by the input text, which can be a visual sequence or a language sequence or a mixed sequence. The mixed sequence is obtained by randomly mixing the visual sequence and the language sequence after knowledge fusion. Layers represents the S-layer mask cross attention layer, and T t-1 Represents the text sequence generated at the previous adjacent time t-1. t-1 Represents the hidden state at the previous adjacent time t-1.
[0026] Furthermore, through linear transformation and softmax operation, the h output of the last cross attention layer of the decoder is transformed into t-1 As a condition to generate the vocabulary t at the current time t t , the formula is as follows:
[0027] t t ~p t =softmax(h t-1 W p +b p ) (Formula 7)
[0028] in, is the linear mapping matrix, b p represents the learnable parameters, d vocab represents the total number of words in the vocabulary, p t Represents the probability distribution of the output vocabulary at time t.
[0029] Furthermore, the specific implementation of step (9) is as follows:
[0030] 9-1. Visual sequence after knowledge fusion Input text to generate a decoder to generate a report, and then input the report into the language encoder to obtain the backtracking language sequence, recorded as L traceback ;
[0031] 9-2. Define the loss function l v2t , represents the visual sequence after knowledge fusion The cross entropy loss reported by the decoder for the conditional chest radiograph input text generation is:
[0032]
[0033] Where M represents the length of the report sequence, that is, the number of time steps required to generate the report sequence, and p represents the probability distribution of the output vocabulary.
[0034] 9-3. Define the loss function l l2t , represents the language sequence after knowledge fusion The cross entropy loss generated for the conditional report-to-report:
[0035]
[0036] 9-4. Define the loss function l m2t , indicating a mixed sequence Generate cross entropy loss for conditional reports:
[0037]
[0038] in, It is a mixed sequence with a length of N, which is obtained by randomly mixing and selecting visual sequence and language sequence elements after knowledge fusion.
[0039] 9-5. Define the backtracking alignment loss l trace , by backtracking the language sequence L traceback Compared with the language sequence L, it is specifically defined as the mean square error loss:
[0040] l trace =||LL traceback || 2 (Formula 11)
[0041] 9-6. Joint training is performed on the model, including the convolutional neural network in the visual encoder, the self-attention layer and structured encoding layer in the language encoder, the entity knowledge encoding module, and the text generation decoder. The training optimization strategy of the model includes the backtracking learning strategy and the alternating training strategy. Specifically, the loss function l is used in the odd epochs of the training process. i2t +l t2 t+l traceback Perform parameter optimization and use the loss function l in even epochsm2t +l traceback Perform parameter optimization. In the backtracking loss function l traceback During the calculation of , the gradient feedback of the self-attention layer and the structured encoding layer in the language encoder will be disconnected.
[0042] The beneficial effects of the present invention are:
[0043] The present invention proposes to integrate chest X-ray medical entity knowledge into the chest X-ray report generation model, and proposes to adopt a strategy of backtracking learning and alternating training to establish an effective semantic association between the image visual sequence and the report language sequence during the training process to enhance the accuracy of report generation. In addition to the rapid generation of chest X-ray report text, the method of the present invention can also predict and provide corresponding medical subject terms, and provide reports containing medical subject terms for reference by radiologists, thereby assisting doctors in understanding chest X-rays and reducing the workload of doctors. Overall, the present invention has brought significant convenience and progress to the intelligent understanding of medical images through intelligent technical means. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of the present invention;
[0045] Figure 2 It is a schematic diagram of the overall framework of the present invention;
[0046] Figure 3 A schematic diagram of a text generation decoder for the present invention;
[0047] Figure 4 A schematic diagram of the backtracking learning strategy of the present invention;
[0048] Figure 5 It is a schematic diagram for comparing the qualitative effects of the method of the present invention and the existing method;
[0049] Figure 6 Grad-CAM regions of interest in images when generating reports for the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0051] like Figure 1As shown, the present invention discloses a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association. First, a visual encoder is used to extract the visual sequence of the image, and a language encoder is used to extract the language sequence of the corresponding report; then, medical entity knowledge closely related to the chest X-ray is extracted from the medical entity knowledge base, and the medical entity knowledge is integrated into the visual sequence and the language sequence through the entity knowledge encoding module. Finally, the visual sequence and the language sequence after knowledge fusion are alternately used as prompt symbols of the text generation decoder, and a report containing medical subject terms is decoded and generated in an autoregressive text generation manner. The present invention proposes a training strategy containing retrospective learning, which shortens the distance between the retrospective language sequence and the language sequence by extracting the retrospective language sequence of the generated report, and further enhances cross-modal consistency. The present invention effectively enhances cross-modal semantic associations through medical prior knowledge and retrospective learning strategies, and is suitable for the field of chest X-ray report generation. The method of the present invention can not only generate a chest X-ray report, but also predict and provide corresponding medical subject terms.
[0052] like Figure 2 As shown, the specific implementation steps are as follows:
[0053] Step (1), selecting chest X-ray images and reports containing medical subject terms to form a training data set;
[0054] Step (2) uses the convolutional neural network in the visual encoder to extract convolutional visual features from the chest X-ray image, expands the convolutional visual features and maps them to obtain a visual sequence, which is recorded as Where N is the length of the visual sequence, d model is the characteristic dimension of the model;
[0055] Step (3) uses a language encoder including a self-attention layer and a structured encoding layer to encode the report containing the medical subject terms into a language sequence Where N is the length of the language sequence, which is the same as the length of the visual sequence;
[0056] Step (4), extracting chest X-ray related medical entity knowledge from the medical domain knowledge base, for example, “atelectasis” → “atelectasis refers to a decrease in the volume or air content of one or more pulmonary segments and lobes, usually accompanied by a decrease in the light transmittance of the affected area”;
[0057] Step (5), such as Figure 2 The entity knowledge encoding module in the text encoding network encodes the medical entity knowledge to obtain the word mapping vector and adds the position encoding information, which is then input into the entity knowledge encoding module for further encoding. The entity knowledge encoding module includes a self-attention encoding layer and a multi-layer perceptron network to encode the medical entity knowledge and obtain the medical entity knowledge encoding features. Where K represents the amount of medical entity knowledge, dmodel The dimension of encoding features for medical entity knowledge is the same as the feature dimension of the model. j The encoding feature representing the jth medical entity knowledge is encoded by the following formula:
[0058] e j =Φ knowledge (description j ) (Formula 1)
[0059] Among them, Φ knowledge Represents the entity knowledge encoding module, description j It is a detailed description of the jth medical entity knowledge.
[0060] Step (6): The visual sequence and the medical entity knowledge encoding features are fused through the cross-attention mechanism through the fusion module to obtain the visual sequence after knowledge fusion. The specific formula is as follows:
[0061] v q,i =v i ·W q , e k,j =e j ·W k , e v,j =e j ·W v (Formula 2)
[0062]
[0063]
[0064]
[0065] Among them, W q , W k , W v Represents the linear transformation matrices used to map query vector, key vector and value vector respectively; v i represents the i-th element in the visual sequence, e j Represents the encoding features of the jth medical entity knowledge; v q,i represents the i-th query vector transformed by the corresponding weight matrix, e k,j 、e v,j represents the j-th key vector and value vector transformed by the corresponding weight matrix; is the intermediate feature of the visual sequence elements after the cross-attention mechanism, α i,j is the attention weight, W o is the weight matrix of the knowledge fusion output process, exp represents the exponential function, and T is the transposition operation;
[0066] Step (7) is similar to the knowledge fusion process in step (6). Given a language sequence L, it is fused with the medical entity knowledge in step (5) to obtain the language sequence after knowledge fusion
[0067] Step (8): Use the visual sequence after knowledge fusion or language sequence As prompts, alternate input into the text generation decoder to generate a report containing medical subject headings.
[0068] like Figure 3 The figure shows a text generation decoder, which maps the prompt symbol, the target medical subject word text and the target report text to obtain the symbol mapping information Tok.E, and adds the position encoding information Pos.E and the character segmentation information Seg.E, and inputs the multi-layer mask cross attention layer and the linear output layer based on the autoregressive generative algorithm to generate a report containing medical subject words;
[0069] Step (9) uses the backtracking learning strategy combined with the alternating learning strategy to learn the parameters of the optimization model, and the visual sequence after knowledge fusion and language sequences Make semantic associations;
[0070] Step (10), during the test, the chest X-ray image to be tested is input into the visual encoder to extract the visual sequence of the image, and after integrating the entity medical knowledge, it is input into the text generation decoder, and the vocabulary of all moments is generated by autoregression, and all the vocabulary are connected in series to realize the generation of a complete report, including medical subject word information. Among them, the medical subject words and the report text are connected by splicing operation, and are generated based on the autoregressive generative algorithm. Figure 3 As shown, the text generation decoder contains a masked cross attention layer, and the hidden state of the output can be expressed as follows:
[0071] H={h1,h2,…,h t-1}=Layers(f t-1 , P) (Formula 6)
[0072] Where P represents the prompt symbol of the decoder generated by the input text, which can be a visual sequence or a language sequence or a mixed sequence. The mixed sequence is obtained by randomly mixing the visual sequence and the language sequence after knowledge fusion. Layers represents the S-layer mask cross attention layer, and T t-1 Represents the text sequence generated at the previous adjacent time t-1. t-1 Represents the hidden state at the previous adjacent time t-1.
[0073] Furthermore, through linear transformation and softmax operation, the h output of the last cross attention layer of the decoder is transformed into t-1 As a condition to generate the vocabulary t at the current time t t , the formula is as follows:
[0074] t t ~p t =softmax(h t-1 W p +b p ) (Formula 7)
[0075] in, is the linear mapping matrix, b p represents the learnable parameters, d vocab represents the total number of words in the vocabulary, p t Represents the probability distribution of the output vocabulary at time t.
[0076] Furthermore, the specific implementation of step (9) is as follows:
[0077] 9-1. Visual sequence after knowledge fusion The input text generates a decoder to generate a report, which is then input into the language encoder to obtain the backtracking language sequence, denoted as L traceback ,like Figure 4 As shown,
[0078] 9-2. Define the loss function l v2t , represents the visual sequence after knowledge fusion The cross entropy loss reported by the decoder for the conditional chest radiograph input text generation is:
[0079]
[0080] Where M represents the length of the report sequence, that is, the number of time steps required to generate the report sequence, and p() represents the probability distribution of the output vocabulary.
[0081] 9-3. Define the loss function l l2t , represents the language sequence after knowledge fusion The cross entropy loss generated for the conditional report-to-report:
[0082]
[0083] 9-4. Define the loss function l m2t , indicating a mixed sequence Generate cross entropy loss for conditional reports:
[0084]
[0085] in, It is a mixed sequence with a length of N, which is obtained by randomly mixing and selecting visual sequence and language sequence elements after knowledge fusion.
[0086] 9-5. Figure 4 As shown, define the backtracking alignment loss l trace , by backtracking the language sequence L traceback Compared with the language sequence L, it is specifically defined as the mean square error loss:
[0087] l trace =||LL traceback || 2 (Formula 11)
[0088] 9-6. Joint training is performed for each module in the model, including the convolutional neural network in the visual encoder, the self-attention layer and structured encoding layer in the language encoder, the entity knowledge encoding module, and the text generation decoder. The training optimization strategy of the model includes the backtracking learning strategy and the alternating training strategy. Specifically, the loss function l is used in the odd epochs of the training process. i2t +l t2t +l traceback Perform parameter optimization and use the loss function l in even epochs m2t +l traceback Perform parameter optimization. In the backtracking loss function l traceback During the calculation of , the gradient feedback of the self-attention layer and the structured encoding layer in the language encoder will be disconnected.
[0089] To test the performance of the proposed method, experimental analysis was performed on two public datasets: IU X-Ray and MIMIC-CXR. Figure 5 The schematic diagram of the qualitative effect comparison between the method of the present invention and the existing method shows that the present invention can accurately generate a report describing the contents of the chest X-ray and give accurate medical subject terms. Figure 5 , the present invention can accurately generate medical subject terms such as "atelectasis, pleural effusion, assist device". In terms of report text generation, the present invention can generate "a pacemaker device on the left chest wall is seen, with leads extending to the right atrium and right ventricle regions. The midline sternal suture and mediastinal clamp are noted again. A small amount of pleural effusion on the left side and opacity on the left base may represent atelectasis or pneumonia. There is no pneumothorax. The cardiac mediastinal contour is stable. The bone structure is intact", which is highly similar to the reference report written by the doctor "double leads of the left pacemaker are seen, extending to the expected positions of the right atrium and right ventricle. The patient's condition is generally stable after median sternotomy and aortic valve replacement. Blunting of the left costophrenic angle is seen, suggesting pleural effusion with overlying atelectasis. Basal consolidation cannot be ruled out. There is a slight increase in opacity at the right lung base, which may be due to atelectasis, although pneumonia is not ruled out". Figure 6 When generating a report for the present invention, the Grad-CAM focus area in the image can be found that the method of the present invention can accurately focus on the visual area corresponding to the lesion text.
[0090] In terms of quantitative analysis, the performance of the present invention is compared with other report generation methods. The BLEU-3, BLEU-4, METEOR, ROUGE-L and CIDEr evaluation indicators used are subtitle generation related indicators. The experimental results are shown in Tables 1 and 2.
[0091] Table 1 Performance comparison of IU X-Ray dataset (the best result is marked in bold)
[0092] method BLEU-3 BLEU-4 METEOR ROUGE-L CIDEr Show-Tell 0.108 0.078 0.157 0.307 0.197 Transformer 0.147 0.136 0.168 0.317 0.310 RAMT 0.221 0.165 0.195 0.377 - CMN 0.222 0.170 0.191 0.375 - CMM+RL 0.235 0.181 0.201 0.384 - CMCL 0.217 0.162 0.186 0.378 - <![CDATA[D 2 -Net]]> 0.231 0.171 0.204 0.378 - The present invention 0.260 0.189 0.217 0.393 0.436
[0093] Table 2 Performance comparison of MIMIC-CXR dataset (the best results are marked in bold)
[0094]
[0095]
[0096] It can be seen from the table that, whether on the IU X-Ray dataset or the MIMIC-CXR dataset, the knowledge-enhanced cross-modal semantic association chest X-ray report generation method proposed in the present invention has shown significant improvement in effect through comprehensive consideration using a variety of evaluation indicators, and has achieved the best results in almost all indicators. At present, the performance of the method of the present invention is in a leading position internationally.
Claims
1. A chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association, characterized in that By integrating medical entity knowledge and retrospective learning strategies, the visual sequence of chest X-ray images and the language sequence of reports are semantically associated during the training process, thereby improving the accuracy of chest X-ray report generation.
2. According to claim 1, a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association is characterized in that: The specific steps are as follows: Step (1), select chest X-ray images and reports containing medical subject terms to form a training data set denoted as {I, T}, where I and T represent the chest X-ray images in the data set and the corresponding reports containing medical subject terms, respectively; Step (2) uses the convolutional neural network in the visual encoder to extract convolutional visual features from the chest X-ray image, expands the convolutional visual features and maps them to obtain a visual sequence, which is recorded as Where N is the length of the visual sequence, d model is the characteristic dimension of the model; Step (3) uses a language encoder including a self-attention layer and a structured encoding layer to encode the report containing the medical subject terms into a language sequence Where N is the length of the language sequence, which is the same as the length of the visual sequence; Step (4), extracting medical entity knowledge related to chest X-ray from the medical domain knowledge base; Step (5), encoding the medical entity knowledge through the word vector mapping network to obtain the word mapping vector and add the position coding information, and input it into the entity knowledge encoding module for encoding; Step (6): Use the fusion module to fuse the visual sequence and the medical entity knowledge encoding features through the cross attention mechanism to obtain the visual sequence after knowledge fusion. Step (7) is similar to the knowledge fusion process in step (6). Given a language sequence L, it is fused with the medical entity knowledge in step (5) to obtain the language sequence after knowledge fusion Step (8): Use the visual sequence after knowledge fusion or language sequence As prompt symbols, they are alternately input into the text generation decoder to generate reports containing medical subject headings; Step (9) uses the backtracking learning strategy combined with the alternating learning strategy to learn the parameters of the optimization model, and the visual sequence after knowledge fusion and language sequences Make semantic associations; Step (10), during the test, the chest X-ray image to be tested is input into the visual encoder to extract the visual sequence of the image, and after integrating the entity medical knowledge, it is input into the text generation decoder, and the vocabulary of all moments is generated by autoregression. All the vocabulary is concatenated to obtain a report containing medical subject terms.
3. According to claim 2, a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association is characterized in that: The entity knowledge encoding module described in step (5) includes a self-attention encoding layer and a multi-layer perceptron network to encode the medical entity knowledge and obtain the medical entity knowledge encoding feature Where K represents the amount of medical entity knowledge, dmodel is the dimension of the encoding features of medical entity knowledge, which is the same as the feature dimension of the model; j The encoding feature representing the jth medical entity knowledge is encoded by the following formula: e j =Φ knowledge (description j ) (Formula 1) Among them, Φ knowledge Represents the entity knowledge encoding module, description j It is a detailed description of the jth medical entity knowledge.
4. According to claim 2, a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association is characterized in that: The specific implementation formula of step (6) is as follows: v q,i =v i ·W q ,e k,j =e j ·W k ,e v,j =e j ·W v (official2) Among them, W q , W k , W v Represents the linear transformation matrices used to map query vector, key vector and value vector respectively; v i represents the i-th element in the visual sequence, e j Represents the encoding features of the jth medical entity knowledge; v q,i represents the i-th query vector transformed by the corresponding weight matrix, e k,j 、e v,j represents the j-th key vector and value vector transformed by the corresponding weight matrix; is the intermediate feature of the visual sequence elements after the cross-attention mechanism, α i,j is the attention weight, W o is the weight matrix of the knowledge fusion output process, exp represents the exponential function, and T is the transposition operation.
5. According to claim 2, a chest X-ray report generation method based on knowledge-enhanced cross-modal semantic association is characterized in that: The implementation of the text generation decoder is as follows: the prompt symbol, the target medical subject word text and the target report text are concatenated and mapped to obtain the symbol mapping information Tok.E, and the position encoding information Pos.E and the character segmentation information Seg.E are added, and the multi-layer masked cross-attention layer and the linear output layer are input together to generate a report containing medical subject words based on the autoregressive generative algorithm.
6. The method for generating a chest X-ray report based on knowledge-enhanced cross-modal semantic association according to claim 2, characterized in that: The specific steps of step (9) are as follows: 9-1. The report generated in the image-to-report generation branch is input into the language encoder to obtain the backtracking language sequence, denoted as L traceback ; 9-2. Define the loss function Represents the visual sequence after knowledge fusion The cross entropy loss generated for the conditional image to report: 9-3. Define the loss function Represents the language sequence after knowledge fusion The cross entropy loss generated for the conditional report-to-report: 9-4. Define the loss function Represents a mixed sequence Generate cross entropy loss for conditional reports: in, The mixed sequence is obtained by randomly mixing the visual sequence and the language sequence after knowledge fusion; 9-5. Define backtracking alignment loss By taking the backtracking language sequence L traceback Compared with the language sequence L, it is specifically defined as the mean square error loss: 9-6. Joint training is performed for each module in the model, including the convolutional neural network in the visual encoder, the self-attention layer and structured encoding layer in the language encoder, the entity knowledge encoding module, and the text generation decoder; the training optimization strategy of the model includes the backtracking learning strategy and the alternating training strategy; specifically, the loss function is used in the odd epochs of the training process. Perform parameter optimization and use the loss function at even epochs Perform parameter optimization; in the backtracking loss function During the calculation of , the gradient feedback of the self-attention layer and the structured encoding layer in the language encoder will be disconnected.
7. The method for generating a chest X-ray report based on knowledge-enhanced cross-modal semantic association according to claim 2, characterized in that: Step (10) The text generation decoder contains S layers of masked cross attention layers, and the hidden state of the output is expressed as follows: H={h1,h2,…,h t-1 }=Layers(T t-1 , P) (Formula 10) Among them, P represents the prompt symbol of the decoder generated by the input text, which can be a visual sequence or a language sequence or a mixed sequence. The mixed sequence is obtained by randomly mixing the visual sequence and the language sequence after knowledge fusion. Layers represents the S-layer mask cross attention layer, and T t-1 represents the text sequence generated at the previous adjacent time t-1; h t-1 Represents the hidden state of the previous adjacent time t-1; Through linear transformation and softmax operation, h output by the last cross attention layer of the decoder is t-1 As a condition to generate the vocabulary t at the current time t t , the formula is as follows: t t ~p t =softmax(h t-1 W p +b p ) (Formula 11) in, is the linear mapping matrix, b p represents the learnable parameters, d vocab represents the total number of words in the vocabulary, p t Represents the probability distribution of the output vocabulary at time t.
Citation Information
Cited By
Text generation chest X-ray image system and method based on diffusion model
CN119722838A
Radiology report generation method based on hierarchical knowledge integration framework
CN119785966A
Medical image report generation method based on fine-grained optimal visual angle constraint
CN119811574A
Chest radiograph report generation method and system based on cross-modal alignment and significant semantic region
CN120748604A
A chest radiograph report generation method and system based on cross-modal alignment and salient semantic regions
CN120748604B
