A detection system and method suitable for chest ct images

By introducing causal-inspired bi-branch feature screening attention and uncertainty prediction branches into the chest CT detection model, the problem of insufficient causal modeling in existing models is solved, improving the accuracy and interpretability of pulmonary aspergillosis diagnosis, and making it suitable for primary healthcare and auxiliary detection scenarios.

CN123182985APending Publication Date: 2026-11-27ANHUI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611688157.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing chest CT detection models lack causal modeling capabilities in the diagnosis of pulmonary aspergillosis, are susceptible to interference from non-causal features, suffer from insufficient handling of noisy samples, have limited interpretability, and lack refined training strategies, resulting in insufficient model generalization ability.

Method used

The MedViT-CA network is adopted, embedding a causal-inspired dual-branch feature selection attention module. Features are adaptively selected through counterfactual suppression and causal enhancement weights. The loss contribution is dynamically adjusted by combining uncertainty prediction branch and heteroscedastic uncertainty weighted loss, and a differentiated learning rate strategy is used to optimize the model.

Benefits of technology

It improves the causal constraint capability of the model, reduces interference from non-causal features, enhances the generalization ability and interpretability of the model, and realizes an integrated auxiliary detection process of automatic detection, interpretable analysis and intelligent text interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182985A_ABST
    Figure CN123182985A_ABST
Patent Text Reader

Abstract

The application discloses a kind of detection system and method suitable for chest CT image, system applies the chest CT detection model of well-trained lung aspergillosis to carry out detection;Wherein, chest CT detection model includes MedViT-CA network, the classification head connected with MedViT-CA network output end, uncertainty prediction branch;MedViT-CA network takes MedViTV2 network as backbone network, embeds cause and effect inspired double-branch feature screening attention module in local feature perception module, global feature perception module: by two parallel learnable convolution subnetworks, respectively generate counterfactual suppression weight and causal enhancement weight, carry out pseudo-true self-adaptive screening to the input chest CT image, after feature fusion and residual connection, obtain the refined feature after cause and effect inspiration;Classification head is used to obtain classification result according to refined feature;Uncertainty prediction branch is used to obtain sample level uncertainty parameter according to refined feature.The application can improve the accuracy and discrimination ability of chest CT image automatic detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent medical image analysis technology, specifically to a detection system and method applicable to chest CT images. Background Technology

[0002] Pulmonary aspergillosis is a serious fungal disease of the lungs caused by Aspergillus infection. It is common in immunocompromised or severely ill patients and is characterized by high mortality, rapid progression, and complex imaging manifestations. Clinically, chest CT imaging is one of the important bases for the diagnosis of pulmonary aspergillosis. However, its imaging manifestations are highly similar to those of other infectious diseases (such as psittacosis and bacterial pneumonia), which brings considerable difficulties to clinicians in differential diagnosis.

[0003] In recent years, deep learning technology has been widely applied in the field of medical image analysis. Some studies have attempted to use convolutional neural networks or Transformer structures to automatically classify and diagnose lung CT images, for example: Wei J. et al.'s paper, "Deep Learning Model for Diagnosing and Classifying Subtypes of Chronic Pulmonary Aspergillosis in Chest CT," uses a deep learning model to classify CT images of pulmonary aspergillosis, improving automated diagnostic capabilities. Zhang H. et al.'s paper, "Deep learning for invasive pulmonary aspergillosis diagnosis on CT," uses a deep neural network to achieve image recognition of invasive pulmonary aspergillosis. Dosovitskiy A. et al.'s paper, "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale," proposes the Vision Transformer, providing a new approach to global feature modeling in medical images. Although the above technologies have improved the automated diagnostic capabilities of CT images of pulmonary aspergillosis to some extent, they still generally have the following shortcomings: 1. Lack of causal modeling ability: Existing models mostly rely on statistical correlation for feature learning, which is easily affected by non-causal features or data bias, resulting in insufficient model generalization ability.

[0004] 2. Insufficient handling of noisy samples and uncertainties: Medical image data often have problems such as annotation errors and differences in imaging quality. Existing models usually use fixed loss functions, which makes it difficult to effectively distinguish samples with high uncertainty.

[0005] 3. Limited interpretability: Although methods such as Grad-CAM are introduced, the model itself does not constrain its focus on causal regions related to lesions at the structural level, resulting in insufficient stability and consistency in the interpretation results.

[0006] 4. Insufficiently refined training strategies: Most methods use the same learning rate for pre-training parameters and new modules, which may lead to low model convergence efficiency or unstable performance.

[0007] The invention patent with application publication number CN116167982A discloses a method for analyzing the benign and malignant nature of pulmonary nodules based on a multi-task Dense-Trans model. The causal relationship in this patent is established on manually labeled semantic attribute tags—by regressing the scores of eight attributes and jointly modeling with the classification results to explore causal relationships. This is an attribute-driven causal reasoning method, which presupposes the existence of a standardized attribute labeling system. However, CT images of pulmonary aspergillosis lack such a standardized attribute labeling system; the semantic labeling of its image manifestations (halo sign, cavitation, nodules, consolidation, etc.) relies on subjective judgment, resulting in low labeling consistency. The invention patent with application publication number CN121280392A discloses a method, device, processor, and readable storage medium for multi-scale feature enhancement medical image diagnosis based on causal inference. This patent's solution belongs to feature-interventional causal learning—by applying perturbations to the input image to construct counterfactual samples, and learning causal invariant features based on bi-branch consistency constraints, forcing the model to learn those causal invariant features unaffected by the perturbations. Its core drawbacks are: (1) additional intervention samples need to be generated, significantly increasing the computational overhead of training and inference; (2) perturbation of images may destroy key features of the lesion itself (such as small halo signs and thin-walled cavities in the early stage of pulmonary aspergillosis) and introduce new noise. Summary of the Invention

[0008] The technical problem to be solved by this invention is: how to introduce a causal constraint mechanism into a chest CT detection model to reduce interference from non-causal features and improve the model's generalization ability.

