XRayGAN: Consistency-preserving Generation of X-ray Images from Radiology Reports

Xingyi Yang, Nandiraju Gireesh, Eric P. Xing, Pengtao XiearXiv 2020

Introduction

Medical training requires exposure to a vast array of clinical cases. However, strict patient privacy regulations often limit the availability of diverse X-ray datasets. XRayGAN addresses this by generating realistic, high-resolution, multi-view X-ray images directly from text-based radiology reports, providing a privacy-preserving tool for medical education. By bridging the gap between descriptive medical text and visual diagnostic data, XRayGAN offers a scalable solution for generating training materials.

Technical Challenges in Medical Image Synthesis

Generating synthetic X-rays from text involves overcoming three primary hurdles that standard text-to-image models are ill-equipped to handle:

  1. Multi-view Consistency: A single radiology report typically describes findings across multiple views (e.g., frontal and lateral). Independent generation often results in images that appear to belong to different patients.
  2. High Resolution: Medical diagnosis relies on subtle anatomical details and lesions. Standard models often produce blurry outputs that lack the necessary diagnostic fidelity.
  3. Complex Semantics: Radiology reports are structured documents filled with dense medical jargon. Extracting precise clinical meaning to condition image generation is significantly more difficult than interpreting simple natural language captions.

Methodology

The XRayGAN framework employs three specialized modules to address these challenges through a combination of hierarchical text encoding and progressive image synthesis.

Hierarchical Attentional Encoder (HAE)

To capture the nuanced meaning of radiology reports, the HAE utilizes a two-level LSTM architecture (word-level and sentence-level). This hierarchical approach allows the model to understand the report's structure and apply attention mechanisms to prioritize clinically significant terms—such as "opacity," "effusion," or "cardiomegaly"—over common filler words. This ensures that the generated images reflect the most critical diagnostic findings.

Multi-scale Conditional GAN (MSCGAN)

XRayGAN utilizes a progressive "coarse-to-fine" generation strategy known as curriculum learning. It begins by generating a low-resolution (32x32) layout to establish basic anatomical positioning. It then iteratively refines the image through multiple generator stages, progressively scaling up to a 256x256 resolution. This method is essential for preserving sharp anatomical outlines and preventing the distortions often seen in single-step high-resolution generation.

View Consistency Network (VCN)

The VCN is the system's most innovative component. It consists of a Siamese neural network pre-trained on real X-ray pairs to identify if a frontal and lateral view belong to the same patient. During the GAN's training phase, the VCN acts as a judge, providing a "consistency reward." This forces the generators to produce anatomically and clinically coherent pairs, ensuring that a finding in one view is logically represented in the other.

Architecture of XRayGAN showing progressive generation and the View Consistency Network.

Experimental Results

The model was rigorously evaluated on the Open-i and MIMIC-CXR datasets, comparing it against state-of-the-art baselines including GAN-INT-CLS, StackGAN, and AttnGAN.

Quantitative Performance

XRayGAN significantly outperformed all baselines across key metrics. On the Open-i dataset, it achieved a Frechet Inception Distance (FID) of 141.5, a massive improvement over AttnGAN's 226.6. Furthermore, its View Consistency (VC) score of 0.627 closely approached the real-world patient baseline of 0.669, indicating that the synthetic pairs are remarkably coherent.

Qualitative Fidelity

Visually, XRayGAN produces much sharper anatomical structures than its predecessors. While baseline models often yield blurry lungs or distorted rib cages, XRayGAN successfully generates clear anatomical features and accurately places abnormalities exactly where the text dictates.

Qualitative comparison of X-ray generation across different models, demonstrating XRayGAN's superior clarity and consistency in both frontal and lateral views.

Conclusion and Future Work

XRayGAN represents a significant advancement in medical image synthesis by enforcing multi-view consistency and utilizing progressive generation. While current results at 256x256 are promising for educational use, future work will focus on scaling to clinical-grade resolutions (e.g., 2K) and extending the framework to support a wider variety of diagnostic views.

Summary updated

BibTeX
@misc{yang2020xraygan,
  author = {Xingyi Yang and Nandiraju Gireesh and Eric P. Xing and Pengtao Xie},
  title = {{XRayGAN: Consistency-preserving Generation of X-ray Images from Radiology Reports}},
  year = {2020},
  eprint = {2006.10552},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10552},
}
Figure