Prefix probabilities of a generative process #
A generative process — a distribution P : PMF T over complete structures
together with their yields str : T → List W — induces probabilities on
strings: prefixMass is the total mass of the structures whose yield extends
a given prefix ([Sto95]'s prefix probability, computed there by Earley
parsing), and nextProb the conditional word probability it induces. This is
the shared input type of surprisal theory: [Hal01] defines word difficulty
as the log-ratio of successive prefix probabilities, and [Lev08] proves
that ratio equals the relative entropy of the induced belief update
(Studies/Hale2001.lean, Studies/Levy2008.lean).
Main definitions #
consistent— the structures whose yield extends a prefix.prefixMass— the prefix probability.nextProb— the induced conditional word probability.
Main results #
consistent_anti,prefixMass_anti— longer prefixes select fewer structures and less mass.prefixMass_nil— the empty prefix has mass one.
The complete structures whose yield extends the prefix ws.
Equations
- Processing.Expectation.consistent str ws = {t : T | ws <+: str t}
Instances For
Longer prefixes select fewer structures.
The prefix probability: total mass of the structures whose yield extends the prefix.
Equations
- Processing.Expectation.prefixMass P str ws = ∑' (t : T), (Processing.Expectation.consistent str ws).indicator (⇑P) t
Instances For
Longer prefixes carry less mass.
The conditional probability of the next word induced by the generative process.
Equations
- Processing.Expectation.nextProb P str ws w = Processing.Expectation.prefixMass P str (ws ++ [w]) / Processing.Expectation.prefixMass P str ws