[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A detection system applicable to chest CT images, which uses a trained chest CT detection model to detect pulmonary aspergillosis; The chest CT detection model includes a MedViT-CA network, a classification head connected to the output of the MedViT-CA network, and an uncertainty prediction branch. The MedViT-CA network uses the MedViTV2 network as its backbone network and embeds a causal-inspired dual-branch feature filtering attention module into its local feature perception module and global feature perception module. Through two parallel learnable convolutional sub-networks, counterfactual suppression weights and causal enhancement weights are generated respectively. For the input chest CT image, adaptive filtering is performed based on the image features themselves to remove falsehoods. After feature fusion and residual connection, the refined features after causal inspiration are obtained. The classification head is used to obtain classification results based on refined features; The uncertainty prediction branch is used to obtain sample-level uncertainty parameters based on refined features; Specifically, the standard deviation of the sample level is obtained by exponential transformation of the uncertainty parameter at this level. Based on the standard deviation of the sample level, the loss contribution of each sample is dynamically adjusted by the weighted loss of heteroscedastic uncertainty during the training phase of the chest CT detection model.

[0010] Furthermore, the MedViT-CA network architecture is set up in multiple stages. By setting up progressive downsampling and progressively increasing the number of channels, it is used to extract multi-scale image features from chest CT images in layers. Specifically, a local feature perception module is set in the first stage, a global feature perception module is set in the final stage, and alternating local feature perception modules and global feature perception modules are set in the intermediate stages.

[0011] Furthermore, the two parallel learnable convolutional subnetworks include a counterfactual suppression branch and a causal enhancement branch; The counterfactual suppression branch is used to obtain counterfactual features corresponding to chest CT images. ; ; The causal enhancement branch is used to obtain the causal enhancement features corresponding to chest CT images: ; ; In the formula, , These are the corresponding spatial-channel inhibition weights in the two branches. , These are the corresponding branches. Activation function , These are 1×1 convolutions located in the inner layer of the two branches, respectively. , These are 1×1 convolutions in the outermost layer of the two branches, respectively. , These are the activation functions in the two branches, respectively. , Normalization, Given the input feature map, As a counterfactual feature, For element-wise multiplication, This is a causal reinforcement feature; among which, the two branches are the counterfactual inhibition branch and the causal reinforcement branch.

[0012] Furthermore, refined characteristics derived from causal inspiration include: Counterfactual features and causal enhancement features are concatenated along the channel dimension, and information is integrated through fusion convolution to obtain fused features: ; Finally, refined features are obtained through residual connections: ; In the formula, As a feature of fusion, As a refined feature, For channel-dimensional splicing, For 1×1 convolution, For normalization, This is the activation function.

[0013] Furthermore, the global feature perception module incorporates a causal mask. The causal mask is generated as follows: the chest CT image is cropped to obtain a coarsely filtered lung field region; this region is downsampled to have the same resolution as the feature map in the final stage of the MedViT-CA network, and then converted into a patch-level binary mask. Patches belonging to the lung field region are allowed to establish connections during attention calculation and are assigned a value of 0; patches not belonging to the lung field region are assigned a value of 0 at their corresponding positions. .

[0014] Furthermore, the classification head, used to obtain classification results based on refined features, includes: The refined features are mapped to two-dimensional feature vectors through a fully connected layer, and then... The activation function normalizes a two-dimensional feature vector into a probability distribution for two categories: a judgment of whether it is pulmonary aspergillosis and the corresponding probability value; The uncertainty prediction branch is used to obtain sample-level uncertainty parameters based on refined features, including: The refined features are mapped to a single scalar value through a fully connected layer. The scalar value is represented as the logarithmic variance and used as a sample-level uncertainty parameter to quantify the confidence level of whether the diagnosis is pulmonary aspergillosis.

[0015] Furthermore, the loss contribution of each sample is dynamically adjusted using the heteroscedasticity uncertainty-weighted loss as follows: ; In the formula, For the total loss function, The sample-level standard deviation of the prediction. For sample-level uncertainty parameters, For dynamic loss weights, For standard cross-entropy loss, The diagnostic results correspond to the actual chest CT images. To predict the classification probability of pulmonary aspergillosis, For regularization terms, This is the balance coefficient.

[0016] Furthermore, during the training phase, a differentiated learning rate strategy is used to optimize the MedViT-CA network, the classification head, and the uncertainty prediction branch in a hierarchical manner. Among them, the backbone parameters of the MedViT-CA network, excluding the dual-branch feature filtering attention module, are fine-tuned using the first learning rate; A second learning rate is used for the dual-branch feature selection attention module, classification head, and uncertainty prediction branch to accelerate the adaptation speed for detection tasks.

[0017] Furthermore, the system includes a Grad-CAM visualization module and a language model semantic interpretation module, which are integrated with the trained chest CT detection model to form an integrated auxiliary detection system; among them, the Grad-CAM visualization module uses the Grad-CAM algorithm to generate corresponding heat maps from refined features for visualization; A structured prompting framework is set up to transform classification results, sample-level uncertainty parameters, and heatmaps into a standardized input format that the language model semantic interpretation module can understand and analyze. The language model semantic interpretation module then generates structured medical interpretation reports for clinical use.

[0018] The present invention also provides a detection method applicable to chest CT images, including acquiring chest CT images as input to a chest CT detection model, and outputting classification results and sample-level uncertainty parameters.

[0019] Compared with the prior art, the beneficial effects of the present invention are: This invention proposes a feature-based causal heuristic scheme: through a learnable dual-branch convolutional sub-network (counterfactual suppression branch and causal enhancement branch), channel-spatial attention weights are adaptively generated from the features themselves to perform end-to-end filtering of feature maps to "remove falsehoods and retain truth." This scheme requires no attribute annotation or the construction of intervention samples, and belongs to a completely data-driven feature-level causal heuristic mechanism.

[0020] A three-tiered collaborative system of causal constraints, uncertainty modeling, and differential learning rate: The dual-branch feature screening attention mechanism suppresses background pseudo-correlated features, but may also suppress some features of weak lesions at the edge of the lung field → uncertainty modeling compensates for this by dynamically reducing the weight of difficult cases; Feature selection and attention pre-filtering of noise → reduce the learning difficulty of uncertain branches, improving... Focusing on noise and heterogeneity associated with lesions; Differential learning rate coordinates the optimization pace of pre-trained backbone and newly added modules → ensuring that the pre-trained backbone network is not significantly disturbed, and enabling the parameters of the dual-branch feature selection attention module and the uncertainty branch to converge fully.

[0021] This invention realizes an integrated auxiliary detection process of "automatic detection + interpretable analysis + intelligent text interpretation"; it has good engineering feasibility and clinical application potential, and is suitable for primary healthcare and auxiliary detection scenarios. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the architecture of the MedViT-CA network in an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the classification results and sample-level uncertainty parameters obtained after inputting a chest CT image into a chest CT detection model in an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the classification results and sample-level uncertainty parameters obtained after inputting another chest CT image into the chest CT detection model in an embodiment of the present invention.

[0025] Figure 4 This is a schematic diagram of the pulmonary aspergillosis detection results in an embodiment of the present invention.

[0026] Figure 5 These are schematic diagrams of LLM interpretation reports in embodiments of the present invention. Detailed Implementation

[0027] To facilitate understanding of the technical solution of the present invention by those skilled in the art, the technical solution of the present invention will now be further described in conjunction with the accompanying drawings.

[0028] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0029] Please see Figure 1As shown, this invention provides a detection system applicable to chest CT images, which uses a trained chest CT detection model to detect pulmonary aspergillosis. The chest CT detection model includes a MedViT-CA network, a classification head connected to the output of the MedViT-CA network, and an uncertainty prediction branch.

