Paper commentary
Deep CORAL: Correlation Alignment for Deep Domain Adaptation
Deep CORAL adds a correlation loss that aligns deep features across domains
- Problem Deep networks lose accuracy when the target domain differs from the labelled source domain. Linear CORAL aligns features across domains but cannot be trained end-to-end inside a deep network.
- Method Deep CORAL adds a differentiable CORAL loss to AlexNet's classification loss. The loss penalizes the squared distance between source and target covariances of fc8 activations, so alignment and classification train together.
- Results Deep CORAL reaches 72.1 average accuracy over six Office domain shifts. That compares with 71.3 for DAN and 70.4 for linear CORAL.
Why deep features still need adaptation
Deep convolutional features tolerate low-level image changes to a degree, yet they still lose accuracy when the input distribution moves to a new domain. Collecting labelled data for every new setting is impractical, which motivates unsupervised domain adaptation, where the target domain has images but no labels. CORAL addresses this by matching the second-order statistics of source and target with a linear transformation, and it performs well despite its simplicity.
Its limits are that the transformation is linear and the pipeline is not end-to-end: features are extracted first, transformed, and only then fed to a separately trained SVM.
A differentiable CORAL loss
The central move is to add a penalty to the training objective that measures how far the source and target feature covariances are from each other, computed on the activations of a chosen layer. For d-dimensional activations with source covariance \( C_S \) and target covariance \( C_T \), the loss is \( \ell_{CORAL} = \frac{1}{4d^2}\|C_S - C_T\|_F^2 \), the squared Frobenius norm of the covariance difference divided by 4d².
Each covariance is built from the mini-batch matrix of activations: \( C_S = \frac{1}{n_S-1}\left(D_S^\top D_S - \frac{1}{n_S}(\mathbf{1}^\top D_S)^\top(\mathbf{1}^\top D_S)\right) \), with \( C_T \) defined the same way from the target batch and \( n_T \) examples.
The gradient with respect to the source activations carries the sign opposite to the gradient with respect to the target activations, and both are routed through the covariance difference \( C_S - C_T \). The two branches share network parameters, so the same layers receive the alignment gradient from both domains, and the covariances are batch estimates rather than statistics over the whole dataset.
Why the CORAL term needs the classifier
Minimising the classification loss alone tends to overfit the source domain and reduce target performance. Minimising the CORAL loss alone has a degenerate solution: a network can map every source and target input to one point, which makes the covariance difference zero while leaving no usable classifier. The training objective therefore adds the classification loss to a weighted sum of CORAL losses over t layers, with each weight λ trading adaptation against source classification accuracy.
The weight is set so that the classification loss and the CORAL loss are roughly equal at the end of training; the authors call this a reasonable choice because they want features that are discriminative and also close across domains.
Network placement and training settings
The CORAL loss is attached to fc8, the last classification layer of AlexNet, which the authors chose as the most general placement because most deep classifiers end in a fully connected layer. The fc8 layer has 31 outputs, one per Office category, and is initialised from N(0, 0.005); its learning rate is 10 times that of the other layers because it trains from scratch.
The remaining layers start from parameters pre-trained on ImageNet and keep their original layer-wise settings.
In the training phase the batch size is 128, the base learning rate is 10−3, the weight decay is 5×10−4 and the momentum is 0.9. The implementation uses Caffe with the BVLC Reference CaffeNet for all experiments.
Office protocol and baselines
The Office dataset has 31 object categories drawn from Amazon, DSLR and Webcam, and the protocol uses all labelled source data and all target data without labels. Each of the three domains serves once as source and once as target in turn, which gives six shifts in total.
Seven methods are compared: the CNN without adaptation, GFK, SA, TCA, CORAL, DDC and DAN. GFK, SA, TCA and CORAL use fc7 features fine-tuned on the source domain and a linear SVM, while DAN is run on fc8 for a direct comparison with Deep CORAL. Some baseline numbers are taken from other authors under the same setting and others come from re-running the authors' released code.
Accuracy across the six Office shifts
Averaged over the six shifts, Deep CORAL reaches 72.1, against 71.3 for DAN, 70.4 for linear CORAL and 70.1 for the CNN without adaptation. The CORAL row is the linear method on fc7 features with an SVM, so it differs from Deep CORAL in both feature extraction and classifier.
The paper counts Deep CORAL as highest on three of the six shifts; on the other three shifts the margin to the best baseline is at most 0.7. Deep CORAL reaches 66.4 on A→W, and on D→A it ties DAN at 52.8. The table gives ± spreads for the deep methods, but the text does not state how many runs stand behind them.
Training dynamics on A→W
With the CORAL loss, target-domain test accuracy is higher while source-domain training accuracy stays strong.
At the start the CORAL loss is small and the classification loss is large, because the fc8 layer is randomly initialised; after a few hundred iterations the two losses are about equal. The CORAL loss does not decrease monotonically during training, even though it limits the domain distance.
Without the CORAL loss the CORAL distance grows to more than 100 times the value seen with the loss. The authors attribute this to fine-tuning without adaptation overfitting the features to the source domain, so the CORAL term keeps the domains close while the features are fine-tuned.
Relation to MMD-based and adversarial adaptation
The CORAL loss is similar to minimising MMD with a polynomial kernel, which the authors see as the link to these methods. The authors argue that it is more powerful than DDC, which aligns only sample means, and simpler to optimise than DAN and ReverseGrad.
Limitations
The loss is applied only at fc8 of AlexNet, and the text does not test other layers or network architectures. The experiments cover only the Office benchmark with its six shifts. The loss weight is chosen by a matching rule at the end of training, and no sweep over the weight is reported. The baselines mix numbers from other reports with re-runs, and ReverseGrad and DLID do not appear in Table 1.
Paper info
- Authors
- Baochen Sun, Kate Saenko
- Venue
- arXiv · Preprint
- First published
- 2016-7-6
- Added
- 2026-11-12
- Updated
- 2016-7-6
- Version
- v1
- arXiv
- 1607.01719
- Category
- cs.CV · cs.AI · cs.LG · cs.NE
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
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
Baochen Sun, Kate Saenko (2016). Deep CORAL: Correlation Alignment for Deep Domain Adaptation. arXiv:1607.01719v1. https://arxiv.org/abs/1607.01719v1
BibTeX
@misc{sun2016deep,
title = {{Deep CORAL: Correlation Alignment for Deep Domain Adaptation}},
author = {Baochen Sun and Kate Saenko},
year = {2016},
eprint = {1607.01719},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1607.01719v1}
}