Introduction

Modeling epidemic diseases has a long tradition in science1,2. In recent years the study of epidemic spreading became an attractive research topic in the realm of complex networks leading to a better understanding of the underlying spreading dynamics3,4,5,6. In particular, this progress allowed for the development of efficient countermeasures to contain diseases in our today’s highly interconnected world7,8,9,10,11,12.

More recently, it has been shown that targeted recovery protocols, focusing on influential spreaders13,14,15, are able to prevent a system from failure or disease cascades16,17,18. In contrast to targeted recovery strategies, standard models of epidemic spreading assume that nodes, i.e. the constituents of a network, spontaneously recover after being infected19. However, nodes located in highly infectious neighborhoods do not only exhibit an enhanced reinfection probability but also accessing these regions might be difficult. Thus, in terms of targeted recovery, one would recover nodes at the boundary of infected regions first. Here we study the latter scenario and find that this strategy is highly efficient in terms of disease containment. The epidemic outbreaks are minimal when compared to the baseline scenario of random intervention. In addition, on spatial networks the dynamics self-organizes to spatially confined epidemics with a characteristic length scale–independently of initial conditions. Similar confined structures emerge in modeling tumor spheroids20,21, vegetation circles22 and pattern formation in population dynamics23. We observe that this confined epidemic spot follows a random walk behavior. Previous studies focused on vaccination strategies to contain a disease7,10,11,12. Our results, however, suggest that a targeted recovery approach is also able to drastically reduce the number of infected individuals and to spatially confine an epidemic. Our approach is therefore of crucial importance in epidemiology when vaccination is not available. This opens completely new avenues of research in the study of spreading dynamics.

Model

Our model uses a binary-state dynamics where \(N\) nodes are either in a susceptible or in an infected state. In the case of random recovery, infected nodes spontaneously recover at unit rate and susceptible nodes get infected at rate \(r\) if at least one neighboring node is infected. Spontaneous transitions from a susceptible to an infected state occur at rate \(p\). However, unless specified otherwise, we typically assume \(p=0\) and just use this spontaneous infection term to perturb the system. This baseline scenario resembles the critical behavior of the contact process or of susceptible-infected-susceptible (SIS) dynamics24,25,26,27. Our recovery protocol accounts for spontaneous and targeted recovery. In our kinetic Monte Carlo simulations28,29, the probability of a recovery event to occur is proportional to the total number of infected nodes. With probability \(1-\varepsilon \) recovery is spontaneous, i.e. a randomly selected infected node recovers, and with probability \(\varepsilon \) it is targeted. In the latter case, nodes in the least-infected neighborhoods recover first. We therefore create a list in which infected nodes are sorted according to their fraction of infected neighbours. An infected node with the least fraction of infected neighbours is then randomly selected to recover. The parameter \(1-\varepsilon \) accounts for spontaneous recovery which might be present in real situations and allows to analyze the stability of the effects in the case where \(\varepsilon =1\) by perturbing the system with random recovery events. We first study the dynamics on a spatially embedded network to later on assess the influence of a transition to a random network30,31. Spatial models are widely used in epidemiology to understand the influence of spatial effects32,33 and many real-world systems exhibit features of random networks34.

Targeted recovery and confined epidemics

We start with the case where nodes in least-infected neighborhoods always recover first, i.e. \(\varepsilon \to 1\). In this case, some nodes in highly infected neighborhoods cannot recover although we assume that the probability of a recovery process is proportional to the population of infected nodes. We account for random recovery events in the subsequent paragraphs thus justifying the latter proportionality. As we see later on, properties such as the formation of confined epidemic spots that occur for \(\varepsilon \to 1\) are still observable even when a substantial amount of infected nodes recovers spontaneously. For now we consider a spatially embedded network with a spreading seed made of a circular region of infected nodes. In Fig. 1 a typical time-evolution of the number of infected nodes is presented, cf. video 1. Independent of the initial size of the circular spreading seed, the dynamics converges to the same stationary number of infected nodes. In the stationary state, the epidemic stays confined inside a deformed circular spot of finite size that grows with infection rate \(r\). This effect is shown in the inset of Fig. 1. Independent of the system size, we observe a linear dependence of the spreading radius \(R=\sqrt{{n}_{st}(r)N/\pi }\) on the spreading rate \(r\). Here \({n}_{st}(r)\) defines the fraction of infected nodes in the stationary state as a function of \(r\). The linear dependence is a consequence of the following approximated growth dynamics neglecting any stochasticity:

$$\dot{R}(t)=r\frac{2\pi R(t)}{\pi {R}^{2}(t)+2\pi R(t)}-\frac{\pi {R}^{2}(t)}{\pi {R}^{2}(t)+2\pi R(t)},$$
(1)

where \(R\) is the radius of the spreading area. The first term accounts for the fact that spreading occurs at the boundary of the circular region whereas the second term describes recovery. Recovery is still proportional to the total number of infected nodes (\(\pi {R}^{2}(t)\)), however, just occurs at the boundary in the limit of \(\varepsilon \to 1\) and thus reduces the radius. In agreement with the inset of Fig. 1, this description explains the linear growth of the radius with the infection rate \(r\), i.e. \(R(r)=2r\) in the stationary state.

Figure 1
figure 1

Time evolution and radius of the confined region. The number of infected nodes as a function of time for \(r=10\), \(\varepsilon =1\) and two different initial circular spreading seeds. In the stationary state, the epidemic is still confined to a deformed circular spot. The inset shows the spreading radius \(R=\sqrt{{n}_{st}(r)N/\pi }\) of the confined region as a function of the spreading rate \(r\). All simulations have been performed on square lattices with \(N\) nodes and a circular spreading seed.

But are the confined stationary states a mere consequence of the single initial circular spreading seed or is it possible to observe this effect for multiple and randomly distributed spreading seeds as well? We study the influence of small perturbations (\(p > 0\)) leading to a random configuration of spreading seeds instead of, as before, assuming one circular spreading seed, cf. video 2. In the Supplemental Material, we illustrate that even in this case, the dynamics still approaches a stationary state in which the epidemic stays confined. Up to fluctuations due to spontaneous infections (\(p > 0\)), different initial spreading seeds merge at some point and others vanish spontaneously so that at the end only one confined spot remains35.

Diffusive properties

The confined circular region moves over the spatially embedded system since its boundaries are always subject to deformations due to infection and recovery events. We define the mean-square displacement of the confined region as

$$\langle {\rm{\Delta }}{\vec{r}}_{{\rm{CM}}}{(t)}^{2}\rangle =\frac{1}{M}\sum _{i=1}^{M}{({\vec{r}}_{{\rm{CM}}}^{i}(t)-{\vec{r}}_{0}^{i})}^{2},$$
(2)

where \(M\) is the number of samples, \({\vec{r}}_{{\rm{CM}}}(t)\) is the center of mass at time \(t\) and \({\vec{r}}_{0}\) denotes the center of mass at time \(t=0\). To account for periodic boundaries, we applied the algorithm proposed in ref.36. We illustrate the mean-square displacement for different spreading rates in Fig. 2. The linear dependence of \(\langle {\rm{\Delta }}{\vec{r}}_{{\rm{CM}}}{(t)}^{2}\rangle \) on \(t\) suggests a diffusive behavior as typical for a random walk37. The inset of Fig. 2 shows the diffusion constant \(D\) defined by the relation \(\langle {\rm{\Delta }}{\vec{r}}_{{\rm{CM}}}{(t)}^{2}\rangle =4Dt\) for different spreading rates \(r\). Infection and recovery events correspond to center of mass shifts of size \(\mathrm{1/}R\) and \(-\mathrm{1/}R\), respectively. In the case of large clusters, i.e. for a large value of the rate \(r\), the diffusion constant is proportional to the squared center of mass shift and to the number of such shifts per unit time \(N\), i.e. \(D\sim N{R}^{-2}\). The number of shifts per unit time is proportional to \({R}^{2}\) and thus \(D\) is constant. What is the value of this constant? For large clusters the infection and recovery events are uniformly distributed around the perimeter. As a consequence of this uniform distribution, one would expect to see a non-moving cluster characterized by \(D\to 0\) when the size of the cluster goes to infinity in accordance with the observed behavior in Fig. 2. Small confined epidemic clusters do not exhibit a uniform distribution of infection and recovery events due to their finite size and one finds a diffusion constant different from zero as described by the following fit \(D(r)\sim {(r-\mathrm{1)}}^{-\alpha }\) with \(\alpha =\mathrm{0.21(1)}\). The functional form of \(D(r)\) suggests the existence of a threshold \({r}_{c}(\varepsilon =\mathrm{1)}=1\). In the case of spreading rates smaller than \({r}_{c}(\varepsilon =\mathrm{1)}\), the confined epidemic dies out. Even for values of \(r\) slightly larger than 1, the infected spot might disappear due to statistical fluctuations. The threshold value is also implicitly contained in Eq. (1) since \(R\) would only take stationary values smaller than 2 for \(r < {r}_{c}(\varepsilon =\mathrm{1)}\). So the dynamics would end up in the absorbing state with zero infected nodes.

