When Translators Prefer the Wrong Word: Diagnosing and Correcting Prior-Driven Semantic Flips in Unpaired Image Translation

Unpaired image-to-image translation trains a generator to restyle images from one collection (say, video-game street scenes or surgical simulator frames) so they look like another collection (real streets, real operating-room video). No aligned image pairs are used. The generator is trained against a discriminator, a network that tries to tell real target images from translated ones. A known failure is "semantic flipping": the generator paints sky as trees, or instruments as bloody tissue. It does this because the two collections contain different proportions of each class, and turning one class into another is a cheap way to match the target's statistics. Machine translation met a close cousin of this failure long ago. In a new domain, a system often already knows the right domain-specific translation of a word. It still picks the common general-domain one, because its learned preferences are skewed toward general text. We propose to carry that field's error-diagnosis method, and its central lesson, over to image translation.

The proposal has two parts. First, we build a diagnostic that splits each flipped image region into three causes. The region may be a coverage failure: the target collection never shows that class in that appearance. It may be a preference failure: the generator can render the class correctly, but class-proportion mismatch pushes it toward another class. Or it may be an ambiguity failure: the source appearance really does resemble a different target class. Second, we test a simple correction aimed at preference failures. The correction is a class-conditional discriminator whose per-region losses are reweighted by an estimate of the target-to-source class-proportion ratio, and the estimate needs no target labels. Our hypothesis is that preference failures make up most flips on synthetic-to-real benchmarks. If so, correcting the prior should beat smoothness-based and structure-based regularizers, and it should cost less realism than they do.

Core Claim

Each existing semantic-consistency method attacks flipping with one generic regularizer, and none asks why a given region flipped. Lipschitz Regularized CycleGAN for Improving Semantic Robustness in Unpaired Image-to-image Translation (SRUNIT) attributes flipping to mismatched label distributions between GTA and Cityscapes. It adds noise to the generator's internal features and penalizes output changes, which enforces local smoothness. But a flip that is uniform across a whole class is perfectly smooth, so this penalty cannot see it. Exploring semantic consistency in unpaired image translation to generate data for surgical applications (ConStructS) adds multi-scale structural similarity, which compares local brightness, contrast and structure between input and output. That preserves edges and luminance but cannot say whether a region is still "instrument." Self-Attentive Spatial Adaptive Normalization for Cross-Modality Domain Adaptation (SASAN) grounds attention maps in anatomy using source masks. These three papers motivate the problem and supply the baselines.

The diagnostic lens comes from Measuring Machine Translation Errors in New Domains. Its S⁴ taxonomy separates four kinds of lexical error: words never seen, translations never seen, correct translations scored too low, and correct translations lost in search. The paper tests each category with oracle interventions: it adds the missing entries to the system's translation table and measures the gain. In the medical domain, fixing never-seen words gave an 8% BLEU gain and fixing never-seen translations gave 7%. SemEval-2010 Task 17 supplies the causal story we borrow: domain shift flips the probability of each meaning given a word, and an uncorrected prior falls back to the general meaning.

Our claim is that the vision analogue of the "correct translation scored too low" error is measurable. We expect it to dominate flipping on GTA→Cityscapes and on simulator→Cholec80. We also expect it to respond to explicit prior correction rather than to more smoothness or structure constraints. No paper in the file partitions translation errors by cause. None corrects the discriminator's class prior either.

Research Program

The diagnostic. Both benchmarks come with source masks (simulator and game ground truth). The target-side masks exist only for evaluation. A frozen segmentation network, trained on real target data, labels each translated image, and each disagreement with the source mask counts as a flip. We then attribute flips with oracle interventions, following the Irvine et al. design.

To test for preference failures, we retrain the translator on source and target subsets resampled using ground-truth masks on both sides, so that class proportions match at the patch level. A flip that disappears under this oracle matching is a preference failure. A flip that persists, even though the target set contains many patches of the correct class, is an ambiguity failure. We confirm this second category with a nearest-neighbor check: the source appearance should lie closer, in segmenter feature space, to the target patches of the wrong class. A flip is a coverage failure when the target collection has too few patches of the correct class at comparable scale and context.

The output is a per-class, per-cause flip matrix for each baseline method. This is the analytic contribution. It is useful even if our correction fails.

The correction. The discriminator is made class-conditional. It sees each patch together with the source class of that patch; on the target side, it uses pseudo-labels from a segmenter trained on source data. Each patch's adversarial loss is weighted by

$$w(c) = \hat{p}_T(c) / p_S(c),$$

where $p_S(c)$ is the source pixel share of class $c$, read from the masks, and $\hat{p}_T(c)$ is the estimated target share. To get $\hat{p}_T$ without target labels, we take the source segmenter's predicted class shares on target images and invert its confusion matrix, measured on held-out source data. This removes the incentive to reassign classes in order to match proportions. A generator that flips a sky patch into trees is now judged against real sky patches at the correct proportion, instead of being rewarded for filling the target's tree quota.

