  When a fraction of a population becomes immune to an infectious disease, the
population-wide infection risk decreases nonlinearly due to collective
protection known as herd immunity. Studies based on mean-field models suggest
that natural infection in a heterogeneous population may induce herd immunity
more efficiently than homogeneous immunization. Here, we use network epidemic
models to show that the opposite can also be the case. We identify two
competing mechanisms driving disease-induced herd immunity in networks: the
high density of immunity among socially active individuals enhances the herd
immunity effect, while the topological localization of immune individuals
weakens it. The effect of localization is stronger in networks embedded in
low-dimensional space, which can make disease-induced immunity less effective
than random immunization. Our results highlight the role of networks in shaping
herd immunity and call for careful examination of model predictions that inform
public health policies.
