Abstract
We propose a novel machine learning algorithm that assesses pulmonary edema severity from chest radiographs. While large datasets of radiographs and free-text reports exist, structured numerical labels for edema severity are scarce. To leverage the rich information in radiology reports, we developed a neural network model trained on both images and free-text to assess severity at inference time using only images. Our results demonstrate that joint image-text representation learning significantly improves performance compared to supervised models trained on images alone. We also demonstrate how text can explain image classification through multimodal attention.
Introduction: The Challenge of Edema Assessment
Pulmonary edema, characterized by excess fluid in the lungs, is a critical indicator for patients with acute congestive heart failure (CHF). In clinical settings, simply detecting the presence of edema is insufficient; clinicians require a quantitative assessment of severity to manage fluid status effectively.
However, developing automated tools for this task faces a significant "label scarcity" hurdle. While massive datasets like MIMIC-CXR provide hundreds of thousands of images, high-quality, expert-labeled severity scores (ranging from none to alveolar edema) are rare due to the high cost of manual annotation. Conversely, free-text radiology reports are abundant but difficult to use directly for training structured classifiers. This research addresses this gap by using reports as a rich auxiliary information source during the training phase.
Methodology: Joint Representation Learning
The core of our approach is a joint image-text representation learning framework designed to transfer knowledge from descriptive text to an image-based classifier.
Architecture
The model consists of two primary branches:
- Image Encoder: A residual network architecture that transforms a 2D chest X-ray into a 768-dimensional feature vector.
- Text Encoder: A BERT model, pre-trained on scientific literature, which converts the corresponding radiology report into a matching 768-dimensional vector.
Dual-Loss Training Strategy
Training is guided by two distinct loss functions:
- Ranking-based Loss: This encourages the model to align the feature vectors of an image and its specific report in a shared embedding space. By contrasting true pairs against "impostor" reports, the model learns to associate visual patterns with descriptive terminology.
- Classification Loss: A standard cross-entropy loss applied to both branches, training the model to predict four severity levels: (0) None, (1) Vascular Congestion, (2) Interstitial Edema, and (3) Alveolar Edema.
Inference Decoupling
A key advantage of this architecture is that the text and image streams are decoupled at inference time. While the model benefits from text during training, it requires only the chest radiograph to provide a severity assessment in a clinical environment, ensuring it does not depend on a human-written report to function.
Data and Evaluation
The study utilized the MIMIC-CXR v2.0 dataset, containing over 377,000 radiographs and 227,000 reports. To generate training labels at scale, regular expressions were used to extract severity levels from the reports.
For rigorous evaluation, a "gold standard" test set was created. A board-certified radiologist and two domain experts manually labeled 531 image-text pairs, providing a high-fidelity benchmark to compare model performance against automated regex labeling.
Results and Explainability
The joint model consistently outperformed the image-only baseline across all severity categories. The "ranking-dot-semi" configuration, which combines joint learning with additional unlabeled data, achieved an Area Under the Curve (AUC) of 0.90 for detecting the most severe stage (Level 3), a significant jump from the 0.78 AUC achieved by the image-only model. Furthermore, the macro-F1 score improved from 0.43 to 0.51, indicating a better balance between precision and recall across the different severity levels.
One of the most compelling aspects of joint modeling is the improvement in explainability. By forcing the image encoder to align with text features, the model learns to "see" like a radiologist, focusing on subtle clinical markers like Kerley B lines or hilar engorgement. Using Grad-CAM heatmaps, we observed that the model's attention aligns with the anatomical regions mentioned in the reports, such as the hila. This suggests that the text acts as a "teacher," guiding the image model toward clinically relevant features that might be overlooked in a purely supervised setting.
Limitations and Future Work
Despite the performance gains, challenges remain. The automated regex labeling used for the bulk of the training data has an estimated 89% accuracy; improving these "teacher" labels through more advanced NLP could further refine the model. Additionally, while the training set is vast, the expert-validated test set is relatively small. Future research should focus on clinical integration to determine how these automated assessments impact real-time emergency room workflows and patient outcomes.
Summary updated