Paper · 2021-12-01 · cs.CV
The Norm Must Go On: Dynamic Unsupervised Domain Adaptation by Normalization
DUA adapts a trained network to shifted test data by updating only the BatchNorm running mean and variance, one unlabeled sample at a time, using a batch of 64 augmented copies and a decaying momentum. No backpropagation. Author-reported: CIFAR-10C level-5 mean error 26.8% (ResNet-26) vs 49.2% source-only, using 80 samples.
Domain adaptationBatch normalizationdomain-adaptationbatch-normalizationtest-time-adaptationcorruption-robustnessobject-detection
arXivPDFCodeMarkdown15 min read
AI-compiled by claude-haiku-5-5 on 2026-11-09, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
A neural network that learned on clean photos often fails when the photos look different, for example in fog, with sensor noise, or at night. Inside the network, each normalization layer stores an average and a spread of the values it saw during training, and those stored numbers are wrong for the new photos. This is the problem the paper addresses.
The fix is simple. The method keeps every learned weight fixed and only nudges those stored averages toward the new data, one incoming image at a time. To get a usable estimate from a single image, it makes a small batch of randomly cropped, flipped and rotated copies of that image. The first updates move the averages a lot and later updates move them less, so the estimate settles. No gradients are computed, so the cost stays close to ordinary inference. The method was shown to work with fewer than 1% of the unlabeled test images.
TL;DR
DUA (Dynamic Unsupervised Adaptation) updates only the running mean and variance of each BatchNorm layer while a stream of unlabeled test samples arrives §3.2. It uses a momentum that decays with each sample eq. 4 eq. 5 and a 64-copy augmented batch per sample §5.4. The paper reports strong results on corruption benchmarks and fog and rain detection, using 25 to 100 test samples per dataset, and no backpropagation §1 tab. 1 tab. 4. Check the Paper vs code section before comparing numbers: the released code reports the best score over the whole stream.
Problem
Models trained on one distribution lose accuracy under a shift, even a slight one, and the paper cites this loss for corruption and weather benchmarks §1. Unsupervised domain adaptation normally needs many labeled source images and a large unlabeled target set, and often retraining §1 §2. The paper targets dynamic settings: a pretrained model with no training data, a few unlabeled samples from a changing environment (e.g. autonomous driving in bad weather) and real-time use §1.
Related test-time methods that recompute batch statistics from scratch
need large test batches, and gradient-based test-time methods need
backpropagation at test time §1 §2. This card follows arXiv v2
(updated 2022-04-04), the version that fetch retrieved.
Method
Batch normalization. A BatchNorm layer normalizes each incoming activation with a training mean and variance, then applies a learned scale and shift §3.1 eq. 1. During training those statistics are running averages with momentum rho eq. 2 eq. 3. At test time the running statistics are fixed §3.1.
DUA. All weights stay fixed. Only the expected value and variance used by the BatchNorm layers are replaced by estimates from the target stream, starting from the source statistics as a prior §3.2. Each target sample updates the estimates once, sequentially §3.2. The update has the same form as eq. 2 and eq. 3, but the momentum at step k is rho_k plus a lower bound zeta, and rho_k decays geometrically eq. 4 eq. 5. The variance update mirrors the mean update eq. 6 eq. 7.
Batch per sample. For each incoming sample the method builds a batch of augmented copies. The paper uses random horizontal flips, random crops and rotations §3.2. The supplemental material states rotations of 0, 90, 180 and 270 degrees app. A. The batch size is 64 in the experiments §5.4. The paper notes that a batch of 8 still gives most of the benefit §5.4 fig. 6. Corruption types from the benchmark are not used as augmentations §3.2.
Why the schedule. With a fixed momentum the estimates are unstable or converge slowly §3.2 fig. 3. The decaying momentum starts with larger steps to move the distributions apart and later uses smaller steps to keep the estimates stable fig. 3.
Equations, as in the paper:
\hat{x} = \frac{x - \mathbb{E}[X]}{\sqrt{\mathrm{Var}[X] + \epsilon}} \cdot \gamma + \beta eq. 1
\hat\mu_k = (1-\rho)\,\hat\mu_{k-1} + \rho\,\mu_k eq. 2
\hat\sigma^2_k = (1-\rho)\,\hat\sigma^2_{k-1} + \rho\,\sigma^2_k eq. 3
\hat\mu_k = \bigl(1-(\rho_k+\zeta)\bigr)\,\hat\mu_{k-1} + (\rho_k+\zeta)\,\mu_k eq. 4
with \hat\mu_0 = \hat\mu_s, \rho_k = \rho_{k-1}\,\omega, \rho_0 = 0.1 eq. 5
\hat\sigma^2_k = \bigl(1-(\rho_k+\zeta)\bigr)\,\hat\sigma^2_{k-1} + (\rho_k+\zeta)\,\sigma^2_k eq. 6
with \hat\sigma^2_0 = \hat\sigma^2_s, \rho_k = \rho_{k-1}\,\omega, \rho_0 = 0.1 eq. 7
Here \mu_k and \sigma^2_k are the mean and variance of the incoming batch §3.1. The paper defines 0<\zeta<\rho_0 as the lower bound of the momentum §3.2.
Procedure, one sample at a time. The paper gives it in prose and equations, and it has no numbered algorithm. The pseudocode below follows the equations and the released code.
# DUA: adapt BatchNorm statistics one sample at a time [§3.2] [eq. 4]-[eq. 7]
# Input: trained model with BN layers; unlabeled test stream;
# rho_0 = 0.1, omega = 0.94, zeta = 0.005 [§3.2] [§4.3]
# Output: BN running statistics adapted to the stream
def adapt_stream(model, stream, rho_0, omega, zeta):
# Momentum starts at rho_0 and decays per sample [eq. 5] [eq. 7]
rho = rho_0
for sample in stream:
# Decay before use: the first update uses rho_0 * omega
# [code: methods/dua.py#L45] [code: methods/dua.py#L72]
rho = rho * omega
# Weight of the new batch statistics, floored at zeta [eq. 4]
momentum = rho + zeta
# Make 64 augmented copies of the one sample [§5.4]
# [code: methods/dua.py#L126]
batch = make_augmented_batch(sample, size=64)
# Rotate each copy by a random 0, 90, 180 or 270 degrees [app. A]
# [code: utils/rotation.py#L33-L45]
batch = random_rotate(batch)
# Only BN running statistics change; weights stay fixed [§3.2]
set_bn_momentum(model, momentum)
model.set_bn_train_mode()
# Forward pass: running mean and variance are updated from the
# statistics of the 64 copies [eq. 4] [eq. 6]
model(batch)
# The output of this pass is discarded [code: methods/dua.py#L79]
model.eval()Input normalization, the CIFAR augmentation and the rotation details come from the code, not the paper. See Paper vs code.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| initial momentum rho_0 | 0.1 | §3.2 eq. 5 eq. 7 | Code: hard-coded mom_pre = 0.1 dua.py |
| momentum decay omega | 0.94 | §4.3 app. B | Code default --decay_factor 0.94 main.py. Chosen from the sweep in app. B fig. 8; higher omega is unstable, lower is slow |
| momentum lower bound zeta | 0.005 | §4.3 | Code default --min_mom 0.005 main.py. Constraint 0 < zeta < rho_0 §3.2 |
| momentum used at sample k | rho_0 · omega^k + zeta | eq. 4 eq. 5 | Derived from the equations, not stated as a formula. About 0.099 at k=1 and 0.0057 at k=80 |
| adaptation batch size | 64 copies per sample | §5.4 dua.py | §3.2 says only "a small batch". Batch of 8 gives most of the gain §5.4 fig. 6. Code hard-codes 64; --batch_size (default 8 main.py) is a different setting |
| number of adaptation samples | CIFAR-10C 80; CIFAR-100C 80; ImageNet-C 100; KITTI-Fog/Rain 25; MNIST 30; SVHN 30; USPS 20; Office-31 40; VIS-DA 40; SODA10M 30 | app. A (tab. num_samples) | Paper says results saturate at these counts app. A. Code default is 80 for all datasets main.py. See Paper vs code |
| CIFAR augmentation | random crop (padding 4 in code), horizontal flip, rotation | §3.2 app. A dua.py | Crop padding and rotation details: code only |
| CIFAR input normalization | mean 0.5, std 0.5 per channel | not stated in paper data_loader.py | Code only |
| optimizer / backprop | none | §1 | Only BN statistics are written |
| source model, CIFAR ResNet-26 | batch 128, 150 epochs, SGD lr 0.1, momentum 0.9, weight decay 5e-4, multi-step at 75 and 125 (gamma 0.1) | app. A | Source training, not DUA; "random cropping and horizontal flipping" |
| source model, digits | 2 conv + 2 linear + 2 BN layers; dropout 0.25 and 0.5; ADADELTA; 15 epochs; batch 64 | app. A | Source training, not DUA; experiments not in released code |
| source model, Office-31 / VIS-DA | ImageNet-pretrained ResNet-18 (ResNet-50 for VIS-DA); SGD lr 0.1, momentum 0.9, weight decay 5e-4; 100 epochs; milestones at 60 and 75 (gamma 0.1) | app. A | Fine-tuning, not DUA; not in released code |
| source model, YOLOv3 detection | COCO-pretrained YOLOv3, retrained 100 epochs per split, batch 20; other settings from the Ultralytics implementation | app. A | Training code is in the repository training_yolov3.py; its settings were not compared with these values |
| hardware | single NVIDIA RTX 3090 | app. A | Author-reported |
Results
Author-reported. Setup: corruption benchmarks at severity 5 (15 corruption types) with ResNet-26 (compared with TTT and NORM) and Wide-ResNet-40-2 (compared with TENT); ImageNet-C with ResNet-18; YOLOv3 for KITTI-Fog and KITTI-Rain §4.1 §4.2 §4.3. Baselines use the whole test set, while DUA uses under 1% of it §4.3.
CIFAR-10C, top-1 error (%), severity 5 tab. 1
| Model / method | G.noise | S.noise | I.noise | Defocus | Glass | Motion | Zoom | Snow | Frost | Fog | Bright | Contrast | Elastic | Pixel | JPEG | Mean |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ResNet-26 Source | 67.7 | 63.1 | 69.9 | 55.3 | 56.6 | 42.2 | 50.1 | 31.6 | 46.3 | 39.1 | 17.1 | 74.6 | 34.2 | 57.9 | 31.7 | 49.2 |
| ResNet-26 TTT | 45.6 | 41.8 | 50.0 | 21.8 | 46.1 | 23.0 | 23.9 | 29.9 | 30.0 | 25.1 | 12.2 | 23.9 | 22.6 | 47.2 | 27.2 | 31.4 |
| ResNet-26 NORM | 44.6 | 43.7 | 49.1 | 29.4 | 45.2 | 26.2 | 26.9 | 25.8 | 27.9 | 23.8 | 18.3 | 34.3 | 29.3 | 37.0 | 32.5 | 32.9 |
| ResNet-26 DUA | 34.9 | 32.6 | 42.2 | 18.7 | 40.2 | 24.0 | 18.4 | 23.9 | 24.0 | 20.9 | 12.3 | 27.1 | 27.2 | 26.2 | 28.7 | 26.8 |
| WRN-40-2 Source | 28.8 | 22.9 | 26.2 | 9.5 | 20.6 | 10.6 | 9.3 | 14.2 | 15.3 | 17.5 | 7.6 | 20.9 | 14.7 | 41.3 | 14.7 | 18.3 |
| WRN-40-2 TENT | 15.8 | 13.5 | 18.7 | 8.1 | 18.7 | 9.1 | 8.0 | 10.3 | 10.8 | 11.7 | 6.7 | 11.6 | 14.1 | 11.7 | 15.2 | 12.3 |
| WRN-40-2 DUA | 15.4 | 13.4 | 17.3 | 8.0 | 18.0 | 9.1 | 7.7 | 10.8 | 10.8 | 12.1 | 6.6 | 10.9 | 13.6 | 13.0 | 14.3 | 12.1 |
Columns are the 15 corruptions in the order given in tab. 1, then the mean. Headline: DUA reaches 26.8 mean error with ResNet-26, against 31.4 for TTT and 32.9 for NORM. With Wide-ResNet-40-2, DUA (12.1) is slightly below TENT (12.3) and well below source (18.3) tab. 1. The paper states that DUA uses 80 samples on CIFAR-10C app. A; the table caption says the TENT and TTT/NORM rows use the whole test set §4.3. The paper calls the ResNet-26 result a new state of the art § Results (CIFAR-10/100C).
CIFAR-100C, top-1 error (%), severity 5 tab. 2
| Model / method | G.noise | S.noise | I.noise | Defocus | Glass | Motion | Zoom | Snow | Frost | Fog | Bright | Contrast | Elastic | Pixel | JPEG | Mean |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ResNet-26 Source | 89.5 | 88.8 | 95.5 | 68.4 | 83.3 | 65.0 | 63.5 | 62.4 | 74.9 | 70.3 | 42.9 | 83.0 | 61.1 | 84.4 | 65.5 | 73.2 |
| ResNet-26 TTT | 83.8 | 83.0 | 86.8 | 59.9 | 77.7 | 57.9 | 59.2 | 61.5 | 70.6 | 70.5 | 44.5 | 69.8 | 56.5 | 80.2 | 60.3 | 68.1 |
| ResNet-26 NORM | 72.5 | 72.7 | 77.1 | 48.6 | 69.3 | 49.7 | 47.9 | 59.5 | 59.7 | 58.4 | 41.8 | 53.1 | 58.8 | 57.3 | 67.7 | 59.6 |
| ResNet-26 DUA | 67.9 | 67.3 | 72.6 | 47.9 | 66.1 | 51.6 | 46.6 | 58.1 | 57.6 | 54.4 | 41.3 | 58.6 | 55.3 | 53.3 | 60.7 | 57.3 |
| WRN-40-2 Source | 65.7 | 60.1 | 59.1 | 32.0 | 51.0 | 33.6 | 32.4 | 41.4 | 45.2 | 51.4 | 31.6 | 55.5 | 40.3 | 59.7 | 42.4 | 46.7 |
| WRN-40-2 TENT | 40.3 | 39.9 | 41.8 | 29.8 | 42.3 | 31.0 | 30.0 | 34.5 | 35.2 | 39.5 | 28.0 | 33.9 | 38.4 | 33.4 | 41.4 | 36.0 |
| WRN-40-2 DUA | 42.2 | 40.9 | 41.0 | 30.5 | 44.8 | 32.2 | 29.9 | 38.9 | 37.2 | 43.6 | 29.5 | 39.2 | 39.0 | 35.3 | 41.2 | 37.6 |
On CIFAR-100C, DUA beats TTT and NORM with ResNet-26 (57.3 vs 59.6 for NORM) and trails TENT with Wide-ResNet-40-2 (37.6 vs 36.0) tab. 2. The text calls this "competitive with TENT" § Results (CIFAR-10/100C).
ImageNet-C, top-1 error (%), severity 5, ResNet-18 tab. 3
| Method | G.noise | S.noise | I.noise | Defocus | Glass | Motion | Zoom | Snow | Frost | Fog | Bright | Contrast | Elastic | Pixel | JPEG | Mean |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Source | 98.4 | 97.7 | 98.4 | 90.6 | 93.4 | 89.8 | 81.8 | 89.5 | 85.0 | 86.3 | 51.1 | 97.2 | 85.3 | 76.9 | 71.7 | 86.2 |
| TTT | 96.9 | 95.5 | 96.5 | 89.9 | 93.2 | 86.5 | 81.5 | 82.9 | 82.1 | 80.0 | 53.0 | 85.6 | 79.1 | 77.2 | 74.7 | 83.6 |
| NORM | 87.1 | 89.6 | 90.5 | 87.6 | 89.4 | 80.0 | 71.9 | 70.6 | 81.5 | 66.9 | 47.8 | 89.8 | 73.5 | 64.2 | 68.5 | 77.3 |
| DUA | 89.4 | 87.6 | 88.1 | 88.0 | 88.6 | 84.7 | 74.3 | 77.8 | 78.4 | 68.6 | 45.6 | 95.9 | 72.2 | 66.5 | 67.4 | 78.2 |
On ImageNet-C the mean error of DUA (78.2) is slightly above NORM (77.3). The paper calls the result "on-par" with all baselines § Results (ImageNet-C).
KITTI-Fog and KITTI-Rain, mAP@50 for YOLOv3, most severe level tab. 4
| Setting | Method | Car | Pedestrian | Cyclist |
|---|---|---|---|---|
| KITTI → KITTI-Fog (30 m visibility) | Source only | 30.9 | 34.1 | 16.2 |
| DUA | 51.4 | 48.5 | 33.1 | |
| Fully supervised | 71.3 | 64.5 | 63.2 | |
| KITTI → KITTI-Rain (200 mm/hr) | Source only | 80.7 | 66.7 | 54.6 |
| DUA | 86.3 | 70.3 | 66.7 | |
| Fully supervised | 92.3 | 76.1 | 78.2 |
The text reports mean gains over the source model of 17.7 mAP for fog and 7.1 mAP for rain § Results (Object Detection). From the Table 4 rows, the fog gain averages 17.3 (see Paper vs code).
Natural and cross-domain shifts and digits, supplemental app. C
| Task | Source only | DUA | Fully supervised | Metric |
|---|---|---|---|---|
| SODA10M day→night, car / ped / cyclist | 75.3 / 48.3 / 50.1 | 77.2 / 49.9 / 51.6 | 86.9 / 55.7 / 63.2 | mAP@50 |
| KITTI→SODA10M, car / ped / cyclist | 43.6 / 13.9 / 18.9 | 49.4 / 17.2 / 23.1 | 84.8 / 46.1 / 61.2 | mAP@50 |
| SODA10M→KITTI, car / ped / cyclist | 80.1 / 55.5 / 33.9 | 81.3 / 56.3 / 35.1 | 91.8 / 71.3 / 76.5 | mAP@50 |
| KITTI-Fog 40 m, car / ped / cyclist | 39.6 / 39.3 / 20.2 | 61.3 / 53.5 / 39.9 | 77.8 / 68.1 / 70.5 | mAP@50 |
| KITTI-Fog 50 m, car / ped / cyclist | 48.2 / 45.9 / 27.3 | 69.6 / 59.7 / 48.4 | 82.2 / 71.3 / 74.2 | mAP@50 |
| KITTI-Rain 100 mm/hr, car / ped / cyclist | 93.2 / 80.5 / 81.1 | 94.9 / 81.7 / 83.2 | 95.4 / 83.2 / 84.1 | mAP@50 |
| KITTI-Rain 75 mm/hr, car / ped / cyclist | 95.5 / 82.6 / 83.6 | 96.1 / 83.2 / 86.0 | 96.6 / 84.1 / 87.2 | mAP@50 |
| MNIST / SVHN / USPS pairs, six transfers (accuracy %) | 66, 58, 78, 16, 42, 9 | 71, 68, 86, 33, 55, 28 | 94, 96, 95, 85, 97, 91 | accuracy |
| Office-31, six transfers (classification error %) | 38.4, 34.3, 12.9, 61.4, 4.2, 66.1 | 33.2, 29.6, 5.7, 51.9, 2.0, 59.7 | 27.1, 11.3, 3.9, 34.1, 1.2, 22.3 | error |
| VIS-DA (classification error %), ResNet-50 | 57.4 | 47.2 | 23.7 | error |
Digit transfers in the digit row are, in order, SVHN→USPS, SVHN→MNIST, MNIST→USPS, MNIST→SVHN, USPS→MNIST, USPS→SVHN. Office-31 transfers are Amazon→Webcam, Amazon→DSLR, DSLR→Webcam, DSLR→Amazon, Webcam→DSLR, Webcam→Amazon app. C. The paper says DUA is not meant to beat specialized domain-adaptation methods there, but to serve as a first step before them app. C.
Lower severities. The paper reports consistent improvements at severity levels 1 to 4 for CIFAR-10C, CIFAR-100C and ImageNet-C app. B. The per-table numbers are in the supplement and are not copied here.
Ablations (CIFAR-10C, ResNet-26, author-reported).
- Sample order: over 300 shuffled runs, error after 5 samples is 36.4 ± 0.4, after 25 samples 28.3 ± 0.19, and after 100 samples 27.2 ± 0.09, from a source error of 49.2 §5.1.
- Continuous adaptation: on KITTI-Fog with day → fog → day cycles, the text quantifies the day-domain drop at iteration 100 as 5.8% and reports fast recovery §5.2 fig. 4.
- Batch-norm layers: adapting all BN layers gives the best result; the paper notes individual gains are slightly larger at later layers §5.3 fig. 5.
- Augmentation and batch size: batch 64 is used; batch 8 gives most of the benefit with a minor loss; the source error is 49.2 §5.4 fig. 6.
- Momentum decay: omega = 0.94 balances stability and speed app. B fig. 8.
Paper vs code
Code: the official repository jmiemirza/DUA at commit
5a2197154405ce947006558180f430d64b99c626, read from raw/code/2112.00463.
The paper names the repository in §4.3. The repository has no LICENSE file, so
its code is cited only, never quoted.
- The reported number is the best over the stream, selected on the test
set. The paper reports the value after a fixed number of samples, where
results saturate app. A. The code evaluates the full test set after every
sample and keeps the minimum error (or maximum mAP) over all steps. The
selection uses test labels. Code:
resultsis appended every step, thenadaptation_result = min(results)for error metrics dua.py. The paper does not state a selection rule. - Sample count. The paper lists 25 samples for KITTI-Fog and KITTI-Rain and 100 for ImageNet-C app. A. The code uses one default of 80 for all datasets and no per-dataset override main.py. The README runs use this default README.md.
- ImageNet-C adaptation transform. The paper says it uses an ImageNet pretrained ResNet-18 §4.3 app. A and does not describe the adaptation transform. The code's default branch, used for every non-YOLOv3 dataset, crops 32×32 with padding 4, flips, and normalizes with mean and std 0.5 dua.py. The ImageNet image getter returns the raw file, with no resize datasets.py. The ImageNet test path resizes to 256, center-crops 224 and uses ImageNet mean and std data_loader.py. If the code is right, the adaptation statistics come from a different input scale and size than evaluation. This was read from the code, not run.
- KITTI input scaling. The YOLOv3 adaptation transform ends with a
ToTensorthat already maps 0–255 to 0–1 dua.py. The adaptation input then divides by 255 again dua.py. The test path divides once testing_yolov3.py. This reads as a double scaling of the adaptation inputs. It was read from the code, not run, and the paper does not mention it. - Momentum index. The paper defines rho_0 = 0.1 and rho_k = rho_{k-1} omega eq. 5 but does not say whether the first update uses k = 0 or k = 1. The code uses rho_1 = 0.1 × 0.94 = 0.094, so the first momentum is 0.099 dua.py dua.py dua.py.
- Input normalization. The paper does not state a mean or std. The code uses mean 0.5 and std 0.5 for CIFAR data_loader.py.
- Batch size flag. The adaptation batch is hard-coded to 64 copies
dua.py dua.py. The
--batch_sizeflag defaults to 8 main.py and does not set the adaptation batch. - Datasets not in the release. The paper reports digits, Office-31, VIS-DA, SODA10M and KITTI cross-domain results app. C. The released code's dataset choices are CIFAR-10, ImageNet, ImageNet-mini and KITTI main.py config.py. The digit, Office-31, VIS-DA and SODA10M experiments are not in the repository.
- Matching numbers. The README reproduces the CIFAR-10C Wide-ResNet-40-2 DUA row with 80 samples and mean error 12.1 README.md, the same as tab. 1.
- Sample order. The code takes the test images in dataset order, one per step dua.py. The shuffled runs in §5.1 are not in the release.
The rotation augmentation agrees between paper and code: each copy gets one of four angles, drawn uniformly app. A rotation.py.
Pitfalls
- Oracle selection inflates numbers. The released code's reported value is the best step on the test set (see Paper vs code, item 1). A reimplementation that reports the value after a fixed sample count will differ. Decide which one you report and say so.
- Fixed count versus stream. Paper results use fixed counts (80, 100, 25, ...). Use the same count per dataset when comparing with the paper.
- Momentum floor keeps moving the statistics. Momentum never drops below zeta = 0.005, so the statistics keep changing at that rate after the decay has flattened eq. 4 eq. 5. The paper does not discuss long streams beyond the reported counts.
- Source-statistic prior. The first steps use large momentum (about 0.099 by the code's schedule), so the first few samples dominate the final statistics. Check the first 10 steps in any reimplementation dua.py.
- Batch statistics from augmented copies. Each update uses statistics of 64 augmented versions of one image, not of a real batch §3.2. The augmentations are not the test corruptions §3.2. In practice this may shift the statistics away from the true test distribution. The paper's batch-size ablation reports a small loss at batch 8 §5.4.
- Layer coverage. Adapting all BatchNorm layers is best §5.3. A network without BatchNorm cannot use the method, as the abstract states.
- Framework convention. The code sets the framework's BatchNorm momentum to rho_k + zeta, which weights the new batch statistics as in eq. 4 dua.py. Check that a port uses the same convention. The variance update is set by the same momentum eq. 6.
- Cost. The paper claims minimal overhead and no backpropagation §1. In the code, each adaptation step is one forward pass on the 64-copy batch dua.py. The released code also runs a full test-set evaluation after each sample for reporting. That evaluation is not part of the method and is far more expensive.
- Internal arithmetic. The text gives a mean fog gain of 17.7 mAP § Results (Object Detection). The Table 4 rows give (20.5 + 14.4 + 16.9) / 3 = 17.3. The source of the 17.7 figure is not stated.
- Appendix letters are inferred from the appendices environment (A, B, C), not printed in the source. Table and figure numbers were counted from the source order of the main text.
Lineage
- Builds on: batch normalization, which the method reuses unchanged, with its running statistics as the prior §3.1 eq. 1. Ioffe and Szegedy are the citation the paper gives §3.1.
- Compared against: NORM (Schneider et al. 2020; Nado et al. 2020), which recomputes BatchNorm statistics from the whole test set §4.2. TTT (Sun et al. 2020), which uses an auxiliary task and backpropagation at test time §4.2. TENT (Wang et al. 2020), which recomputes statistics and updates scale and shift by entropy minimization §4.2. Adaptive BN (Li et al. 2016) recomputes BatchNorm statistics from scratch on the test set §2.
- Related: the released README points to DISC, a CVPR 2022 workshop extension of DUA, for domain-incremental driving README.md. The paper itself does not cite it.
- Superseded by: not stated in this card.
Source and license
Adapted from “The Norm Must Go On: Dynamic Unsupervised Domain Adaptation by Normalization” by M. Jehanzeb Mirza, Jakub Micorek, Horst Possegger, Horst Bischof (arXiv:2112.00463), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/jmiemirza/DUA at commit 5a2197154405 (none (no LICENSE file in repository)). Any quoted code is shown under that license.