Abstract:As a crucial objective basis for precise diagnosis, medical imaging is experiencing a paradigm shift driven by deep learning-based computer-aided diagnosis systems. However, in real-world clinical deployment, cross-device and cross-regional data distribution shifts, combined with the extreme vulnerability of models to imperceptible adversarial perturbations, severely hinder their safe practical application. To address this, we propose a robustness and generalization enhancement framework compatible with both adversarial attacks and distribution shifts. First, a guided filter is applied to lung CT images to generate augmented data, highlighting key lung cavity structures. Second, dual-level perturbations on samples and weights are introduced, utilizing an early-stopping feedback mechanism to apply the strongest effective adversarial perturbations. Meanwhile, to compensate for the potential weakening of diagnostic features in augmented data, weight noise generated by a proxy model is injected into the original model, implicitly integrating lung contour priors. Finally, a mixed optimization strategy combining square loss and KL divergence is adopted to improve the traditional loss function and alleviate inductive bias. Experiments on datasets like SARS-COV-2 demonstrate that, on the Visformer model, our method improves natural accuracy by approximately 3.4\% and increases average out-of-distribution generalization accuracy by about 25\%, substantially enhancing the reliability of clinical auxiliary decision-making.