Documentation

Linglib.Phenomena.Dialogue.Studies.HardingGerstenbergIcard2025

A Communication-First Account of Explanation #

@cite{halpern-pearl-2005} @cite{harding-gerstenberg-icard-2025} @cite{sumers-etal-2023} @cite{frank-goodman-2012}

Formalization of @cite{harding-gerstenberg-icard-2025} §3: "why FACT?" / "FACT because X = x" modeled as an RSA communication game where the literal listener interprets via Halpern-Pearl actual causation, the speaker reasons about a downstream decision problem (the manipulation game of Def 3), and Goodness (eq. 8) is Δ expected utility under the pragmatic listener.

The framework (paper §3) #

We work in the β → ∞ regime the paper adopts most often ("agents are maximizing"): policies become argmax over expected reward, and the softmax collapses. This makes the worked theorems exact-rational and kernel-decidable.

Scenarios #

Each scenario lives in its own namespace with a per-scenario World type, ExplanationGame instance, message inventory, and worked predictions:

§3 Substrate: ExplanationGame #

structure HardingGerstenbergIcard2025.ExplanationGame (V : Type u_1) (W : Type u_2) [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] :
Type (max u_1 u_2)

A configuration for the explanation framework: a finite world space of causal-situation pairs (M, u), with prior, plus a designated explanandum variable.

  • modelOf : WCore.Causal.BoolSEM V

    World w → its structural causal model.

  • contextOf : WCore.Causal.Valuation fun (x : V) => Bool

    World w → its exogenous context (a partial valuation over V).

  • vs : List V

    Vertex list for developDetOn (typically all of V in some order).

  • n :

    Iteration depth for developDetOn (typically Fintype.card V).

  • isDet (w : W) : Core.Causal.SEM.IsDeterministic (self.modelOf w)

    Each world's model is deterministic.

  • isDag (w : W) : (self.modelOf w).graph.IsDAG

    Each world's graph is acyclic.

  • prior : W

    Unnormalized world prior.

  • prior_nonneg (w : W) : 0 self.prior w
  • factVar : V

    The explanandum FACT (single variable, value = true assumed).