Figure 2
figure 2

Random motion of confined epidemics. The mean-square displacement \(\langle {\rm{\Delta }}{\vec{r}}_{{\rm{CM}}}{(t)}^{2}\rangle \) as a function of time for different spreading rates \(r\). The linear growth of \(\langle {\rm{\Delta }}{\vec{r}}_{{\rm{CM}}}{(t)}^{2}\rangle \) suggests that the confined epidemic performs a random walk. The inset shows the diffusion constant for different spreading rates. The number of samples is \(M=2\times {10}^{4}\).

Surface roughness

As illustrated in Figs 1 and S1 in the Supplemental Material, the confined epidemic exhibits a characteristic interface separating infected and susceptible nodes. We analyze the surface roughness in terms of its width and define the overall stationary width of a spatially embedded network with linear dimension \(L\) and a spreading rate \(r\) 38,

$${W}_{L}(r)=\sqrt{\langle {[h(x)-\langle h\rangle ]}^{2}\rangle },$$
(3)

where \(h(x)\) denotes the interface height. In order to form a stable flat interface, we used as initial condition a line of infected nodes at the bottom of a lattice, cf. upper right inset in Fig. 3. We then set the spreading rate to \(r=10\) and study the height \({h}_{L}(r=\mathrm{10)}\) as well as the width \({W}_{L}(r=\mathrm{10)}\) as a function of \(L\). We clearly see in Fig. 3 that the height approaches the analytical stationary value \({h}_{L}(r=\mathrm{10)}=10\) as \(L\) increases. The value \(h(r=\mathrm{10)}=10\) or more generally \(h(r)=r\) corresponds to the stationary state of Eq. (1) by assuming a rectangular spreading regime instead of a circular one. The width as a measure of the standard deviation of the surface height decreases for large values of \(L\) as \({h}_{L}\) approaches its analytical value, as shown in the upper left inset of Fig. 3. For small system sizes we observe deviations from this expected behavior since recovery typically occurs at kinks which are moving through the system. The smaller the system the more often the kink will travel through it in a fixed time. This behavior is different from the one typically observed for the growth of interfaces38,39. Summarizing, we find that the model’s dynamics leads to confined spatial structures with a flat interface.

Figure 3
figure 3

Surface height and width of the confined epidemic. The surface height \({h}_{L}(r=\mathrm{10)}\) for \(r=10\) as a function of the linear system size \(L\in {\mathrm{\{2}}^{6},\,{2}^{7},\,\ldots ,\,{2}^{19}\}\) of a square lattice. For the smallest system with \(L=64\), the number of samples is \({10}^{4}\). As the system size doubles, the number of samples is divided by 2. A typical rectangular interface structure is shown in the upper right inset. Black lattice sites are infected. The width \({W}_{L}(r=\mathrm{10)}\) as a function of \(L\) is shown in the upper left inset. Error bars are smaller than the marker sizes.

Influence of spontaneous recovery

Until this point we have only discussed the properties of a targeted intervention strategy where nodes in least-infected neighborhoods recover first. But how is spontaneous recovery, i.e. an \(\varepsilon \) smaller than 1, going to influence the spreading dynamics? As shown in Fig. 4 (lower panel), confined epidemics still govern the spatial structure of the spreading dynamics for a value of \(\varepsilon =0.8\) where twenty percent of the recovery events occur randomly. However, as \(\varepsilon \) approaches zero, the infected nodes are not confined anymore. We also see the influence of \(\varepsilon \) by comparing the corresponding phase transitions in Fig. 4 (upper panel). We discuss the dependence of \({n}_{st}\) on \(\varepsilon \) in the Supplemental Material. A purely random recovery strategy leads to a relatively low critical spreading rate \({r}_{c}(\varepsilon =\mathrm{0)}=\mathrm{0.47(1)}\) 24 when compared to strategies with \(\varepsilon > 0\). This implies that purely random recovery admits non-zero stationary proportions of infected nodes for spreading rates which might be too low to cause any outbreak for \(\varepsilon > 0\). Thus, recovery of nodes in least-infected neighborhoods is very efficient since it reduces the number of infected nodes drastically. This effect is still observable under large perturbations, i.e. for small values of \(\varepsilon \), corresponding to a large proportion of spontaneous recovery events. Similar results have been found for random geometric graphs as shown in the Supplemental Material.