[0030] The MedViT-CA network uses the MedViTV2 network as its backbone, embedding a causal-inspired dual-branch feature filtering attention module into its local and global feature perception modules. Through two parallel learnable convolutional sub-networks, counterfactual suppression weights and causal enhancement weights are generated respectively, adaptively filtering the input chest CT images to remove artifacts. After feature fusion and residual connections, refined causal-inspired features are obtained. A classification head is used to obtain classification results based on the refined features. An uncertainty prediction branch is used to obtain sample-level uncertainty parameters based on the refined features.

[0031] In one embodiment of the present invention, MedViTV2, a medical imaging backbone network, is used as the basic architecture. The attention calculation logic of its Local Feature Perception (LFP) and Global Feature Perception (GFP) modules is modified with causal constraints, and the original classification head is replaced with a causal-guided classification head (prototype learning classification head). Simultaneously, an uncertainty prediction branch is added, forming an improved network adapted to chest CT image classification tasks—MedViT-CA (Causality-ConstrainedMsdViT). It should be noted that the prototype learning classification head incorporates the classic idea of ​​prototype learning (a classic classification approach in machine learning) into its design and is guided and constrained by prior causal attention; therefore, it is described as a "causal-guided prototype learning classification head."

[0032] In one embodiment of the present invention, input preprocessing and channel standardization are implemented: Addressing the practical problems of diverse sources and inconsistent original channel numbers in medical CT images (single grayscale channel, three RGB channels, four RGBA channels, etc.), the following unified preprocessing workflow is adopted: Size normalization: cropped to the lung field area and scaled to 224×224; during the testing phase, Resize(224, 224) was used to directly scale to a fixed size.

[0033] Channel unification: The "unify_to_3_channels()" function automatically adapts to all channel formats. "unify_to_3_channels()" is an image preprocessing function commonly used in medical imaging (especially pathological slides) or remote sensing image processing, designed to uniformly convert any input image into a standard 3-channel format.

[0034] Numerical normalization: Standardization was performed using ImageNet pre-training statistics (mean [0.485, 0.456, 0.406], standard deviation [0.229, 0.224, 0.225]) to ensure consistency with the feature distribution of the pre-trained backbone network. ImageNet is a classic, ultra-large-scale natural image dataset in computer vision; most visual models are pre-trained on ImageNet to learn common visual features (edges, textures, shapes, and other basic visual patterns). Its mean and variance are statistically derived benchmarks for pixel numerical distribution.

[0035] Data augmentation (training set only): Random horizontal flipping + AugMix hybrid augmentation improves the model's robustness to changes in imaging conditions. For example, chest CT images are horizontally mirrored with a 40% probability. The AugMix method is used to randomly combine various image transformations, including rotation, translation, color jitter, contrast adjustment, and saturation adjustment.

[0036] After the above preprocessing, the original chest CT images of any format are unified into a standard three-channel tensor of 224×224×3, which can be directly input into the MedViT-CA network.

[0037] In one embodiment of the invention, the MedViT-CA network architecture is configured in multiple stages. Through progressive downsampling and progressively increasing channel count, it extracts multi-scale image features from chest CT images. Specifically, a local feature perception module is included in the first stage, a global feature perception module is included in the final stage, and alternating local and global feature perception modules are used in the intermediate stages. See Table 1 for details. Table 1. Hierarchical structure of the MedViT-CA network

[0038] Specifically, the Stem stage is the initial convolution downsampling. The first stage, Stage 1, sets up two local feature perception modules. The intermediate stages include Stage 2 and Stage 3. In Stage 2, one local feature perception module and one global feature perception module are alternately set up, connected by PatchEmbedding. Stage 3 uses "two local feature perception modules + one global feature perception module" as a basic unit, repeating two sets of alternating stacking patterns. The specific arrangement is: local feature perception module → local feature perception module → global feature perception module → local feature perception module → local feature perception module → global feature perception module, totaling four local feature perception modules and two global feature perception modules. The final stage, Stage 4, sets up two global feature perception modules.