Instances For

    Actual causation (literal meaning of "because") #

    Simplified Halpern-Pearl: cause is an actual cause of effect under (M, u) iff there exists a witness valuation under which cause = true is but-for effect = true (sufficiency + non-redundance).

    This collapses to plain but-for when u itself is the witness, and extends to overdetermination cases via off-actual witnesses (see Milk-Theft Example 4).

    noncomputable def HardingGerstenbergIcard2025.actualCause {V : Type u_1} [Fintype V] [DecidableEq V] (M : Core.Causal.BoolSEM V) [Core.Causal.SEM.IsDeterministic M] (vs : List V) (u : Core.Causal.Valuation fun (x : V) => Bool) (n : ) (cause effect : V) :

    Halpern-Pearl-style actual causation, simplified to existential Boolean witness. AC1: cause and effect both fired at (M, u). AC2 (witness form): some valuation s' makes cause but-for effect via BoolSEM.completesForEffectOn.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      noncomputable instance HardingGerstenbergIcard2025.instDecidableActualCause {V : Type u_1} [Fintype V] [DecidableEq V] (M : Core.Causal.BoolSEM V) [Core.Causal.SEM.IsDeterministic M] (vs : List V) (u : Core.Causal.Valuation fun (x : V) => Bool) (n : ) (cause effect : V) :
      Decidable (actualCause M vs u n cause effect)
      Equations

      Messages and meaning #

      A "FACT because X = x" message. Restricts to the Boolean case where the cited cause-value and explanandum-value are both true (paper's convention for the worked examples).

      • cause : V
      Instances For
        def HardingGerstenbergIcard2025.instDecidableEqMessage.decEq {V✝ : Type u_1} [DecidableEq V✝] (x✝ x✝¹ : Message V✝) :
        Decidable (x✝ = x✝¹)
        Equations
        Instances For
          def HardingGerstenbergIcard2025.instReprMessage.repr {V✝ : Type u_1} [Repr V✝] :
          Message V✝Std.Format
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def HardingGerstenbergIcard2025.ExplanationGame.meaning {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (w : W) :

            Whether m is true at world w: actualCause of factVar by m.cause.

            Equations
            Instances For
              @[implicit_reducible]
              noncomputable instance HardingGerstenbergIcard2025.ExplanationGame.meaning_decidable {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (w : W) :
              Decidable (G.meaning m w)
              Equations

              §3.1 L0 posterior #

              P_{L0}(w | m) ∝ Prior(w) · 1_{w ⊨ m} (eq. 2). We provide both the unnormalized score and the normalized posterior.

              noncomputable def HardingGerstenbergIcard2025.ExplanationGame.l0Score {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (w : W) :

              Unnormalized L0 weight: prior × meaning indicator.

              Equations
              Instances For
                noncomputable def HardingGerstenbergIcard2025.ExplanationGame.l0Z {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) :

                Normalizer: sum of L0 scores over the world fintype.

                Equations
                Instances For
                  noncomputable def HardingGerstenbergIcard2025.ExplanationGame.l0 {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (w : W) :

                  Normalized L0 posterior. Returns 0 when the normalizer is 0 (vacuous message).

                  Equations
                  Instances For

                    §3.3 Manipulation Game (Def 3) #

                    R(X, M, u') = 1 iff X manipulates FACT in (M, u') (some Boolean intervention on X flips FACT). Aggregated reward over the world space: R(X, w) = E_{w'}[1_{Manipulates(X, FACT | M_{w'}, u_{w'})}] weighted by prior on w'.

                    Note: paper's Def 3 averages over u' for fixed M; here we average over the entire world w' (including model uncertainty), matching the formalization choices made for the listener's epistemic state.

                    noncomputable def HardingGerstenbergIcard2025.ExplanationGame.worldManipulates {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (X : V) (w : W) :

                    Whether action variable X manipulates FACT at world w.

                    Equations
                    Instances For
                      @[implicit_reducible]
                      noncomputable instance HardingGerstenbergIcard2025.instDecidableWorldManipulates {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (X : V) (w : W) :
                      Decidable (G.worldManipulates X w)
                      Equations
                      noncomputable def HardingGerstenbergIcard2025.ExplanationGame.reward {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (X : V) :

                      Manipulation-game reward for action X: prior-weighted indicator of X manipulating FACT across worlds.

                      Equations
                      Instances For
                        noncomputable def HardingGerstenbergIcard2025.ExplanationGame.condReward {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (X : V) (m : Message V) :

                        Conditional reward: prior-weighted manipulation under L0's posterior.

                        Equations
                        Instances For

                          §3.2 Speaker (β = ∞ specialization) #

                          In the β → ∞ regime, π_{L0}(a | m) puts all mass on argmax_a condReward(a, m). We expose the argmax as a predicate isBestAction (any action whose conditional reward dominates all others); when the argmax is unique, uS reduces to that action's actual-world reward.

                          noncomputable def HardingGerstenbergIcard2025.ExplanationGame.isBestAction {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (X : V) :

                          An action X is L0's best response to message m: its conditional reward dominates every other action.

                          Equations
                          Instances For
                            @[implicit_reducible]
                            noncomputable instance HardingGerstenbergIcard2025.instDecidableIsBestAction {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (m : Message V) (X : V) :
                            Decidable (G.isBestAction m X)
                            Equations
                            noncomputable def HardingGerstenbergIcard2025.ExplanationGame.uS {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (bestAction : V) (w : W) :

                            Speaker utility (β = ∞) at world w, given an L0 best response bestAction selected by the caller (typically a witness for isBestAction m bestAction): the reward of bestAction at w.

                            Equations
                            Instances For

                              §3.4 Pragmatic Listener and Goodness (eq. 8) #

                              In the β → ∞ regime, P_S puts all mass on argmax-utility messages, and π_L behaves like π_{L0} after Bayesian inversion against the speaker's choice. We collapse Goodness (eq. 8) to a single comparable scalar at the actual world w*: post-explanation reward of the chosen best action minus the prior-best action's reward. Positive Goodness means the explanation strictly improved the listener's expected outcome at w*.

                              noncomputable def HardingGerstenbergIcard2025.ExplanationGame.goodness {V : Type u_1} {W : Type u_2} [Fintype V] [DecidableEq V] [Fintype W] [DecidableEq W] (G : ExplanationGame V W) (priorBest postBest : V) (wStar : W) :

                              Goodness of message m at the actual world w*, given the pre-explanation prior-best action (priorBest) and the post- explanation L0-best action (postBest). Δ expected utility at the actual world (β = ∞).

                              Equations
                              • G.goodness priorBest postBest wStar = G.uS postBest wStar - G.uS priorBest wStar
                              Instances For

                                Bob is late (T = 1) and forgot Charlie's birthday (B = 1); Charlie is cross (C = 1). K = {(M_T, u), (M_∧, u)} where M_T has C ← T and M_∧ has C ← T ∧ B. Actual world is M_T.

                                Endogenous variables.

                                • T : V
                                • B : V
                                • C : V
                                Instances For
                                  @[implicit_reducible]
                                  Equations
                                  @[implicit_reducible]
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[implicit_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            @[implicit_reducible]
                                            Equations
                                            • One or more equations did not get rendered due to their size.

                                            World enum: which structural alternative (single shared context).

                                            Instances For
                                              @[implicit_reducible]
                                              Equations
                                              @[implicit_reducible]
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[implicit_reducible]
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  Tardiness manipulates crossness in the actual world (M_T).

                                                  Forgotten birthday does NOT manipulate crossness in M_T (B doesn't appear in C's mechanism in M_T).

                                                  Tardiness manipulates crossness in M_∧ (with B = 1 fixed by lateBg).

                                                  Forgotten birthday manipulates crossness in M_∧ (with T = 1 fixed by lateBg, flipping B flips C from true to false).

                                                  The "because T" message is true at the actual world M_T: T = 1 is an actual cause of C = 1 there.

                                                  The "because T" message is also true at M_∧: T = 1 is an actual cause of C = 1 (with B = 1 fixed by lateBg, flipping T flips C).

                                                  B is not but-for C in M_T even at the actual context lateBg: flipping B from 1 to 0 leaves C at true, since semT's mechanism for C reads only T. (The full ¬ meaning ⟨B⟩ mT claim — that NO witness valuation makes B but-for C — requires a witness-irrelevance lemma about C's parent set; deferred.)

                                                  Two potential causes (R = thatched roof, D = drought) of one effect (F = fire). K = {(M_R, u), (M_D, u), (M_∧, u), (M_∨, u)} where u = (R = 1, D = 1). The framework predicts that under the actual structure M_R, citing R "tracks" F's manipulation more reliably than citing D — even though both are equally informative under the bare manipulation game (a downstream-relevant decision such as "what to repair" breaks the tie).

                                                  @[implicit_reducible]
                                                  Equations
                                                  @[implicit_reducible]
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    @[implicit_reducible]
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    @[implicit_reducible]
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    @[implicit_reducible]
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    @[implicit_reducible]
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      @[implicit_reducible]
                                                                      Equations
                                                                      @[implicit_reducible]
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        @[implicit_reducible]
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For

                                                                          R manipulates F in M_∧ (both are needed; with D = 1 fixed, R is but-for).

                                                                          R does NOT manipulate F in M_∨ at the actual context (overdetermination: D = 1 alone fires F regardless of R).

                                                                          Single causal model M_∨: M ← Ch ∨ Da. K varies over the exogenous context: u_C (Charlie alone), u_D (Dana alone), u_{C,D} (both). Actual world: u_{C,D}. Predicts overdetermination: in u_{C,D}, neither single variable manipulates M. The conjunctive message "Ch ∧ Da" would be needed to manipulate M as a joint intervention — the action set must include subsets of V; deferred.

                                                                          • Ch : V
                                                                          • Da : V
                                                                          • M : V
                                                                          Instances For
                                                                            @[implicit_reducible]
                                                                            Equations
                                                                            @[implicit_reducible]
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  @[implicit_reducible]
                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  @[implicit_reducible]
                                                                                  Equations
                                                                                  @[implicit_reducible]
                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    @[implicit_reducible]
                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For

                                                                                      Charlie manipulates M when only Charlie drank (u_C).

                                                                                      Dana does NOT manipulate M when only Charlie drank (Dana = 0 in u_C).

                                                                                      Overdetermination: Charlie does NOT manipulate M when both drank (Da = 1 still fires M regardless of Ch). The paper's Milk-Theft point.

                                                                                      Symmetric overdetermination: Dana does NOT manipulate M when both drank.

                                                                                      "Charlie because M" is true at u_C: Charlie's drinking actually caused M (sole cause; lateBg-as-witness suffices).

                                                                                      HP-style actual cause via off-actual witness: Charlie IS an actual cause of M at u_{C,D} despite not being but-for there. Witness: bgC (sets Da = false off-actual), where Charlie becomes but-for.