Abstract
Generated synthetic data in medical research can substitute privacy and security-sensitive data with a large-scale curated dataset, reducing data collection and annotation costs. We propose ViewXGen, a unified chest X-ray and report generation model. We design a unified model for bidirectional chest X-ray and report generation by adopting a vector quantization method to discretize chest X-rays into discrete visual tokens and formulating both tasks as sequence generation tasks. We introduce several special tokens to generate chest X-rays with specific views (PA, AP, Lateral) that can be useful when desired views are unavailable. Furthermore, ViewXGen can flexibly take various inputs from single to multiple views to take advantage of additional findings available in other X-ray views. We adopt an efficient transformer for computational and memory efficiency to handle long-range input sequences. Extensive experiments show that our unified model has a synergistic effect on both generation tasks. View-specific special tokens distinguish between different views and properly generate specific views even if they do not exist in the dataset, and utilizing multi-view chest X-rays faithfully captures abnormal findings.
Introduction
Synthetic medical data is a critical frontier for healthcare AI, offering solutions to data scarcity, privacy concerns, and algorithmic bias. However, generating high-quality chest X-rays (CXRs) remains challenging due to two primary gaps in existing models: a heavy bias toward frontal views and the underutilization of multi-view information. Most generators rely solely on text reports, ignoring the rich anatomical data present in complementary views (e.g., Lateral views) within a clinical study.
ViewXGen addresses these limitations by treating X-ray generation as a sequence-to-sequence task capable of "hallucinating" missing views or generating specific ones based on user preference while maintaining anatomical consistency across a patient's study.
Methodology
ViewXGen leverages several key architectural innovations to handle the complexity of multi-view medical data:
- Image Tokenization (VQ-GAN): High-resolution X-rays are encoded into a sequence of discrete "visual words" using a VQ-GAN. This discretization makes visual data compatible with language model architectures.
- Efficient Transformer (Performer): To manage the long sequences generated by combining multiple images and detailed reports, ViewXGen utilizes the Performer architecture. Its linear-attention mechanism provides the necessary computational and memory efficiency.
- View-Specific Special Tokens: Unique tokens (e.g.,
[PA],[AP],[LAT]) act as steering mechanisms, allowing the model to generate specific anatomical perspectives. - Multimodal Causal Masking: The model is trained to predict the next token (text or image) given previous context. This allows for flexible inputs, such as using a report and a Lateral view to generate a matching PA view.
Results and Evaluation
The model was trained on the MIMIC-CXR dataset, containing over 377,000 X-rays. Evaluation focused on both visual fidelity and clinical utility.
Quantitative Performance
ViewXGen significantly outperformed baselines like Stable Diffusion. It achieved a Fréchet Inception Distance (FID) of 19.21 (compared to 78.96 for Stable Diffusion), indicating superior image quality. In a 14-diagnosis classification task, ViewXGen achieved an AUROC of 0.711, far exceeding the 0.589 achieved by Stable Diffusion.
Clinical Accuracy and Human Evaluation
Board-certified clinicians rated ViewXGen’s images nearly as high as original X-rays for realism (~4.19 vs. ~4.17 on a 5-point scale). Crucially, clinicians correctly identified the intended view (PA vs. Lateral) of generated images almost 100% of the time. The model successfully "transfers" findings, such as lesion locations, from one angle to another when provided with an additional view as input.
Discussion and Conclusion
ViewXGen demonstrates that providing additional views as input drastically improves the quality of generated target views. It effectively addresses "missing data" in real-world clinical records by generating plausible versions of missing images based on text reports.
Future work will focus on incorporating temporal context (comparing current studies to historical ones) and improving the generation of fine-grained details, such as small medical devices like catheters and wires. Additionally, refining datasets to remove comparison phrases may help the model focus more accurately on current anatomical states.
Summary updated