Agent-Based Modeling Suggests We Can Modulate COVID-19 Spread By Encouraging Localized Social Interactions — Part Two

Written by Deborah Duong and Ben Goertzel

Ben Goertzel
13 min readNov 9, 2020


This post elaborates on the points made in the prequel post, showing some of the detailed simulation results that led us to the conclusions presented there.

Our recent experiments with Agent-Based Modeling of COVID-19 have led us to some interesting hypotheses regarding the relationship between a population’s social interaction network and the spread of the virus through that population. For instance, we have found in our simulations that if the “clumpiness” of the social network of a certain population is above a certain threshold, then it becomes much easier to control the spread of COVID-19 in that population via lockdowns and other mechanisms. It becomes much easier to keep the maximum infection rate under a level consistent with the limits of the healthcare system, and also makes it easier to achieve herd immunity with a lower percentage of the population immune.

We will show here some of the specific Agent-Based Simulation results that led us to these tentative conclusions. The basic gist of the results presented here was covered in my talk in the Medical Applications stream of the D.OS (Decentralized OS Summit) event that SingularityNET and Cardano co-organized on November 9, 2020.

The post definitely digs fairly deep into the weeds, and is offered in the vein of “open science.” The matters we’re addressing here are critically important for all of us, the results we’re presenting and discussing are highly intriguing yet also in many ways rough and preliminary — so we consider it especially important to be explicit and transparent about everything involved.

For those who want to dig yet further, iPython notebooks containing the results summarized here may be found at this link. Further analysis based on these results (and new results currently in the works) will be supplied in forthcoming scientific publications.

We welcome any software developers or simulations modellers interested in helping out with taking the next steps in this COVID-19 modelling adventure. We must also offer some small caveats in this regard: So far the code underlying these simulations, while open-source and reasonably clean and well-structured, has definitely been developed for ease of use by our own (relatively expert) simulation modelling team rather than by the general developer community. At the moment it’s more about command-line functions with long argument lists than whizzy graphs and animations, and while we have implemented things efficiently where we can, there has been a certain element of waiting overnight for batches of simulation results. Next steps will include making the framework more accessible and scalable, e.g. by creating graphical user interfaces including maps of the regions being modelled, and via integration into the SingularityNET decentralized AI platform which will support greater scalability.

The work reported here has been a collaborative effort among numerous members of the SingularityNET AI team, including Dr Deborah Duong, Dr Matt Ikle’, Andre’ Luiz de Senna, Ramon Duraes, Cassio Pennachin, Ben Goertzel and others.

Incorporating Social-Network “Clumpiness” In Simple COVID-19 Simulation Models

The simulation results we summarize here were obtained from modelling a generic simulated village with 1000 or 10000 residents (mostly we worked with the 1000 case, but did some runs with the 10000 cases to ensure the results weren’t an artefact of the particular population assumed). Simulation runs with much larger population sizes are in the works, but studying smaller cases is faster in terms of computational time, and thus preferable for early-stage exploration.

The various types of people, occupations and locations considered in the model were reviewed in the prequel post — basically, people of various different age brackets, including children and elderly, who go to school or work and occasionally go to restaurants etc., with potential full or partial lockdowns restricting their behaviours. We have tuned the parameters of the simulation so that the overall properties regarding COVID-19 resemble those seen in real situations like towns and cities in the USA — similar infection rates and spreading factors, similar dynamics within restaurants and schools, similar impacts obtained from lockdowns etc. This tuning is mathematically simple but involved a great deal of background research into the known behaviour of COVID-19 in various scenarios, which sometimes is known only partially and uncertainly.

As also summarized in the prequel post, we have calibrated our simulation using connectivity between different people belonging to different social groups, which we call “clumpiness”. We measure the connectivity of a social network in terms of the number of hops across the social network needed to get from one person or group to another. A clumpier social network is one in which it generally takes more hops to get from one tightly-connected social group to another in the social network.

For example, families that have students in the same schools have a route in which to infect each other within one hop — a route which those with students in different schools don’t have, although they may have another route through a working district. If Jim’s daughter goes to school with Bob, and Bob’s mother works with Lateisha — and there are no more direct connections between Jim and Lateisha — then Jim and Lateisha are separated by two hops rather than one.

In our current relatively simplistic simulations, we can index the clumpiness of a particular simulated society in an elementary way. We can gauge the connectedness of two simulated people (agents) as the length of the shortest path through the social network between them, and then we can gauge the general clumpiness of the simulated society as the maximum of this value seen across any pair of people. So a “6 hop” simulation is one where the furthest apart any two agents are is 6 hops in the social network. In more complex simulations where the agents are more heterogeneous, we have worked with sophisticated statistical measures, but this leads to more parameters to experiment with, so for the simple results presented here we will stick with the elementary and homogeneous approach.

