Hoffman 2022 - Appendix - Hogwild Counterexample and Hessian Identity Proof
Summary
Two appendices with full arguments: (D) a two-bit XOR kernel that is exactly valid when applied one state at a time but collapses to the absorbing state when applied to both states simultaneously, showing why “hogwild” ECA is invalid; (E) a proof that under boundary-vanishing conditions.
Overview
These justify two design constraints of MEADS: fold-based parallel ECA (Hoffman 2022 - Ensemble-Chain Adaptation and Parallelism) and estimating the Hessian from gradients (Hoffman 2022 - MEADS Heuristics - Step Size, Damping, Drift and Eigenvalue Estimation).
Main Content
Appendix D: hogwild adaptation fails
Two independent uniform bits , . Kernel for updating one state given the other: .
- One at a time is valid. Holding fixed, the two possible maps ( and ) are both reversible with respect to the uniform distribution, so alternating updates leave the uniform distribution invariant.
- Simultaneous (hogwild) is wrong. , so after one iteration the two states are identical; another iteration sends both to 0 (). After two iterations the chain is stuck in absorbing state .
- The one-at-a-time chain is neither ergodic nor aperiodic, which can be fixed by occasionally (probability 0.01) applying a kernel that resamples uniformly; the hogwild version then still has a stationary distribution heavily biased toward since resampling is rare.
import random
def run(hogwild, steps=20000, p_reset=0.01):
x=[random.randint(0,1), random.randint(0,1)]; zeros=0
for _ in range(steps):
if random.random()<p_reset: x=[random.randint(0,1), random.randint(0,1)]
elif hogwild: x=[x[0]^x[1], x[1]^x[0]]
else:
i=random.randint(0,1); x[i]=x[i]^x[1-i]
zeros += (x==[0,0])
return zeros/steps
print(run(False), run(True)) # about 0.26 vs about 0.99: hogwild is badly biased(The snippet is a direct implementation of the appendix description; the one-at-a-time version targets 0.25 for the state .)
Appendix E: expected negative Hessian equals expected score outer product (eq. 10)
Let be twice differentiable almost everywhere and continuous, with as for each . Then
Proof. Since (eq. 11), it suffices to show for all . For : write , because by the fundamental theorem of calculus and the vanishing boundary condition. For : because the first derivative also vanishes at .
One-dimensional sanity check
For : , . Then and . The two sides agree, and is the that MEADS wants for the step size.
Connections
Hoffman 2022 - MEADS - Overview lists where each appendix is used. For the importance of boundary decay in funnels (where it can fail numerically) see Betancourt 2015 - Hierarchical Geometry and the Funnel.
See Also
Hoffman 2022 - Ensemble-Chain Adaptation and Parallelism, Hoffman 2022 - MEADS Heuristics - Step Size, Damping, Drift and Eigenvalue Estimation