Radiology report generation method and system based on cross-view spatial alignment and prototype guided semantic memory

By employing cross-viewpoint spatial alignment and prototype-guided semantic memory, the inaccuracies in viewpoint image correction and text generation in radiology report generation are resolved, achieving high-quality radiology report generation.

CN123161771APending Publication Date: 2026-11-24DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611566619.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-10
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing radiology report generation methods fail to effectively correct geometric distortions and anatomical obstructions in images from different perspectives, resulting in inaccurate lesion localization. Furthermore, the autoregressive generation process of report text suffers from redundant descriptions and logical discontinuities.

Method used

By explicitly establishing the spatial mapping relationship between anteroposterior and lateral images through a cross-view spatial alignment module, and combining global medical prior memory and dynamic disease prototypes, a word surface intervention is performed to generate reports that conform to clinical standards.

Benefits of technology

It improves the accuracy of lesion localization from multiple perspectives and the coherence of report text, reduces hallucination descriptions and logical breaks, and enhances the semantic consistency of the report.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123161771A_ABST
    Figure CN123161771A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of medical image processing and natural language generation technology, and relates to a method and system for generating radiology reports based on cross-view spatial alignment and prototype-guided semantic memory. The method includes: using orthogonal features as a fixed reference, calculating the spatial affinity matrix and deformation flow through cross-view multi-head attention, spatially correcting lateral features and fusing them into an aligned joint visual representation; performing Top-K sparse retrieval using global static medical prior memory to obtain clinically relevant prior responses; cascading and binding spatial location, disease prototype memory, and the current text decoding state to generate a clinical intervention vocabulary score; fusing the main decoder vocabulary score with the clinical intervention vocabulary score, and outputting a radiology diagnostic report through candidate path search. This invention can reduce the risk of missed diagnoses caused by spatial misalignment of multi-view images, enhance the fine-grained correspondence between abnormal visual patterns and medical terminology, and improve the clinical consistency and semantic coherence of reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of medical image processing, multimodal learning, and medical natural language generation technology, specifically relating to a radiology report generation method and system based on cross-perspective spatial alignment and prototype-guided semantic memory. Background Technology

[0002] Radiology report generation automatically generates diagnostic texts that conform to clinical writing standards based on medical images, reducing the repetitive writing burden on radiologists and improving diagnostic efficiency and report standardization. In chest X-ray examinations, the same patient typically has both anteroposterior and lateral views, with different perspectives presenting structural information such as lung fields, cardiac silhouette, diaphragm, ductal location, and localized shadows. Clinicians need to synthesize multiple perspectives to determine the location and severity of lesions; therefore, the spatial correspondence between these multiple images directly affects the quality of the generated report.

[0003] Existing radiology report generation methods typically employ an encoder-decoder framework consisting of a visual encoder and a text decoder. The visual encoder extracts image features, and the text decoder generates a natural language report based on these image features through autoregression. To enhance the semantic consistency of medical information during the generation of long texts, existing methods have introduced relational memory matrices, medical knowledge graphs, retrieval enhancement modules, prototype memories, or knowledge distillation mechanisms to improve the connection between image features and medical terminology.

[0004] However, existing methods still have three prominent problems: First, most models treat anteroposterior and lateral images as independent inputs, or only perform shallow stitching in the channel and sequence dimensions, without explicitly correcting for geometric distortions, anatomical occlusions, and spatial nonlinear misalignments caused by different shooting angles, which makes small lesions easily diluted by the normal tissue background during fusion; Second, fixed knowledge bases or dictionary queries are difficult to adapt to the dynamic image-text correspondences of different patients, and there is a lack of fine-grained constraints between abnormal visual patterns and disease-related terms; Third, the report text has a long autoregressive generation chain, and the decoding process is prone to redundant descriptions, hallucination diagnoses, spatial localization errors, or logical discontinuities.

[0005] Therefore, there is a need for a radiology report generation method that can simultaneously perform cross-perspective spatial correction, global medical prior sparse retrieval, disease prototype semantic constraints, and word surface intervention to improve the accuracy of multi-perspective lesion localization, consistency of clinical terminology, and coherence of report text. Summary of the Invention

