Previously submitted to: JMIR Medical Informatics (no longer under consideration since Apr 15, 2026)
Date Submitted: Sep 5, 2025
Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.
Robust Cross-Center Chest X-ray Anomaly Detection: via Dynamic Memory and Transformer Inpainting
ABSTRACT
Background:
Robust chest X-ray (CXR) anomaly detection that generalizes across multiple clinical centers is notoriously difficult because variations in X-ray generators, image post-processing pipelines and patient demographics induce substantial domain shifts. In routine deployment, AI systems are expected to operate “out-of-the-box” at new hospitals that cannot share proprietary images for fine-tuning.
Objective:
To develop and validate a Dynamic-Memory Autoencoder (DMA) that maintains high performance on unseen multi-center CXR data without any domain-specific fine-tuning.
Methods:
We propose a three-component architecture: (i) a dynamic memory network whose slots are written to and pruned on-the-fly according to gated residuals; (ii) a transformer-based adaptive in-painting head that enforces long-range anatomical consistency; (iii) a lightweight teacher–student distillation scheme that stabilizes training. DMA was first pre-trained on a heterogeneous synthetic CXR corpus that emulates a broad spectrum of normal anatomy and common pathologies. External validation used 300 real-world CXRs collected between 2023 and 2025 from five scanners.
Results:
On the pre-training corpus, DMA achieved 84.7% AUC and 80.05% accuracy, surpassing four state-of-the-art baselines by up to 14 AUC points. In the multi-center external validation, DMA preserved 83.4% AUC and 80.23% accuracy without any domain-specific fine-tuning—degradation of only 1.3 pp and 0.1 pp, respectively. Qualitative analyses showed that the dynamic memory rapidly expanded to unfamiliar textures, while the transformer head preserved sharp reconstructions of healthy tissue and produced high-contrast residuals over lesions.
Conclusions:
DMA offers a practical, scalable solution for multi-center CXR triage and could help alleviate radiologists’ workload in resource-limited settings. Clinical Trial: Not applicable.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.