Erk and Herbelot (2024): How to Marry a Star: Probabilistic Constraints for Meaning in Context #
This file formalizes [EH24]'s situation description systems, which model utterance
understanding as Bayesian inference over the concepts underlying the words of a sentence,
constrained locally by selectional preferences and globally by scenarios. In the graphical model
(§5.1, Figure 5; the sampling process in Appendix A) a scenario mix is drawn from a symmetric
Dirichlet with concentration α, one scenario per concept node is drawn from the mix, one
concept per node is drawn from its scenario's concept distribution, for a role filler from the
Product of Experts of that distribution with the role's selectional constraint (p. 570), and
each node emits its condition label deterministically. SDS.nodePosterior is the posterior over
the concept at one node given the labels of all nodes, mathlib's posterior kernel κ†μ of the
deterministic label kernel against the joint, pushed forward to the node, and
SDS.nodePosterior_apply is the closed form the paper estimates by WebPPL sampling, a ratio of
sums over scenario assignments of per-node fibre masses. The paper's two sentences follow with
their posteriors as functions of α. In a player was holding a bat (§5.1, Table 1) the
stick sense of bat has posterior (α + 1) / (2α + 1), which strengthens as α decreases
(p. 571); in an astronomer married a star (§5.2, Table 2) the person sense has posterior
105α / (115α + 8), so the sun sense strengthens as α decreases (p. 572); and on the star
node the selectional constraint prefers STAR-PERSON while the STARGAZING scenario prefers
STAR-SUN, the conflict of Figure 6.
Implementation notes #
- The Dirichlet prior on the scenario mix is integrated out into the Pólya-urn law of the
per-node scenario draws,
polyaUrn. - Ingredients the paper leaves unspecified are set as follows: HOLD-AGENT and MARRY-AGENT get
the same constraint as the corresponding theme role, and both cancel since the agent concept
is observed; MARRY-THEME gives MARRY itself weight
0, the three stated values already summing to1.
TODO #
- The exact posteriors against the paper's WebPPL estimates from 2000 samples: the astronomer
rows,
105/131 ≈ 0.80and7/13 ≈ 0.54against0.82and0.57, are within sampling error; the bat rows,3/4and11/12against0.82and0.96, are not, and the paper does not describe its WebPPL model in enough detail to locate the difference.
References #
A situation description system: the Dirichlet prior on the scenario mix (as a Pólya urn over scenarios), the per-scenario concept distributions, and the per-role selectional constraints.
- prior : S → ℝ
The parameters of the scenario-mix prior
Dirichlet(α, …, α), the weights of the Pólya urn it integrates out to. - prior_pos (s : S) : 0 < self.prior s
The Dirichlet parameters are positive.
- scenario : S → MeasureTheory.Measure C
P(c | s): the concepts a scenario makes available. - selectional : R → MeasureTheory.Measure C
P(c | r): the selectional constraint of a semantic role.
Instances For
Product of Experts (p. 570): the role-filler distribution for scenario s and role r is
the normalized pointwise product of scenario s and selectional r. When the two share no
concept (fn 10) the row is the zero measure.
Equations
- m.poe = ProbabilityTheory.Kernel.ofWeights fun (p : S × R) (c : C) => (m.scenario p.1) {c} * (m.selectional p.2) {c}
Instances For
The concept distribution at one node: a top-level concept (no role) draws from its scenario alone; a role filler draws from the Product of Experts (Appendix A).
Instances For
The concept nodes of an n-node sentence with roles ρ, conditionally independent given
their scenarios.
Equations
Instances For
The joint law of scenario and concept assignments (Figure 5, nodes 1–9).
Equations
- m.joint ρ = (ProbabilityTheory.polyaUrn m.prior n).compProd (m.emissions ρ)
Instances For
Each node emits its condition label deterministically (Figure 5, nodes 10–14).
Equations
- ErkHerbelot2024.SDS.observe S label n = ProbabilityTheory.Kernel.deterministic (fun (ω : (Fin n → S) × (Fin n → C)) (i : Fin n) => label (ω.2 i)) ⋯
Instances For
The posterior over the concept at node t, given the labels x of all nodes.
Equations
- m.nodePosterior label ρ x t = MeasureTheory.Measure.map (fun (ω : (Fin n → S) × (Fin n → C)) => ω.2 t) ((ProbabilityTheory.posterior (ErkHerbelot2024.SDS.observe S label n) (m.joint ρ)) x)
Instances For
The joint mass of a box of per-node concept events: a sum over scenario assignments of the urn likelihood times the per-node masses.
The node posterior in closed form: the ratio of two scenario-assignment sums of per-node fibre masses — the quantity the paper estimates by sampling.
The scenario-assignment sums on reals: urn likelihoods times per-node real masses.
Evaluation helpers #
A player was holding a bat (§5.1, Figure 5, Table 1) #
The concept inventory (p. 569).
- BALL : BatConcept
- BAT_ANIMAL : BatConcept
- HOLD : BatConcept
- BAT_STICK : BatConcept
- CANDLE : BatConcept
- CAT : BatConcept
- PLAYER : BatConcept
- STONE : BatConcept
- VAMPIRE : BatConcept
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqBatConcept x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqBatScenario x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
The semantic roles of HOLD (p. 569).
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqBatRole x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqBatLabel x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
Equations
Equations
The condition label of each concept (Figure 5, nodes 10–14).
Equations
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.BALL = ErkHerbelot2024.BatLabel.ball
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.BAT_ANIMAL = ErkHerbelot2024.BatLabel.bat
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.HOLD = ErkHerbelot2024.BatLabel.hold
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.BAT_STICK = ErkHerbelot2024.BatLabel.bat
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.CANDLE = ErkHerbelot2024.BatLabel.candle
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.CAT = ErkHerbelot2024.BatLabel.cat
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.PLAYER = ErkHerbelot2024.BatLabel.player
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.STONE = ErkHerbelot2024.BatLabel.stone
- ErkHerbelot2024.batLabel ErkHerbelot2024.BatConcept.VAMPIRE = ErkHerbelot2024.BatLabel.vampire
Instances For
The concepts of each scenario: BASEBALL and GOTHIC give equal probability to five concepts each and zero to the rest (p. 569).
Equations
- One or more equations did not get rendered due to their size.
Instances For
HOLD-THEME: 0 for HOLD and 0.125 for each of the eight concrete objects (p. 569).
HOLD-AGENT, which the paper leaves unspecified, is set the same way.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The bat-sentence system with Dirichlet concentration α.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Node roles (Figure 5): the verb node has no role; player fills HOLD-AGENT and bat HOLD-THEME.
Equations
- ErkHerbelot2024.batRoles = ![none, some ErkHerbelot2024.BatRole.holdAgent, some ErkHerbelot2024.BatRole.holdTheme]
Instances For
The observed labels hold(_), player(_), bat(_) (Figure 5, nodes 12, 10, 14).
Equations
Instances For
A role filler's distribution is uniform on the concepts its scenario and role agree on.
Table 1 in closed form: the posterior probability of the stick sense of bat in
a player was holding a bat is (α + 1) / (2α + 1).
Table 1, α = 0.5: P(stick) = 3/4 (paper's simulation: 0.82).
Table 1, α = 0.1: P(stick) = 11/12 (paper's simulation: 0.96).
The stick preference "grows more pronounced when the concentration parameter α of the
Dirichlet distribution is lower" (p. 571): the posterior is strictly decreasing in α.
An astronomer married a star (§5.2, Figure 6, Table 2) #
The concept inventory (p. 571).
- ASTRONOMER : StarConcept
- STAR_PERSON : StarConcept
- STAR_SUN : StarConcept
- MARRY : StarConcept
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqStarConcept x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqStarScenario x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
The semantic roles of MARRY (p. 571).
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqStarRole x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ErkHerbelot2024.instDecidableEqStarLabel x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
Equations
Equations
The condition label of each concept.
Equations
- ErkHerbelot2024.starLabel ErkHerbelot2024.StarConcept.ASTRONOMER = ErkHerbelot2024.StarLabel.astronomer
- ErkHerbelot2024.starLabel ErkHerbelot2024.StarConcept.STAR_PERSON = ErkHerbelot2024.StarLabel.star
- ErkHerbelot2024.starLabel ErkHerbelot2024.StarConcept.STAR_SUN = ErkHerbelot2024.StarLabel.star
- ErkHerbelot2024.starLabel ErkHerbelot2024.StarConcept.MARRY = ErkHerbelot2024.StarLabel.marry
Instances For
STARGAZING gives equal probability to ASTRONOMER, STAR-SUN and MARRY; STAGE to STAR-PERSON and MARRY (p. 571).
Equations
- ErkHerbelot2024.starScenario ErkHerbelot2024.StarScenario.STARGAZING = {ErkHerbelot2024.StarConcept.ASTRONOMER, ErkHerbelot2024.StarConcept.STAR_SUN, ErkHerbelot2024.StarConcept.MARRY}
- ErkHerbelot2024.starScenario ErkHerbelot2024.StarScenario.STAGE = {ErkHerbelot2024.StarConcept.STAR_PERSON, ErkHerbelot2024.StarConcept.MARRY}
Instances For
MARRY-THEME (p. 571): 0.475 on ASTRONOMER and on STAR-PERSON, 0.05 on STAR-SUN, and
0 on MARRY. MARRY-AGENT, "with a strong preference for human role fillers" but otherwise
unspecified, is set the same way.
Equations
Instances For
The selectional constraint of MARRY's roles as a measure.
Equations
- ErkHerbelot2024.marryTheme = ∑ c : ErkHerbelot2024.StarConcept, ErkHerbelot2024.marryFiller c • MeasureTheory.Measure.dirac c
Instances For
The astronomer-sentence system with Dirichlet concentration α.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Node roles (Figure 6): astronomer fills MARRY-AGENT, the verb node has no role, star fills MARRY-THEME.
Equations
- ErkHerbelot2024.starRoles = ![some ErkHerbelot2024.StarRole.marryAgent, none, some ErkHerbelot2024.StarRole.marryTheme]
Instances For
The observed labels astronomer(_), marry(_), star(_).
Equations
Instances For
A role filler's row is the weight kernel of scenario mass times MARRY's constraint.
Table 2 in closed form: the posterior probability of the person sense of star in
an astronomer married a star is 105α / (115α + 8).
The posterior probability of the sun sense of star is (10α + 8) / (115α + 8).
Table 2, α = 0.5: P(person) = 105/131 ≈ 0.80 (paper's simulation: 0.82).
Table 2, α = 0.1: P(person) = 7/13 ≈ 0.54 (paper's simulation: 0.57).
"The more emphasis there is on a coherent scenario (the lower the value of α), the more
probability mass is given to the situation where an astronomer marries a giant ball of plasma"
(p. 572): the sun posterior is strictly decreasing in α.
Figure 6: the two constraints on star conflict #
Selectional side: MARRY-THEME prefers the person sense of star to the sun sense
(p. 571: 0.475 against 0.05).
Scenario side: a coherent STARGAZING scenario prefers the sun sense, which STAR-PERSON is excluded from (p. 571).
Figure 6: "either the concept for star conflicts with the selectional constraint, or it conflicts with the preference for a coherent scenario": on the star node the selectional constraint prefers STAR-PERSON while the STARGAZING scenario prefers STAR-SUN.