[0006] To address the aforementioned problems, this invention proposes a method and system for generating radiology reports based on cross-view spatial alignment and prototype-guided semantic memory. This method takes multi-view radiology images as input, explicitly establishes the spatial mapping relationship between anteroposterior and lateral views through a cross-view spatial alignment module, simultaneously introduces static medical priors and dynamic disease prototypes through a dual-track memory enhancement module, and applies clinical intervention to the decoding results in a vocabulary probability space, thereby generating radiology reports that are consistent with imaging evidence, semantically coherent, and conform to clinical standards.

[0007] The technical solution adopted in this invention is as follows: On the one hand, this invention provides a radiology report generation method based on cross-perspective spatial alignment and prototype-guided semantic memory, comprising: Multi-view radiographic images of the same examination object are acquired, and local features in the frontal view, local features in the lateral view, global features in the frontal view, and global features in the lateral view are extracted respectively. The global features in the frontal view and the global features in the lateral view are then fused into a global feature vector. Using orthogonal local features as fixed reference features and lateral local features as motion features to be aligned, a spatial deformation flow for correcting lateral local features is obtained through cross-view multi-head attention. The lateral local features are corrected based on the spatial deformation flow. The corrected lateral local features are then fused with orthogonal local features to obtain aligned and fused local features. Finally, the global feature vector and the aligned and fused local features are fused into fused visual features. A globally shared static medical prior memory matrix is ​​constructed. The fused visual features and the static medical prior memory matrix are mapped to a multi-head subspace. The similarity between the visual position and the medical prior memory slot is calculated. Based on the similarity, a subset of clinically relevant memory slots is selected from the medical prior memory slots. The subset is then aggregated to obtain the static prior response features. Random projection and spatial anatomical location binding are performed on the aligned joint visual representation, and it is fused with the static prior response features to form a global visual context; the input real report text is processed by word embedding and deep semantic interaction by a Transformer encoder to obtain the text context; Based on the current decoded text state, disease consensus prototypes are retrieved from the dynamic disease prototype memory matrix, and disease consensus prototypes, text context, and global visual context are mapped to clinical intervention vocabulary scores through cascading binding. The original word list score output by the main decoder used to generate the radiological diagnostic report is fused with the clinical intervention word list score according to the preset intervention weight to obtain the final word probability distribution, and the radiological diagnostic report is generated by candidate path search.

[0008] Furthermore, the multi-view radiographic images include at least anteroposterior and lateral chest X-ray images; Extract local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view, respectively. This includes using a pre-trained convolutional neural network or a visual coding network to extract local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view.

[0009] Furthermore, the cross-view multi-head attention includes: mapping lateral local features to query vectors, mapping orthogonal local features to key vectors and value vectors; calculating scaled dot product attention for each attention head to obtain a spatial affinity matrix; and performing weighted reconstruction of the orthogonal value vector based on the spatial affinity matrix to obtain a spatial deformation flow for correcting lateral local features.

[0010] Furthermore, the lateral local features are corrected based on the spatial deformation flow, including: The spatial deformation flow is added to the lateral local features, and layer normalization is performed to obtain the aligned lateral local features.

[0011] Furthermore, the corrected lateral local features are fused with the anteroposterior local features to obtain aligned and fused local features, including: The aligned lateral local features are concatenated with the anterior local features, and then subjected to linear dimensionality reduction, normalization, and nonlinear activation to obtain the aligned and fused local features.

[0012] Further, based on the similarity, a subset of clinically relevant memory slots is selected from the medical prior memory slots, and this subset is aggregated to obtain static prior response features, including: For each visual sequence location, only the K medical prior memory slots with the highest similarity are retained to form a subset of clinically relevant memory slots, and the remaining medical prior memory slots are masked. The similarity of the clinically relevant memory slot subset is normalized, and the corresponding value vectors are weighted and summed based on the normalized similarity to form static prior response features.

[0013] Furthermore, the spatial anatomical location binding includes: projecting the fused visual features onto a low-dimensional continuous prior space and binding them element-by-element to a preset discrete orthogonal position basis matrix to inject anatomical location coordinates into the visual grid; the static prior response features and the bound geometric features are weighted and fused according to a spatial prior adjustment coefficient.

