# CyCADA: Cycle-Consistent Adversarial Domain Adaptation

Cycle-consistent image translation lets segmentation models adapt from synthetic to real roads

Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko and 2 more · arXiv · 2017-11-8

- **Problem** Segmentation models trained on synthetic driving images lose much accuracy on real photos. Feature-level alignment misses low-level appearance differences and can match a car to a bicycle.
- **Method** CyCADA adds cycle-consistency and semantic losses to adversarial image translation. It translates source images into the target style, trains the task model on them, then adapts one intermediate layer.
- **Results** On GTA5 to Cityscapes with VGG16-FCN8s, pixel plus feature adaptation reaches 83.6 pixel accuracy, up from 54 percent for the source-only model in the introduction's example.

## Why synthetic training transfers poorly to real images

A segmentation model trained only on synthetic dashcam frames can label its own domain well yet miss the road in real photographs. In the motivating example, per-pixel label accuracy falls from 93% when the model is trained on real imagery to 54% when it is trained only on synthetic data. The usual remedy is feature-level unsupervised adaptation, which pulls the network's internal features of labeled source images toward those of unlabeled target images.

The alignment is usually measured with a distribution distance such as maximum mean discrepancy, correlation distance or the accuracy of an adversarial discriminator. Matching marginal distributions places no constraint on which source class a target sample lands on, so a target car can be matched to a source bicycle. Alignment deep in the network can also overlook low-level appearance differences that the segmentation task depends on.

## Keeping content while translating pixels

Translation models trained on unpaired images from two domains can change an image's style, but the earlier work cited here was shown only at small image sizes and under limited domain shifts. A translator can also change what an image depicts, so a cat sketch might come back looking like a dog photograph while still matching the target style.

CyCADA's central move is to ask the adapted image to map back to the original, so the translation must keep the content it needs to carry. The cycle-consistency mechanism comes from CycleGAN, which was built for image-to-image generation and was not tied to any particular task. Table 1 places CyCADA beside feature-level, pixel-level and CycleGAN-style methods and marks which of pixel loss, feature loss, semantic loss and cycle consistency each one uses.

## How the losses fit into one objective

The base term is a cross-entropy task loss computed on labeled source images, written as \\( L\_{task}(f\_S, X\_S, Y\_S) = -E\[\\sum\_k 1\[k=y\_s\]\\log \\sigma(f\_S^{(k)}(x\_s))\] \\), where σ is the softmax. A generator G\_{S→T} is trained to turn source images into images that a discriminator D\_T cannot tell apart from real target images. The adversarial term on its own does not guarantee that a translated image keeps the structure of its source, so the method adds a second generator G\_{T→S} with its own GAN loss.

The cycle-consistency loss is an L1 penalty requiring the round trip to return the input, \\( G\_{T\\to S}(G\_{S\\to T}(x\_s)) \\approx x\_s \\), and the same condition applied in the target-to-source direction. The semantic loss reuses the source classifier as a fixed labeler, and it asks that the predicted class of an image stay the same before and after translation.

The authors relate this to content losses in style transfer, where the content to keep is set by the source task model.

A feature-level GAN loss can be added on the task network's features, comparing translated source features with real target features. The full objective sums the task loss on translated source images, the image-level GAN losses, the feature-level GAN loss, the cycle loss and the semantic loss, and it is optimized as a min-max problem over the task model, the generators and the discriminators.

## Running the objective in stages

Training the full objective end to end was memory-intensive, so the segmentation experiments run in stages. The first stage maps source images into the target domain in image space, which is also the stage whose outputs can be inspected visually. The second stage trains a task model on the translated source images with their original labels.

The third stage runs feature-level adaptation between translated source features and real target features on one intermediate layer of that task model.

For the digit experiments, the pixel-level stage produces a classifier trained on CycleGAN-translated images, and the feature-level term is added afterwards.

## Digit adaptation results