Figure 4
figure 4

Influence of spontaneous recovery. (upper panel) The fraction of infected nodes in the stationary state \({n}_{st}(r)\) as a function of \(r\) for different values of \(\varepsilon \). The inset shows the number of infected nodes for \(\varepsilon =0.8\) and \(\varepsilon =1\) (averaged over 500 samples). Two different presentations have been used since the number of infected nodes is only proportional to the system size for small values of \(\varepsilon \). Otherwise the number of infected nodes does not depend on the system size. All simulations have been performed on a square lattice with \(N=1024\times 1024\) nodes. (lower panel) Snapshots at \(t=10\) for different \(\varepsilon \), \(r=2\) and an initial spreading seed with a radius of 30 on a square lattice with \(N=128\times 128\) nodes. Black lattice sites correspond to infected ones.

Transition from the square lattice to a random network

The data presented in Fig. 4 suggest that epidemic transitions on a spatially embedded system are less severe for any \(\varepsilon > 0\) when compared to purely random recovery. In order to examine the influence of the underlying network structure on our dynamics, we analyze the transition from a spatial network to a random network30,31. We study a spatially embedded network with degree \(k=4\) where long-range links replace randomly chosen nearest-neighbor links31. The lengths \(l\) of the long-range links are distributed according to \(P(l)\sim \exp (-l/\zeta )\), where \(\zeta \) defines the characteristic link length. As \(\zeta \to 0\), a square lattice is recovered, whereas the limit \(\zeta \to \infty \) corresponds to a regular random graph since all link lengths are equally likely. In Fig. 5 (upper panel), we illustrate the influence of different values of \(\zeta \) on the transitions of the targeted recovery strategy (\(\varepsilon =1\)) in comparison to random recovery (\(\varepsilon =0\)). Targeted recovery outperforms random intervention for all values of \(\zeta \) in terms of the number of infected nodes. In the Supplemental Material, we show that targeted intervention tends towards random recovery for large values of \(r\) and for regular random graphs with a large degree. Our strategy substantially improves the control of an epidemic when applied to random networks. In Fig. 5 (lower panel), we observe that the epidemic becomes less confined for \(\varepsilon =1\) and \(\zeta =10\) compared to the situation where \(\zeta =0\) in Fig. 4 (lower panel). In the case of \(\zeta =100\), long-range random connections lead to a loss of the spatial structure destroying the confinement.

Figure 5
figure 5

Transition from a lattice to a random network. (upper panel) The dependence of \({n}_{st}(r)\) on \(r\) on a network with \(N=128\times 128\) nodes for different values of \(\zeta \). Targeted recovery with \(\varepsilon =1\) (green filled markers) outperforms random interventions where \(\varepsilon =0\) (blue hollow markers) for all values of \(\zeta \) since a smaller fraction of nodes is infected in the stationary state. The curves for \(\varepsilon =0\) and different \(\zeta \) lie on top of each other. (lower panel) Snapshots at \(t=10\) for \(\zeta =\mathrm{10,\ 100}\), \(r=2\) and an initial spreading seed with a radius of 30 on a network with \(N=128\times 128\) nodes. Black lattice sites are infected.

Concluding remarks

We have studied a disease propagation model accounting for targeted recovery where nodes recover first when they are located in least-infected neighborhoods. Surprisingly, this dynamics self-organizes in spatially confined epidemics resembling deformed circular spots of flat surface that perform a random walk on spatially embedded networks. This effect is still observable under large perturbations of random recovery events. Spatially confining an epidemic is of great importance for controlling diseases. Our targeted recovery protocol outperforms random interventions in terms of the number of infected nodes on networks reaching from spatially embedded systems to random ones. The results in refs7,11 suggest that an optimized vaccination strategy is able to reduce the infection prevalence of a SIS model up to 80% compared to random vaccination. In our model, we find that targeted recovery leads to vanishingly small outbreaks on spatial networks and reductions of the disease prevalence up to 50% on random networks for the studied parameters. It would be desirable to compare the efficiency of our approach with an optimal recovery protocol for general topologies. However, to the best of our knowledge, a general framework which describes an optimal recovery procedure for standard disease models on a general topology has not been studied yet.