[0014] Furthermore, the dynamic disease prototype memory matrix includes multiple disease writing prototype vectors; retrieving disease consensus prototypes from the dynamic disease prototype memory matrix based on the current decoded text state includes: using the current decoded text state as a query vector, calculating the similarity with each disease writing prototype vector, and obtaining the disease consensus prototype through Top-K disease prototype selection.

[0015] Furthermore, the fusion is a weighted fusion performed within the logarithmic vocabulary score space; during the training phase, cross-entropy loss is used to constrain the consistency between the final word probability distribution and the true report word sequence; during the inference phase, beam search is used to maintain the candidate report sequence with the highest cumulative likelihood until a terminator is generated or the maximum length is reached.

[0016] In another aspect, the present invention also provides a radiology report generation system based on cross-perspective spatial alignment and prototype-guided semantic memory, comprising: Multi-view image feature extraction module: acquires multi-view radiographic images of the same examination object, extracts local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view, and fuses the global features from the frontal view and the global features from the lateral view into a global feature vector; Cross-view spatial alignment module: Using orthogonal local features as fixed reference features and lateral local features as motion features to be aligned, a spatial deformation flow for correcting lateral local features is obtained through cross-view multi-head attention. The lateral local features are corrected based on the spatial deformation flow, and the corrected lateral local features are fused with orthogonal local features to obtain aligned and fused local features. The global feature vector and the aligned and fused local features are then fused into fused visual features. Global Medical Prior Memory Retrieval Module: Constructs a globally shared static medical prior memory matrix, maps the fused visual features and the static medical prior memory matrix to a multi-head subspace, calculates the similarity between the visual position and the medical prior memory slot, filters a subset of clinically relevant memory slots from the medical prior memory slots based on the similarity, and aggregates the subset to obtain static prior response features; The prototype-guided semantic memory module performs random projection and spatial anatomical location binding on the aligned joint visual representation, and fuses it with the static prior response features to form a global visual context; the input real report text is processed through word embedding and deep semantic interaction by a Transformer encoder / decoder to obtain the text context; based on the current decoded text state, the disease consensus prototype is retrieved from the dynamic disease prototype memory matrix, and the disease consensus prototype, text context, and global visual context are mapped to clinical intervention vocabulary scores through cascade binding; The dual-intervention decoding and report generation module performs maximum likelihood optimization on the model based on real radiological report sequences during the training phase. During the inference phase, the original vocabulary score output by the main decoder used to generate radiological diagnostic reports is fused with the clinical intervention vocabulary score according to preset intervention weights to obtain the final word probability distribution, and candidate path search is used to generate radiological diagnostic reports.

[0017] Compared with the prior art, the beneficial effects of the present invention are: First, this invention uses cross-view spatial alignment, taking local features of the anteroposterior image as a fixed reference and local features of the lateral image as motion features to be aligned, and uses multi-head attention to calculate the spatial affinity matrix and deformation flow, so that the anatomical structures in the anteroposterior and lateral images are expressed in a unified space, reducing the missed detection of small lesions caused by viewpoint misalignment.

[0018] Second, this invention uses global medical prior memory retrieval to perform multi-head Top-K sparse queries in a static medical prior memory matrix, retaining only the medical memory slots most relevant to the current visual region, filtering out normal tissue background and irrelevant prior noise, and improving the matching quality between abnormal visual regions and cross-sample medical knowledge.

[0019] Third, this invention guides semantic memory through prototypes, cascading spatial anatomical location binding, dynamic disease prototype retrieval, text context binding, and global visual context binding. It corrects the output of the main decoder at the vocabulary probability level, which can reduce hallucination descriptions, over-template expressions, and clinical logic breaks. Attached Figure Description

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

[0021] Figure 1 This is a flowchart illustrating the radiology report generation method based on cross-perspective spatial alignment and prototype-guided semantic memory in an embodiment of the present invention. Figure 2 This is an overall architecture diagram of the radiology report generation system based on cross-perspective spatial alignment and prototype-guided semantic memory in an embodiment of the present invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] This embodiment takes the generation of a chest X-ray radiology report as an example. The input is the frontal and lateral view images of the same examinee, and the output is a radiological diagnosis report in natural language.

[0025] like Figure 1 As shown, this embodiment presents a radiology report generation method based on cross-view spatial alignment and prototype-guided semantic memory, which specifically includes the following steps: S1. Obtain multi-view radiographic images of the same examination subject, denoted as... .

