Documentation

Linglib.Studies.HawkinsEtAl2025

Hawkins, Tsvilodub, Bergey, Goodman and Franke (2025): Relevant answers to polar questions #

This file formalizes the PRIOR-PQ model of [HTB+25], a Rational Speech Act model of question answering grounded in the questioner's decision problem. The base-level respondent R0 answers with any true and safe response (2.1), where a response is safe for a question when a questioner who knew it would know the answer (Safe, with the belief-state characterization safe_iff_forall_settles). The questioner questioner soft-maximizes the expected value of the decision problem updated by the base respondent's answer less its cost (2.3), with the Bayesian update (2.4) as the posterior of the observation model R0Model and the policy value of (2.2) as value; questionScore_eq_eig identifies the score with [Lin56]'s expected information gain of the question as an experiment. The pragmatic respondent respondent infers the questioner's decision problem from the question (respondentPosterior, respondentPosterior_lt_iff: a question is a signal about the goal) and soft-maximizes a mixture of informativity and action relevance less cost (2.5); respondentScore_beta_one and respondentScore_beta_zero are its two pure ends. posterior_lt_iff_card is the size principle of §2b: a response is strengthened towards the worlds with fewer true and safe alternatives.

Case study 1 (§3a) instantiates the model on the credit cards: polar_exhaustive_safe and mention_safe_iff classify the responses, yes_value_eq_exhaustive is the reason the exhaustive list is dispreferred after a question about a card the questioner holds (3), and generalYes_posterior_pos the residual uncertainty after the general question (5).

Implementation notes #

TODO #

References #

Safe answers (§2a) #

def HawkinsEtAl2025.Settles {W : Type u_1} (s : Set W) (p : WProp) :

A belief state settles a proposition when it entails it or its negation.

