FewRef-5: Fixed-Reference Test-Time Adaptation for Virtual Staining
Wenxuan Wang, Liwen Wang, Mingmin Wu, Xingbo Dong, Zhe Jin
Key points
From the paper's conclusion- We therefore propose FewRef-5, a reference-assisted TTA method for virtual staining built on StainPromptInversion.
Abstract
Virtual staining synthesizes special-stain images from routine hematoxylin and eosin (H&E), extending the information available from an existing digital slide. However, a fixed inference rule can leave available real target-stain references unused, limiting query-specific correction of stain appearance at deployment. Test-time adaptation (TTA) provides a mechanism for this reference-guided, query-specific refinement without retraining the generator. We therefore propose FewRef-5, a reference-assisted TTA method for virtual staining built on StainPromptInversion. We extract tissue-masked optical-density means and standard deviations from five real Masson's trichrome (MAS) training patches and average them into a fixed stain target. A scheduled statistic-matching loss introduces this target into per-query visual-prompt optimization alongside our edge/Gram consistency penalties and the inherited reconstruction objectives. The target remains unchanged across queries, avoiding recursive dependence on earlier generated outputs while the pretrained generator stays fixed. On recorded H&E-to-MAS outputs for 1,989 queries, FewRef-5 reduces target-set FID from 183.201 to 166.904 and increases source-referenced SSIM from 0.92787 to 0.94996 relative to our Edge+Gram variant. Source PSNR and MS-SSIM decrease, showing an endpoint trade-off rather than uniformly better reconstruction.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ViT-Stain: Vision transformer-driven virtual staining for skin histopathology via global contextual learningPLoS ONE · 2026
- Generative AI for misalignment-resistant virtual staining to accelerate histopathology workflowsNature Communications · 2026
- Towards Generalizable and Robust Virtual Staining via Causal Intervention.IEEE transactions on medical imaging · 2026
- Virtual histological staining: toward standardization and clinical translation.Biomedical engineering letters · 2026
- Assessment of Transfer Learning for H&E Virtual Staining in Veterinary Oncology.Journal of imaging · 2026
- Contrastive fine-tuning against stain and scanner bias improves robustness and downstream performance across pathology foundation modelsarXiv · 2026