- Introduced by
- Goodfellow, I. et al. (GAN); Wang & Ramanan (transfer to GAN)
- Year
- 2014–2018
- Type
- Generative model with transferred weights
- Family
- Deep learning / NLP / CV
What does it do?
Transfer Learning GAN initialises a Generative Adversarial Network, or its generator and discriminator, from weights pretrained on a large source dataset, and then fine-tunes it on a smaller target dataset.
The aim is to reuse low- and mid-level feature representations learned from the source, so that the target model needs less data than a network trained from scratch. The transfer-to-GAN approach is associated with the 2018 ECCV paper 'Transferring GANs: generating images from limited data'.
The intuition behind the method
A GAN trained from scratch on a very small image set often struggles, because the generator receives a weak and unstable learning signal and may produce low-diversity or unrealistic samples. Transfer Learning GAN starts instead from a generator whose early layers already encode generic visual structure, such as edges and textures, learned from a large source corpus such as ImageNet or FFHQ. Fine-tuning then adjusts these representations toward the target domain. The discriminator is adapted in the same way, so that its judgement of realism reflects the new data rather than the source.
History
Generative Adversarial Networks were introduced by Goodfellow et al. in 2014. Transfer to GANs was studied in a 2018 ECCV paper by Wang et al., 'Transferring GANs: generating images from limited data', which frames the problem as generating images when data are limited. Later work on large-scale GAN training, such as Progressive GAN and StyleGAN, produced high-quality pretrained generators that can serve as transfer sources. Augmentation-based methods such as ADA and DiffAugment were subsequently developed to stabilise GAN training with limited data.
When to use it
Choose Transfer Learning GAN when the target domain has too few examples to train a GAN from scratch reliably, and a large related source dataset or a strong pretrained GAN checkpoint is available. Typical cases are domains where data collection is expensive, such as medical imaging, rare species photography, industrial defect synthesis, or stylised face generation. Do not use it when source and target domains share little low-level or semantic structure, for example natural images and molecular graphs, since negative transfer is likely. It is also unnecessary when the target dataset is large enough for scratch training. If a diffusion model or VAE fits the generation task better, one of those may be the more suitable choice.
Limitations and considerations
- Negative transfer: when source and target features differ strongly, the fine-tuned model can perform worse than a simpler baseline or a model trained from scratch.
- FID and related metrics are unreliable on very small target sets, where estimates are statistically noisy, which makes objective comparison difficult.
- Pretrained checkpoints carry licence terms that may restrict commercial use or redistribution of derived generators.
- Mode coverage is bounded by the source: modes absent from the source dataset are unlikely to emerge from fine-tuning on a small target set.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Can produce usable generators from target sets too small for stable scratch training, because the early layers are already trained on a large source dataset.
- Reduces training time and compute relative to scratch training, since fine-tuning starts from converged weights.
- Adaptation depth is adjustable: fewer layers are released for close domains and more for distant ones.
- Compatible with augmentation and regularisation methods such as ADA, DiffAugment and EWC, which address the overfitting that arises with scarce data.
- Pretrained generators such as StyleGAN2 trained on FFHQ are publicly available, so fine-tuning can begin without training a source model from scratch.
Applications
- Medical image synthesis: generating additional samples of rare conditions for classifier training, by adapting a pretrained checkpoint to a small clinical dataset. Suitability depends on the source domain and must be validated for each task.
- Creative and stylised face generation: adapting a face-pretrained generator such as StyleGAN2 trained on FFHQ to a new visual style using a few hundred examples.
- Industrial defect synthesis: producing defect-like images to supplement scarce real defect examples for quality-control models.
- Remote sensing: adapting a generator to specific imaging conditions. Transfer from natural-image checkpoints to aerial or satellite data is less well established and should be validated carefully.
- Biodiversity datasets: augmenting small wildlife photograph collections before training downstream species classifiers.
How it works
How it works
A GAN, commonly StyleGAN2, BigGAN or a similar architecture, is first trained on a large and diverse source dataset. The learned weights are the asset that transfer reuses: in image GANs, earlier layers tend to capture low-level structure such as textures and edges, while deeper layers capture more semantic structure. The pretrained generator and discriminator together form the starting point for adaptation.
Before fine-tuning, a decision is made about which layers stay fixed and which are trainable. The number of released layers is typically chosen by considering how close the source and target domains are and how many target examples are available. Closer domains and smaller datasets generally favour freezing more layers, while more distant domains may require adapting more of the network. Freezing protects general low-level features from being overwritten by a small, noisy target set. The exact depth is an empirical choice rather than a fixed rule.
The generator and discriminator are fine-tuned jointly on the target data with the standard minimax GAN objective shown in the mechanics formula. The objective itself is not changed for transfer: the transfer effect comes from the initialisation and from the restricted set of trainable layers. Learning rates are usually set lower than in pretraining, so that the pretrained representations are not overwritten too quickly. The adversarial game continues, with the generator trying to produce samples that the discriminator cannot separate from real target images.
Formula
\min_G \max_D \, \mathbb{E}_{x \sim p_{\text{data}}}[\log D(x)] + \mathbb{E}_{z \sim p_z}[\log(1 - D(G(z)))]With limited target data, the generator can overfit the discriminator or collapse onto a few modes. Techniques used against this include elastic weight consolidation (EWC), which penalises changes to parameters judged important for the source task; freezing parts of the discriminator; and differentiable augmentation (DiffAugment or ADA), which augments both real and generated images so that the discriminator is less able to memorise the small target set. The most suitable option depends on the dataset and is usually checked empirically.
Generated samples are typically assessed with Frechet Inception Distance (FID) against the target dataset, complemented by perceptual measures such as LPIPS or by review from domain experts. With small target sets FID estimates are noisy, so repeated runs with different random seeds are advisable to judge stability. Visual inspection should accompany any single metric.
Common pitfalls
- Choosing a source checkpoint from a semantically unrelated domain without checking that its features transfer to the target.
- Evaluating FID on the same small target set used for fine-tuning, which gives optimistically biased scores.
- Training on a very small target set without DiffAugment or EWC-type regularisation, which can lead to discriminator memorisation and generator collapse.
- Unfreezing all layers at a high learning rate, which can overwrite pretrained representations (catastrophic forgetting).
- Relying on FID alone without visual inspection, which can miss artefacts or partial mode collapse.
Frequently asked questions
How similar must the source and target domains be for transfer to help?
Transfer helps most when low- and mid-level visual features, such as edges, textures and lighting, are shared between domains. Natural-image pretraining may transfer to some medical imaging tasks, but this should be checked for each case rather than assumed. Transfer to symbolic or graph-structured data is unlikely to help. A direct check is to compare the FID of a fine-tuned model with that of a scratch-trained model on a held-out subset of the target data.
How many target images do I need?
No reliable universal minimum exists. With strong regularisation such as ADA or DiffAugment, similar source and target domains can work with small sets, and perceptual quality tends to degrade as the set shrinks. The required size depends on the domain, the checkpoint and the chosen regularisation, so a pilot run on your own data is advisable.
Should I freeze the discriminator or the generator first?
One plausible starting point is to keep the early discriminator layers fixed, since they respond to generic low-level features, and to let higher layers adapt. For the generator, a plausible starting point is to keep early blocks fixed and release later blocks, adding more blocks as the domain distance grows. These are working hypotheses rather than established rules, so compare several freezing depths on a held-out subset of the target data.
Can I use this with diffusion models instead of GANs?
Yes. Transfer learning is also applied to diffusion models, for example through DreamBooth or LoRA fine-tuning of Stable Diffusion. Which family performs better on very small datasets depends on the task. If image quality and training stability matter more than sampling speed, a fine-tuned diffusion model is worth comparing directly.
How do I evaluate quality when my target set is tiny?
FID estimates become statistically noisy when the number of real images is small. Kernel Inception Distance (KID) is sometimes proposed as a complementary metric for small sample sizes. Combine these metrics with qualitative inspection by domain experts, and report results across several random seeds to characterise variance.
Related methods
Sources
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A. & Bengio, Y. (2014). Generative Adversarial Nets. Advances in Neural Information Processing Systems (NeurIPS), 27, 2672–2680.
Open publication referenceWang, Y. & Ramanan, D. (2018). Transferring GANs: generating images from limited data. European Conference on Computer Vision (ECCV), 11205, 220–236.
Open DOI reference