Representative Image Feature Extraction via Contrastive Learning Pretraining for Chest X-ray Report Generation

Yu-Jen Chen, Wei-Hsiang Shen, Hao-Wei Chung, Jing-Hao Chiu, Da-Cheng Juan, Tsung-Ying Ho, Chi-Tung Cheng, Meng-Lin LiarXiv 2022 · DOI

Abstract

Automated radiology report generation requires high-fidelity visual features. Traditional models rely on ImageNet-pretrained encoders, which suffer from a significant domain gap when applied to medical imaging. This paper presents a framework using domain-specific Contrastive Learning (CL) and a novel lung segmentation augmentation to improve feature extraction. Results on IU X-ray and MIMIC-CXR datasets demonstrate substantial improvements in both NLP metrics and clinical diagnostic accuracy.

Introduction

Writing accurate radiology reports is a critical yet labor-intensive task. While encoder-decoder architectures have been adapted for this purpose, their performance is often bottlenecked by the visual encoder. Most existing models utilize encoders pretrained on ImageNet, a dataset of natural objects. The "domain gap" between natural images and chest X-rays prevents these models from capturing subtle clinical nuances. Furthermore, many current methods require auxiliary metadata that may not be available in clinical workflows.

Methodology

The proposed approach utilizes a two-stage training pipeline designed to bridge the domain gap and focus the model on clinically relevant regions.

Contrastive Learning Pretraining

The first stage involves self-supervised pretraining using Contrastive Learning (CL) frameworks such as SimCLR and MoCo. Instead of relying on manual labels, the model learns by maximizing the similarity between different augmented "views" of the same image (positive pairs) while minimizing similarity between views of different images (negative pairs). This process forces the encoder to learn robust, representative features inherent to chest X-rays.

The Contrastive Learning framework: positive pairs are pulled together in the embedding space while negative pairs are pushed apart.

Lung Segmentation Augmentation

A key innovation of this work is the integration of a lung segmentation mask during the CL phase. By randomly alternating between the full X-ray and a cropped lung region, the model is forced to attend to the pulmonary area. This "weak supervision" guides the encoder to prioritize features within the lungs, which are essential for diagnosing conditions like pneumonia or pneumothorax.

The lung segmentation pipeline: a segmentation network generates a binary mask, which is used via pixel-wise multiplication to create focused positive pairs.

Experimental Results

The framework was evaluated on two benchmark datasets: IU X-ray (7,470 image-report pairs) and MIMIC-CXR (377,110 images).

Quantitative Performance

The CL-pretrained encoders significantly outperformed ImageNet-pretrained baselines across all standard NLP metrics. On the IU X-ray dataset, SimCLR pretraining led to a 9% improvement in BLEU-1 scores. On the larger MIMIC-CXR dataset, the performance gain reached up to 32% over baseline methods. These improvements were consistent across various decoder architectures, including Transformers, LSTMs, and GRUs.

Clinical Accuracy

Beyond NLP metrics, the lung segmentation augmentation directly improved diagnostic precision. For instance, the F1 score for detecting pneumothorax increased from 0.752 to 0.808. Qualitative analysis showed that the CL-based model more accurately identified specific conditions, such as "hyperexpanded lungs," where traditional models provided only generic descriptions.

Discussion and Limitations

While the lung-focused augmentation improved pulmonary findings, it introduced a trade-off: the model occasionally overlooked non-lung regions like the heart or ribs. Future research will explore multi-organ segmentation (e.g., heart and mediastinum) to provide a more holistic visual focus. This pretraining strategy also holds potential for other modalities such as CT and MRI.

Conclusion

By replacing generic ImageNet pretraining with domain-specific contrastive learning and targeted lung segmentation, this work provides a more effective "visual foundation" for automated radiology reporting. The approach demonstrates that clinical relevance can be learned through intelligent data augmentation, reducing the reliance on large-scale labeled datasets.

Summary updated

BibTeX
@misc{chen2022representative,
  author = {Yu-Jen Chen and Wei-Hsiang Shen and Hao-Wei Chung and Jing-Hao Chiu and Da-Cheng Juan and Tsung-Ying Ho and Chi-Tung Cheng and Meng-Lin Li and Tsung-Yi Ho},
  title = {{Representative Image Feature Extraction via Contrastive Learning Pretraining for Chest X-ray Report Generation}},
  year = {2022},
  eprint = {2209.01604},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.01604},
}
Figure