Canonical RSA pipeline #
The single L0 → S1 → L1 pipeline for Rational Speech Act models
[FG12] [Deg23], built directly on the Core/Probability
shell with no bundled configuration.
The pragmatic speaker S1 is the softmax of a utility score : St → U → EReal
mapping a speaker state (a world, or a world × latent pair) to a per-utterance
utility; an utterance is inapplicable exactly when its utility is ⊥ (softmax
weight 0). The standard informativity utility is rsaUtility = α·(log L0 − cost),
but any utility plugs in the same way — action-utility ([HTB+25]) and
belief-utility speakers included. The pragmatic listener L1 is the joint
Bayesian posterior over world × latent, with marginals .fst/.snd.
Positivity is supplied once as a ViableSpeaker instance (no utterance has
infinite utility; every state has an applicable utterance), so per-paper speakers
carry no tsum ≠ 0 / ≠ ⊤ plumbing.
A prediction is stated in the *_prefers_iff vocabulary, each a one-line wrapper
over a Core/Probability decomposition lemma (PMF.softmax_lt_iff_score_lt,
PMF.posterior_fst_lt_iff): the partition and the marginal cancel, leaving a
comparison of utilities / conditional-joint sums.
Main definitions #
RSA.Canonical.ViableSpeaker— positivity mixin discharging the softmax obligations.RSA.Canonical.S1— pragmatic speaker,PMF.softmaxof a viable utility.RSA.Canonical.rsaUtility— the standard informativity utilityα·(log L0 − cost).RSA.Canonical.L1— pragmatic listener, jointPMF.posterioroverworld × latent.
Main statements #
RSA.Canonical.S1_prefers_iff— speaker preference ↔ utility comparison.RSA.Canonical.L1_world_prefers_iff/L1_latent_prefers_iff— listener marginal preference ↔ conditional-joint-sum comparison.
Implementation notes #
Non-latent models take St = W and use the foundation PMF.posterior_lt_iff_score_lt
directly (the latent = Unit collapse). The IsCovering ⇒ ViableSpeaker (rsaUtility …)
bridge for standard informativity speakers is added when first needed.
Pragmatic speaker #
A speaker utility score : St → U → EReal is viable when no utterance has
infinite utility and every state has at least one finite-utility (applicable)
utterance — precisely the conditions under which the softmax speaker is
well-defined. Supplied as an instance, it discharges the PMF.softmax positivity
obligations so per-paper speakers need no explicit tsum-positivity plumbing.
No utterance has
+∞utility.- some_finite (s : St) : ∃ (u : U), score s u ≠ ⊥
Every state has at least one applicable (finite-utility) utterance.
Instances
The canonical pragmatic speaker at state s: the softmax of a viable
utility. The single speaker the library instantiates; the standard informativity
form is rsaUtility, while action/belief-utility speakers supply their own score.
Equations
- RSA.Canonical.S1 score s = PMF.softmax (score s) ⋯ ⋯
Instances For
Cross-utterance prediction: the speaker prefers u₂ to u₁ at state s
iff u₂ has the higher utility. The partition function cancels.
≤ companion of S1_prefers_iff.
= companion of S1_prefers_iff: score symmetry.
The speaker assigns positive probability to any applicable (finite-utility)
utterance — the witness for discharging L1 marginal positivity.
Standard informativity utility #
The standard informativity utility α·(log L0(u | w) − cost u), EReal-valued
so an inapplicable utterance (L0 = 0 ⇒ log = ⊥) is ⊥ (softmax weight 0).
Plug into S1; the rpow speaker RSA.S1Belief is the cost-free case.
Equations
- RSA.Canonical.rsaUtility L0 cost α w u = ↑α * ((L0 w u).log - ↑(cost u))
Instances For
Pragmatic listener #
The canonical pragmatic listener: the joint Bayesian posterior over
world × latent given the observed utterance u. World/latent marginals are
.fst/.snd.
Equations
- RSA.Canonical.L1 S joint u h = PMF.posterior S joint u h
Instances For
Cross-world prediction: marginalising the latent, L1 favours world w₂
over w₁ iff the conditional-joint sums favour it.
≤ companion of L1_world_prefers_iff.
= companion of L1_world_prefers_iff: conditional-joint-sum symmetry.
Cross-latent prediction: marginalising the world, L1 favours latent l₂
over l₁ iff the conditional-joint sums favour it.
≤ companion of L1_latent_prefers_iff.
= companion of L1_latent_prefers_iff: conditional-joint-sum symmetry.
Power-utility informativity speakers #
The cost-free informativity speaker at a natural exponent α —
S1(u|s) ∝ L0(s|u)^α, the [FG12] form taken by most RSA
papers. The speaker state is a world × latent pair s : W × I and the
literal listener a per-latent kernel L0 : I → U → PMF W. powUtility is
rsaUtility at zero cost (powUtility_eq_rsaUtility); through the bridge
PMF.softmaxWeight_natMul_log_eq_pow the softmax weights are the powers
powWeight = L0^α, so predictions reduce to weight dominance via the
PMF.normalize bound lemmas, with ℕ-certificates
(ENNReal.natCast_mul_inv_pow_lt) closing uniform-extension comparisons.
The power-utility informativity speaker score α · log L0(w | u, i).
Equations
- RSA.Canonical.powUtility α L0 s u = ↑α * ((L0 s.2 u) s.1).log
Instances For
Grounding: powUtility is rsaUtility at exponent α and zero cost.
powUtility is viable as soon as every state has an applicable
utterance — the discharge for the ViableSpeaker instance of any
informativity speaker.
Softmax weight of the power-utility speaker: the power L0^α.
Equations
- RSA.Canonical.powWeight α L0 s u = (L0 s.2 u) s.1 ^ α
Instances For
The power-utility speaker in PMF.normalize-of-powers form (the bridge
PMF.softmaxWeight_natMul_log_eq_pow).
Dominance upper bound: the competitors in S outweigh a by a factor
of n, so a's share is below (n+1)⁻¹.
Majority lower bound: all competitors together weigh less than n times
a, so a's share exceeds (n+1)⁻¹.
The only applicable utterance is produced with certainty.
An inapplicable utterance is never produced.
Event comparison for the pragmatic listener #
Posterior-mass comparison over events of the joint listener reduces to
comparing prior-weighted speaker sums — PMF.posterior_toOuterMeasure_lt_iff_finset_score_lt
in the L1 vocabulary.
At a uniform joint prior the prior cancels: event comparison reduces to comparing summed speaker probabilities.
Boolean-meaning literal listeners with latent interpretations #
The [BLG16] lexical-uncertainty shape: a Boolean meaning per latent interpretation, the literal listener uniform on the extension.
Per-interpretation literal listener: uniform on the extension.
Equations
- RSA.Canonical.L0OfBool m hne i u = RSA.L0OfBoolMeaning (m i) u ⋯
Instances For
Weight of the power-utility speaker over a Boolean model: the inverse
extension size, to the α.
One-dominator bound over a Boolean model: if u' is also applicable with
an extension smaller by an ℕ-certificate factor, u is produced with
probability below (n+1)⁻¹.