Simulations with No Lockdowns

What we’re going to show here, first of all, are results obtained from 4 scenarios, with 1 hop, 3 hops, 6 hops and 10 hops (i.e. clumpiness values of 1,3,6, and 10).

For each clumpiness value, we did 30 runs of 1000 agents, in-network setups where every agent has an infection path to every other agent, over a 360 day run with no lockdowns.

At the beginning of the simulated scenario, 10 random agents were infected, and then 1 more was infected every approximately 5 days, to make a floor of 82 exogenous infections.

We found realistic results, corresponding roughly to US estimations, with a clumpiness of 10 hops.

In the following graphs, the shaded areas represent 95% confidence intervals around a mean; for each graph we present both a big picture and a zoom-in.

1 hop (every person shares a (work or school) district network with every other person)
1 hop zoomed in.
3 hops. A person in the farthest locality can infect another through three network hops.
3 hops zoomed in
6 hops. The persons farthest in the locality from each other require 6 network hops to infect.
6 hops zoomed in.
10 hops
10 hops. Zoomed in.

In the 10 hops scenario, which seems the most realistic in terms of comparison with US data, the persons farthest apart require 10 network hops to infect. Without lockdowns, in the 10 hop scenario, herd immunity is reached at 67% of the population, with a peak infection rate of 16% of the population at one time and peak hospitalization at 2.2% of the population at one time.

To compare, 3.4 % of New Yorkers have been infected with Covid-19 and 0.07% have been hospitalized at one time, in half a year (when there have been lockdowns). The 67% herd immunity in this “realistic clumpiness” confirms herd immunity estimates based on connectivity as reported e.g. in a New York Times article,

Nonlinearity in the Dependence of Herd Immunity Thresholds on Clumpiness

One thing interesting to observe in these results — and results we’ve seen in other simulation runs not included here — is that clumpiness doesn’t relate smoothly to the percentage of infected individuals when herd immunity is reached. There is, rather, a nonlinear dependence manifested for example in a surprising decrease in the herd immunity threshold occurring after 6 hops:

Effects of Clumpiness on Lockdown trigger conditions and length

The next step is to introduce lockdowns into the model. This step revealed some other interesting nonlinearities — e.g. we found that very similar results in terms of infection rates are obtained from

  • models with realistic clumpiness and lax lockdown triggers
  • models with no clumpiness but more stringent lockdown triggers

The “lockdown trigger” refers to how high the infection rate needs to be in order to trigger a lockdown — this, along with the length the lockdown lasts, is the key parameter we used to compare different lockdown policies in this initial work. Of course one could use the same simulation models to evaluate more fine-grained aspects of different lockdown policies.

This result suggests that epidemiological models that don’t model the natural bubbles of homophilic social interaction (“clumpiness”) are overly conservative, and may potentially lead to more stringent lockdowns than are really necessary.

For example, in our realistic clumpiness level simulation, we have a similar amount of infection when we trigger lockdowns when five per thousand are infected, a high number, as when 1 per thousand are infected, a low number. In the two scenarios, we obtain a peak where 4.39% of the population are infected, versus a peak where 4.11 % of the population are infected. To compare, California counties enter the purple tier, a level of full lockdown, when there are about 1.5 infections per thousand persons.

However, if we do not include clumping in the model, the number of infections obtained when we trigger lockdowns at four per thousand and three per thousand is very different: a peak infection of 6.8% of the population vs. 4.94%.

So based on our current simulations, we can tentatively conclude: If we have models with realistic clumpiness, the lockdown can be much laxer and have the same infection effect.

The following table summarizes results from multiple simulation runs, pointing in this overall direction:

The table shows simulation results, including different levels of clumpiness against the policy, and resultant infection rates and herd immunity levels. Where the same values are repeated on lower rows, the trigger levels all result in the same policy: lockdown for the entire year.

We see in this table the same threshold phenomenon reported above in simulation without lockdowns: a nonlinear jump in herd immunity threshold (as well as peak infected, which is what’s most important to keep down in order to avoid healthcare system overload) as clumpiness increases, here occurring between three-hop and six-hop clumpiness scenarios.

The policies show triggers that activate lockdown and the number of days below that trigger required before the lockdown is lifted. Often, changing the day requirements under the trigger is as effective as changing the trigger value. For example, with a clumpiness of 10, changing the trigger from 0.3 to 0.2 brings the infection rate down from 4.39 to 4.27. However, if the time period is changed from 7 days to 21 days, the infection rate is brought down approximately the same amount, to 4.29.