[0026] The input includes two chest X-ray views: a frontal view and a lateral view. In practice, a pre-trained visual feature extraction network is used. As a visual extractor, local pathological features are extracted from the anteroposterior and lateral images respectively, resulting in anteroposterior local features and lateral local features:

[0027] in, It belongs to the B×2×C×H×W dimensional input space, where B represents the batch size, 2 represents the number of chest X-ray viewpoints, and C, H and W represent the number of channels, height and width of the input image, respectively. and These represent local feature maps of the frontal and lateral viewpoints, respectively, with a channel dimension of D and a spatial grid size of H×W.

[0028] Furthermore, the model employs a dual-branch parallel visual representation construction approach. The local branch flattens the frontal and lateral local features in the spatial dimension and then averages or fuses them to obtain the local visual sequence. The global branch compresses joint visual features using adaptive average pooling to obtain a global visual description. The aforementioned misaligned local features, local visual sequences, and global visual descriptions together constitute the basic visual input for subsequent cross-viewpoint spatial alignment and dual-track memory enhancement.

[0029] S2. Using local features from the frontal view as fixed reference features and local features from the lateral view as motion features to be aligned, a spatial deformation flow is obtained through cross-view multi-head attention to correct the local features from the lateral view. The local features from the lateral view are corrected based on the spatial deformation flow, and the corrected local features from the lateral view are fused with the local features from the frontal view to obtain the aligned joint visual representation. Due to differences in shooting angle, anatomical obstruction, and local spatial distortion between anteroposterior and lateral views, direct stitching can lead to lesion displacement. This step focuses on local features in the anteroposterior view. As a fixed reference feature, lateral local features As motion features to be aligned, the query vector, key vector, and value vector are obtained through shared linear projection:

[0030]

[0031]

[0032] in, , and The transformation matrix is ​​learnable and shared. The projected tensor is divided into multiple attention heads along the channel dimension, and each attention head learns the local correspondence between the frontal and lateral positions in an independent subspace.

[0033] For the i-th attention head, calculate the scaled dot product attention between the lateral query vector and the positive key vector to obtain the spatial affinity matrix. :

[0034] in, Scaling factor This represents the spatial affinity weights formed by the i-th attention head among N visual positions. This spatial affinity matrix characterizes the stretching, translation, and local topological deformation tendencies of lateral images relative to the anteroposterior reference anatomical structure.

[0035] The positive position vector is reconstructed by weighting the spatial affinity matrix, and the results of multiple attention heads are concatenated to obtain the feature flow for lateral view spatial correction:

[0036] in, The feature flow projection matrix, This represents the lateral correction feature generated by cross-view attention. To avoid losing original lesion clues in the lateral images during the correction process, this correction feature is residually joined with the lateral local features and layer normalization is performed:

[0037] in, This represents the lateral visual features after spatial alignment. Subsequently, the aligned lateral visual features are concatenated with the frontal local features, and then subjected to linear dimensionality reduction, layer normalization, and GELU nonlinear activation to obtain a cross-view joint visual representation:

[0038] in, It is a linear dimension reduction transformation matrix. This is a joint visual representation after spatial correction and deep fusion. This representation serves as the visual input to the dual-track memory enhancement module, providing spatially unbiased visual anchors for subsequent static medical prior retrieval and dynamic semantic intervention.

[0039] S3. Construct a globally shared static medical prior memory matrix, map the aligned joint visual representation and the static medical prior memory matrix to a multi-head subspace, calculate the similarity between the visual position and the medical prior memory slot, retain the clinically relevant memory slots based on the similarity, and aggregate to obtain the static prior response features; To store anatomical patterns, common lesion prototypes, and implicit clinical visual semantics shared across samples, a globally shared static medical prior memory matrix is ​​constructed. . Essentially, it is a learnable parameter matrix. During end-to-end training of the model, it is randomly initialized through backpropagation and continuously optimized and updated as training progresses. Each slot in the matrix will gradually and adaptively learn to capture a specific medical pathology pattern.

[0040] During the training initialization phase, the static medical prior memory matrix is ​​randomly initialized according to a normal distribution:

[0041] in, belong ×c-dimensional space, represents the number of static medical knowledge slots, and c represents the channel dimension of a single static memory vector. and These represent the expected mean and standard deviation of the initial normal distribution, respectively, and are used to control the dispersion and numerical stability of the memory slot weights in the early stages of training.