[0039] Patch Embedding, or patch embedding, is a transformation step that connects local and global features in convolution. Its function is to divide the two-dimensional feature map output by the local feature perception module into multiple image patches of fixed size, and then map them into a one-dimensional feature vector sequence (Token sequence) through linear projection. This adapts the input format requirements of the Transformer self-attention in the subsequent global feature perception module. In the attached diagram, Patch Embedding is located in each stage (Stage 2 / 3 / 4) containing the global feature perception module, before the global feature perception module, serving as a transition layer for the transformation from local to global features.

[0040] In this embodiment, aspergillosis-related CT abnormalities are typically manifested primarily in the lung region. In lung CT classification tasks, the lung field can be used as the primary discriminative information region, and feature interactions with background locations outside the lung field can be restricted. Therefore, the lung field can be considered a stable anatomical prior. Based on this prior, the information propagation path of attention can be explicitly constrained, allowing the model to establish long-range dependencies only within the lung parenchyma, thereby cutting off spurious correlations introduced by the background region at the source.

[0041] To incorporate the aforementioned causal priors into the model, this invention designs a causal attention mechanism in the global feature perception module. This mechanism introduces a causal mask matrix M on top of the standard multi-head self-attention mechanism, thus forming a causal attention mechanism. Its mathematical expression is: ; In the formula, For attention matrix, For normalized exponential functions, For query, As key, For value, For feature dimension, For matrix transpose, This is a causal mask matrix.

[0042] The causal mask matrix M is defined as follows: ; In the formula, This is the causal mask matrix at pixel position (i, j). Mask generation method: The chest CT image is cropped to obtain the coarsely filtered lung field region; the coarsely filtered lung field region is downsampled to have the same resolution as the feature map in the final stage of the MedViT-CA network, and then converted into a patch-level binary mask; Patches belonging to the lung field region are allowed to establish connections during attention calculation and are assigned a value of 0; Patches not belonging to the lung field region (background, scan bed, text markers, etc.) are assigned a value at their corresponding positions. After softmax, the weights approach 0. In the specified global feature interaction layer, the degree to which restricted positions participate in attention weight calculation as key positions is reduced or canceled, thereby reducing the interference of background information outside the lung field on the aggregation of lesion features within the lung field.

[0043] Causal-inspired limited attention mechanisms; In one embodiment of the present invention, the standard Transformer self-attention mechanism essentially assigns aggregation weights based on the similarity between the Query and the Key. Its learning objective comes entirely from the statistical co-occurrence relationships in the training data, rather than the true causal mechanism of disease occurrence. In lung CT image classification tasks, background areas such as the scan bed, in vitro markers, and extrapulmonary tissues may statistically co-occur with specific disease labels in the training set, making the model prone to forming an attention distribution based on spurious correlations. Furthermore, even if the attention calculation is correctly focused on the lung field region, the model may still learn texture patterns within the lung field that are not causally related to the disease (such as normal vascular textures, bronchial walls, etc.), affecting the reliability of detection.

[0044] Therefore, from the perspective of causal inference, classification tasks contain both causal features that are causally related to the disease (such as lesion manifestations like halo signs, cavitation, and consolidation) and confounding features that are statistically related to disease labels but have no causal relationship (such as scan bed texture, lung field markers, and normal anatomical structures). This invention draws on the core idea of ​​"removing false evidence and focusing on causal relationships" in causal learning, proposing a causal-inspired dual-branch feature selection attention mechanism. This method is not a strictly causal inference method (such as do-calculus or counterfactual reasoning), but rather uses two parallel learnable convolutional sub-networks to adaptively generate counterfactual suppression weights and causal enhancement weights from the features themselves, respectively, performing a soft screening of information at the feature level to "remove false evidence and retain the truth."

[0045] In this embodiment, the causal-inspired dual-branch feature filtering attention module is embedded as a residual branch in the local feature perception module and the global feature perception module. After the standard attention calculation is completed, the features are refined. Its structure is as follows.

[0046] The counterfactual suppression branch is used to obtain counterfactual features corresponding to chest CT images: the counterfactual suppression branch consists of a lightweight convolutional subnetwork, which extracts features from the input feature map. Generative space - channel suppression weights: ; Counterfactual features are obtained through suppression operations: In the formula Counterfactual features, element-wise product Right now The larger the value, the stronger the suppression.

[0047] The causal enhancement branch is used to obtain causal enhancement features corresponding to chest CT images. The causal enhancement branch has the same structure as the counterfactual suppression branch but its parameters are independent. ; Causal augmentation features are obtained through augmentation operations: ,Right now Positions with larger values ​​are more strongly preserved and enhanced.

[0048] in, , These are the corresponding spatial-channel inhibition weights in the two branches. , These are the corresponding branches. Activation function , These are 1×1 convolutions located in the inner layer of the two branches, respectively. , These are 1×1 convolutions in the outermost layer of the two branches, respectively. , These are the activation functions in the two branches, , Normalization, As a counterfactual feature, As a causal enhancement feature, For element-wise multiplication, The input is a feature map, i.e., a chest CT image. For real numbers, For batch dimension, For the channel, For height dimension, The width dimension is used. The inner 1×1 convolution compresses the number of channels to... The outer 1×1 convolution is restored to Channel. Specifically, This is the channel reduction ratio, which defaults to 8.

[0049] The suppressed and enhanced features are concatenated along the channel dimension, and the information is integrated through fusion convolution: ; As a feature of fusion, This is a concatenation based on channel dimensions; the number of channels after concatenation is... After 1×1 convolution, it is restored to aisle. For 1×1 convolution, For normalization, This is the activation function.

[0050] The final output is obtained through residual connection: ; It is characterized by its refined nature.

[0051] In one embodiment of the present invention, the dual-branch feature filtering attention module is simultaneously embedded in: Local feature perception module: Added as a residual after dilated neighborhood attention and KAN feedforward network.

[0052] Global Feature Awareness Module: Added as a residual after the multi-head self-attention and KAN feedforward network.

