Source-linked AI summary
Tissue Detection Determines False Positives in Diffusion-Based Histopathology Artifact Detection
Konstantinos Moutselos, Ilias Maglogiannis
TL;DR
Tissue detection is usually treated as neutral preprocessing, even though a one-class detector learns normal tissue from the selected training pool. This paper tests how changing that pool affects a diffusion-based artifact detector. Saturation–Otsu detection excludes normal clear-space tissue, while replacing it reduces false positives on held-out clean slides without loss of sensitivity.
Problem
Tissue detection is commonly treated as neutral preprocessing, although one-class detectors learn normality from the selected pool and false positives cost normal tissue.
Source: §1 · p. 3, §2.2 · p. 5Method
The study rebuilt the clean pool using different tissue-detection methods and compared the resulting one-class diffusion detectors.
Source: §2.2 · p. 5, §5 · p. 22Results
Saturation–Otsu excluded normal clear-space tissue, while replacing it removed most false positives on held-out clean slides without loss of sensitivity, in a graded relation to the pool’s clear-space fraction.
Source: §5 · p. 22Takeaways & Limitations
For one-class quality control, tissue detection decides what the model learns as normal and should be chosen and reported accordingly.
Source: §5 · p. 22The development evidence rests on 16 slides, with only four clean slides held out one per fold for the primary endpoint.
Source: §4.6 · p. 22
Abstract
from arXiv · showhide
One-class artifact detectors for whole-slide images learn normal tissue from a clean training pool and flag departures from it. The pool is built by a preprocessing pipeline whose tissue-detection step is usually treated as neutral. We tested whether it is. On 16 annotated TCGA slides, we rebuilt the clean pool of a diffusion-based detector with different tissue detection methods and compared the resulting models in a four-fold cross-validation. Per-slide saturation-Otsu detection excluded normal tissue, chiefly tissue with large clear spaces such as adipose tissue and alveolar parenchyma, and on slides with thick marker ink kept the ink while excluding ordinary tissue. Replacing it with entropy-based detection reduced the false-positive fraction on held-out clean slides from 0.102 to 0.016, in every fold and with a second training seed, without loss of sensitivity; the gain came from the composition of the pool, not its size. Across three tissue detection methods, false positives followed the fraction of such clear-space tissue in the pool, a statistic that needs no labels or training (0.103, 0.016 and 0.009). The effect did not carry over at the same size to a nearest-neighbour detector on foundation-model features. On an external cohort, the curated pool lowered clean-control false positives by about 20%, far less than within TCGA, and the remaining cross-center loss was not explained by stain differences. For one-class quality control, tissue detection decides what the model learns as normal and should be chosen and reported accordingly.
1. Introduction
The paper tests whether tissue detection, usually treated as neutral preprocessing, changes what a one-class artifact detector learns as normal and how it flags clean tissue. It rebuilds the training pool with different tissue detectors and compares the resulting models.
1. Introduction
- Because the clean pool defines normal for a one-class detector, tissue omitted during preprocessing can lie outside the learned distribution and be flagged when it appears at test time.The authors report that this contribution to false positives had not previously been measured, and release pools, fold definitions, code, and evaluation outputs.Source: §1 · pp. 3–4
- The study rebuilt pools using different tissue detectors and compared diffusion-based detectors in four-fold cross-validation over 16 annotated TCGA slides.It also tested whether the effect was graded, detector-dependent, and transferable to an external cohort.Source: §1 · p. 4
- Per-slide saturation–Otsu detection excludes normal clear-space tissue and, on slides with thick marker ink, keeps the ink while excluding ordinary tissue.The study tests whether this pool composition explains false positives from a diffusion-based detector.Source: §1 · p. 4
- Replacing saturation–Otsu with entropy-based detection reduced held-out clean-slide false positives more than sixfold, across every fold and a second seed, without loss of sensitivity.The gain came from pool composition rather than pool size.Source: §1 · p. 4
- Across three tissue-detection methods, clean-slide false positives followed the fraction of clear-space tissue admitted to the pool, a statistic requiring no labels or training.Source: §1 · p. 4
- The effect was not as large for a nearest-neighbour detector on foundation-model features; on an external cohort it was directionally expected but unconfirmed, and stain differences did not explain the remaining cross-center loss.Source: §1 · p. 4
2. Materials and methods
The methods use annotated TCGA slides for development and a separate SlideInspect cohort for external evidence. The paper also identifies limits on interpreting the development results and describes how the external images were prepared.
2.1. Data
- The development set comprised 16 AIRAQC training slides from TCGA, including four slides used as clean slides in the evaluation.Annotations covered out-of-focus regions, folds, penmarks, and air bubbles within tissue.Source: §2.1 · pp. 4–5
- Because the detector backbone was pretrained on a corpus that includes TCGA, the authors classify results on the TCGA slides as development-tier evidence.Source: §2.1 · p. 5
- SlideInspect supplied 441 images; restricting the external set to H&E left 289 images, including 55 clean controls and 135 with out-of-focus regions.Source: §2.1 · p. 5
- External images were stored at 5×, upsampled twofold for inference, and ingested using the same saturation-based thumbnail tissue mask as the development slides.The manual tissue mask was not used for ingestion because it excludes out-of-focus tissue by definition.Source: §2.1 · p. 5
2.2. Detector
The detector learns normal tissue by denoising patches and flags regions it denoises poorly. Its predictions are formed from windowed errors that are smoothed and thresholded without evaluation-slide tuning.
- The one-class diffusion model learns to denoise patches of normal tissue and flags regions it denoises poorly.Source: §2.2 · p. 5
- At inference, the slide is tiled into non-overlapping 1,024-pixel windows, with windows retained when at least 10% of their area is tissue.Source: §2.2 · p. 6
- The per-position score is squared prediction error against the added noise, averaged over channels and mapped onto a grid that averages overlapping windows.Source: §2.2 · p. 6
- Error maps are smoothed, clipped between the 65th and 75th raw-error percentiles, thresholded by Otsu, then morphologically cleaned.Percentiles are computed over scored tissue across slides evaluated together; the rule has no parameter tuned on evaluation slides.Source: §2.2 · p. 6
2.3. Clean pools and tissue detection
The clean-pool construction compares saturation-Otsu, entropy-based, and GrandQC tissue masks, then uses these pools in a four-fold evaluation design. Pool composition is also characterized by a label-free clear-space fraction.
2.3. Clean pools and tissue detection
- A patch enters a pool when at least 50% of its box is detected as tissue; the original, curated, and GrandQC pools contain 2,185, 2,969, and 2,991 patches.Source: §2.3 · pp. 6–7
- Three tissue-detection methods define candidate tissue: per-slide saturation-Otsu, LazySlide entropy, and GrandQC masks using classes 1–6 as tissue.Source: §2.3 · p. 6
- The curated pool uses entropy-based detection with marker ink removed, while other unannotated findings were recorded but not removed.Source: §2.3 · pp. 6–7
- Clear-space fraction is the mean near-white pixel fraction across pool patches, computed from optical density below 0.15 without training or annotation.Source: §2.3 · p. 7
2.4. Cross-validation design
- Four folds hold out four slides each and train on the remaining 12; each fold includes one marker-ink slide and one annotation-free clean slide.Source: §2.4 · p. 7
- The comparisons include pool changes, marker-ink removal, balancing, size-matched subsampling, a second training seed, and the GrandQC pool.After balancing was shown to add nothing, later comparisons used the curated pool without balancing.Source: §2.4 · p. 7
- The primary endpoint is the held-out clean-slide fraction of scored tissue flagged outside ground truth, pooled across folds by summing pixels.Source: §2.4 · p. 8
2.5. Decision criteria
Decision criteria were set before each comparison, and the reported outcomes distinguish confirmed, contradicted, and inconclusive reductions. Some pool differences remained within seed variability across folds.
- Comparison criteria covered the pooled endpoint, fold agreement, and sensitivity-loss tolerances, and each comparison was evaluated once.Source: §2.5 · p. 8
- Rows 9 and 10 showed reductions in the expected direction but were inconclusive because neither met confirmation criteria nor had an interval entirely above 1.Source: §2.5 · p. 9
- For the GrandQC-versus-entropy comparison, only F3 separated the pools clearly; F2 and F4 differences were within seed variability.Source: §2.5 · p. 9
2.6. Feature-space detector
The feature-space detector uses nearest-neighbour similarity in UNI2-h features and shares the diffusion detector's windows, grid, scoring rule, and endpoint. The external evaluation compares models on clean controls and includes a stain diagnostic.
2.6. Feature-space detector
- The nearest-neighbour detector stores normalized UNI2-h feature vectors from clean-pool patches and scores each vector by one minus its maximum cosine similarity to the bank.Source: §2.6 · p. 10
- Its maps use the diffusion detector's windows and grid and are evaluated with the same scoring rule and endpoint.Source: §2.6 · p. 10
2.7. External evaluation
- The external comparison evaluated the curated-pool model against the reference model on SlideInspect clean controls, using identical ingestion and noise draws.The reference evaluation was reproduced exactly, with clean-control FP 0.226355 in the saturation tissue region.Source: §2.7 · p. 10
- The stain diagnostic compared each image's mean optical density of non-white pixels in its manual tissue mask with distances from curated-pool patches.Source: §2.7 · p. 10
2.8. Descriptive analyses
The descriptive analyses compare model responses to patches excluded by saturation-based detection and characterize adapter updates. The experiments used A100 GPUs, and code and evaluation materials are available at Zenodo.
2.8. Descriptive analyses
- Activation analyses contrasted saturation-rejected clear-space patches with patches accepted by both methods after shared encoding and noise at t=800.The batches were passed through models trained on the two pools and their second-seed replicates.Source: §2.8 · pp. 10–11
- They recorded every transformer block's output and mean denoising error, comparing pool differences with a shared-input, shared-noise seed-difference floor.The seed comparison provides a valid floor because it shares inputs and noise.Source: §2.8 · p. 11
- Adapter spectra were computed as singular values of each module's low-rank update.Source: §2.8 · p. 11
2.9. Implementation
- Experiments ran on NVIDIA A100 GPUs with 40 GB in a Singularity container with PyTorch.Source: §2.9 · p. 11
0.12.0. Code, pools, fold definitions and evaluation outputs are available at Zenodo
- The passage identifies a Zenodo record by DOI 10.5281/zenodo.23016733.Source: §0.12.0 · p. 11
3. Results
The results examine how tissue-detection choices shape the clean training pool and clean-slide false positives, including sensitivity and a smaller, unconfirmed improvement on the external cohort. They link the gain to clear-space tissue reconstruction and show that its size depends on the detector.
3.1. What saturation-based tissue detection leaves out of the clean pool
- Entropy detection added 993 patches; saturation-Otsu missed clear-space tissue, while on inked slides it retained ink and intensely stained regions but excluded ordinary tissue.Source: §3.1 · pp. 11–12
3.2. Changing the tissue detector removes most clean-slide false positives
- On held-out clean slides, the curated-pool entropy-region false-positive fraction fell from 0.1019 to 0.0158 in all four folds.Removing marker ink alone left the false-positive fraction unchanged at 0.1030; a size-matched curated pool retained 103% of the gain, and a second seed reproduced the reduction (0.0927 to 0.0117).Source: §3.2 · pp. 14–15, Figure 2 · p. 14
3.3. The effect is graded by the clear-space tissue a detector includes
- Across saturation-based, entropy-based, and GrandQC pools, clear-space fractions were 0.112, 0.215, and 0.230, while clean-slide false-positive fractions were 0.1030, 0.0157, and 0.0087.Source: §3.3 · p. 15, Figure 3 · p. 16
0.009. Nearly all of the reduction occurs between saturation-based detection and the other
- Nearly all reduction occurred from saturation-based detection to entropy or GrandQC; GrandQC's pooled difference from entropy was −0.0070, with a clearer drop on TCGA-A8-A093 (0.068 to 0.036).Source: §0.009 · p. 16
3.4. The gain is not paid for in sensitivity
- No model fell outside preset sensitivity tolerances; in the saturation tissue region, pooled over folds, original-to-curated sensitivity increased for out-of-focus (0.656 to 0.670), fold (0.137 to 0.149), and penmark (0.521 to 0.584).Source: §3.4 · p. 17
- The lower false-positive rate was not paid for in sensitivity across artifact types.Table 3 reports clean-slide false positives and sensitivity for every diffusion-detector model, pooled over the four held-out folds.Source: Table 3 · p. 17, §3.4 · p. 17
3.5. The curated pool teaches the model to reconstruct clear-space tissue
- At t = 800, the curated pool lowered mean denoising error by 0.039 on saturation-rejected clear-space patches, versus 0.007 on patches accepted by both methods.The clear-space reduction was about seven times the seed-to-seed difference (0.005–0.006); the shared-patch reduction was 0.007 against a seed difference of 0.002–0.003.Source: §3.5 · p. 17
- Pool-specific internal activations differed beyond the seed floor at every transformer block except the first, with larger differences on clear-space than dense patches (1.2–1.65 times).Adapters were nearly rank-2, while removing marker ink moved them almost as much as changing the tissue detector; only the detector change altered the endpoint.Source: §3.5 · pp. 17–18
3.6. The effect depends on the detector
- The nearest-neighbour detector’s pooled clean-slide FP fell from 0.1062 to 0.0902 (ratio 0.849), with a lower rate in three of four folds.The detectors failed on different slides: the curated pool repaired the diffusion detector’s failure on fat-rich TCGA-A8-A093, while nearest-neighbour flagged 98% of TCGA-W5-AA30, the only frozen section in the set.Source: §3.6 · p. 18
3.7. External test: the right direction, not confirmed, and not explained by stain
- External clean-control FP fell from 0.2264 to 0.1766 in saturation tissue (ratio 0.780, 97.5% CI 0.505–1.002) and from 0.2305 to 0.1857 in annotator tissue (ratio 0.806, CI 0.671–0.988); neither met the confirmation criterion.Out-of-focus sensitivity remained within tolerance, changing from 0.818 to 0.785 (difference −0.033, CI −0.107 to +0.020).Source: Table 4 · p. 18, §3.7 · p. 18
- The curated pool recovered only about 20% of the cross-center loss, versus more than sixfold within TCGA, and stain distance did not explain the remainder.Only 11% of the 55 controls exceeded the largest training-slide stain distance; the observed correlation with clean FP (ρ = 0.32) was confounded by organ.Source: §3.7 · p. 19
4. Discussion
The discussion argues that tissue detection shapes what a one-class detector learns as normal: excluding clear-space tissue drives diffusion-detector false positives. The effect varies by detector family and is smaller on the external cohort, motivating careful pool construction, evaluation, and reporting.
4.1. The clean pool defines normal
- Saturation-based detection excludes normal clear-space tissue, which a diffusion detector then flags; replacing it removes most false positives through pool composition, not pool size.The curated pool also reconstructs clear-space tissue better, while dense-tissue reconstruction barely changes.Source: §4.1 · pp. 19–20
- The excluded tissue is sparse rather than simply pale: sampled patches were mainly lumen with thin walls or tissue boundaries, not weakly stained tissue filling the patch.The relation between clear-space fraction and false positives is strongly non-linear; nearly all the gain appears once the pool contains any clear-space tissue.Source: §4.1 · p. 20
4.2. Why the effect depends on the detector
- At the tested pool size, the nearest-neighbour detector on UNI2-h features did not show the diffusion detector’s effect, so a pool curated for one detector family should be re-audited for another.It also failed on different slides than the diffusion detector.Source: §4.2 · pp. 20–21
4.3. The cross-center gap
- On SlideInspect, curated pools lowered clean-control false positives by about 20%, versus more than sixfold within TCGA; stain differences did not explain the cross-center loss.Organ coverage alone did not explain the residual pattern; the authors also name 5× storage as a candidate.Source: §4.3 · p. 21
4.4. Practical recommendations
- For TCGA pools, use entropy-based detection or GrandQC masks, measure clear-space fraction, inspect inked-slide pools, and report pool detection separately from scored-region detection.The authors also recommend evaluating held-out clean slides and reporting their false-positive fraction.Source: §4.4 · p. 21
4.5. Comparing fine-tuned adapters
- Distances between low-rank adapters did not track functional differences: changing tissue detection lowered clean-slide false positives, while removing marker ink left them unchanged.Functional comparisons on shared inputs and noise avoid the problems of weight-space comparisons.Source: §4.5 · p. 22
4.6. Limitations
- The development evidence rests on 16 TCGA slides, with only four clean slides held out; the authors caution that this limits generalizability.The cross-validation slides are part of the backbone’s pretraining corpus, and the external set is available only at 5× and yielded an unresolved result.Source: §4.6 · p. 22
- Other boundaries include seed variability in the entropy-versus-GrandQC comparison on two folds, one frozen-section holdout, and detector-dependence evidence from only two detector families.The mechanism analyses are descriptive, and sensitivities were not compared across detector families.Source: §4.6 · p. 22
5. Conclusion
Tissue detection determines what a one-class artifact detector learns as normal. In the diffusion-based detector studied here, excluding clear-space tissue leads to false positives; replacing the tissue detector removes most of them, supporting careful choice and reporting of how clean pools are built.
5. Conclusion
- Per-slide saturation–Otsu detection excludes normal tissue with large clear spaces, which a diffusion-based detector trained on that pool flags as artifact.Replacing the tissue detector removed most false positives on held-out clean slides without loss of sensitivity, in a graded way that followed the pool’s clear-space fraction.Source: §5 · p. 22
- Choosing and reporting how the clean pool is built should be part of the standard description of one-class quality-control methods.The effect was detector-family specific, and the external cross-center result pointed in the right direction without being confirmed.Source: §5 · p. 22
Data availability
The paper identifies sources for its images, annotations, and tissue masks, and makes its constructed pools and analysis materials available. It also reports the use of an AI tool in manuscript and analysis-script preparation, with experiments run and numbers checked by the authors.
Data availability
- Whole-slide images are available through the TCGA data portal, artifact annotations from the AIRAQC authors, and TCGA GrandQC tissue masks from a public deposit.SlideInspect images are available on Kaggle under academic, non-commercial terms.Source: Data availability · p. 23
- The authors make clean pools, fold definitions, marker-ink labels, evaluation outputs, model adapters, and code available at Zenodo.The released code covers pool construction, training, evaluation, figures, and tables.Source: Data availability · p. 23
preparation process
- The authors used Claude to draft and edit manuscript text and write analysis, figure, and table scripts; they ran the experiments and checked reported numbers against evaluation outputs.They reviewed and edited the content and take responsibility for the published article.Source: preparation process · pp. 23–24
Supplementary Note S1. Spectra and weight-space distances of the low-rank adapters
The supplementary analysis finds that adapter weight-space distances do not reliably track functional differences, despite adapters trained at rank 16 being effectively rank 2. It also shows that saturation–Otsu thresholds on inked slides can fall within tissue, unlike thresholds on reference slides without ink.
Supplementary Note S1. Spectra and weight-space distances of the low-rank adapters
- Across 24 models, a median of two singular values captured 90% of each module’s squared Frobenius norm, making rank-16 adapters effectively rank 2.The reported mean number of singular values needed was 2.01–2.15.Source: Supplementary Note S1. Spectra and… · p. 27
- Changing tissue detection lowered clean-slide false positives from 0.103 to 0.016, while replacing entropy-based detection with GrandQC lowered them further to 0.009; adapter distances did not track these functional changes.Removing marker ink moved adapters by 0.26 on average but left false positives nearly unchanged, from 0.102 to 0.103.Source: Supplementary Note S1. Spectra and… · p. 28
- The total update Frobenius norm was 2–7% larger with seed 42 and 1–6% larger with seed 7 for curated versus original pools, a difference the authors report without interpretation.In two folds, this difference was the same size as the seed-to-seed difference for the curated pool.Source: Supplementary Note S1. Spectra and… · p. 28
Supplementary Fig. S1
- In the figure, slide thumbnails and saturation masks appear at left and center, with saturation histograms at right; compare inked slides’ thresholds within tissue against reference thresholds between glass and tissue modes.On inked slides, the masks keep ink and intensely stained tissue while excluding paler tissue.Source: Figure S1 · p. 29