[0042] In multi-head sparse queries, the aligned joint visual representation obtained in step S2 is used as the query source, and the static medical prior memory matrix is ​​used as the key and value source. For the i-th attention head, a learnable linear projection and a composite rearrangement operator are used. We obtain the query vector, key vector, and value vector:

[0043]

[0044]

[0045] in, This represents the query vector obtained by the aligned joint visual representation mapping. and This represents a key-value vector mapped from a static medical prior memory matrix. Through this mapping, different attention heads can retrieve the corresponding medical priors in distinct subspaces.

[0046] Calculate the dot product similarity between the query vector and the key vector within the i-th attention head to obtain the similarity matrix between the visual location and the static medical memory slot:

[0047] in, belong A dimensional space is used to represent the response strength of each visual sequence location to all static medical memory slots. To avoid the model being influenced by a large number of irrelevant normal tissue priors, only the K memory slots with the highest similarity are retained for each visual location, and negative infinity masking is applied to the remaining memory slots:

[0048] Where b represents the training batch index, j represents the visual sequence position index, and k represents the static memory slot index. Top-K sparse gating allows the model to focus on a small number of clinically relevant priors, thereby suppressing interference from background tissue and irrelevant lesion prototypes.

[0049] Subsequently, Softmax normalization is performed on the sparse similarity matrix, and the medical prior value vectors in each attention head are weighted and aggregated using normalized weights; then, the global representation is recovered through inverse rearrangement operator and concatenation operation to obtain the static knowledge response vector:

[0050] in, This represents a static medical prior response feature. This feature establishes a connection between the current patient's local visual evidence and shared medical priors across samples, providing a stable flow of clinical common sense for subsequent prototype-guided semantic memory modules.

[0051] S4. Randomly project and bind spatial anatomical positions to the aligned joint visual representation, and fuse it with static prior response features to form a global visual context; based on the current decoded text state, retrieve the disease consensus prototype from the dynamic disease prototype memory matrix, and map the disease consensus prototype, text context and global visual context to clinical intervention vocabulary score through cascade binding. This process includes three stages: visual geometry enhancement and location binding, text space disease consensus prototype binding, and vocabulary-level dual binding and joint constraints.

[0052] In the first stage, anatomical orientation and multi-view spatial positional relationships are explicitly introduced, and the aligned joint visual representation obtained in step S2 is mapped to a low-dimensional continuous prior space:

[0053] in, For learnable random projection matrices, This represents the continuous visual features after projection. Subsequently, a preset discrete orthogonal position basis matrix is ​​extracted from a fixed parameter library. And inject it into visual features by binding it element by element:

[0054] in, This represents dynamic geometric features with spatial anatomical position constraints. This represents an element-wise binding operation on the high-dimensional tensor axis. This positional binding allows the flattened visual mesh to regain its explicit spatial coordinate semantics.

[0055] The static prior response obtained in step S3 Mapping to A consistent space, adjusted according to spatial prior coefficients. Integrating static prior response and dynamic geometric features:

[0056] in, This represents the integrated prior response characteristics after spatial geometry enhancement. A value between 0 and 1 is used to adjust the relative weights of static medical priors and single-sample dynamic geometric information. Further... Residual connections are established with the aligned joint visual representation, and the spatial dimension is compressed through average pooling to obtain the global visual context:

[0057] in, This indicates the removal of pixel-level noise, which serves as the global visual context and flows into the downstream word list layer cascade intervention stage.

[0058] In the second stage, to enable the model to retrieve standard clinical expressions within the current text context, a learnable dynamic disease prototype memory matrix is ​​introduced. , Essentially, it is also a learnable parameter matrix.

[0059]

[0060] in, Indicates the preset number of disease writing slots. Indicates the first k Each expert-level medical record prototype vector corresponds to a specific core pathological phenomenon, imaging sign, or clinical expression pattern.

[0061] At the current time step t of the autoregressive decoding, the Transformer decoder outputs the text hidden state. Using the text's hidden state as the query, the scaled dot product similarity is calculated with each disease prototype in the dynamic disease prototype memory matrix. Then, Top-K gating is used to retain the most relevant disease prototypes, resulting in normalized weights.