[0053] The dual-branch feature screening attention module is effective in all Stages (1-4) of LFP and GFP modules, enabling layer-by-layer causal screening of multi-scale features.

[0054] Heteroscedasticity uncertainty modeling module; In one embodiment of the present invention, medical imaging data commonly suffers from the following sources of noise: (1) annotation noise—doctors with different seniority may have inconsistent diagnostic opinions on the same CT image; (2) imaging noise—different CT equipment, scanning parameters, and reconstruction algorithms lead to significant differences in image quality; (3) lesion heterogeneity—pulmonary aspergillosis presents with diverse imaging manifestations (halo sign, cavitation, consolidation, nodules, etc.), and it is difficult to distinguish atypical lesions. Traditional fixed-weight loss functions (such as standard cross-entropy) treat all samples equally, and noisy samples can mislead the direction of model parameter updates, reducing the model's generalization ability on the test set.

[0055] The mainstream solutions for robust medical image noise (label smoothing, Focal Loss, sample reweighting) are all static weighting based on pre-defined rules. Focal Loss distinguishes between easy and difficult samples based on prediction confidence, but difficult samples ≠ noisy samples (atypical lesions are difficult samples but should not be downweighted). Manually pre-defined sample weights rely on prior experience and cannot adapt to the noise distribution of different datasets.

[0056] This invention employs heteroscedasticity uncertainty modeling, which is a data-driven dynamic weighting method. It does not require manual pre-setting of weight rules and learns the inherent noise level of each sample from end to end. It can simultaneously adapt to various noise scenarios such as annotation errors, poor imaging quality, and atypical lesions.

[0057] In this embodiment, the classification head and the uncertainty prediction branch share a 512-dimensional high-level semantic feature vector obtained through global average pooling (refined features are obtained through global average pooling): Classification Header: Fully Connected Layer (512→2) + Activation → Output binary classification probability; that is, mapping the refined features to a two-dimensional feature vector through a fully connected layer, and then... The activation function normalizes a two-dimensional feature vector into a probability distribution for two categories: a judgment of whether it is pulmonary aspergillosis and the corresponding probability value.

[0058] Uncertainty prediction branch: Fully connected layer (512→1), outputs a single scalar value. (Log-variance); The refined features are mapped to a single scalar value through a fully connected layer. This value represents the log-variance and serves as a sample-level uncertainty parameter to quantify the confidence level of the diagnosis of pulmonary aspergillosis.

[0059] This invention models sample-level uncertainty, rather than pixel-level or region-level uncertainty. The 512-dimensional feature vector after global average pooling integrates high-level semantic information such as the distribution and structural morphology of lesions throughout the lung, and can stably reflect the prediction reliability of the entire sample. If uncertainty is predicted based on shallow feature maps of Stage 2 or Stage 3, the output is easily affected by short-term fluctuations caused by factors such as local texture, imaging noise, and edge artifacts, and cannot represent the overall uncertainty level of the sample.

[0060] In this embodiment, during the training phase, the chest CT detection model dynamically adjusts the loss contribution of each sample using a weighted loss based on heteroscedasticity uncertainty. The total loss function consists of a classification loss term and an uncertainty regularization term. ; In the formula, For the total loss function, The sample-level standard deviation of the prediction is the log-variance output by the uncertainty branch. Obtained through exponential transformation, For sample-level uncertainty parameters, For dynamic loss weights, when When the uncertainty is large (high), the weight is reduced, automatically decreasing the contribution of that sample to the gradient; when When the confidence level is low (high confidence), the weights are increased, and the model focuses on learning from reliable samples. The standard cross-entropy loss measures the difference between the classification prediction and the true label. The diagnostic results correspond to the actual chest CT images. To predict the classification probability of pulmonary aspergillosis, As a regularization term, to prevent Infinitely increasing the value leads to a degenerate solution into a meaningless one. The balance coefficient controls the balance between "noise robustness" and "difficult example learning ability". If the regularization constraint is too small, the model is prone to degradation. (infinitely large) If the value is too large, the uncertainty weighting effect will be suppressed, and the interference of noisy samples cannot be effectively reduced. In this embodiment, the value is set to 0.5. is an exponential function, and log is a logarithmic function.

[0061] Differential learning rate training strategy; In one embodiment of the present invention, the backbone network used in the present invention has been pre-trained on multiple large-scale medical image datasets, and its convolutional layer and attention layer parameters have learned general medical image feature representations. The newly added dual-branch feature filtering attention module, classification head, and uncertainty prediction branch need to be quickly adapted for the specific task of pulmonary aspergillosis. If a uniform learning rate is used for training, the following contradictions will be faced: Large learning rate: The pre-trained general medical features are over-updated and destroyed, and the constraints of causal masking will cause the model to overfit the lung field features of the training set, resulting in a significant decrease in cross-center generalization ability. Small learning rate: The classification head and uncertainty prediction branch converge too slowly, making it impossible to work with the causal mask in the early stages of training, resulting in the failure of multi-module joint optimization.

[0062] This invention employs a differentiated learning rate strategy for hierarchical optimization of the MedViT-CA network, the classification head, and the uncertainty prediction branch.

[0063] The backbone parameters of the MedViT-CA network, excluding the dual-branch feature filtering attention module, are fine-tuned using a first learning rate. The first learning rate... To minimize the learning rate and maintain the stability of learned general medical features, only minor adjustments are made. .

[0064] A second learning rate is applied to the dual-branch feature selection attention module, causal mask, classification head, and uncertainty prediction branch to accelerate adaptation to detection tasks. Second learning rate To maximize learning rates and accelerate adaptation to tasks related to pulmonary aspergillosis. Specifically: .

[0065] The parameter update formula is: ;in, For the first The layer in the first The parameters for the next iteration for Updated parameters For the first Learning rate of layer For loss function, For gradient, For the first The set of learnable parameters for a multilayer network, including convolutional kernel weights, fully connected layer weights, bias terms, etc. This is the partial derivative. It is usually set as: < .

