Source-linked AI summary
Conditioning noise is a free regularizer for LoRA fine-tuning: no pathology encoder required for diffusion-based artifact detection in histopathology
Konstantinos Moutselos, Ilias Maglogiannis
TL;DR
Artifacts in whole-slide images create a quality-control problem, and annotation-free coverage is a central challenge. The paper adds conditioning to LoRA fine-tuning and reports confirmed external endpoint gains, while noting limits in artifact-type coverage and specificity evidence.
Problem
Whole-slide images contain diverse artifacts that quality-control pipelines must cover without annotation.
Source: §1 · pp. 1–2Method
The paper adds embedding conditioning as a cost-free regularizer during LoRA fine-tuning of a latent diffusion backbone.
Source: §1 · p. 2Results
+0.0073 at 95% and +0.0129 at 97.5% were reported for the external endpoints.
Source: §1 · p. 2Takeaways & Limitations
Reconstruction- and feature-based detection show inverse specialization and are complementary by construction.
Source: §6.4 · p. 18Confirmed gains concentrate in one artifact type, and the external set lacks a clean-slide stratum, leaving specificity claims to development data.
Source: §7.4 · p. 19
Abstract
from arXiv · showhide
Diffusion-based artifact detectors score whole-slide image patches by reconstruction error under a model fine-tuned on clean tissue. We show that conditioning this fine-tuning on random Gaussian embeddings -- resampled at every step from approx. 200 KB of precomputed embedding statistics, with no encoder, no cache, and no change to inference -- consistently widens the clean/artifact separation. A four-step ablation chain shows the benefit requires neither content (shuffled real embeddings), provenance (synthetic Gaussians), a tuned intensity (flat across an 8x variance range), nor per-patch identity (fresh per-step noise); a LoRA-dropout control shows the conditioning pathway specifically, not generic weight perturbation, carries the effect. Patch-level gains of +0.25-0.48 Cohen's d replicate across nine trainings; honest leave-one-slide-out evaluation clears a pre-registered bar in 2/2 seeds; and two pre-registered external endpoints on a 281-case set confirm pooled Delta F1 = +0.0073 (95% CI) and +0.0129 (97.5% CI, two-look corrected). We release the full evaluation protocol, including measured seed noise and selection-optimism pricing.
1. Introduction
Whole-slide artifact detection must cover open-ended defects without relying on costly annotations, while strong reconstruction models can also reconstruct artifacts. The paper introduces a training-time conditioning regularizer and reports confirmed external gains alongside evidence about its mechanism and limits.
1. Introduction
- Open-ended artifact types and expensive pixel-level ground truth make annotation-free coverage a central quality-control challenge in computational pathology.Examples include out-of-focus regions, air bubbles, tissue folds, pen markings, and foreign debris; undetected artifacts can silently corrupt downstream analysis.Source: §1 · pp. 1–2
- The proposed regularizer conditions LoRA fine-tuning of a latent diffusion backbone, while leaving inference byte-identical to the unconditioned baseline.Conditioning uses fresh Gaussian noise shaped by approximately 200 KB of precomputed embedding statistics.Source: §1 · p. 2
- The benefit survives shuffled embeddings, synthetic Gaussians, an 8x variance range, and fresh per-step draws, while LoRA dropout does not reproduce it.The foundation encoder is therefore removable from the design.Source: §1 · p. 2
- The evaluation protocol measures seed noise at patch and slide levels and prices the optimism of shortcut leave-one-slide-out threshold selection.The paper reports this as a pre-registered, noise-calibrated protocol with two confirmed external endpoints.Source: §1 · pp. 2–3
- +0.0073 at 95% and +0.0129 at 97.5% were reported for two confirmed external endpoints on a 281-slide set.The second endpoint used a declared two-look multiplicity correction.Source: §1 · p. 2
- A feature-density baseline family reveals inverse specialization between reconstruction-based and feature-based detection.The paper also reports a data-scaling regime that worsens detection and an artifact class whose detectability collapses across sites.Source: §1 · pp. 2–3
2. Related work
Existing artifact-detection approaches face limits in annotation coverage, while reconstruction-based diffusion methods offer a clean-tissue alternative. This paper positions conditioning-pathway noise as a training-only regularizer for that approach.
2.1 Artifact detection and QC in computational pathology
- Reconstruction-based detection models clean tissue and flags patches that reconstruct poorly, while DiffusionQC applies this paradigm with latent diffusion and denoising error.Supervised QC pipelines are limited by their label sets, and pixel-level ground truth is scarce for some common artifacts.Source: §2.1 · p. 3
2.2 Diffusion models for unsupervised anomaly detection
- Prior diffusion anomaly-detection work addresses identity shortcuts from the scoring side, whereas adaptive denoising depth is complementary to this training-only intervention.The cited work spans medical imaging, industrial inspection, and latent-space reformulations.Source: §2.2 · p. 3
2.3 Zero-shot and feature-density alternatives
- Feature-density methods model normal features directly, but are inversely specialized to reconstruction error and depend on a foundation encoder at inference.They perform strongly on structurally foreign content and weakly on photometric degradation.Source: §2.3 · p. 4
2.4 Noise injection, conditioning, and regularization
- The dropout control indicates pathway identity matters: conditioning dropout intermittently removes conditioning [13], while the method replaces it with fresh noise only during training for discrimination.Random pairing of conditions also served data-free distillation of generative models, the same mechanical act aimed at a different target.Source: §2.4 · p. 4
2.5 Positioning
- The contribution is a training-only, annotation-free, foundation-model-free regularizer for reconstruction-based artifact detection, evaluated under a preregistered two-look external protocol.The authors report no prior work using conditioning-pathway noise purely as a train-time regularizer for anomaly scoring.Source: §2.5 · pp. 4–5
3. Method
The method modifies LoRA fine-tuning of a diffusion-based reconstruction detector, while keeping its inference scoring unchanged. Its evaluation uses fixed slide splits and pre-registered effect bars based on measured seed noise.
3.1 Base pipeline
- The detector fine-tunes a PixCell latent-diffusion backbone on clean patches and scores patches by fixed-timestep denoising error under null conditioning.Slide heatmaps tile the patch scores over tissue; encoder-free refers to removing UNI2-h from all stages while retaining the PixCell VAE.Source: §3.1 · p. 5
3.3 The proposed modification
- The sole training change is a fresh Gaussian conditioning draw at every step, sampled from per-position UNI2-h embedding moments estimated once on clean training patches.The moment summary is about 200 KB; inference remains byte-identical to the unconditioned baseline.Source: §3.3 · p. 6
3.4 Cost accounting
- Training adds one Gaussian sample per step and a single offline moment-estimation pass, with no added deployment cost.The proposal removes the encoder and embedding cache associated with self-conditioning; its summary statistics occupy about 200 KB.Source: §3.4 · p. 7
3.5 Pre-registration and seeds
- Claims were preregistered before runs, with effect bars calibrated to measured seed noise and external claims using frozen thresholds and a declared multiplicity correction.Measured seed-noise floors were 0.126 Cohen's d at patch level and 0.0112 pooled F1 at slide level.Source: §3.5 · p. 7
4. Mechanism: what the conditioning benefit does — and does not — require
Fresh synthetic Gaussian conditioning during fine-tuning raises patch-level clean/artifact separation, while inference remains unchanged. Ablations show that content and embedding provenance are unnecessary for the benefit.
4.1 The final scheme, stated first
- During LoRA fine-tuning, fresh cross-attention conditioning input at every training step and for every patch accompanies clean/artifact separation rising from Cohen's d = 1.34 to 1.76 (t = 650); inference is unchanged.Source: §4.1 · pp. 8–9
4.2 Content is unnecessary
- Shuffled real embeddings retain the benefit: d = 1.79, at or above the correctly paired self-conditioning seeds, indicating that patch-specific content is unnecessary.Self-conditioning yields d = 1.59–1.67 across three seeds.Source: §4.2 · p. 9
4.3 Provenance is unnecessary
- Moment-matched synthetic Gaussian conditioning is indistinguishable from shuffled real embeddings, with d = 1.78 / 1.71 across two seeds.An independent redraw gives d = 1.77; the three-run family range is 0.069 Cohen's d, half the measured seed noise.Source: §4.3 · p. 9
4.4 Intensity is not a tunable
The conditioning benefit persists across broad intensity changes and with fresh noise rather than stable patch identities. A LoRA-dropout control does not reproduce the effect, pointing to the conditioning pathway specifically.
4.4 Intensity is not a tunable
- Across an 8x standard-deviation range, Cohen's d changes by less than seed noise; even x4 preserves the benefit despite token norms about 3.6x beyond pretrained cross-attention exposure.The authors characterize intensity as having no sensitive hyperparameter.Source: §4.4 · pp. 9–10
4.5 Identity is unnecessary
- Fresh per-step noise matches the family band at d = 1.76 / 1.755, showing stable patch-specific keys are unnecessary.The passage places the effect in the noise-injection-as-regularization family.Source: §4.5 · p. 10
4.6 The pathway is necessary
- LoRA dropout without conditioning gives d = 1.23, an excess of −0.11 over baseline, while the ablation table reports that only this pathway control loses the benefit.Generic weight-space stochasticity does not reproduce the effect at this probe.Source: §4.6 · p. 10, Table 1 · p. 10
4.7 Summary of the ablation chain
- Table 1 compares patch-level separation after removing one conditioning-signal property per row; content-free variants retain the benefit, unlike the pathway control.Ranges span the seeds or redraws for each arm.Source: Table 1 · p. 10, §4.7 · p. 10
4.8 A first-order account
Fresh conditioning noise is framed as a first-order sensitivity penalty on the cross-attention pathway, consistent with the ablations but not a proof of the mechanism. The account does not explain why the measured benefit stays flat across an 8× intensity range.
4.8 A first-order account
- Fresh conditioning noise is equivalent to a first-order Tikhonov penalty on sensitivity to the conditioning input, weighted by injected per-dimension variances.The derivation expands the denoiser around the mean embedding; the zero-mean noise removes the linear cross term in expectation.Source: §4.8 · p. 11
- The penalty targets the cross-attention pathway, pressuring adapters to rely less on conditioning and encode cleaner unconditional structure.The residual-times-curvature term vanishes at the optimum because the noise-prediction target does not depend on the conditioning input.Source: §4.8 · p. 11
- Only the conditioning distribution’s first two moments enter this account, so embedding content and provenance do not matter, while fixed and fresh draws coincide in expectation.The classical noise-injection result transfers to this setting; generic weight-space perturbation is not equivalent.Source: §4.8 · p. 11
- The first-order account does not explain the measured effect’s flatness across an 8× intensity range, and the x4 arm lies outside the classical small-noise limit.The authors offer the account as a parsimonious frame consistent with the ablations, not as proof.Source: §4.8 · p. 12
5. Evaluation protocol
The evaluation protocol measures seed variability, avoids evaluation-slide threshold selection, and preregisters external confirmation to make reported gains legible against measured noise and selection effects. It also records experiment provenance so readers can check when protocols were fixed relative to results.
5. Evaluation protocol
- The protocol is a contribution alongside the reported gains because it measures noise and prices selection effects.The motivation is that reported external effects are comparable to or smaller than measured threshold-selection optimism and seed variability.Source: §5 · p. 12
5.1 Measured noise floors
- +0.126 Cohen’s d is the patch-level seed noise floor, and 0.0112 pooled F1 is the slide-level floor.Three baseline trainings differing only in seed establish these floors; comparisons are stated in their units, and no single-run difference below 2 × the patch-level floor was treated as an effect.Source: §5.1 · p. 12
5.2 Honest slide-level selection
- +0.016 F1 optimism was measured for selecting thresholds on evaluation slides, so reported slide-level scores use leave-one-slide-out selection.Each held-out slide is scored using a configuration selected on the remaining slides; the grid-max figure is reported separately as the shortcut’s price.Source: §5.2 · pp. 12–13
5.3 Pre-registered external confirmation
- External confirmation uses a frozen two-look budget, one pooled ΔF1 endpoint per look, and a stratified paired case-level bootstrap.The second look uses a predeclared 97.5% confidence interval; hypotheses arising from the external findings require new data.Source: §5.3 · p. 13
5.4 Provenance
- Each run records its commit, arguments, and environment, while a version-controlled notebook preserves preregistrations, reading rules, dated results, and deviations.This lets readers check when each protocol was frozen relative to its result.Source: §5.4 · p. 13
6. Results
Conditioning improves patch-level separation and slide-level performance, with gains confirmed on two pre-registered external endpoints. Feature-density scorers trail diffusion overall and show different per-type strengths.
6.1 Patch level: a twelve-training family
- At t = 800, all variants remain above baseline, though not every excess clears seed noise; at t = 650, air-bubble and out-of-focus separations stay stable, indicating global widening rather than artifact re-ranking.The t = 800 family range is 2.50–2.79 versus 2.42 baseline; at t = 650, per-type ranges are 1.35–1.55 and 1.99–2.16, respectively.Source: §6.1 · p. 14
- d = 1.59–1.82 across conditioned variants, versus baseline d = 1.34, with every variant above the pre-registered bar and separation flat across an 8x intensity range.The reported excess is +0.25 to +0.48 Cohen's d against seed noise s_seed = 0.126.Source: Figure 2 · p. 14, §6.1 · pp. 14–15, Table 2 · p. 15
6.2 Slide level: honest leave-one-slide-out
- 0.6716 and 0.6714 pooled F1 for the final configuration clear the pre-registered 0.6679 bar in both honest leave-one-slide-out seeds.The baseline is 0.6567, with measured slide-level seed noise s_slide = 0.0112.Source: §6.2 · p. 15
6.3 External confirmation: two pre-registered endpoints
- ΔF1 +0.0073 (95% CI +0.0042 to +0.0110) and +0.0129 (97.5% CI +0.0068 to +0.0201) were confirmed on the two GrandQC looks.The stricter interval corresponds to the declared two-look correction.Source: §6.3 · p. 16, Table 3 · p. 17
6.4 Why diffusion: the density-family baseline
- Feature-density scorers trail diffusion pooled, but their per-type ranking reverses: kNN separates air-bubbles better, while diffusion separates out-of-focus artifacts better.The diffusion detector's externally confirmed gains concentrate in out-of-focus, the class the feature family misses.Source: Table 4 · p. 17, §6.4 · pp. 17–18
7. Discussion
The patch-level effect is substantial but attenuates at external F1, where gains concentrate in out-of-focus detection. Discussion highlights transfer, clean-data curation, scope limits, and directions for further evaluation.
7.1 What the effect is, and how large
- +0.25–0.48 Cohen's d at patch level corresponds to 20–33% relative margin widening, while frozen-protocol external gains are +0.0073 and +0.0129 F1.The measured patch-to-deployed-F1 chain discounts by roughly 5x, and external gains concentrate in out-of-focus detection.Source: §7.1 · p. 18
7.2 Transfer is the open problem — and it is an operating-point problem
- Fold sensitivity falls from 0.47 in development to 0.04–0.05 externally for every model, bounding what a single fixed-timestep detector can claim across sites.The authors attribute the transfer problem to the GrandQC fold population and point to per-type operating points as a hypothesis requiring confirmation on new data.Source: §7.2 · pp. 18–19
7.3 Data curation dominates architecture
- Relaxing clean-patch curation while scaling training data 4x inverted air-bubble separation (d = −1.31), while removing an artifact class from contrastive training data had no effect on detecting it.Together, these results motivate prioritizing what the clean manifold excludes over how much it includes.Source: §7.3 · p. 19
7.4 Limitations
- The study uses one backbone, H&E stain, 10x magnification, and LoRA r16; external gains concentrate in one artifact type, and the external set lacks a clean-slide stratum.The mechanism account is described as first-order rather than proven.Source: §7.4 · p. 19
7.5 Future work
- Future work includes per-type or adaptive timestep policies, complementary reconstruction- and feature-based scores where encoder cost is acceptable, and richer weight-space perturbation probes.The authors would evaluate these directions using pre-registered endpoints on previously unconsulted data.Source: §7.5 · pp. 19–20
8. Reproducibility statement
The authors release code, checkpoints, the laboratory record, and the materials needed to reproduce training and external evaluation.
8. Reproducibility statement
- Code, trained-adapter checkpoints, and the complete laboratory record—including pre-registrations, frozen reading rules, dated results, and deviations—are released.The repository and archived deposit are identified in the reproducibility statement.Source: §8 · p. 20
- A single script rebuilds the deposit with integrity checks, and run outputs include provenance sidecars recording commits, arguments, and environment.Source: §8 · p. 20
- The public GrandQC MPP10 evaluation uses fully specified, label-free recalibration, and the shipped ~200 KB of embedding statistics supports training without development-data access.Source: §8 · p. 20
Declarations
The declarations report author contributions, funding, data sources, ethics, AI assistance, and competing interests.
Declarations
- The contribution statement credits Konstantinos Moutselos and Ilias Maglogiannis with the listed research and writing roles.Source: Declarations · p. 20
- The authors declare no known competing financial interests or personal relationships that could have influenced the work.Source: Declarations · p. 20
- Primary data come from public TCGA whole-slide images, AIRAQc artifact annotations, and the GrandQC external evaluation cohort.Source: Declarations · p. 21
- The work was carried out within Project PRODIGY, supported by the Greek-Chinese Bilateral Research and Technology Cooperation programme and ERDF co-funding.Source: Declarations · p. 21
- The study used publicly available, de-identified images and released annotations, collected no new human data, and required no ethics approval.Source: Declarations · p. 21
- The authors disclose using a large language model to help design and analyze experiments, write evaluation code, and draft and revise text; they reviewed and verified the work.Source: Declarations · p. 21