[0062] The selected disease prototype vectors are weighted and summed according to normalized weights to obtain the clinical knowledge consensus prototype at the current time step:

[0063] in, This represents a disease consensus prototype. Through hard truncation and normalization, this prototype can filter out disease-related noise that is irrelevant to the current condition, making the text generation process more closely reflect the patient's current imaging evidence.

[0064] The third stage involves performing two-level cascaded binding at the vocabulary level. The first-level binding transforms the current decoded text state through a linear transformation and hyperbolic tangent activation, and then binds it to the disease consensus prototype. Perform element-by-element binding to obtain contextualized knowledge vectors:

[0065] in, The text context transformation matrix, This represents the knowledge vector after fusing the current text context and the disease consensus prototype. Specifically, the current decoded text state refers to the hidden state features output in real time by the Transformer decoder within the t-th time step. It is dynamically calculated by the decoder by combining the historical generation context, self-attention mechanism, and cross-attention mechanism, and is used as the query vector to retrieve the dynamic disease prototype.

[0066] The second-level binding projects the global visual context and... Rebind and map to the clinical terminology space to output the clinical intervention terminology score:

[0067] in, For the visual latent projection matrix, This is a vocabulary mapping matrix. This is the logarithmic score of the clinical intervention at the current time step. This score can reinforce medical terms consistent with imaging evidence and disease prototypes at the word level.

[0068] S5. During the report generation phase, the main decoder outputs the original vocabulary score. The prototype-guided semantic memory module outputs a score for the clinical intervention vocabulary. .

[0069] To explicitly constrain the generation process using clinical rules, a weighted fusion of the two is performed in logarithmic space:

[0070] in, A value between 0 and 1 indicates an intervention control weight based on clinical common sense. The larger the value, the more the generation process is constrained by prototype-guided semantic memory; The smaller the value, the more the generation process relies on the language distribution of the main decoder itself. This weight can be used to strike a balance between clinical prior strength and language fluency.

[0071] During the training phase, a sequence of real radiological report terms is given. The overall network is trained using the maximum likelihood approach, and the target word probability after the final vocabulary score is processed by Softmax is used to calculate the cross-entropy loss.

[0072] in, This represents the index of the t-th real report word in the vocabulary. This is the overall training loss. Through this loss, visual feature extraction, cross-view spatial alignment, static medical prior memory, dynamic disease prototype memory, and text decoder parameters can be jointly optimized.

[0073] During the inference phase, the model uses candidate path search to generate a diagnostic report. At the t-th generation time step, based on the generated context and the word probability distribution after dual intervention, the cumulative log-likelihood score of each candidate path is maintained:

[0074] Where I represents the original multi-view medical image context, This represents the truncated sequence of historical text markers generated before the current time step T. At each time step, only the W candidate paths with the highest scores are retained and this process continues until a candidate path generates a terminator or the maximum length limit is reached. The final output is the report sequence with the highest cumulative score:

[0075] in, This refers to the final generated radiological diagnostic report. This indicates the actual sequence length at the point of generation termination. The report integrates complementary information from both anteroposterior and lateral perspectives in terms of image content, is constrained by both static priors and dynamic disease prototypes in terms of medical semantics, and ensures coherent expression through an autoregressive decoder in terms of linguistic structure.

