Paper List

期刊: ArXiv Preprint
发布日期: 2026-03-11
Computational ModelingCausal Inference

Realizing Common Random Numbers: Event-Keyed Hashing for Causally Valid Stochastic Models

Institute for Disease Modeling, Gates Foundation | Department of Epidemiology, University of North Carolina | Institute for Disease Modeling, Gates Foundation

Vince Buffalo, Carl A. B. Pearson, Daniel Klein

30秒速读

IN SHORT: This paper addresses the critical problem that standard stateful PRNG implementations in agent-based models violate causal validity by making random draws execution-path-dependent, thereby breaking the fundamental assumption of common random numbers needed for valid counterfactual comparisons.

核心创新

  • Methodology Identifies and formalizes the fundamental mismatch between scientific causal structure in ABMs and program-level causal structure induced by stateful PRNGs through the lens of Structural Causal Models (SCMs)
  • Methodology Introduces the concept of 'execution invariance' as a necessary property for causally valid ABM counterfactuals, requiring that exogenous noise terms remain stable across intervention scenarios
  • Methodology Proposes event-keyed random number generation combining counter-based PRNGs (Philox/Threefry) with event identifiers to decouple random draws from simulation execution order

主要结论

  • Standard stateful PRNG practices violate the execution invariance required for valid SCM-style interventions, as demonstrated through formal analysis of the structural causal model framework
  • Event-keyed hashing with counter-based PRNGs restores the stable event-indexed exogenous structure assumed by SCMs, enabling proper counterfactual comparisons with variance reduction benefits
  • The proposed approach allows ABMs to function as valid structural causal models under interventions, maintaining the critical property that interventions change only structural equations while holding exogenous noise terms fixed
研究空白: Current ABM implementations using stateful PRNGs fail to maintain proper coupling of exogenous noise terms across intervention scenarios due to execution-path-dependent draw indexing, making individual counterfactual comparisons causally incoherent even when mechanistic specifications are sound.

摘要: Agent-based models (ABMs) are widely used to estimate causal treatment effects via paired counterfactual simulation. A standard variance reduction technique is common random numbers (CRNs), which couples replicates across intervention scenarios by sharing the same random inputs. In practice, CRNs are implemented by reusing the same base seed, but this relies on a critical assumption: that the same draw index corresponds to the same modeled event across scenarios. Stateful pseudorandom number generators (PRNGs) violate this assumption whenever interventions alter the simulation's execution path, because any change in control flow shifts the draw index used for all downstream events. We argue that this execution-path-dependent draw indexing is not only a variance-reduction nuisance, but represents a fundamental mismatch between the scientific causal structure ABMs are intended to encode and the program-level causal structure induced by stateful PRNG implementations. Formalizing this through the lens of structural causal models (SCMs), we show that standard PRNG practices yield causally incoherent paired counterfactual comparisons even when the mechanistic specification is otherwise sound. We show that a remedy is to combine counter-based random number generators (e.g., Philox/Threefry) with event identifiers. This decouples random number generation from simulation execution order by making random draws explicit functions of the particular modeled event that called them, restoring the stable event-indexed exogenous structure assumed by SCMs.