[0066] In this embodiment, the differential learning rate is not a simple parameter tuning technique, but a necessary training condition to ensure the synergistic effect of "causal constraints + loss adjustment", as detailed below: 1. The effectiveness of causal masks depends on stable pre-trained features: If the pre-trained backbone parameters are over-updated with a large learning rate, the drastic changes in the distribution of low-level features will cause the constraints of high-level causal masks to lose their stable semantic basis, and the effectiveness of the masks will be greatly reduced.

[0067] 2. Uncertainty branch needs to keep up with the constraint effect of causal mask: Causal mask filters out a lot of background noise in advance. If uncertainty branch converges too slowly, it cannot dynamically weight the remaining signal noise in time, which will amplify the negative impact of noise samples in the early stage of training.

[0068] 3. The roles of the two must be precisely matched: ablation experiments (model D vs model G) demonstrate that even if causal attention and uncertainty loss coexist, the model performance is almost on par with the baseline (ACC 83.3% vs 83.3%) if differential learning rate is lacking, indicating that multi-module collaborative optimization requires differential learning rate as a training guarantee.

[0069] Ablation experiment verification and effect analysis; In this embodiment, the experimental setup is shown in Table 2.

[0070] Table 2 Ablation Experiment Setup

[0071] It should be noted that Epochs refers to the number of training rounds, Batch Size refers to the batch size, which is the number of samples used by the model for each parameter update (one gradient descent iteration), Optimizer refers to the optimizer, AdamW is an optimizer algorithm, LR is the learning rate, and the newly added modules are a two-branch feature selection attention module, a causal mask, a classification head, and an uncertainty prediction branch. The ablation experiment results are shown in Table 3.

[0072] Table 3 Ablation Experiment Results

[0073] The results are analyzed as follows: (1) Uncertainty loss is the core performance driving module model A → model C: only uncertainty loss is introduced ( =0.5), ACC improved from 83.3% to 85.0% (+1.7%), and AUC improved from 86.7% to 88.3% (+1.6%). This shows that sample-level dynamic weighting can effectively reduce the misleading effect of noisy samples on model parameters and is the core driver of performance improvement.

[0074] (2) The limited attention of causal heuristics needs to work in conjunction with other modules to be effective. Model A → Model B: Introducing only causal attention + differential learning rate actually reduces performance (ACC 81.7%, AUC 82.2%). Introducing causal mask alone will forcibly cut off all background information, and at the same time lose the edge context information of weak lesions such as subpleural lesions and atypical infiltrates at the edge of the lung field, resulting in a decrease in the performance of difficult-to-classify samples. Model C → Model G: Introducing causal attention + differential learning rate on the basis of uncertainty loss, ACC remains the same (85.0%), and AUC further improves by 0.3% (88.3% → 88.6%). Causal mask pre-filters a large number of background pseudo-correlation features, reduces the learning difficulty of uncertainty branches, and allows The value focuses more on the noise and heterogeneity of the lesion itself; while the dynamic downweighting of difficult cases at the lung field edge by uncertainty modeling compensates for the suppression of edge information by causal masking, and the two complement each other.

[0075] (3) Differential learning rate is a necessary training guarantee for the synergistic effect of multiple modules. Model D → Model G: Both include causal attention and uncertainty loss, the only difference being whether differential learning rate is used. After adding differential learning rate, ACC increased from 83.3% to 85.0% (+1.7%), and AUC increased from 86.9% to 88.6% (+1.7%). This result shows that, under the reported experimental configuration, differential learning rate improves the joint training effect when causal constraints and loss adjustment coexist; slow convergence of new modules under uniform learning rate (small LR) or destruction of pre-trained features (large LR) may affect the synergistic effect of multiple modules.

[0076] (4) Parameters have a significant impact on performance. The optimal performance is achieved when the value is 0.5. When the regularity is 0.2, the regularization constraint is insufficient, resulting in... Risk of degradation; At a value of 0.8, the uncertainty weighting effect is excessively suppressed, failing to effectively reduce noise. Ablation experiments fully validated this. The rationality and necessity of 0.5.

[0077] Experimental Conclusions: The proposed three-layer synergistic scheme of causal heuristic restricted attention, heteroscedastic uncertainty modeling, and differential learning rate improves the ACC by 1.7 percentage points and AUC by 1.9 percentage points compared to the baseline model. There are clear synergistic dependencies among the modules: causal attention requires the cooperation of uncertainty modeling to exert a positive effect, and the synergistic effect of the two requires training support from the differential learning rate. This synergistic mechanism cannot be achieved by simply piecing together techniques; its combination produces technical effects that improve performance without sacrificing generalization.

[0078] It should be noted that the core function of causal attention is usually to filter out non-causal spurious features, and its effect is reflected in interpretability and attention concentration. This functional effect is not applicable to the metrics ACC and AUC. Table 3 reflects the marginal contribution of each module to the single metric ACC. The AUC of models C to G increased from 88.3% to 88.6%, reflecting the improvement in discriminative ranking ability, which is consistent with the problem targeted by causal feature screening. Some of the technical effects of the dual-branch feature screening attention module are determined by the structure itself and do not depend on statistical metrics: causal constraints are implemented at the feature level, the training and inference structures are consistent, and there is no need to construct intervention sample pairing paths for causal consistency constraints, thereby avoiding perturbation of images containing early lesions such as small halos and thin-walled cavities at the input level. This effect will not be negated by the numerical fluctuation of ablation metrics.

[0079] Model C, which only includes uncertainty loss, may have a known side effect (such as overconservatism, decreased prediction coverage, and worsened recall for minority classes) due to its improved ACC (+1.7%). The introduction of causal attention (from Model C to D) corrects or suppresses this side effect while maintaining the same ACC. This demonstrates a functional mutual support between causality and uncertainty.

[0080] In one embodiment of the present invention, the system includes a Grad-CAM visualization module and a language model semantic interpretation module, which are integrated with a trained chest CT detection model to form an integrated auxiliary detection system.

