  A novel generalized mean field approximation, called the Small-Coupling
Dynamic Cavity (SCDC) method, for epidemic inference and risk assessment is
presented. The method is developed within a fully Bayesian framework and
accounts for non-causal effects generated by the presence of observations. It
is based on a graphical model representation of the epidemic stochastic process
and utilizes dynamic cavity equations to derive a set of self-consistent
equations for probability marginals defined on the edges of the contact graph.
By performing a small-coupling expansion, a pair of time-dependent cavity
messages is obtained, which capture the probability of individual infection and
the conditioning power of observations. In its efficient formulation, the
computational cost per iteration of the SCDC algorithm is linear in the
duration of the epidemic dynamics and in the number of contacts. The SCDC
method is derived for the Susceptible-Infected (SI) model and straightforwardly
applicable to other Markovian epidemic processes, including recurrent ones. It
exhibits high accuracy in assessing individual risk on par with Belief
Propagation techniques and outperforming heuristic methods based on
individual-based mean-field approximations. Although convergence issues may
arise due to long-range correlations in contact graphs, the estimated marginal
probabilities remain sufficiently accurate for reliable risk estimation. Future
work includes extending the method to non-Markovian recurrent epidemic models
and investigating the role of second-order terms in the small coupling
expansion of the observation-reweighted Dynamic Cavity equations.
