Let a model assign probabilities to the tokens that actually occurred, and let be the average surprise in bits. Derive the identity for the perplexity. Then compute the perplexity of the two-token sequence with and , and explain why the arithmetic mean of the two per-token perplexities is not the sequence perplexity.
Worked solution
Write the exponent as Exponentiating base 2 gives For , the product is , so The per-token values are and , whose arithmetic mean is 51. Perplexity is built from an average of logarithms, and exponentiating an average of logarithms gives a geometric mean, not an arithmetic one. The geometric mean is pulled toward the small value; the arithmetic mean is pulled toward the large one. This derives the bridge between the sequence product of section 24.1 and the average surprise of section 24.2.