arXiv:2608.27516eess.IVAug 2026

Manuscript Offprint

arXiv:2608.27516

Destroy Me: Automatic Artifact Generation for Histopathology Images

Zuzanna Krawczyk-Borysiak, Adam Krawczyk, Mateusz Miller, Gabriela Kaczmarek, Sławomir Pakuło, Małgorzata Sokół, Żaneta Swiderska-Chadaj

Zuzanna Krawczyk-Borysiak¹,²[0000-0002-3897-1078]

zuzanna.krawczyk@pw.edu.pl, Adam Krawczyk³,⁴[0009-0002-4851-6789]

adam.krawczyk@cs.put.poznan.pl, Mateusz Miller¹[0009-0001-4362-7271],

Gabriela Kaczmarek¹,²[0009-0004-3650-1875], Sławonir

Pakulo⁵[0000-0001-6160-9651], Malgorzata Sokól¹[0009-0008-1483-4379], and

Żaneta Swiderska-Chadaj¹,²[0000-0003-2115-9822]

¹ IDEAS Research Institute, Poland

² Warsaw University of Technology, Warsaw, Poland

³ Poznan University of Technology, Poznan, Poland

⁴ AKCES NCBR, Warsaw, Poland

⁵ Tumor Pathology Department, Maria Skłodowska-Curie National Research Institute of Oncology, Poland

Abstract. Deep learning’s diagnostic utility in pathology is constrained by model vulnerability to real-world data imperfections. While current strategies favor "perfect data" by filtering low-quality regions, which can lead to the loss of valuable diagnostic context, we propose a paradigm shift: engineering models to thrive in imperfect environments using "Destroy Me", a hybrid framework for realistic artifact synthesis and robust data augmentation. Our approach combines Stable Diffusion, fine-tuned to preserve morphological continuity by realistically integrating artifacts with the underlying tissue architecture, with physics-based procedural modeling to synthesize six common artifact types: tissue folds, precipitates, blur, stitching errors, dust, and pen markers. Artifact fidelity is assessed using Kernel Inception Distance (KID) and color Wasserstein distance metrics. Validating this strategy on lung adenocarcinoma pattern classification with an nnU-Net, we confirm that models trained on "destroyed" patches consistently outperform baselines on independent real-world datasets. Specifically, we observed a 10.5% relative improvement in macro F1-score and a 15% relative increase in the Cohen’s Kappa (κ\kappa) coefficient. Crucially, our results demonstrate that selective, impact-weighted augmentation is vital for balancing practical robustness with the preservation of subtle diagnostic features. Our method is available at GitHubLinkWillBeHere.

Keywords: Computational Pathology · Stable Diffusion · Data Augmentation.

1 Introduction

The rapid advancement of computational pathology, driven by Artificial Intelligence (AI) and particularly deep learning (DL), promises a transformative era in diagnostic support. Dedicated algorithms are increasingly used for critical tasks like disease detection and classification [4, 7, 23]. However, a significant barrier to their widespread clinical adoption persists: data quality. Routine clinical Whole Slide Images (WSIs), especially Hematoxylin and Eosin (H&E) stained, are frequently compromised by artifacts (e.g., tissue folds, pen markers, scanning glitches) [24]. This discrepancy creates a "domain shift", causing models trained on pristine research datasets to often fail on imperfect clinical images, leading to unreliable inference [20].

Current strategies predominantly rely on automated quality control (QC) tools [12, 9, 21, 27, 14, 17, 22] to filter corrupted regions. While these tools improve data purity, this approach treats artifacts as noise to be eliminated, often discarding valuable diagnostic context. Prior research has focused on the generation of synthetic artifacts to quantify model failure modes via stress testing [20, 25] or to improve artifact detection within QC pipelines [13]. However, these methodologies are primarily centered on diagnostic evaluation and filtering rather than performance recovery. Moreover, subtle or complex artifacts, difficult to detect automatically, still degrade model performance, highlighting a fundamental limitation in current robustness paradigms.

Figure

Fig. 1. Overview of the proposed "Destroy Me" framework.

In this work, we propose a paradigm shift: instead of striving for perfect data by eliminating artifacts, we engineer models to thrive in non-perfect real-world environments. We introduce "Destroy Me", a novel hybrid framework that generates realistic histological artifacts for H&E-stained tissue (see fig.1). Its application is primarily demonstrated and validated on lung tissue for this study.

Our approach leverages Generative AI (Stable Diffusion), fine-tuned on expert-annotated TCGA-LUAD [1] data, to synthesize six common artifact types. This includes complex, texture-dependent artifacts (tissue folds, precipitates) combined with targeted algorithmic techniques for simpler degradations (blur, stitching errors, pen marker, dust). The high perceptual realism of these generated artifacts is quantitatively confirmed by metrics like Kernel Inception Distance (KID) [3] and CLIP [10] score, showing consistent quality across diverse datasets, which underscores the method's robustness to unseen data distributions. Importantly, our research utilizes publicly available datasets, ensuring full transparency and reproducibility. The key contributions of our study are:

– Novel "Destroy Me" GenAI Framework: A hybrid GenAI (Stable Diffusion + algorithmic) framework uniquely synthesizing six diverse, high-fidelity H&E histological artifacts (e.g., complex folds, blur), meticulously preserving tissue morphology.

– Robustness Engineering via Augmentation We demonstrate that synthetic "destroyed" data serves as a superior augmentation strategy, enhancing model robustness to clinical noise.

– Mitigating Clinical Domain Shift: Validation on LUAD (WSI-level task) confirms that models trained with our "Destroy Me" strategy achieve superior generalization on noisy real-world clinical slides, directly mitigating the pervasive domain shift.

We apply GenAI artifact synthesis beyond mere data expansion to build robust models for imperfect pathology images, bridging the gap between research benchmarks and clinical reality.

References (26)