Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Equation (5), §3, p. 8 — credit assignment: the DN estimator equals (1/N) Σ_i (η_i + ξ_i Σ_{j∈N_i} η_j) Y_i

Proved
DiffNeighbors.Bias.credit_assignment

by mikedeng1 · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

differences-in-neighborsestimator-identitynetwork-interferencep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

Consider NNN units with interference graph GGG (neighbourhoods Ni\mathcal N_iNi​), outcome functions fif_ifi​ and observed outcomes Yi=fi(z)Y_i = f_i(z)Yi​=fi​(z) at a treatment vector z∈{0,1}Nz \in \{0,1\}^Nz∈{0,1}N. For p∈Rp \in \mathbb Rp∈R write

ηi=zip−1−zi1−p,ξi=zi(1−p)p+(1−zi)p1−p.\eta_i = \frac{z_i}{p} - \frac{1 - z_i}{1 - p}, \qquad \xi_i = \frac{z_i(1-p)}{p} + \frac{(1 - z_i)p}{1 - p}.ηi​=pzi​​−1−p1−zi​​,ξi​=pzi​(1−p)​+1−p(1−zi​)p​.

The DN estimator (3), ATEDN=1N∑iηi(∑j∈NiYjξj+Yi)\mathrm{ATE}_{\mathrm{DN}} = \frac1N \sum_i \eta_i \bigl(\sum_{j \in \mathcal N_i} Y_j \xi_j + Y_i\bigr)ATEDN​=N1​∑i​ηi​(∑j∈Ni​​Yj​ξj​+Yi​), can be rewritten as assigning credit for each outcome YiY_iYi​ to the treatments of iii and of its neighbours:

ATEDN=1N∑i=1N(ηi+ξi∑j∈Niηj)Yi.(5)\mathrm{ATE}_{\mathrm{DN}} = \frac1N \sum_{i=1}^N \Bigl(\eta_i + \xi_i \sum_{j \in \mathcal N_i} \eta_j\Bigr) Y_i. \tag{5}ATEDN​=N1​i=1∑N​(ηi​+ξi​j∈Ni​∑​ηj​)Yi​.(5)

The paper uses this form in the analysis of the estimator's expectation and variance: each outcome enters once, with a weight built from the treatments that influence it.

Differences from the source:

  • generalization: p ∈ (0,1) and outcomes under Assumption 1 (standing) → any real p and any outcome functions f, with no Assumption 1; reason: the identity is a rearrangement of a finite double sum that uses only the symmetry of the graph; it specializes to the paper's setting
  • encoding: units [N] = {1,…,N}, treatment vectors z ∈ {0,1}^N, an undirected graph without self-loops, d = max_i |N_i| → a finite type ι with N = card ι, z : ι → Bool with 1/0 read through ind, G : SimpleGraph ι, N_i = G.neighborFinset i, d = G.maxDegree; reason: a simple graph is exactly an undirected graph without self-loops; same instances
Preamble
import Mathlib
import Definitions.Def_DiffNeighbors_Bias_Model
Formal statement
namespace DiffNeighbors.Bias

open Finset

/-- **Credit assignment**, (5), §3, p. 8: the DN estimator (3) equals
`(1/N) ∑_i (η_i + ξ_i ∑_{j ∈ N_i} η_j) Y_i`, with `η_j = z_j/p − (1 − z_j)/(1 − p)`. -/
theorem credit_assignment {ι : Type*} [Fintype ι] [DecidableEq ι] (G : SimpleGraph ι)
    [DecidableRel G.Adj] (p : ℝ) (f : ι → (ι → Bool) → ℝ) (z : ι → Bool) :
    dnEstimator G p f z = (Fintype.card ι : ℝ)⁻¹ *
      ∑ i, (eta p z i + xi p z i * ∑ j ∈ G.neighborFinset i, eta p z j) * f i z := by sorry

end DiffNeighbors.Bias
Source
Peng, Ye, Zheng, Differences-in-Neighbors for Network Interference in Experiments, arXiv:2503.02271v1, p. 8, §3, Credit Assignment, (5)
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 23, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me