The digit experiments use a LeNet variant as the task net and the full training sets for learning, with the standard test sets for evaluation. On SVHN to MNIST, the model without adaptation reaches 67.1 ± 0.6, ADDA reaches 76.0 ± 1.8, and the pixel plus feature variant of CyCADA reaches 90.4 ± 0.4. The pixel-only variant reaches 70.3 ± 0.2 on that shift, so most of the gain over ADDA comes from adding the feature-level term.

On the two smaller shifts, pixel-only adaptation reaches 95.6 ± 0.2 on MNIST to USPS and 96.4 ± 0.1 on USPS to MNIST. CoGAN is reported at 91.2 and 89.1 on those two shifts, and ADDA at 89.4 ± 0.2 and 90.1 ± 0.8. The authors describe the feature-level term as giving only a small benefit on these smaller shifts.

The pixel-da method of Bousmalis et al. reports 95.9% on MNIST to USPS, but it uses some labeled data for cross-validation, so the comparison is not like-for-like.

## What removing each loss does on SVHN to MNIST

Without the semantic loss, CycleGAN-style training on SVHN to MNIST diverged in the reported runs and often flipped labels at random. In one example, the MNIST-style image carries the wrong class while the image reconstructed back to SVHN looks correct, so cycle constraints alone do not secure the semantics. The authors add the semantic loss with labels from a weak source classifier, which resolves this failure in their runs.

Without the cycle-consistency loss there is no reconstruction guarantee, and the translation back to SVHN fails. The semantic loss still encourages correct semantics, but because it depends on the weak labeler, some label flipping remains.

## Cross-season adaptation on SYNTHIA

This setting uses pixel-level adaptation alone with an FCN8s architecture, on front-facing SYNTHIA frames with 13 classes, from 10,852 fall images to 7,654 winter images. The translations make the seasonal change visible, with snow added in the fall-to-winter direction and removed in the reverse direction.

One error the authors describe is snow being added to sidewalks but not to the road, which they read as evidence that the model separates the two during pixel adaptation without pixel labels.

## Synthetic-to-real results on Cityscapes

GTA5 supplies the labeled synthetic images and Cityscapes the real target, with the same 19 classes used in both and 19998 unlabeled Cityscapes training images plus 500 validation images. The GTA5 set contains 24966 images, and the two architectures compared are VGG16-FCN8s, labeled A, and DRN-26, labeled B.

With architecture A, the source-only model reaches 17.9 mIoU, 41.9 fwIoU and 54.0 pixel accuracy, and pixel plus feature adaptation reaches 35.4 mIoU, 73.8 fwIoU and 83.6 pixel accuracy. The target-supervised oracle with architecture A reaches 60.3 mIoU and 93.1 pixel accuracy. The authors report that CyCADA recovers about 40% of the performance lost to domain shift in this setting.

With architecture B, the source-only model reaches 21.7 mIoU, 47.4 fwIoU and 62.5 pixel accuracy, and pixel plus feature adaptation reaches 39.5 mIoU, 72.4 fwIoU and 82.3 pixel accuracy. The introduction quotes the synthetic-to-real pixel accuracy as rising from 54% to 82% without naming the architecture, which is close to the 82.3 reported for architecture B.

A pixel-level translation baseline from Shrivastava et al. did not converge in these runs and scored below the source-only model.

## Limitations

On SYNTHIA fall to winter, CyCADA does not recover full supervised performance. The semantic loss was not used in the segmentation experiments, because loading generators, discriminators and a segmenter together did not fit in memory at submission. Segmentation was evaluated only on SYNTHIA fall to winter and on GTA5 to Cityscapes, so other shifts and tasks were not tested.

The authors treat visual inspection of adapted images as a sanity check and not as evidence of better task performance.

## Paper info

