  Machine learning models based on temporal point processes are the state of
the art in a wide variety of applications involving discrete events in
continuous time. However, these models lack the ability to answer
counterfactual questions, which are increasingly relevant as these models are
being used to inform targeted interventions. In this work, our goal is to fill
this gap. To this end, we first develop a causal model of thinning for temporal
point processes that builds upon the Gumbel-Max structural causal model. This
model satisfies a desirable counterfactual monotonicity condition, which is
sufficient to identify counterfactual dynamics in the process of thinning.
Then, given an observed realization of a temporal point process with a given
intensity function, we develop a sampling algorithm that uses the above causal
model of thinning and the superposition theorem to simulate counterfactual
realizations of the temporal point process under a given alternative intensity
function. Simulation experiments using synthetic and real epidemiological data
show that the counterfactual realizations provided by our algorithm may give
valuable insights to enhance targeted interventions.
