Houlihan et al. (2023): Emotion prediction as computation over a generative theory of mind #
This file formalizes the inverse planning and computed appraisal modules of
[HKWH+23] for the Split or Steal game. A Player
values an outcome by three Fehr–Schmidt base features, money against a reference point and the
two inequities, weighted by preferences and passed through a value function; the expected base
utility of an action under the player's belief about the opponent is (3.1)
(Setting.expectedBaseUtility), the softmax policy is (3.3) (Setting.policy), and the
observer's inverse inference (3.4) is the posterior kernel of the plan over a finite prior
(Setting.posterior). The public game adds the reputation utilities of (3.2), the base
weights an observer of the anonymous game would infer from the action
(Setting.expectedPublicUtility).
The direction of the inferences in Figure 2 follows from the covariance form of Bayes' rule: observing cooperation raises the posterior expectation of any statistic that monovaries with the expected-utility gap in favour of cooperating, and in Split or Steal that gap increases in the advantageous-inequity weight and decreases in the money and disadvantageous-inequity weights. The appraisals of Section 4, achieved utility, prediction error and the two counterfactuals, then carry structural signs: a cooperator whose opponent stole has a negative disadvantageous-inequity prediction error and a positive opponent counterfactual, the two loadings of the learned envy concept, and a player who stole from a cooperator has a negative advantageous-inequity utility that cooperating would have spared.
Implementation notes #
- The prior over preferences and beliefs is carried by a finite type of simulated players,
as in the paper's sampled implementation; the value function
νis any strictly monotone function vanishing at zero, in place of the sign-adjusted logarithm. - Figure 2's per-weight directions are stated for priors that vary in that weight alone, which is what makes the weight monovary with the utility gap; a correlated prior can reverse them, and the paper reports only its empirical prior.
- The lesion models of Section 5 are the constant posterior and the restriction to the money domain; the learned readout of Section 8 and the fitted concordances are not formalized.
References #
The game #
Split (cooperate) or steal (defect).
Instances For
Equations
- HoulihanEtAl2023.instDecidableEqAction 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
The action not chosen.
Equations
Instances For
Player 1's share of the pot: half when both split, all of it when stealing from a splitter, and nothing otherwise.
Equations
- HoulihanEtAl2023.payoff pot HoulihanEtAl2023.Action.cooperate HoulihanEtAl2023.Action.cooperate = pot / 2
- HoulihanEtAl2023.payoff pot HoulihanEtAl2023.Action.cooperate HoulihanEtAl2023.Action.defect = 0
- HoulihanEtAl2023.payoff pot HoulihanEtAl2023.Action.defect HoulihanEtAl2023.Action.cooperate = pot
- HoulihanEtAl2023.payoff pot HoulihanEtAl2023.Action.defect HoulihanEtAl2023.Action.defect = 0
Instances For
Stealing weakly dominates in money.
Equations
- HoulihanEtAl2023.instDecidableEqDomain 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.
The base feature of an outcome in a domain, money measured against the reference point
ref.
Equations
- HoulihanEtAl2023.Domain.feature pot ref a₁ a₂ HoulihanEtAl2023.Domain.money = HoulihanEtAl2023.payoff pot a₁ a₂ - ref
- HoulihanEtAl2023.Domain.feature pot ref a₁ a₂ HoulihanEtAl2023.Domain.aia = (HoulihanEtAl2023.payoff pot a₁ a₂ - HoulihanEtAl2023.payoff pot a₂ a₁)⁺
- HoulihanEtAl2023.Domain.feature pot ref a₁ a₂ HoulihanEtAl2023.Domain.dia = (HoulihanEtAl2023.payoff pot a₂ a₁ - HoulihanEtAl2023.payoff pot a₁ a₂)⁺
Instances For
Money is sought and the inequities are avoided: the signs of (3.1).
Equations
Instances For
The reputation utilities of (3.2) carry the opposite signs: players want to be seen as motivated by equality rather than by money.
Instances For
Players and the forward model #
A simulated player: base preference weights, reputation weights, the belief π_{a₂} that
the opponent cooperates, and the reference point π_Money.
Instances For
The belief as a distribution over the opponent's action.
Equations
Instances For
The player after learning the opponent's action (footnote 3).
Equations
Instances For
The subjective utility of an outcome in one domain: the signed, weighted value of its feature, the summands of (3.1).
Equations
- S.domainUtility q a₁ a₂ d = d.sign * q.base d * S.ν (HoulihanEtAl2023.Domain.feature S.pot q.reference a₁ a₂ d)
Instances For
The base utility of an outcome, summed over the domains.
Equations
- S.baseUtility q a₁ a₂ = ∑ d : HoulihanEtAl2023.Domain, S.domainUtility q a₁ a₂ d
Instances For
(3.1): the expected base utility of an action under the belief about the opponent.
Equations
- S.expectedBaseUtility q a₁ = ∑ a₂ : HoulihanEtAl2023.Action, q.beliefOn a₂ * S.baseUtility q a₁ a₂
Instances For
The expected-utility gap in favour of cooperating: cooperation forgoes money and risks disadvantageous inequity, and avoids advantageous inequity.
(3.3): the softmax policy at rationality lam for a utility U.
Equations
- S.policy U q a = Real.exp (S.lam * U q a) / ∑ a' : HoulihanEtAl2023.Action, Real.exp (S.lam * U q a')
Instances For
A player certain that the opponent will steal cooperates at most half the time: the gap of (3.1) is then the disadvantageous-inequity cost of cooperating.
A player certain that the opponent will split prefers to cooperate exactly when the advantageous-inequity cost of stealing outweighs the money it gains: the Fehr–Schmidt account of cooperation.
Inverse planning #
The forward model as a kernel from the prior's support to actions.
Equations
- S.plan U p = ProbabilityTheory.Kernel.ofWeights fun (ω : Ω) (a : HoulihanEtAl2023.Action) => ENNReal.ofReal (S.policy U (p ω) a)
Instances For
(3.4): the observer's inverse inference, the posterior kernel of the plan.
Instances For
The posterior expectation of a statistic of the player after observing an action.
Equations
- S.expectation U p μ f a = ∫ (ω : Ω), f (p ω) ∂(S.posterior U p μ) a
Instances For
The prior expectation of a statistic of the player.
Equations
- HoulihanEtAl2023.priorExpectation μ p f = ∫ (ω : Ω), f (p ω) ∂μ
Instances For
Observing cooperation raises the expectation of any statistic that monovaries with the utility gap in favour of cooperating: Bayes' rule reweights the prior by the policy, which is increasing in the gap.
Observing defection lowers it.
Figure 2: a cooperator is inferred to be more averse to advantageous inequity.
Figure 2: a cooperator is inferred to be less motivated by money.
Figure 2: a cooperator is inferred to be less averse to disadvantageous inequity.
The public game #
The expected reputation in a domain: the base weight an observer of the anonymous game would infer from the action.
Equations
- S.reputation p μ d a₁ = S.expectation S.expectedBaseUtility p μ (fun (x : HoulihanEtAl2023.Player) => x.base d) a₁
Instances For
(3.2): the expected utility of an action in the public game, the base utility plus the reputation utilities, each the value of the inferred base weight scaled by the pot.
Equations
- S.expectedPublicUtility p μ q a₁ = S.expectedBaseUtility q a₁ + ∑ d : HoulihanEtAl2023.Domain, d.repuSign * q.repu d * S.ν (S.reputation p μ d a₁ * S.pot)
Instances For
A player whose reputation concern is to be seen as averse to advantageous inequity cooperates at least as often in public as in private, since cooperating is inferred to reflect more of that aversion.
A player whose reputation concern is to be seen as averse to disadvantageous inequity cooperates at most as often in public, since stealing is inferred to reflect more of it.
(3.4) for the public game: the inverse inference over the six weights and the belief.
Equations
- S.publicPosterior p μ = S.posterior (S.expectedPublicUtility p μ) p μ
Instances For
Computed appraisals (Section 4) #
The expected utility of an action in a domain during planning.
Equations
- S.expectedDomainUtility q a₁ d = ∑ a₂ : HoulihanEtAl2023.Action, q.beliefOn a₂ * S.domainUtility q a₁ a₂ d
Instances For
Prediction error: the achieved utility of the outcome less the utility expected during planning.
Equations
- S.predictionError q a₁ a₂ d = S.domainUtility q a₁ a₂ d - S.expectedDomainUtility q a₁ d
Instances For
The opponent counterfactual CFa₂: the utility the opponent's other choice would have
brought, weighted by the belief that the opponent would make it.
Equations
- S.opponentCounterfactual q a₁ a₂ d = q.beliefOn a₂.other * (S.domainUtility q a₁ a₂.other d - S.domainUtility q a₁ a₂ d)
Instances For
The agent counterfactual CFa₁: the utility the player's other choice would have brought,
weighted by the probability of that choice under the policy of the player who knows the
opponent's action (footnote 3).
Equations
- S.agentCounterfactual q U a₁ a₂ d = S.policy U (q.knowing a₂) a₁.other * (S.domainUtility q a₁.other a₂ d - S.domainUtility q a₁ a₂ d)
Instances For
The absolute prediction error of the opponent's action, |PE_{π_{a₂}}|.
Equations
- HoulihanEtAl2023.Setting.beliefError q a₂ = |1 - q.beliefOn a₂|
Instances For
Envy's first loading (Figure 5b): a cooperator whose opponent stole is in a more disadvantageous position than expected.
Envy's second loading (Figure 5b): had the opponent split, the cooperator would have been in a less disadvantageous position.
Guilt's structural condition: stealing from a splitter costs advantageous-inequity utility.
Guilt's structural condition: splitting would have spared that cost.
Gratitude's structural condition: had the opponent stolen from a splitter, the money would have been worse.
When both steal, a defector who had split would have been left with nothing against a full pot: the base agent counterfactual is relief rather than regret in the disadvantageous domain, so regret after mutual stealing must come from reputation.
The reputation utility of an action in a domain, the summands of (3.2).
Equations
- S.reputationUtility p μ q a₁ d = d.repuSign * q.repu d * S.ν (S.reputation p μ d a₁ * S.pot)
Instances For
The agent counterfactual over reputation.
Equations
- S.reputationAgentCounterfactual p μ q U a₁ a₂ d = S.policy U (q.knowing a₂) a₁.other * (S.reputationUtility p μ q a₁.other d - S.reputationUtility p μ q a₁ d)
Instances For
Regret and guilt over reputation: whatever the opponent did, a defector who cares to be seen as averse to advantageous inequity would have been seen as more so had they split.
Lesions (Section 5) #
The social lesion keeps only the money appraisals; a reader of monetary achieved utility then ranks stealing from a splitter above splitting with one, whereas observers predict similar joy for both.
The inverse planning lesion: the posterior of (3.4) replaced by the prior, so that the inferred preferences and beliefs no longer depend on the action.
Equations
- HoulihanEtAl2023.lesionedPosterior μ = ProbabilityTheory.Kernel.const HoulihanEtAl2023.Action μ