[0076] Corresponding to the radiology report generation method in the above embodiments, this embodiment also provides a radiology report generation system based on cross-perspective spatial alignment and prototype-guided semantic memory, such as... Figure 2 As shown, the system mainly consists of the following core components: Multi-view image feature extraction module: acquires multi-view radiographic images of the same examination object, extracts local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view, and fuses the global features from the frontal view and the global features from the lateral view into a global feature vector; Cross-view spatial alignment module: Using orthogonal local features as fixed reference features and lateral local features as motion features to be aligned, a spatial deformation flow for correcting lateral local features is obtained through cross-view multi-head attention. The lateral local features are corrected based on the spatial deformation flow. The corrected lateral local features are fused with orthogonal local features to obtain aligned and fused local features. The global feature vector and the aligned and fused local features are fused into fused visual features. Global Medical Prior Memory Retrieval Module: Constructs a globally shared static medical prior memory matrix, maps the fused visual features and the static medical prior memory matrix to a multi-head subspace, calculates the similarity between the visual position and the medical prior memory slots, filters a subset of clinically relevant memory slots from the medical prior memory slots based on the similarity, and aggregates the subset to obtain static prior response features; The prototype-guided semantic memory module performs random projection and spatial anatomical location binding on the aligned joint visual representation, and fuses it with static prior response features to form a global visual context; the input real report text is processed through word embedding and deep semantic interaction by the Transformer encoder / decoder to obtain the text context; based on the current decoded text state, the disease consensus prototype is retrieved from the dynamic disease prototype memory matrix, and the disease consensus prototype, text context and global visual context are mapped to clinical intervention vocabulary scores through cascade binding; The dual-intervention decoding and report generation module performs maximum likelihood optimization on the model based on real radiological report sequences during the training phase. During the inference phase, the original vocabulary score output by the main decoder used to generate radiological diagnostic reports is fused with the clinical intervention vocabulary score according to the preset intervention weights to obtain the final word probability distribution, and candidate path search is used to generate radiological diagnostic reports.

[0077] In the above embodiments, a cross-view spatial alignment module uses local features of the anteroposterior image as a fixed reference and local features of the lateral image as motion features to be aligned. Multi-head attention is used to calculate the spatial affinity matrix and deformation flow, enabling anatomical structures in both anteroposterior and lateral images to be expressed in a unified space, reducing the missed detection of minute lesions caused by viewpoint misalignment. A global medical prior memory retrieval module performs multi-head Top-K sparse queries on the static medical prior memory matrix, retaining only the medical memory slots most relevant to the current visual region, filtering out normal tissue background and irrelevant prior noise, and improving the matching quality between abnormal visual regions and cross-sample medical knowledge. A prototype-guided semantic memory module cascades spatial anatomical location binding, dynamic disease prototype retrieval, text context binding, and global visual context binding, correcting the main decoder output at the vocabulary probability level, which can reduce hallucination descriptions, over-template expressions, and clinical logical breaks.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A radiology report generation method based on cross-perspective spatial alignment and prototype-guided semantic memory, characterized in that, include: Multi-view radiographic images of the same examination object are acquired, and local features in the frontal view, local features in the lateral view, global features in the frontal view, and global features in the lateral view are extracted respectively. The global features in the frontal view and the global features in the lateral view are then fused into a global feature vector. Using orthogonal local features as fixed reference features and lateral local features as motion features to be aligned, a spatial deformation flow for correcting lateral local features is obtained through cross-view multi-head attention. The lateral local features are corrected based on the spatial deformation flow. The corrected lateral local features are then fused with orthogonal local features to obtain aligned and fused local features. Finally, the global feature vector and the aligned and fused local features are fused into fused visual features. A globally shared static medical prior memory matrix is ​​constructed. The fused visual features and the static medical prior memory matrix are mapped to a multi-head subspace. The similarity between the visual position and the medical prior memory slot is calculated. Based on the similarity, a subset of clinically relevant memory slots is selected from the medical prior memory slots. The subset is then aggregated to obtain the static prior response features. Random projection and spatial anatomical location binding are performed on the aligned joint visual representation, and it is fused with the static prior response features to form a global visual context; the input real report text is processed by word embedding and deep semantic interaction by a Transformer encoder to obtain the text context; Based on the current decoded text state, disease consensus prototypes are retrieved from the dynamic disease prototype memory matrix, and disease consensus prototypes, text context, and global visual context are mapped to clinical intervention vocabulary scores through cascading binding. The original word list score output by the main decoder used to generate the radiological diagnostic report is fused with the clinical intervention word list score according to the preset intervention weight to obtain the final word probability distribution, and the radiological diagnostic report is generated by candidate path search.

2. The method for generating radiological reports according to claim 1, characterized in that, The multi-view radiographic images include at least chest X-ray images in the anteroposterior and lateral views; Extract local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view, respectively. This includes using a pre-trained convolutional neural network or a visual coding network to extract local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view.

3. The method for generating radiological reports according to claim 1, characterized in that, The cross-view multi-head attention includes: mapping lateral local features to query vectors, mapping orthogonal local features to key vectors and value vectors; calculating scaled dot product attention for each attention head to obtain a spatial affinity matrix; and performing weighted reconstruction of the orthogonal value vector based on the spatial affinity matrix to obtain a spatial deformation flow for correcting lateral local features.

