  Epidemic models and self-exciting processes are two types of models used to
describe diffusion phenomena online and offline. These models were originally
developed in different scientific communities, and their commonalities are
under-explored. This work establishes, for the first time, a general connection
between the two model classes via three new mathematical components. The first
is a generalized version of stochastic Susceptible-Infected-Recovered (SIR)
model with arbitrary recovery time distributions; the second is the
relationship between the (latent and arbitrary) recovery time distribution,
recovery hazard function, and the infection kernel of self-exciting processes;
the third includes methods for simulating, fitting, evaluating and predicting
the generalized process. On three large Twitter diffusion datasets, we conduct
goodness-of-fit tests and holdout log-likelihood evaluation of self-exciting
processes with three infection kernels --- exponential, power-law and Tsallis
Q-exponential. We show that the modeling performance of the infection kernels
varies with respect to the temporal structures of diffusions, and also with
respect to user behavior, such as the likelihood of being bots. We further
improve the prediction of popularity by combining two models that are
identified as complementary by the goodness-of-fit tests.