[0081] Interpretable visualization based on Grad-CAM; Grad-CAM is a post-inference processing tool and does not participate in the training and updating of model parameters. It, together with the causal-inspired constrained attention mechanism, forms a two-layer interpretable system of training constraints and inference visualization. Causal-inspired constrained attention: It remains effective during both the training and inference phases, constraining the model to focus on lesion areas within the lung fields from the perspective of attention structure, and belongs to process-constrained interpretability; Grad-CAM generates heatmaps during the inference phase, mapping the model's decision-making basis for specific categories into spatial visualization, allowing clinicians to verify whether the model's focus area matches the lesion, thus belonging to the result-displaying interpretability category.

[0082] The two have different functional levels: the former constrains the feature interaction path from the source, while the latter is used to observe the model's decision-making basis after the constraints are applied.

[0083] Please see Figure 2 , 3 As shown in the lower half, in this embodiment, the Grad-CAM visualization module uses the Grad-CAM algorithm to generate corresponding heatmaps from refined features for visualization. The specific implementation process is as follows: S1, select the feature map (high semantic level, size 7×7) output by the last GFP module in Stage 4 as the target feature layer.

[0084] S2, calculate the gradient of the target category (pulmonary aspergillosis) output with respect to each spatial location in the feature map; S3, perform global average pooling on the gradient to obtain the importance weights of each feature channel. : ; In the formula, For target category The model predicts the output score, which is in this application. Corresponding to the category of pulmonary aspergillosis, For the first Spatial location in each feature channel Feature activation values ​​at the location, for, For the spatial location index of the feature map, For row index, The column index corresponds to each spatial unit in the feature map. This refers to the spatial width of the feature map, i.e., the number of columns in the feature map. This represents the spatial height of the feature map, i.e., the number of rows in the feature map.

[0085] S4, weighted summation of the feature maps of each channel, after... Activate and retain the positive contribution region: ; In the formula, For target category The corresponding Grad-CAM class activation heatmap, For the first Two-dimensional feature map of each channel.

[0086] S5 upsamples the 7×7 heatmap to 224×224 using bilinear interpolation and overlays it onto the original CT image to visualize the region of interest of the model.

[0087] Intelligent assisted interpretation module based on Large Language Model (LLM); Although the aforementioned causal-inspired limited attention mechanism constrains the scope of feature attention at the model structure level, and Grad-CAM heatmap maps the model's decision-making basis to spatial visualization, end users without medical imaging expertise (such as primary care physicians and junior resident physicians) still find it difficult to efficiently extract the key information needed for clinical decision-making from the raw output of category probability + heatmap.

[0088] Furthermore, unlike existing medical report generation schemes that use an end-to-end image-to-text generation approach, the LLM module in this system does not directly analyze CT images. Instead, it uses the predicted probabilities and uncertainty indicators output by the classification model. and Grad CAM spatial focus information is used as input to generate structured diagnostic reports. This design allows LLM to act as a clinical expert reviewing AI diagnoses, combining the quantitative advantages of models with the medical semantic understanding capabilities of LLM, while avoiding the illusionary risks of large multimodal models in medical image understanding.

[0089] In this embodiment, a structured prompting framework is set up to convert classification results, sample-level uncertainty parameters, and heatmaps into a standardized input format that the language model semantic interpretation module can understand and analyze. The language model semantic interpretation module then generates a structured medical interpretation report for clinical use.

[0090] A five-dimensional structured cue word template for chest CT image detection was designed to transform the model's raw output into a standardized input format that LLM can accurately understand and analyze. See Table 4 for details.

[0091] Table 4. Five-Dimensional Structured Cue Keyword Framework

[0092] Where τ1 and τ2 are the confidence thresholds, respectively. The overall category probability is the probability value corresponding to the judgment of whether or not it is pulmonary aspergillosis in the classification head.

[0093] In this embodiment, the integrated auxiliary detection system adopts a front-end and back-end separation architecture: Backend (Flask framework): Integrates chest CT detection model inference, Grad-CAM visualization module heatmap generation, and language model semantic interpretation module calls.

[0094] Frontend (Streamlit): Provides an interactive web interface that supports batch uploading of CT images, four-stage progressive feedback (upload → preprocessing → inference → interpretation), and a dynamic color coding system (three-level confidence level differentiation and differentiated color matching for positive and negative results).

[0095] This invention also provides a detection method applicable to chest CT images, comprising: acquiring chest CT images as input to a chest CT detection model, and simultaneously outputting classification results and sample-level uncertainty parameters. Specifically, a complete auxiliary detection interaction process is as follows: Long-term image upload: Users can upload one or more lung CT slices through the front-end interface.

[0096] Preprocessing: The uploaded images were cropped and their dimensions were normalized (224×224×3).

[0097] Model inference: The chest CT detection model simultaneously outputs the class probability distribution and sample-level uncertainty. For example... Figure 2 , 3 As shown.

[0098] Heatmap generation: The Grad-CAM algorithm generates an attention heatmap based on the output of the last GFP module in Stage 4, which is then overlaid onto the original CT image.

[0099] Cue word construction: Fill the five-dimensional cue word template (diagnostic conclusion, confidence assessment, imaging features, clinical advice, and precautions) with category probability, sample-level uncertainty, and spatial description of high-response areas in the heatmap.

[0100] LLM Interpretation and Generation: The LLM API is called, and the filled-in prompts are input into a large language model. A structured analysis report containing standardized medical terminology is generated within 5-15 seconds. For example... Figure 4 , 5 As shown.

[0101] Results presentation: The front end uses three levels of confidence to differentiate between positive and negative results, and displays diagnostic conclusions, heatmaps, and LLM interpretation reports with different color schemes.

[0102] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.

[0103] The above-described embodiments are merely examples of implementation methods of the invention. The scope of protection of the present invention is not limited to the above-described embodiments. For those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention.

Claims

