Documentation

CslibFrontier.GameTheory.Reputation.PeerPrediction

Peer-Prediction Feedback Elicitation #

Formalizes the Miller–Resnick–Zeckhauser peer-prediction mechanism for eliciting honest subjective ratings without objective ground-truth verification, from Section 27.4 (Equations (27.1)–(27.2), Proposition 1, Footnote 2, and Exercise 27.6, pp. 684–688, 697) of Eric Friedman, Paul Resnick, and Rahul Sami, "Manipulation-Resistant Reputation Systems", Chapter 27 of Algorithmic Game Theory [FRS07], and Nolan Miller, Paul Resnick, and Richard Zeckhauser, "Eliciting Informative Feedback: The Peer-Prediction Method" [MillerResnickZeckhauser2005, §2, Propositions 1–2, Eq. (4)].

Model and source mapping #

Main definitions #

Main results #

References #

Private Gibbs inequality for strictly positive distributions #

Common-prior Bayesian peer-rating model #

structure Cslib.GameTheory.Reputation.PeerPredictionModel (Θ : Type u_1) (S : Type u_2) [Fintype Θ] [Fintype S] :
Type (max u_1 u_2)

Common-prior Bayesian signal model for peer prediction [FriedmanResnickSami2007, §27.4.1, p. 685; MillerResnickZeckhauser2005, §2, p. 4].

  • prior : Θ → ℝ

    Common prior distribution Pr_0(t) over product quality types t : Θ.

  • isMixedStrategy_prior : IsMixedStrategy self.prior

    The prior is a valid probability vector.

  • prior_pos (θ : Θ) : 0 < self.prior θ

    Every product quality type has strictly positive prior probability.

  • likelihood : Θ → S → ℝ

    Conditional signal likelihood f(s | t) = Pr(S^i = s | t).

  • isMixedStrategy_likelihood (θ : Θ) : IsMixedStrategy (self.likelihood θ)

    Each conditional signal likelihood is a probability vector on S.

  • likelihood_pos (θ : Θ) (s : S) : 0 < self.likelihood θ s

    Every signal has strictly positive probability under every product type.

Unconditional marginal probability Pr(S^i = s) = ∑_t Pr_0(t) f(s | t) of observing signal s [FriedmanResnickSami2007, §27.4.1, p. 685].

noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.typePosterior {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) (s : S) (θ : Θ) :

