13 / 34 · Evaluation
Human evaluation of generative models
How to ask people about generated samples so that the answers mean something, with real-or-generated tests, pairwise preferences and ratings, and the statistics that say how many judgements a conclusion needs.
Precision and recall for generative models · Inception Score
On this page 7
Salimans et al. (2016) showed crowd workers a mix of real CIFAR-10 images and samples from their best generator, half and half, and asked which were real. The workers labelled 78.7% of the images correctly. The authors themselves, looking at the same kind of images, were right more than 95% of the time. And when workers were told after each answer whether they had been right, they quickly learned the generator’s flaws and became harsher judges.
One generator, three different verdicts, depending on who looks and how they are asked. Every metric of this section so far, IS, FID, precision and recall, replaces a person by a network and inherits the network’s blind spots. Human judgement is the reference those metrics are checked against. It is also noisy, expensive and easy to collect badly, and the protocol decides what the numbers mean.
What can be asked#
Four questions cover most human evaluations of generative models:
| Question | What the rater sees | Number reported | Measures |
|---|---|---|---|
| Real or generated? | one image at a time | error rate on a balanced set | realism |
| Which of two is better? | outputs of two models for the same input | win rate, Bradley–Terry or Elo scores | relative preference |
| How good is it? | one output | mean rating on a fixed scale | absolute quality |
| Does it match the input? | a prompt and an output | share of matching outputs, or a win rate | alignment with the condition |
The first question asks the rater to detect something; the others ask for an opinion. Detection has a correct answer on every trial, which makes it easier to check and to calibrate.
Real or generated#
Show an image and ask whether it is real. The fool rate, the share of generated images judged real, approaches 50% when people cannot tell and guess with even odds. But it counts only generated images, so it also measures how readily a rater says “real”. Mixing in an equal number of real images and scoring the error rate over all of them removes this response bias, as the last section of this note works out.
HYPE (Zhou et al., 2019) standardises the protocol. Each rater labels 100 images, 50 real and 50 generated, in random order. HYPE∞ is the error rate with unlimited viewing time: misjudged generated images plus misjudged real ones, divided by 100. At 50% the rater is at chance; above 50% the generated images look more real than the real ones.
HYPE time flashes each image for 100 to 1000 ms and adapts the exposure with a staircase: correct answers shorten it, wrong ones lengthen it. The score is the exposure people need to tell generated from real, so longer means more realistic.
A run uses 30 raters, and the confidence interval comes from resampling whole raters, each with all their answers. In the paper, StyleGAN, a GAN of the next section, trained on FFHQ faces and sampled with the truncation trick, reaches a HYPE∞ of 27.6%, against 19.0% without truncation, with non-overlapping intervals. Truncation narrows the generator toward typical faces: the precision side of the trade-off, which people reward.
Worked example: is 38% different from chance?#
In a balanced test with 100 real and 100 generated images, raters make 76 errors in 200 judgements, an error rate of . The textbook interval misbehaves near 0 and 1 and for small ; the Wilson interval (Wilson, 1927) inverts the score test instead and behaves well everywhere (intervals from the normal approximation). With its centre and half-width are
Where the centre and half-width come from
The interval collects every that the score test at level 5% does not reject, the test that uses the standard error under itself rather than under :
Multiplying out and collecting powers of gives a quadratic inequality:
Its solutions lie between the two roots. Their midpoint is the coefficient of over twice the leading one, which is . Their half-distance is the square root of the discriminant over twice the leading coefficient; the discriminant simplifies as
and taking out gives .
| Quantity | Value |
|---|---|
| centre | |
| half-width | |
| 95% interval | |
| exact binomial test of 76 out of 200 against |
The interval excludes 0.5: raters can tell these images from real ones.
Both calculations treat the 200 judgements as independent trials with one error probability. Judgements by the same rater, or about the same image, are correlated, so a real study’s interval is wider. It should come from resampling raters and images as clusters, as HYPE resamples raters, or from a model with rater and image effects. The numbers here are an idealised baseline.
How many judgements an answer of ±0.05 takes
How many judgements a comparison needs#
The half-width shrinks like , so precision is expensive. To tell a model with a true balanced error rate of from one indistinguishable from data, , with a two-sided test at the 5% level and power 0.8, we need a sample size that comes from the same normal approximation as the A/B test, here for one rate against a fixed . The test rejects when is far from in units of the standard error under ; under the alternative, is approximately normal around with its own standard error. With and the far tail neglected,
Power 0.8 means the rejection threshold sits standard errors above : . Multiplying by and solving for ,
judgements, with . A study of 100 judgements per model detects only large differences. Correlated judgements raise the number further, so 783 is a floor for the study size.
Which of two is better#
Absolute questions are hard to answer consistently; comparisons are easier. Show two outputs for the same input, one from each model, and ask which is better. Many such votes over many pairs of models are summarised by the Bradley–Terry model (Bradley and Terry, 1952). Every model has a score , and the probability that A is preferred to B is
The scores are fitted by maximum likelihood over all observed votes, so models that were never compared directly are placed on one scale through the models they share. The Elo scale is the same model in other units, with ratings :
A worked example. Model A wins 60% of its comparisons against B. Then
If B beats C by the same margin, A is points above C. The odds of a win are , so odds multiply along a chain, , and the model predicts that A beats C with probability , although no one compared them. This transitivity is an assumption. If the votes contradict it, as with rock–paper–scissors preferences, the fit is poor and the scores mislead.
The Bradley–Terry model on the Elo scale
Public arenas apply this at scale. A user submits a prompt, sees two anonymous outputs, votes, and the scores are refitted. Chatbot Arena does this for language models and fits Bradley–Terry coefficients (Chiang et al., 2024); GenAI-Arena does the same for text-to-image, text-to-video and image editing (Jiang et al., 2024). The same model fitted to labellers’ preferences is the reward model of RLHF, and the LLM evaluation note discusses arenas for text.
How good, and does it match#
Absolute ratings. The rater scores one output on a fixed scale, usually 1 to 5, and the mean opinion score (MOS) averages the ratings. The protocol comes from telephone speech quality testing (ITU-T P.800) and is standard for speech synthesis. Its weakness is the scale itself: raters use it differently, some never give a 5, and anchors drift during a session, so MOS values are comparable only within one study with the same raters and instructions.
Alignment with the condition. A conditional model must also produce what was asked for. Text-to-image benchmarks fix a set of prompts that probe known weaknesses, and raters compare two models on image quality and on prompt alignment separately. DrawBench has 200 prompts in 11 categories (Saharia et al., 2022); PartiPrompts has more than 1,600 (Yu et al., 2022). Counting objects, spatial relations and rendered text are typical categories, because models often get them wrong.
Making judgements reliable#
Most of the work is in the design of the study, before any statistics.
Raters do not know which model produced an output, and both the order of trials and the left–right position in a pair are randomised. Outputs are drawn with random seeds; cherry-picked samples measure the authors’ taste. Trials with a known answer, an obvious artifact or a real image shown twice, catch inattentive raters.
Each item is judged by several raters, and their agreement is measured, for example with Cohen’s κ for two raters (LLM evaluation note); low agreement means the question is ambiguous. What “realistic” or “matches the prompt” means is defined with examples, and viewing time is fixed when it matters, as in HYPE time. Every rate or win probability is reported with its interval and the number of judgements behind it.
Against the automatic metrics, people see artifacts that features miss and judge what users will actually see. They cost hours of paid work instead of minutes of compute, and they are reproducible only statistically, given the protocol. In practice automatic metrics follow every training run, and people make the final comparisons and check that the metrics still agree with them.
Where it breaks#
A fake-only test can be won without looking. Suppose a rater cannot tell real from generated at all and answers “real” on 80% of trials, whatever the image.
| Test | What is counted | Result for this rater |
|---|---|---|
| fool rate, generated images only | generated judged real | 80% |
| balanced error rate, 50 real + 50 generated | generated judged real, plus real judged generated |
The fool rate says the generator fools people 80% of the time; it only measured the rater’s habit. On the balanced set the same habit costs as many errors on real images as it gains on generated ones. For a blind rater who answers “real” with any probability , the errors are on generated images and on real ones, and the balanced error rate is : exactly chance, as it should be for a rater who sees nothing. This is why HYPE scores errors over a balanced set. A rater who always says “real” has a fool rate of 100% and still a balanced error rate of 50%.
Realism is also not everything. A model that reproduces its training images perfectly reaches 50% on any real-or-generated test, because its outputs are real images. Human realism tests are blind to diversity and to memorisation, the failures that precision and recall and nearest-neighbour searches with LPIPS catch. And numbers from different instructions, interfaces or rater pools are not comparable, as the opening experiment showed.
What you should remember#
- Ask one of four questions: real or generated, which of two, how good, does it match.
- Score real-or-generated tests as an error rate over a balanced set; there 50% is chance whatever the rater’s bias. HYPE: 50 real and 50 generated per rater, 30 raters.
- A rate needs an interval: 200 independent judgements give about ±0.07, telling 0.45 from 0.5 takes about 783, and correlated judgements need more.
- Bradley–Terry turns pairwise votes into scores; a 60% win rate is 70.4 Elo points.
- Reliability comes from the design: blind, randomised, random seeds, checks, several raters, measured agreement.
Code#
No course notebook covers human evaluation. The two computations of the worked examples, with the standard library and SciPy:
import math
from scipy.stats import binomtest
def wilson(k, n, z=1.96):
p = k / n
d = 1 + z * z / n
centre = (p + z * z / (2 * n)) / d
half = z / d * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n))
return round(centre - half, 3), round(centre + half, 3)
print(wilson(76, 200), round(binomtest(76, 200, 0.5).pvalue, 4))
print(round(400 * math.log10(0.6 / 0.4), 1), 'Elo points for a 60% win rate')
(0.316, 0.449) 0.0008
70.4 Elo points for a 60% win rate
Next#
The evaluation toolkit is complete: IS and FID for sets, LPIPS for pairs, precision and recall for the two kinds of failure, and people as the reference. So far it has judged VAEs, which pay for their likelihood bound with blur. The next note introduces generative adversarial networks, which give up the likelihood altogether and train a generator through a second network that tries to tell its samples from real data. These metrics are how they are judged.
References#
- T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, X. Chen. Improved techniques for training GANs. NeurIPS, 2016. Section 4: human annotators and the effect of feedback; Section 6.2: 78.7% correct on CIFAR-10.
- S. Zhou, M. L. Gordon, R. Krishna, A. Narcomey, L. Fei-Fei, M. S. Bernstein. HYPE: A benchmark for Human eYe Perceptual Evaluation of generative models. NeurIPS, 2019. HYPE time and HYPE∞, 30 raters with bootstrapped intervals, StyleGAN on FFHQ.
- E. B. Wilson. Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 1927.
- R. A. Bradley, M. E. Terry. Rank analysis of incomplete block designs: I. The method of paired comparisons. Biometrika, 39(3/4), 1952.
- W.-L. Chiang et al. Chatbot Arena: an open platform for evaluating LLMs by human preference. ICML, 2024.
- D. Jiang, M. Ku, T. Li, Y. Ni, S. Sun, R. Fan, W. Chen. GenAI Arena: an open evaluation platform for generative models. NeurIPS Datasets and Benchmarks, 2024.
- ITU-T. Recommendation P.800: Methods for subjective determination of transmission quality. 1996.
- C. Saharia et al. Photorealistic text-to-image diffusion models with deep language understanding. NeurIPS, 2022. Imagen and DrawBench.
- J. Yu et al. Scaling autoregressive models for content-rich text-to-image generation. TMLR, 2022. Parti and PartiPrompts.
- S. Ermon. CS236 Deep Generative Models, Stanford University, Fall 2023. Lecture 15, Evaluating generative models: human evaluation as the gold standard, and HYPE.