(The lower values shown for one-hop rather than three-hop scenarios in this table are intriguing, but may well be a result of noise resultant from the relatively small number of experiments, or some implementation peculiarity in the model setup. This is a matter of current investigation.)

The following graph shows the results of a relatively lax lockdown policy, in a 10-hop simulation: To trigger lockdown at an infection rate of 0.4% of the population (active cases) and to only lift that lockdown when that infection rate has been under 0.4% for seven days.

We can see from the income line that under these rules lockdown lifts and average income raises some time after 200 days. The green line at 0.26 at the end of the year, represents the herd immunity level that has been reached.

The following is a zoom-in of the above graph:

We can see that the infection rate per day lowers at lockdown and stays below the critical level, staying down after lockdown is lifted after day 200. This is despite the fact that a new random agent is exogenously infected about every 5 days, demonstrating a new “herd immunity” that has been achieved.

The following chart shows a complete lockdown on the same scenario, also at clumpiness 10, with a trigger at 0.1% of the population for lockdown and release when the population has been under the trigger for 7 days. Of course, with the exogenous infection of one person per 5 days, the trigger never releases and so we see a complete lockdown over a year, with considerably less average income than the more lax trigger in which lockdown was released at a 0.4% infection rate.

The following is a zoom of the above chart , with the 0.1% trigger. We can see that the infection rate, after day 200, is very similar to the infection rate in the more lax lockdown, but the income lost is much greater.

Here is a scenario showing the above policy trigger for a lockdown of 0.4 with no clumping. The herd immunity threshold is considerably higher, at 36.8%.

This is a zoom-in of the above 0.4 triggers no clumping scenario. We can see that the infection rises much more easily because there is no clumpiness to slow it down. The peak infection is 6.8%

Here we see a 0.3 trigger, which does more to change this no clump scenario than a 0.1 trigger does to change the scenario with realistic clumpiness, bringing herding down to 33.5 and infection down to 4.94%.

A zoom-in of the above scenario:

Working Toward Conclusions

While the simulations summarized above are highly simplistic compared to any actual society plagued by COVID-19, they are extremely complex and sophisticated compared to the standard epidemiological models used to drive most current pandemic management policies. They include key feedbacks between cultural social behaviours, spatial organization and temporal infection dynamics which are omitted in standard models — and these feedbacks appear critical in generating significant nonlinearities regarding pragmatically important phenomena like maximum infection rate and herd immunity threshold.

The feedbacks and nonlinearities immanent in these simulations push us to remember the subtlety and context-dependence of the parameters of herd immunity, which is not really about a fixed percentage of the population are immune, but more about the pattern of immunity in the social network as related to the overall network structure and dynamics.

Our results, albeit preliminary and in need of further investigation and elaboration, also tentatively suggest somewhat different policy directions than those currently getting most of the focus. If the goal is to make herd immunity easier to come by and to prevent overloading of the healthcare system, and also to minimize the social, psychological and economic cost imposed by lockdowns, then — according to our understanding so far — it will make sense to focus on interventions that increase the clumpiness of the social network. This will reduce maximum infection, make it easier to come by herd immunity, and enable us to get away with laxer parameters regarding lockdown triggering and length.

Natural next steps include extending these simulations to larger and more heterogeneous populations, more realistic geometries, and agents with the ability to learn and adapt. More than likely following through on these steps will reveal a host of additional interesting and important dynamic phenomena beyond the clumpiness-related phenomena reported here. Incorporating detailed information regarding particular towns, cities, nations and other regions into much larger scale simulations will be even more revelatory.

We are clearly still at the early stages in our COVID-19 simulation modelling adventure, but we believe the preliminary results reported here illustrate the value and importance of pursuing and massively scaling up this sort of work. The pandemic is costing tens of trillions of dollars to the global economy and causing immeasurable psychological and social damage — some of which cannot be avoided given the circumstances, but much of which could very likely be minimized via avidly pursuing agent-based modelling and incorporating the results in the policy.

Join Us

We hope you will join us in our mission to democratize AI and to use its transformative powers to enact real, positive and lasting change. The best way forward is to come together and work practically towards creating a better future.

If you are looking to monetize your AI services or create new ones, we invite you to learn more about the nature of our platform and what it has to offer by visiting the SingularityNET developer portal.

We are proud of our developers and researchers that are actively publishing their research for the benefit of the community; you can read the research here. For any additional information, please refer to our new roadmap. To stay informed about all of our developments, please subscribe to our newsletter. You can connect with our passionate and talented community by visiting our community forum.