Posterior probability Pr(t | S^i = s) over product quality types given signal s [FriedmanResnickSami2007, §27.4.1, p. 686].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.typePosterior_pos {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) (s : S) (θ : Θ) :
0 < M.typePosterior s θ
noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.peerPosterior {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) (s s' : S) :

Posterior distribution Pr(S^j = s' | S^i = s) of a peer rater's signal s' given one's own signal s [FriedmanResnickSami2007, §27.4.1, p. 686; MillerResnickZeckhauser2005, §2.1, p. 6].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.signalProb_mul_peerPosterior {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) (s s' : S) :
M.signalProb s * M.peerPosterior s s' = ∑ θ : Θ, M.prior θ * M.likelihood θ s * M.likelihood θ s'

Stochastic relevance [MillerResnickZeckhauser2005, §2.1, p. 6; FriedmanResnickSami2007, Proposition 1, p. 687]: distinct signals s₁ ≠ s₂ induce distinct posterior distributions over a peer rater's signal.

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.stochasticallyRelevant_iff {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) :
M.StochasticallyRelevant ↔ ∀ (s₁ s₂ : S), s₁ ≠ s₂ → ∃ (s' : S), M.peerPosterior s₁ s' ≠ M.peerPosterior s₂ s'

Simultaneous reporting game (Equation (27.1)) #

def Cslib.GameTheory.Reputation.PeerPredictionModel.jointSignalProb {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} [Fintype I] (s_prof : I → S) :

Joint prior-likelihood probability Pr(S = s_prof) of a full rater signal profile s_prof.

noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.condSignalProb {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] (i : I) (s_i : S) (s_prof : I → S) :

Conditional probability Pr(S = s_prof | S^i = s_i) of the full signal profile given rater i's realized signal s_i [FriedmanResnickSami2007, §27.4.1, p. 685].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.sum_prod_likelihood_sub {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} [Fintype I] [DecidableEq I] (P : I → Prop) [DecidablePred P] (θ : Θ) :
∑ g : { j : I // P j } → S, ∏ j : { j : I // P j }, M.likelihood θ (g j) = 1

Under fixed type θ, the product likelihood over any subset {j : I // P j} of raters sums to 1 over all signal profiles on that subset.

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.sum_condSignalProb_mul_ref {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {i r : I} (hri : r ≠ i) (s_i : S) (g : S → ℝ) :
∑ s_prof : I → S, M.condSignalProb i s_i s_prof * g (s_prof r) = ∑ s_r : S, M.peerPosterior s_i s_r * g s_r

Marginalizing condSignalProb onto a distinct reference rater r ≠ i recovers peerPosterior s_i.

noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.interimTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] (τ : (I → S) → I → ℝ) (σ : I → S → S) (i : I) (s_i report : S) :

Interim expected transfer E_{S^{-i}}[τ_i(report, σ_{-i}(S^{-i})) | S^i = s_i] of rater i in Equation (27.1) [FriedmanResnickSami2007, §27.4.1, p. 685].

def Cslib.GameTheory.Reputation.PeerPredictionModel.IsBayesNashReporting {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] (τ : (I → S) → I → ℝ) (σ : I → S → S) :

Announcement strategy profile σ is a Bayes–Nash equilibrium of the simultaneous reporting game with transfers τ (Equation (27.1), [FriedmanResnickSami2007, p. 685]).

def Cslib.GameTheory.Reputation.PeerPredictionModel.IsStrictBayesNashReporting {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] (τ : (I → S) → I → ℝ) (σ : I → S → S) :

Announcement strategy profile σ is a strict Bayes–Nash equilibrium of the simultaneous reporting game with transfers τ [FriedmanResnickSami2007, §27.4.1, p. 686].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.IsStrictBayesNashReporting.isBayesNashReporting {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {τ : (I → S) → I → ℝ} {σ : I → S → S} (h : M.IsStrictBayesNashReporting τ σ) :

Truthful signal announcement strategy x_m^i = s_m for every rater i [FriedmanResnickSami2007, §27.4.1, p. 686].

Logarithmic peer-prediction mechanism (Proposition 1, effort scaling, budget balance) #

noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.logPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} (r : I → I) (α β : ℝ) (x : I → S) (i : I) :

Positive-affine logarithmic peer-prediction transfer τ_i^*(x) = α * ln Pr(S^{r(i)} = x^{r(i)} | S^i = x^i) + β (Equation (27.2) with affine parameters α, β, [FriedmanResnickSami2007, §27.4.2, pp. 687–688; MillerResnickZeckhauser2005, §2.1–2.3]).

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.interimTransfer_logPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {r : I → I} (hr : ∀ (i : I), r i ≠ i) (α β : ℝ) (σ : I → S → S) (i : I) (s_i report : S) :
M.interimTransfer (M.logPeerTransfer r α β) σ i s_i report = ∑ s_r : S, M.peerPosterior s_i s_r * (α * Real.log (M.peerPosterior report (σ (r i) s_r)) + β)
theorem Cslib.GameTheory.Reputation.PeerPredictionModel.truthful_isStrictBayesNash_logPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {r : I → I} (hr : ∀ (i : I), r i ≠ i) (hrel : M.StochasticallyRelevant) {α : ℝ} (hα : 0 < α) (β : ℝ) :

Proposition 1 ([FriedmanResnickSami2007, §27.4.2, p. 687]; [MillerResnickZeckhauser2005, Proposition 1, p. 7]): if M is stochastically relevant, every rater i is scored against a distinct reference rater r i ≠ i, and 0 < α, then truthful reporting by all raters is a strict Bayes–Nash equilibrium of the simultaneous reporting game.

Ex-ante expected base log score ∑_s Pr(s) ∑_{s'} Pr(s' | s) ln Pr(s' | s) when acquiring a signal and reporting truthfully, assuming reference rater r(i) reports truthfully [MillerResnickZeckhauser2005, §2.2, p. 9].

Ex-ante expected base log score ∑_s Pr(s) ∑_{s'} Pr(s' | s) ln Pr(s' | s_0) when skipping signal acquisition and submitting a fixed uninformed report s_0 [MillerResnickZeckhauser2005, §2.2, p. 9].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.exists_scale_effort_incentive {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [Nontrivial S] (hrel : M.StochasticallyRelevant) {c : ℝ} (hc : 0 < c) :
∃ (α : ℝ) (β : ℝ), 0 < α ∧ (∀ (s₀ : S), α * M.uninformedExpectedLogScore s₀ + β < α * M.informedExpectedLogScore + β - c) ∧ ∀ {I : Type u_3} (r : I → I) (x : I → S) (i : I), 0 ≤ M.logPeerTransfer r α β x i

Effort elicitation and ex-post voluntary participation ([MillerResnickZeckhauser2005, Proposition 2 & §2.3, pp. 9–10]; [FriedmanResnickSami2007, §27.4.2, pp. 687–688]): when S has at least two distinct signals and M is stochastically relevant, for every positive signal-acquisition effort cost 0 < c there exist 0 < α and β : ℝ such that:

  1. acquiring a signal at cost c and reporting truthfully strictly beats every uninformed fixed report s₀ : S, and
  2. every ex-post transfer logPeerTransfer M r α β x i is nonnegative.
noncomputable def Cslib.GameTheory.Reputation.PeerPredictionModel.balancedLogPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} (r : I → I) (b : I ≃ I) (α : ℝ) (x : I → S) (i : I) :

Budget-balanced peer-prediction transfer (Equation (4) of [MillerResnickZeckhauser2005, §2.3, p. 10]; [FriedmanResnickSami2007, §27.4.2, p. 688]): rater i receives her own peer-prediction score minus the base score of rater b i under a balancing bijection b : I ≃ I.

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.sum_balancedLogPeerTransfer_eq_zero {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} [Fintype I] (r : I → I) (b : I ≃ I) (α : ℝ) (x : I → S) :
∑ i : I, M.balancedLogPeerTransfer r b α x i = 0

Exact ex-post budget balance: for every announcement vector x, the sum of balancedLogPeerTransfer across all raters is identically 0 [MillerResnickZeckhauser2005, §2.3, Eq. (4), p. 10].

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.truthful_isStrictBayesNash_balancedLogPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {r : I → I} {b : I ≃ I} (hr : ∀ (i : I), r i ≠ i) (hb : ∀ (i : I), b i ≠ i) (hrb : ∀ (i : I), r (b i) ≠ i) (hrel : M.StochasticallyRelevant) {α : ℝ} (hα : 0 < α) :

Strict Bayes–Nash truthfulness of budget-balanced peer prediction ([MillerResnickZeckhauser2005, §2.3, Eq. (4), p. 10]): when r i ≠ i, b i ≠ i, and r (b i) ≠ i for every rater i (satisfiable whenever |I| ≥ 3, e.g. by distinct cyclic shifts), truthfulStrategy is a strict Bayes–Nash equilibrium of balancedLogPeerTransfer.

Uninformative constant equilibria & sequential manipulation (Footnote 2 & Exercise 27.6) #

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.constStrategy_isStrictBayesNash_logPeerTransfer {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) [DecidableEq S] {I : Type u_3} [Fintype I] [DecidableEq I] {r : I → I} (hr : ∀ (i : I), r i ≠ i) {s₀ : S} (hdiag : ∀ (s : S), s ≠ s₀ → M.peerPosterior s s₀ < M.peerPosterior s₀ s₀) {α : ℝ} (hα : 0 < α) (β : ℝ) :
M.IsStrictBayesNashReporting (M.logPeerTransfer r α β) fun (x : I) (x_1 : S) => s₀

Uninformative constant equilibrium ([FriedmanResnickSami2007, §27.4.2, p. 688, Footnote 2]): if signal s₀ uniquely maximizes self-prediction s ↦ peerPosterior s s₀ (which holds whenever observing s₀ strictly raises the posterior of s₀ above every other signal's posterior of s₀), then all raters constantly reporting s₀ regardless of their signal is also a strict Bayes–Nash equilibrium.

theorem Cslib.GameTheory.Reputation.PeerPredictionModel.observedPeer_misreport_strict_gain {Θ : Type u_1} {S : Type u_2} [Fintype Θ] [Fintype S] (M : PeerPredictionModel Θ S) {I : Type u_3} [DecidableEq I] {r : I → I} {i : I} (hri : r i ≠ i) {α : ℝ} (hα : 0 < α) (β : ℝ) (x : I → S) {s_true s_lie : S} (hlt : M.peerPosterior s_true (x (r i)) < M.peerPosterior s_lie (x (r i))) :
M.logPeerTransfer r α β (Function.update x i s_true) i < M.logPeerTransfer r α β (Function.update x i s_lie) i

Observed-reference ex-post manipulation (related to [FriedmanResnickSami2007, Exercise 27.6, p. 697]): if rater i observes reference rater r(i)'s announcement x (r i) before submitting her own report and is still paid according to logPeerTransfer (0 < α), then reporting s_lie yields strictly higher ex-post transfer than reporting s_true whenever peerPosterior s_true (x (r i)) < peerPosterior s_lie (x (r i)). For the genuine j ≠ r(i) Bayesian posterior-updating failure of static transfers stated in Exercise 27.6, see CslibFrontier.GameTheory.Reputation.SequentialPeerPrediction.