TACIT: Task-Aware Counterfactual Image Translation for Medical Domain Generalization

TL;DR
Adversarial realism and cycle reconstruction do not verify that a synthetic medical image keeps its label and actually reaches the target domain; TACIT freezes leakage-aware task and domain validators, uses them to guide a counterfactual renderer, and keeps only images both validators accept, reaching 96.04% held-out test accuracy on the cross-hospital Camelyon17-WILDS benchmark.
Abstract
AI-based medical image analysis models often degrade under shifts in acquisition protocol, scanner, staining, or clinical site. Synthetic cross-domain augmentation may mitigate this degradation, but an augmented image is useful as labeled data only if it both preserves source task semantics and matches the requested target-domain appearance. Standard translation objectives, such as adversarial realism and cycle reconstruction, do not directly verify these two properties. To address this gap, we introduce TACIT, a Task-Aware Counterfactual Image Translation framework for audit-first medical augmentation. TACIT first trains leakage-aware task and domain validators, selects low-leakage checkpoints, and freezes the selected validators. The frozen validators supervise a source-start renderer with task-preservation and domain-arrival losses, using same-label target styles from task-conditioned codebooks or references. Candidates generated by the renderer are added to downstream training only if the frozen validators predict both source-label preservation and requested target-domain arrival. We evaluate TACIT on the cross-hospital Camelyon17-WILDS histopathology benchmark, with an additional downstream whole-prostate MRI evaluation on PI-CAI. Multi-seed cross-validator audits show that task-preservation loss, domain-arrival loss, and same-label routing address complementary failure modes. In downstream out-of-distribution classification, validator-filtered TACIT reaches 96.04±0.40% held-out test accuracy on Camelyon17-WILDS, comparable to strong domain-generalization baselines. These results support evaluating synthetic medical augmentation in terms of both task and domain validity, rather than visual plausibility alone.