Equations
Instances For
    def HawkinsEtAl2025.Safe {W : Type u_1} (q r : WProp) :

    A response r is safe for the polar question q (§2a): a questioner who knew r would know the answer to q, so r entails one of the complete answers.

    Equations
    Instances For
      @[instance_reducible]
      instance HawkinsEtAl2025.instDecidableSafeOfFintypeOfDecidablePred {W : Type u_1} [Fintype W] (q r : WProp) [DecidablePred q] [DecidablePred r] :
      Decidable (Safe q r)
      Equations
      theorem HawkinsEtAl2025.safe_iff_forall_settles {W : Type u_1} (q r : WProp) :
      Safe q r s{w : W | r w}, Settles s q

      Safety in belief states: every state verifying r settles q.

      theorem HawkinsEtAl2025.safe_self {W : Type u_1} (q : WProp) :
      Safe q q
      theorem HawkinsEtAl2025.safe_not {W : Type u_1} (q : WProp) :
      Safe q fun (w : W) => ¬q w

      The model #

      structure HawkinsEtAl2025.Model (W : Type u_6) (Q : Type u_7) (R : Type u_8) (A : Type u_9) (D : Type u_10) :
      Type (max (max (max (max u_10 u_6) u_7) u_8) u_9)

      A PRIOR-PQ model: the propositions questions and responses denote, the questioner's decision problems, and the cost of responses.

      • question : QWProp

        The proposition a polar question asks about.

      • response : RWProp

        The proposition a response asserts.

      • utility : DWA

        The utility function of a decision problem.

      • prior : DW

        The questioner's prior over worlds under a decision problem.

      • cost : R

        The production cost of a response.

      Instances For
        def HawkinsEtAl2025.Model.Admissible {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) (w : W) (q : Q) (r : R) :

        A response is admissible at a world and question when it is true there and safe.

        Equations
        Instances For
          @[instance_reducible]
          instance HawkinsEtAl2025.instDecidableAdmissible {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype W] (w : W) (q : Q) (r : R) :
          Decidable (m.Admissible w q r)
          Equations
          noncomputable def HawkinsEtAl2025.Model.R0 {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] :

          (2.1): the base-level respondent, uniform over the true and safe responses.

          Equations
          • m.R0 = { score := fun (wq : W × Q) (r : R) => if m.Admissible wq.1 wq.2 r then 1 else 0, score_nonneg := }
          Instances For
            noncomputable def HawkinsEtAl2025.Model.R0' {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(r : R) → DecidablePred (m.response r)] [Fintype R] :

            §2c: the truth-only relaxation of the base respondent, uniform over the true responses.

            Equations
            • m.R0' = { score := fun (wq : W × Q) (r : R) => if m.response r wq.1 then 1 else 0, score_nonneg := }
            Instances For
              def HawkinsEtAl2025.Model.admissibleCard {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (w : W) (q : Q) :

              The number of true and safe responses at a world and question.

              Equations
              Instances For
                theorem HawkinsEtAl2025.Model.R0_totalScore {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (w : W) (q : Q) :
                m.R0.totalScore (w, q) = (m.admissibleCard w q)
                theorem HawkinsEtAl2025.Model.R0_policy_pos_iff {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] {w : W} {q : Q} {r : R} (h : 0 < m.admissibleCard w q) :
                0 < m.R0.policy (w, q) r m.Admissible w q r

                The base respondent gives a response positive probability iff it is true and safe.

                noncomputable def HawkinsEtAl2025.Model.R0Model {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (h : ∀ (w : W) (q : Q), 0 < m.admissibleCard w q) :

                The base respondent as an observation model, with questions as experiments and responses as observations, given that every world admits a true and safe response.

                Equations
                • m.R0Model h = { likelihood := fun (w : W) (q : Q) (r : R) => m.R0.policy (w, q) r, likelihood_nonneg := , likelihood_sum := }
                Instances For
                  noncomputable def HawkinsEtAl2025.Model.R0Model' {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(r : R) → DecidablePred (m.response r)] [Fintype R] (h : ∀ (w : W), ∃ (r : R), m.response r w) :

                  The truth-only base respondent as an observation model, given that every world makes some response true.

                  Equations
                  • m.R0Model' h = { likelihood := fun (w : W) (q : Q) (r : R) => m.R0'.policy (w, q) r, likelihood_nonneg := , likelihood_sum := }
                  Instances For
                    theorem HawkinsEtAl2025.Model.R0Model_likelihood_pos_iff {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (h : ∀ (w : W) (q : Q), 0 < m.admissibleCard w q) {w : W} {q : Q} {r : R} :
                    0 < (m.R0Model h).likelihood w q r m.Admissible w q r
                    theorem HawkinsEtAl2025.Model.R0Model_marginal_pos {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (h : ∀ (w : W) (q : Q), 0 < m.admissibleCard w q) (d : D) ( : ∀ (w : W), 0 < m.prior d w) {q : Q} {r : R} {w : W} (hadm : m.Admissible w q r) :
                    0 < (m.R0Model h).marginal (m.prior d) q r

                    The marginal of a response is positive when some world of positive prior admits it.

                    theorem HawkinsEtAl2025.Model.R0Model_posterior_pos_iff {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (h : ∀ (w : W) (q : Q), 0 < m.admissibleCard w q) (d : D) ( : ∀ (w : W), 0 < m.prior d w) {q : Q} {r : R} (hm : (m.R0Model h).marginal (m.prior d) q r 0) {w : W} :
                    0 < (m.R0Model h).posterior (m.prior d) q r w m.Admissible w q r

                    Under positive priors a world has positive posterior after a response iff the response is true and safe there.

                    theorem HawkinsEtAl2025.Model.posterior_lt_iff_card {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [(q : Q) → DecidablePred (m.question q)] [(r : R) → DecidablePred (m.response r)] [Fintype R] [Fintype W] (h : ∀ (w : W) (q : Q), 0 < m.admissibleCard w q) (d : D) (q : Q) (r : R) {w₁ w₂ : W} ( : ∀ (w : W), 0 m.prior d w) (hp : m.prior d w₁ = m.prior d w₂) (hpos : 0 < m.prior d w₁) (h₁ : m.Admissible w₁ q r) (h₂ : m.Admissible w₂ q r) (hm : (m.R0Model h).marginal (m.prior d) q r 0) :
                    (m.R0Model h).posterior (m.prior d) q r w₁ < (m.R0Model h).posterior (m.prior d) q r w₂ m.admissibleCard w₂ q < m.admissibleCard w₁ q

                    The size principle (§2b): between two worlds of equal prior at which a response is true and safe, the posterior favours the world with fewer true and safe alternatives.

                    The questioner (§2b) #

                    noncomputable def HawkinsEtAl2025.policy {W : Type u_1} {A : Type u_4} [Fintype W] [Fintype A] (U : WA) (αℵ : ) (π : W) :
                    A

                    (2.2): the policy of a decision problem under beliefs π, a softmax over expected utility with rationality αℵ.

                    Equations
                    Instances For
                      noncomputable def HawkinsEtAl2025.value {W : Type u_1} {A : Type u_4} [Fintype W] [Fintype A] [Nonempty A] (U : WA) (αℵ : ) (π : W) :

                      The value V(D) of a decision problem: the expected utility of following its policy.

                      Equations
                      Instances For
                        theorem HawkinsEtAl2025.expectedUtility_eq_of_support {W : Type u_1} {A : Type u_4} [Fintype W] {π : W} {U : WA} {c : A} (hsum : w : W, π w = 1) (hU : ∀ (w : W), π w 0∀ (a : A), U w a = c a) (a : A) :
                        w : W, π w * U w a = c a

                        Beliefs whose support sees a constant utility profile have that profile as expected utility.

                        theorem HawkinsEtAl2025.value_eq_of_support {W : Type u_1} {A : Type u_4} [Fintype W] [Fintype A] [Nonempty A] {π π' : W} {U : WA} {c : A} (αℵ : ) (hsum : w : W, π w = 1) (hsum' : w : W, π' w = 1) (hU : ∀ (w : W), π w 0∀ (a : A), U w a = c a) (hU' : ∀ (w : W), π' w 0∀ (a : A), U w a = c a) :
                        value U αℵ π = value U αℵ π'

                        Two beliefs seeing the same constant utility profile have the same value.

                        noncomputable def HawkinsEtAl2025.Model.questionScore {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] (om : ProbabilityTheory.ObservationModel W Q R) (αℵ wc : ) (d : D) (q : Q) :

                        The expected value to the questioner of asking q (2.3): the expected value of the updated decision problem after the base respondent's answer, less the weighted cost.

                        Equations
                        Instances For
                          theorem HawkinsEtAl2025.Model.questionScore_eq_eig {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] (om : ProbabilityTheory.ObservationModel W Q R) (αℵ wc : ) (d : D) (q : Q) :
                          m.questionScore om αℵ wc d q = om.eig (m.prior d) (value (m.utility d) αℵ) q + value (m.utility d) αℵ (m.prior d) - wc * r : R, om.marginal (m.prior d) q r * m.cost r

                          The question score is [Lin56]'s expected information gain of the question under the policy value, plus the value of the prior, less the expected cost.

                          noncomputable def HawkinsEtAl2025.Model.questioner {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] (om : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ : ) :

                          (2.3): the questioner, a softmax over question scores with rationality αQ.

                          Equations
                          Instances For

                            The pragmatic respondent (§2c) #

                            noncomputable def HawkinsEtAl2025.Model.respondentPosterior {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ : ) (πD : D) (q : Q) (d : D) :

                            The respondent's posterior over decision problems after hearing q: Bayesian theory of mind through the questioner, π(D ∣ q) ∝ Q(q ∣ D) π(D).

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              theorem HawkinsEtAl2025.Model.respondentPosterior_lt_iff {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ : ) (πD : D) ( : ∀ (d : D), 0 πD d) (q : Q) {d₁ d₂ : D} (hp : πD d₁ = πD d₂) (hpos : 0 < πD d₁) (hz : d' : D, (m.questioner om αℵ wc αQ).policy d' q * πD d' 0) :
                              m.respondentPosterior om αℵ wc αQ πD q d₁ < m.respondentPosterior om αℵ wc αQ πD q d₂ (m.questioner om αℵ wc αQ).policy d₁ q < (m.questioner om αℵ wc αQ).policy d₂ q

                              A question is a signal about the goal: with equal priors, the decision problem under which the question was the more probable is the more probable after it.

                              noncomputable def HawkinsEtAl2025.kl {W : Type u_1} [Fintype W] (p q : W) :

                              The finite Kullback–Leibler divergence of beliefs, in the direction of (2.5).

                              Equations
                              Instances For
                                noncomputable def HawkinsEtAl2025.Model.singleScore {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] (om om' : ProbabilityTheory.ObservationModel W Q R) (αℵ wc β : ) (πW : W) (d : D) (q : Q) (r : R) :

                                The utility of a response under one decision problem (2.5): informativity weighted 1 − β, action relevance weighted β, less the weighted cost.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def HawkinsEtAl2025.Model.respondentScore {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om om' : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ β : ) (πD : D) (πW : W) (q : Q) (r : R) :

                                  (2.5): the pragmatic respondent's score, the expected utility of a response over the inferred decision problem.

                                  Equations
                                  Instances For
                                    noncomputable def HawkinsEtAl2025.Model.respondent {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om om' : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ β αR : ) (πD : D) (πW : W) :

                                    (2.5): the pragmatic respondent, a softmax over response scores with rationality αR.

                                    Equations
                                    Instances For
                                      theorem HawkinsEtAl2025.Model.respondentScore_beta_one {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om om' : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ : ) (πD : D) (πW : W) (q : Q) (r : R) :
                                      m.respondentScore om om' αℵ wc αQ 1 πD πW q r = d : D, m.respondentPosterior om αℵ wc αQ πD q d * (value (m.utility d) αℵ (om.posterior (m.prior d) q r) - wc * m.cost r)

                                      At β = 1 the respondent weighs only action relevance and cost.

                                      theorem HawkinsEtAl2025.Model.respondentScore_beta_zero {W : Type u_1} {Q : Type u_2} {R : Type u_3} {A : Type u_4} {D : Type u_5} (m : Model W Q R A D) [Fintype R] [Fintype W] [Fintype A] [Nonempty A] [Fintype Q] [Fintype D] (om om' : ProbabilityTheory.ObservationModel W Q R) (αℵ wc αQ : ) (πD : D) (πW : W) (q : Q) (r : R) :
                                      m.respondentScore om om' αℵ wc αQ 0 πD πW q r = d : D, m.respondentPosterior om αℵ wc αQ πD q d * (-kl (om'.posterior (m.prior d) q r) πW - wc * m.cost r)

                                      At β = 0 the respondent weighs only informativity and cost.

                                      Case study 1: credit cards (§3a) #

                                      The three cards.

                                      Instances For
                                        @[instance_reducible]
                                        Equations
                                        def HawkinsEtAl2025.instReprCard.repr :
                                        CardStd.Format
                                        Equations
                                        Instances For
                                          @[instance_reducible]
                                          Equations

                                          The questioner's actions.

                                          Instances For
                                            @[instance_reducible]
                                            Equations
                                            @[instance_reducible]
                                            Equations
                                            def HawkinsEtAl2025.instReprAct.repr :
                                            ActStd.Format
                                            Equations
                                            Instances For

                                              The responses: a polar answer to whether any card of S is accepted, the mention of some accepted cards, or the exhaustive list of the accepted cards.

                                              Instances For
                                                @[instance_reducible]
                                                Equations

                                                The decision problems: U1, whether any of the questioner's cards C is accepted, and U2, whether any card is accepted.

                                                Instances For
                                                  @[instance_reducible]
                                                  Equations
                                                  def HawkinsEtAl2025.cardUtility :
                                                  GoalFinset CardAct

                                                  The utility of §3a: 5 for going when a relevant card is accepted or staying when none is, 0 otherwise.

                                                  Equations
                                                  Instances For

                                                    The proposition a response asserts.

                                                    Equations
                                                    Instances For
                                                      noncomputable def HawkinsEtAl2025.cards :
                                                      Model (Finset Card) (Finset Card) Resp Act Goal

                                                      The credit-card model: a question asks whether any card of a set is accepted, worlds are the sets of accepted cards, priors are uniform over the eight worlds, and a response costs the cards it mentions.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        theorem HawkinsEtAl2025.polar_exhaustive_safe :
                                                        (∀ (S : Finset Card) (b : Bool), Safe (cards.question S) (cards.response (Resp.polar S b))) ∀ (S T : Finset Card), Safe (cards.question S) (cards.response (Resp.exhaustive T))

                                                        Polar answers to the question asked are safe, as are exhaustive lists.

                                                        theorem HawkinsEtAl2025.mention_safe_iff (S T : Finset Card) (hS : S.Nonempty) :
                                                        Safe (cards.question S) (cards.response (Resp.mention T)) (T S).Nonempty

                                                        Mentioning accepted cards is safe for a question exactly when one of them was asked about: in (2), naming a third card after a question about two others is not.

                                                        Every world admits a true and safe response to every question: the true polar answer.

                                                        The base respondent as an observation model for the credit cards.

                                                        Equations
                                                        Instances For

                                                          (3): for a questioner holding the card asked about, after the answer "yes" the value of the decision problem already equals its value after the exhaustive list, since every world compatible with either answer accepts a card the questioner holds; only the cost separates the two answers.

                                                          (5): after "yes" to the general question, a world accepting only MasterCard keeps positive posterior, so a questioner holding American Express remains uncertain; after "yes" to the question about American Express it does not.