  We study a simple model of epidemics where an infected node transmits the
infection to its neighbors independently with probability $p$. This is also
known as the independent cascade or Susceptible-Infected-Recovered (SIR) model
with fixed recovery time. The size of an outbreak in this model is closely
related to that of the giant connected component in ``edge percolation'', where
each edge of the graph is kept independently with probability $p$, studied for
a large class of networks including configuration model
\cite{molloy2011critical} and preferential attachment
\cite{bollobas2003,Riordan2005}. Even though these models capture the effects
of degree inhomogeneity and the role of super-spreaders in the spread of an
epidemic, they only consider graphs that are locally tree like i.e. have a few
or no short cycles. Some generalizations of the configuration model were
suggested to capture local communities, known as household models
\cite{ball2009threshold}, or hierarchical configuration model
\cite{Hofstad2015hierarchical}.
  Here, we ask a different question: what information is needed for general
networks to predict the size of an outbreak? Is it possible to make predictions
by accessing the distribution of small subgraphs (or motifs)? We answer the
question in the affirmative for large-set expanders with local weak limits
(also known as Benjamini-Schramm limits). In particular, we show that there is
an algorithm which gives a $(1-\epsilon)$ approximation of the probability and
the final size of an outbreak by accessing a constant-size neighborhood of a
constant number of nodes chosen uniformly at random. We also present
corollaries of the theorem for the preferential attachment model, and study
generalizations with household (or motif) structure. The latter was only known
for the configuration model.

Data Structures and Algorithms;Combinatorics;Probability