Source-linked AI summary
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
TL;DR
Deep-learning pathology models remain vulnerable to artifacts in real-world clinical images, while filtering can remove diagnostic context. The paper introduces “Destroy Me,” a hybrid framework combining Stable Diffusion and procedural modeling to synthesize realistic artifacts for augmentation. It reports improved real-world generalization, including a 10.5% relative macro-F1 gain and a 15% relative Cohen’s κ increase, while emphasizing selective augmentation.
Problem
Pathology models can fail on artifact-corrupted clinical images, and filtering such regions may discard valuable diagnostic context.
Method
“Destroy Me” combines Stable Diffusion and physics-based procedural modeling to synthesize six realistic H&E artifacts for robust data augmentation.
Results
10.5% relative macro-F1 improvement and 15% relative Cohen’s κ increase were achieved with the proposed strategy on real-world clinical data.
Takeaways & Limitations
Selective, impact-weighted augmentation supports robustness while preserving subtle diagnostic features and reduces reliance on additional real-world artifact annotation.
Takeaways & Limitations
The study primarily demonstrates and validates the framework on lung tissue, with extension to other tissue types left for future work.
Abstract
from arXiv · showhide
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 ($κ$) coefficient. Crucially, our results demonstrate that selective, impact-weighted augmentation is vital for balancing practical robustness with the preservation of subtle diagnostic features.
1 Introduction
Pathology models often fail on artifact-corrupted clinical images, while filtering artifacts can discard diagnostic context. “Destroy Me” instead synthesizes realistic H&E artifacts to train models for imperfect environments and address this domain shift.
- Clinical H&E whole-slide images frequently contain folds, pen markers, and scanning glitches that can cause models trained on pristine datasets to fail.
- Filtering corrupted regions improves data purity but may discard valuable diagnostic context and misses subtle or complex artifacts.
- “Destroy Me” engineers models for non-perfect environments by generating realistic histological artifacts rather than eliminating them.
- The hybrid framework combines Stable Diffusion with algorithmic techniques to synthesize six diverse H&E artifacts while preserving tissue morphology.Stable Diffusion handles complex texture-dependent artifacts, while procedural methods target blur, stitching errors, pen markers, and dust.
- Synthetic “destroyed” data serves as an augmentation strategy that improves robustness to clinical noise and supports generalization on noisy real-world slides.
2 Materials and Methods
The study combines generative and procedural modeling to synthesize realistic histopathology artifacts while preserving tissue context. Public H&E datasets support framework development, cross-validation, and independent real-world benchmarking.
- Datasets: Three public H&E datasets supported framework development, cross-validation training, and independent whole-slide benchmarking.TCGA-LUAD developed the generative framework, ANORAK supported cross-validation training, and DHMC provided independent real-world benchmarking.
- Generative synthesis: Stable Diffusion synthesized complex tissue folds and precipitates while preserving morphological continuity around the underlying architecture.The inpainting backbone integrated generated artifacts with surrounding tissue rather than applying static overlays.
- Procedural synthesis: Procedural image processing simulated deterministic stitching and blur artifacts with greater precision, controllability, and computational efficiency than generative models.The approach used random regional displacement with reflection padding for stitching and feathered alpha masking for blur transitions.
- Procedural synthesis: Dust synthesis combined stochastic elliptical components, grit texture, conditional defocusing, and alpha blending to model particulate artifacts and light scattering.When artifact coverage exceeded 0.15, the underlying tissue received heavy Gaussian blur before compositing.
- Procedural synthesis: Marker synthesis used boundary-anchored polygons, distance-based ink density, Gaussian edge bleed, and subtractive blending to model translucent annotations.The density exponent controlled ink concentration, while the blending model simulated pigment attenuation without artificial tissue bleaching.
- Procedural synthesis: Procedural precipitate samples augmented Stable Diffusion training to capture textural variation and organic blending beyond simple algorithmic modeling.The hybrid procedure included crystalline, dye-pool, fibrous, and granular mask types with varied opacity and refractive displacement.
3 Results
The study evaluated artifact augmentation for lung adenocarcinoma pattern models and found that selective synthetic-artifact training improved performance, while artifact realism remained high across datasets.
- 10.5% relative macro-F1 improvement and 15% relative κ improvement were achieved over the clean-data baseline using the strongest artifact augmentations.The baseline scored macro-F1 0.38 and κ 0.40; the best configuration reached macro-F1 0.42 and κ 0.46.
- Generative folds and procedural markers produced the highest overall scores at 30% in-place augmentation.Simpler algorithmic augmentations and precipitates peaked at 15%, whereas dust improved steadily through 30%.
- Mix 3 was superior to Mix 2 despite lower data volume, showing greater categorical stability across LUAD grade patterns.The more aggressive Mix 2 expansion degraded performance specifically for the papillary pattern.
- Excessive expansion can cause over-regularization by making models misidentify subtle diagnostic features as artifacts.This result supports selective, impact-weighted augmentation rather than indiscriminate dataset expansion.
- High-fidelity synthesis was supported by KID, CLIP, Wasserstein distance, and Masked SSIM across TCGA-LUAD and unseen ANORAK data.Internal KID values were 0.0197–0.0444, while unseen ANORAK KID reached a maximum of 0.0536.
- SD-based synthesis averaged 1.42 seconds per patch, while procedural methods required 0.05–0.08 seconds per patch.The procedural methods therefore supported higher-throughput clinical augmentation.
4 Discussion
The discussion reports that Destroy Me improves generalization on real-world clinical data without collecting or manually annotating additional artifacts. It frames realistic imperfection simulation as a route toward more reliable clinical AI, while identifying broader tissue coverage as future work.
- Destroy Me consistently enhanced model generalization on real-world clinical data without additional real-world artifact collection or manual annotation.The method improved macro-F1 from 0.38 to 0.42 and κ from 0.40 to 0.46.
- 10.5% relative macro-F1 improvement and a κ increase from 0.40 to 0.46 accompanied the reported robustness gains.Agreement increased from fair to moderate.
- The framework is presented as reducing model-failure risk on non-ideal clinical slides, supporting trust and deployment possibilities.The discussion links this goal to engineering robustness against common pre-analytical variables.
- Future work includes extending the approach to other tissue types and exploring multi-artifact compositions.