Adversarial Domain Adaptation
Train a domain critic to tell source from target while the encoder learns to fool it, leaving features the critic cannot separate.
Why Does This Exist?
Moment matching in unsupervised adaptation aligns chosen statistics, which misses whatever was not chosen. Adversarial domain adaptation aligns everything the critic can find: a domain classifier learns to separate source from target features while the encoder learns representations that make the critic fail. When the critic cannot separate, the features are domain-blind at least to that critic's capacity.
It is the strongest alignment when tuned, and the least stable. The umbrella is generalization and adaptation.
Think of It Like This
A forger against an art detective
A forger paints in two styles while a detective learns to name the style of each canvas. The forger studies the detective's calls and adjusts until the detective guesses at chance. The encoder is the forger, the critic is the detective, and gradient reversal is the forger watching the detective work. The analogy stops at truth: a fooled detective proves nothing about beauty, and a fooled critic proves nothing about class meaning.
How It Actually Works
One encoder feeds two heads: the label classifier trained on source labels and the domain critic trained to output source or target. The encoder receives the classifier gradient normally and the reversed critic gradient, so it improves labels while destroying domain signal. A schedule ramps the reversal strength from zero as the critic becomes competent.
Worked example with recomputed numbers
Same daylight to night-rain shift starting at target 0.63. With reversal weight ramped to 0.10, the critic falls from 0.97 to 0.52, essentially chance on two domains, while target classification reaches 0.83 and source holds 0.88. Push the weight to 0.50 and the critic still reads 0.51 but target classification collapses to 0.71, because the encoder now spends capacity hiding domains instead of separating classes. The operating band is narrow and the critic score alone cannot find it.
Stability practice
Pretrain the classifier first, introduce the critic late, and choose the reversal weight on held-out target accuracy, never on critic confusion. Separate optimizers with a slower critic learning rate prevent the oscillation where each side undoes the other nightly.
Watch Out For
Declaring victory at chance critic accuracy
A 0.50 critic score with 0.71 target accuracy is a failed run wearing a good metric, since collapsed features also confuse critics. The symptom is confusion achieved alongside falling class accuracy. Track both curves and keep only runs where critic confusion rises together with target class accuracy.
The Quick Version
- A critic separates domains while the encoder learns to erase the separation.
- The worked run lands the critic at 0.52 with target accuracy 0.83.
- Reversal weight is the whole game: 0.10 helps, 0.50 collapses to 0.71.
- Introduce the critic late with its own slower optimizer.
- Never tune on critic confusion alone; collapsed features confuse critics too.