Generative AI Lab

Eight generative-AI labs: architectures, text, image, video, 3D, synthetic data, multimodal, and training and evaluation, with simulators that run in your browser, a learning path and a specialised assistant.

13interactive experiments

Training and Evaluation

Stability, scaling and evaluation: FID, precision and recall, human evaluation and ethical risks.

  • 3Lessons
  • 1Experiments
  • 0Models
  • 2Projects

Every simulator in this lab is educational: some train small real models on 2-D data in your browser, others use simplified mathematics or locally generated data. What you see is not the output of a large real generative model and does not represent its performance; each experiment states its limits.

Scientific introduction

Training generative models is delicate: it needs tuned learning rates and normalisation, monitoring for collapse (in GANs) and avoiding memorisation (in large models). Evaluation quality has several dimensions none of which replaces the others: fidelity (precision), coverage (recall), diversity, novelty, non-memorisation and safety. Numeric metrics such as FID depend on a particular encoder and on the sample size and can disagree with human judgement.

The evaluation simulator generates known failure modes (dropped modes, collapse, blur, shift, outliers, memorisation) and shows how FD, precision, recall and the copy rate react.

Learning objectives

  • Diagnose mode collapse and memorisation from metrics
  • Read FID, precision and recall with their limits stated
  • Design a sound human evaluation
  • Plan reproducible experiments (seeds and logs)
  • Be aware of risks: bias, ownership, deepfakes, leakage

Core concepts

Precision
What share of the generated samples looks real.
Recall
What share of the real diversity the generator covers.
Novelty and memorisation
Whether a sample is new or a training copy; checked by nearest neighbour.
Reproducibility
The same seed and settings give the same result.
Human evaluation
Judgements by raters with clear instructions, enough raters and agreement statistics.

Lessons, architectures and algorithms

Metric

Generative Evaluation Metrics

FID measures the distance between feature distributions of real and generated data; precision and recall separate quality from coverage; the copy rate reveals memorisation. No single metric …

Read the lesson
Practice

Failure Modes and Diagnosis

Main failure modes: dropped modes, mode collapse, blur, distribution shift, outliers and memorisation. Each has a different signature in FD, precision, recall and copy rate.…

Read the lesson
Simulator

Metrics lab

FD, precision and recall are computed directly on 2-D points.…

Read the lesson

Algorithms and models in this lab

AlgorithmLabCovered hereNote
FID, precision and recallTraining and EvaluationComputed in the browserComputed on 2-D points in the evaluation simulator.

The mathematics

Fréchet distance

\mathrm{FD}=\|\mu_r-\mu_g\|^2+\mathrm{Tr}\big(\Sigma_r+\Sigma_g-2(\Sigma_r\Sigma_g)^{1/2}\big)

Manifold precision/recall

\mathrm{Precision}=\frac1{|G|}\sum_{g\in G}\mathbb 1[g\in \mathrm{manifold}(R)],\quad \mathrm{Recall}=\frac1{|R|}\sum_{r\in R}\mathbb 1[r\in \mathrm{manifold}(G)]

Manifolds are estimated with k-nearest-neighbour balls (Kynkäänniemi et al. 2019).

Diagrams

Worked examples

  • Compare the memorisation mode with the collapse mode in precision, recall and copy rate.
  • Increase the failure severity and watch FD.

Interactive experiments

Suitable datasets

The whole data library

Applied projects

Assessment questions

10 questions on this lab, graded on the server. Start the quiz

Papers and references

  1. M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, S. Hochreiter (2017). GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium. Advances in Neural Information Processing Systems 30 (NeurIPS 2017). doi:10.48550/arXiv.1706.08500
  2. T. Kynkäänniemi, T. Karras, S. Laine, J. Lehtinen, T. Aila (2019). Improved Precision and Recall Metric for Assessing Generative Models. Advances in Neural Information Processing Systems 32 (NeurIPS 2019). doi:10.48550/arXiv.1904.06991
  3. T. Karras, T. Aila, S. Laine, J. Lehtinen (2018). Progressive Growing of GANs for Improved Quality, Stability, and Variation. arXiv:1710.10196 (ICLR 2018). doi:10.48550/arXiv.1710.10196
  4. L. Ouyang, J. Wu, X. Jiang, et al. (2022). Training language models to follow instructions with human feedback. arXiv:2203.02155 (NeurIPS 2022). doi:10.48550/arXiv.2203.02155

Content-specific assistant

Ask the assistant about any concept or equation in this lab; it answers from the lab’s content and points you to the matching lesson and experiment.

Open the assistant

Quizzes · My progress and saved runs

Related DLArabic sections