We implement the correction on top of CUT, the patch-contrastive one-sided translator. CUT is the backbone of both SRUNIT and ConStructS, so the correction is additive and the comparison stays clean. We also sweep the correction's strength and measure realism, to chart the trade-off between preserving structure and producing realistic appearance. FGraDA documents the parallel trade-off in text, where forcing terminology hurts fluency. The image-translation papers report only single operating points.

Baselines

The naive reference points are vanilla CycleGAN and vanilla CUT. On Cityscapes label-to-image, SRUNIT reports mIoU of 21.31 for CycleGAN and 23.43 for CUT. On cholecystectomy, ConStructS reports mean IoU of 0.23 and 0.18 for the same two methods.

The strongest published competitor on street scenes is SRUNIT, which reports 27.23 mIoU on Cityscapes label-to-image. The strongest published competitor on surgery is ConStructS. It reports 0.29 mean IoU on cholecystectomy, and adding its translations to real training data raised downstream Dice from 0.62 to 0.84.

We will rerun all methods ourselves on the same splits, with the same backbone, the same number of iterations and the same frozen evaluation segmenter. Each method gets an identical hyperparameter search budget: the same number of configurations, selected on a held-out source-mask consistency set. Published numbers serve only as sanity anchors for our reproductions.

Beating the strongest competitor has two requirements. First, the corrected model must improve flip-consistency mIoU over SRUNIT on GTA→Cityscapes and over ConStructS on Cholec80, with non-overlapping confidence intervals across three seeds. Second, its realism score (Fréchet Inception Distance on the target set) must be no worse than theirs. The paper's second claim needs one more result: the diagnostic must show that the gain comes from the preference-failure cell of the flip matrix.

The ablations isolate the key ingredient. One runs the class-conditional discriminator with $w(c)=1$, which tests conditioning without prior correction. A second uses the oracle ground-truth $p_T$, which bounds how much error the label-free estimation step costs. A third stacks the correction on SRUNIT and on ConStructS, which tests whether the gains are complementary.

Semi-supervised domain adaptation with CycleGAN guided by a downstream task loss uses a few labeled target images, reporting 4 to 7 mIoU points with 14 labels. It belongs to a different supervision regime, so we report it only as a labeled upper reference.

Why not just…?

Why not just rebalance the source data by class frequency? This is the most serious threat, because our oracle is exactly this idea using ground-truth masks. Street and surgical images are mixtures of many classes, though. Resampling whole images cannot freely set pixel-level class proportions: raising the share of sky also raises the share of the classes that co-occur with it. Resampling crops breaks the scene context the generator needs. The experiments include both image-level and crop-level source rebalancing, driven by the same label-free estimate $\hat{p}_T$. If either matches our method, we will report that. The contribution would then shrink to the diagnostic plus the finding that estimating the prior is what matters.

Why not just add a consistency loss from a frozen segmentation network? This is a direct way to penalize flips, and we include it as a baseline. Its weakness is that the generator can learn textures that fool the frozen segmenter without looking right. The Semi-supervised domain adaptation with CycleGAN paper also notes that a frozen expert trained on one domain misleads the generator when it is itself shifted. Our realism-versus-consistency sweep will show whether this loss buys consistency at a higher realism cost than prior correction. The flip matrix will show which error causes each method actually removes.

Why not just use stronger structural losses, as in ConStructS or SASAN? Structural similarity and anatomy-grounded attention keep boundaries in place, but a region can keep its boundary while changing its class. That is the uniform class-level flip SRUNIT's smoothness cannot catch. The diagnostic will test this directly. If structural losses mostly remove coverage or ambiguity flips and leave preference flips, the two approaches are complementary. The stacking ablation measures that.

Proposed Experiments

The primary benchmarks are GTA→Cityscapes and the ConStructS cholecystectomy setup. The latter uses 20,000 synthetic and 26,000 real Cholec80 images. We add the gastrectomy split, with 3,400 synthetic and 4,500 real images, to test generalization. The file reports no gastrectomy-specific number for ConStructS on Lacuna. As an optional third setting we will use MMWHS CT→MRI, where SASAN reports mean Dice of 0.70 against 0.65 for SIFA. That setting has a near one-to-one class taxonomy, so we expect few preference flips there, which makes it a useful negative control.

The metrics are flip-consistency mIoU, per-class flip rates split by cause, Fréchet Inception Distance, and downstream Dice or mIoU for a segmenter trained on real plus translated data. Our reference for the downstream metric is ConStructS's 0.62→0.84 Dice.

Three checks decide the outcome. The first checks the hypothesis itself: across both primary benchmarks, preference failures must account for the plurality of flips under vanilla CUT. If they do not, we treat the correction as unmotivated and report the taxonomy alone. The second is causal. The correction must remove preference flips substantially more than ambiguity flips, and the label-free and oracle-prior versions must stay close. The third is practical. Downstream segmentation trained with corrected translations must beat ConStructS-augmented training at matched synthetic volume, and it must also beat the best rebalancing baseline. If rebalancing ties, the method claim is dropped.