4. The method for generating radiological reports according to claim 3, characterized in that, Correction of lateral local features based on the spatial deformation flow includes: The spatial deformation flow is added to the lateral local features, and layer normalization is performed to obtain the aligned lateral local features.

5. The method for generating radiological reports according to claim 4, characterized in that, The corrected lateral local features are fused with the anteroposterior local features to obtain aligned and fused local features, including: The aligned lateral local features are concatenated with the anterior local features, and then subjected to linear dimensionality reduction, normalization, and nonlinear activation to obtain the aligned and fused local features.

6. The method for generating radiological reports according to claim 1, characterized in that, Based on the similarity, a subset of clinically relevant memory slots is selected from the medical prior memory slots, and this subset is aggregated to obtain static prior response features, including: For each visual sequence location, only the K medical prior memory slots with the highest similarity are retained to form a subset of clinically relevant memory slots, and the remaining medical prior memory slots are masked. The similarity of the clinically relevant memory slot subset is normalized, and the corresponding value vectors are weighted and summed based on the normalized similarity to form static prior response features.

7. The method for generating radiological reports according to claim 1, characterized in that, The spatial anatomical location binding includes: projecting the fused visual features onto a low-dimensional continuous prior space and binding them element-by-element to a preset discrete orthogonal location basis matrix to inject anatomical location coordinates into the visual grid; the static prior response features and the bound geometric features are weighted and fused according to the spatial prior adjustment coefficient.

8. The method for generating radiological reports according to claim 1, characterized in that, The dynamic disease prototype memory matrix includes multiple disease writing prototype vectors; Retrieving disease consensus prototypes from the dynamic disease prototype memory matrix based on the current decoded text state includes: using the current decoded text state as the query vector, calculating the similarity with the written prototype vectors of each disease, and obtaining the disease consensus prototypes through Top-K disease prototype selection.

9. The method for generating radiological reports according to claim 1, characterized in that, The fusion is a weighted fusion performed within the logarithmic vocabulary score space; During the training phase, cross-entropy loss is used to constrain the consistency between the final word probability distribution and the true report word sequence. During the inference phase, bundle search is used to maintain the candidate report sequence with the highest cumulative likelihood until a terminator is generated or the maximum length is reached.

10. A radiology report generation system based on cross-perspective spatial alignment and prototype-guided semantic memory, characterized in that, include: Multi-view image feature extraction module: acquires multi-view radiographic images of the same examination object, extracts local features from the frontal view, local features from the lateral view, global features from the frontal view, and global features from the lateral view, and fuses the global features from the frontal view and the global features from the lateral view into a global feature vector; Cross-view spatial alignment module: Using orthogonal local features as fixed reference features and lateral local features as motion features to be aligned, a spatial deformation flow for correcting lateral local features is obtained through cross-view multi-head attention. The lateral local features are corrected based on the spatial deformation flow, and the corrected lateral local features are fused with orthogonal local features to obtain aligned and fused local features. The global feature vector and the aligned and fused local features are then fused into fused visual features. Global Medical Prior Memory Retrieval Module: Constructs a globally shared static medical prior memory matrix, maps the fused visual features and the static medical prior memory matrix to a multi-head subspace, calculates the similarity between the visual position and the medical prior memory slot, filters a subset of clinically relevant memory slots from the medical prior memory slots based on the similarity, and aggregates the subset to obtain static prior response features; The prototype-guided semantic memory module performs random projection and spatial anatomical location binding on the aligned joint visual representation, and fuses it with the static prior response features to form a global visual context; the input real report text is processed through word embedding and deep semantic interaction by a Transformer encoder / decoder to obtain the text context; based on the current decoded text state, the disease consensus prototype is retrieved from the dynamic disease prototype memory matrix, and the disease consensus prototype, text context, and global visual context are mapped to clinical intervention vocabulary scores through cascade binding; Dual-intervention decoding and report generation module: During the training phase, the model is optimized for maximum likelihood based on real radiological report sequences; During the inference phase, the original vocabulary score output by the main decoder used to generate the radiological diagnostic report is fused with the clinical intervention vocabulary score according to the preset intervention weights to obtain the final word probability distribution, and the radiological diagnostic report is generated by candidate path search.