1. A detection system applicable to chest CT images, characterized in that, A trained chest CT scan model was used to detect pulmonary aspergillosis. The chest CT detection model includes a MedViT-CA network, a classification head connected to the output of the MedViT-CA network, and an uncertainty prediction branch. The MedViT-CA network uses the MedViTV2 network as its backbone network and embeds a causal-inspired dual-branch feature filtering attention module into its local feature perception module and global feature perception module. Through two parallel learnable convolutional sub-networks, counterfactual suppression weights and causal enhancement weights are generated respectively. For the input chest CT image, adaptive filtering is performed based on the image features themselves to remove falsehoods. After feature fusion and residual connection, the refined features after causal inspiration are obtained. The classification head is used to obtain classification results based on refined features; The uncertainty prediction branch is used to obtain sample-level uncertainty parameters based on refined features; Specifically, the standard deviation of the sample level is obtained by exponential transformation of the uncertainty parameter at this level. Based on the standard deviation of the sample level, the loss contribution of each sample is dynamically adjusted by the weighted loss of heteroscedastic uncertainty during the training phase of the chest CT detection model.

2. The detection system applicable to chest CT images according to claim 1, characterized in that, The MedViT-CA network architecture is set up in multiple stages. By progressively downsampling and progressively increasing the number of channels, it is used to extract multi-scale image features from chest CT images. Specifically, the first stage sets up a local feature perception module, the last stage sets up a global feature perception module, and the intermediate stages set up alternating local and global feature perception modules.

3. The detection system applicable to chest CT images according to claim 1, characterized in that, The two parallel learnable convolutional subnetworks include a counterfactual suppression branch and a causal enhancement branch; The counterfactual suppression branch is used to obtain counterfactual features corresponding to chest CT images. ; ; The causal enhancement branch is used to obtain the causal enhancement features corresponding to chest CT images: ; ; In the formula, , These are the corresponding spatial-channel inhibition weights in the two branches. , These are the corresponding branches. Activation function , These are 1×1 convolutions located in the inner layer of the two branches, respectively. , These are 1×1 convolutions in the outermost layer of the two branches, respectively. , These are the activation functions in the two branches, , Normalization, Given the input feature map, As a counterfactual feature, For element-wise multiplication, This is a causal reinforcement feature; among which, the two branches are the counterfactual inhibition branch and the causal reinforcement branch.

4. The detection system applicable to chest CT images according to claim 3, characterized in that, Refined characteristics derived from causal heuristics include: Counterfactual features and causal enhancement features are concatenated along the channel dimension, and information is integrated through fusion convolution to obtain fused features: ; Finally, refined features are obtained through residual connections: ; In the formula, As a feature of fusion, As a refined feature, For channel-dimensional splicing, For 1×1 convolution, For normalization, This is the activation function.

5. The detection system applicable to chest CT images according to claim 2, characterized in that, The global feature perception module is equipped with a causal mask. The causal mask is generated as follows: the chest CT image is cropped to obtain the coarsely filtered lung field region; the coarsely filtered lung field region is downsampled to have the same resolution as the feature map in the final stage of the MedViT-CA network, and then converted into a patch-level binary mask. Patches belonging to lung field regions are allowed to establish connections during attention calculation and are assigned a value of 0. Patches not belonging to lung field regions are assigned a value at their corresponding positions. .

6. The detection system applicable to chest CT images according to claim 1, characterized in that, The classification head, used to obtain classification results based on refined features, includes: The refined features are mapped to two-dimensional feature vectors through a fully connected layer, and then... The activation function normalizes a two-dimensional feature vector into a probability distribution for two categories: a judgment of whether it is pulmonary aspergillosis and the corresponding probability value; The uncertainty prediction branch is used to obtain sample-level uncertainty parameters based on refined features, including: The refined features are mapped to a single scalar value through a fully connected layer. The scalar value is represented as the logarithmic variance and used as a sample-level uncertainty parameter to quantify the confidence level of whether the diagnosis is pulmonary aspergillosis.

7. The detection system applicable to chest CT images according to claim 1, characterized in that, The loss contribution of each sample is dynamically adjusted using the heteroscedastic uncertainty-weighted loss as follows: ; In the formula, For the total loss function, The sample-level standard deviation of the prediction. For sample-level uncertainty parameters, For dynamic loss weights, For standard cross-entropy loss, The diagnostic results correspond to the actual chest CT images. To predict the classification probability of pulmonary aspergillosis, For regularization terms, This is the balance coefficient.

8. The detection system applicable to chest CT images according to claim 1, characterized in that, During the training phase, a differentiated learning rate strategy was used for hierarchical optimization of the MedViT-CA network, the classification head, and the uncertainty prediction branch; among these... The backbone parameters of the MedViT-CA network, excluding the attention module for filtering bi-branch features, are fine-tuned using the first learning rate. A second learning rate is used for the dual-branch feature selection attention module, classification head, and uncertainty prediction branch to accelerate the adaptation speed for detection tasks.

9. The detection system applicable to chest CT images according to claim 1, characterized in that, The system includes a Grad-CAM visualization module and a language model semantic interpretation module, which are integrated with a trained chest CT detection model to form an integrated auxiliary detection system. Among them, the Grad-CAM visualization module uses the Grad-CAM algorithm to generate corresponding heat maps from refined features for visualization. A structured prompting framework is set up to transform classification results, sample-level uncertainty parameters, and heatmaps into a standardized input format that the language model semantic interpretation module can understand and analyze. The language model semantic interpretation module then generates structured medical interpretation reports for clinical use.

10. A detection method applicable to chest CT images, characterized in that, include: Acquire chest CT images as input to the chest CT detection model, and output classification results and sample-level uncertainty parameters.

Citation Information

Patent Citations

  • Pulmonary nodule benign and malignant analysis method based on multi-task Dense-Trans model

    CN116167982A

  • Method and device for realizing multi-scale feature enhanced medical image diagnosis based on causal inference, processor and readable storage medium thereof

    CN121280392A