- **Authors**: Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A. Efros, Trevor Darrell
- **Venue**: arXiv · Preprint
- **First published**: 2017-11-8
- **Added**: 2026-11-12
- **Updated**: 2017-12-29
- **Version**: v3
- **arXiv**: 1711.03213
- **Category**: cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1711.03213v3) · [PDF ↗](https://arxiv.org/pdf/1711.03213v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A. Efros, Trevor Darrell (2017). CyCADA: Cycle-Consistent Adversarial Domain Adaptation. arXiv:1711.03213v3. https://arxiv.org/abs/1711.03213v3

**BibTeX**

```
@misc{hoffman2017cycada,
  title = {{CyCADA: Cycle-Consistent Adversarial Domain Adaptation}},
  author = {Judy Hoffman and Eric Tzeng and Taesung Park and Jun-Yan Zhu and Phillip Isola and Kate Saenko and Alexei A. Efros and Trevor Darrell},
  year = {2017},
  eprint = {1711.03213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.03213v3}
}
```

## Other paper commentary

- [The Open Images Dataset V4: Unified image classification, object detection, and visual relationship detection at scale](https://refivu.com/en/papers/a257d9ea-aed6-4a9a-9d02-5e4c50a42a90-the-open-images-dataset-v4-unified-image-classification.md)
- [Generative Image Inpainting with Contextual Attention](https://refivu.com/en/papers/aad66e29-0d9a-49ff-bbf1-91b1b036c9eb-generative-image-inpainting-with-contextual-attention.md)
- [Multimodal Unsupervised Image-to-Image Translation](https://refivu.com/en/papers/f66e468d-e3a2-4e1b-8490-2978cf3d55ff-multimodal-unsupervised-image-to-image-translation.md)
- [ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks](https://refivu.com/en/papers/b77fbb3e-836f-44e3-bbac-9ff51edf4034-vilbert-pretraining-task-agnostic-visiolinguistic.md)
- [Attention Mechanisms in Computer Vision: A Survey](https://refivu.com/en/papers/d03d817b-607b-4760-8cb5-139501ae5964-attention-mechanisms-in-computer-vision-a-survey.md)
- [Frustum PointNets for 3D Object Detection from RGB-D Data](https://refivu.com/en/papers/3af69443-6a48-4c1c-81f3-e2c87f8df280-frustum-pointnets-for-3d-object-detection-from-rgb.md)
- [Language Models (Mostly) Know What They Know](https://refivu.com/en/papers/ffe245df-5662-4bfb-8c0b-899a38b87412-language-models-mostly-know-what-they-know.md)
- [From Local to Global: A Graph RAG Approach to Query-Focused Summarization](https://refivu.com/en/papers/b90240e0-a6fe-4297-adb6-4ebd769e9c60-from-local-to-global-a-graph-rag-approach.md)
- [Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery](https://refivu.com/en/papers/62959e97-b421-4e00-897e-8709c817c9fb-unsupervised-anomaly-detection-with-generative-adversarial.md)
- [A Survey of Motion Planning and Control Techniques for Self-driving Urban Vehicles](https://refivu.com/en/papers/24bd6bbc-d317-4d2c-a94f-ea5736e3e9a2-a-survey-of-motion-planning-and-control-techniques.md)

## Terms in this paper

- [Semantic segmentation](https://refivu.com/en/terms/00dfce7ec404-semantic-segmentation)
- [mIoU](https://refivu.com/en/terms/901dcc5384c2-miou)
- [Cityscapes](https://refivu.com/en/terms/1067bb006500-cityscapes)
- [CycleGAN](https://refivu.com/en/terms/aa174ef15835-cyclegan)
- [pixel accuracy](https://refivu.com/en/terms/623755cb8953-pixel-accuracy)
- [LeNet](https://refivu.com/en/terms/87fa87f5cc38-lenet)
- [CoGAN](https://refivu.com/en/terms/1e724667040e-cogan)
- [ADDA](https://refivu.com/en/terms/4c6ef2751acc-adda)
- [Synthia](https://refivu.com/en/terms/a10cbd630fcc-synthia)
- [cycle-consistency loss](https://refivu.com/en/terms/e9ef865d52d4-cycle-consistency-loss)
- [GAN loss](https://refivu.com/en/terms/b1d20ee7127e-gan-loss)
- [GTA5](https://refivu.com/en/terms/a3a16fd3da40-gta5)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/86c1af43-2e3a-459f-87e6-d7c0653694a6-cycada-cycle-consistent-adversarial-domain-adaptation)
