Social Contagious Disease Model

A Contagious Disease Simulation as a Graph Network of weakly interacting Cellular Automata

Mathis Kunold, Simon Lüdke, Leander John, Christian Laun

The aim of this project is to simulate the spread of a contagious disease through multiple weakly interacting communities. This is motivated by the current COVID-19 pandemic, however the model is highly flexible and can easily be adapted to new scenarios.

The scenario we explore is a society that is strongly split into milieus. Members within a milieu frequently interact with each other, but only rarely with members of a different milieu. Furthermore, each milieu has an individual dynamic that affects disease spread. At last, there are also global responses to the spread of a pandemic, and some milieus are weighted stronger in those decisions.

Our implementation consists of a cellular automaton for each milieu to model internal dynamics, and a graph structure to facilitate the interaction between milieus.

Our results show that some milieus provide conditions favorable for a fast disease spread, while others are resistant to a point where a disease barely spreads. But even fairly resistant milieus can have recurring  infection clusters when the disease is repeatedly reintroduced from one of the more susceptible milieus.


A milieu is a group of people within a society with similar values and behaviors[1]. Especially smaller milieus are strongly internally connected and show a sense of belonging together [2]. There are a lot of characteristic parameters that determine a milieu: Some are more objective, e.g. the degree of education and income. Others, for example relationships towards others and the mentality, are more subjective.

Many groups of people have attempted to identify and characterize those milieus, as they play an important role in sociological research and in marketing. Two of those are "SIGMA Gesellschaft für internationale Marktforschung und Beratung"[3] and the "SINUS Institute"[4]. Both see 'value orientation' and 'social status' as the two core properties that distinguish different milieus. Based on these parameters they both identify 10 milieus in Germany. The SINUS and SIGMA models mostly agree on the characteristics of these milieus. Moving forward we will be using the SIGMA model as a basis for our model parameters (Figure 1).

It should be noted that we are no experts in the field of social sciences and our focus is on modeling a segmented society where each segment differs from the others in some interesting parameters. Thus the used classification of milieus mainly serves the purpose of an illustration.

  • Figure 1: The German SIGMA Milieus [1]

We are interested in the reaction of such a complex society to a spreading contagious disease, such as the ongoing COVID-19 pandemic.

Following our illustration, some examples why the various milieus may respond differently to a pandemic are as follows:

  • People from lower income brackets may live in cramped living conditions, sharing facilities like kitchens. This increases the risk of exposure.
  • People from higher income brackets can afford to get food and other necessities delivered, reducing human contact further.
  • Many office jobs can be performed from home, whereas members of the service industry often have to interact with many people face-to-face. Examples would be a software engineer vs. a cashier at a grocery store or a teacher.
  • Someone who closely follows the news can respond faster to an emerging pandemic than someone who does not.

The reasons epidemological simulations are carried out in general are to predict the behaviour of a disease and to gouge the effectiveness of countermeasures. Our simulation attempts to predict how different social groups are affected by a pandemic. This may be of interest to determine who is the most vulnerable in such a situation and who will need the most help during and after such an event. While we do explore some political countermeasures, the level of abstraction we use is too high to directly conclude which real-world measures might be useful.

Background: What is a graph?

If you haven't seen it before, the use of the term "graph" on this page can be a bit confusing. In school we were taught that a graph has x- and y-axes, as well as some points or lines. But this is not what we are talking about. We would call that a plot.

A graph, as used here, is a mathematical object. It is made up from nodes and edges.

The nodes are an unordered set. The edges each connect two nodes. Typically the edges describe a relation between the nodes.

We will be working with a fully connected, undirected graph.
Fully connected means that for each pair of nodes an edge exists.
Undirected means that the edge does not have an origin or a destination: The interaction between the two nodes it connects is symmetric. In contrast a directed graph may have an edge from node A to node B, and a different edge from B to A.

This is an image of a graph with 3 nodes (represented by blue circles) and 3 edges (represented by black lines). It is fully connected and undirected.


Model Description

To simulate the dynamics between the social milieus, we implemented a model consisting of two layers. Each milieu is represented as a node within a graph structure, assuming the interaction between different nodes to be comparatively weak as motivated before (Figure 2). The strong interactions within these nodes are modeled via cellular automata, where each milieu is represented by one automaton using a custom implementation based on the Contagious Disease model already found in Utopia.

  • Figure 2: Basic principle of our model: A number of individual CAs interact within a graph structure

Since the standard version of the Contagious Disease model simulates a forest [5], a few changes had to be made in order for it to represent a human population. While the base model introduces population dynamics by allowing trees to randomly grow, our model omits any deaths unrelated to the disease as well as all population growth. This is done because we assume our model to work on a time scale where the overall dynamics of the simulated population are negligible.

Instead of adding dynamics via growth, we gave the individuals represented by the cells the ability to move. Our implementation of movement is inspired by another Utopia base model: the Predator Prey model. Based on a random number the update rule decides if the cell should move in the first place. The movement probability of a populated cell can be set via the configuration and even be changed over the course of the simulation. In case it should move, the neighbors of that cell are evaluated for empty fields, a sample is then drawn from those empty neighbors and the cell shifts to its new position.

Another addition we made is the introduction of new cell states. Whereas the base model distinguishes between healthy and infected cells while emptying the dead ones instantly, our version adds cells that are are exposed, meaning they transmit the disease while not showing symptoms yet, as well as dead and immune cells.

We also effectively lengthened the time an infection lasts by randomly sampling whether or not the illness should progress. In the base model, infected trees will die off upon being updated the next time. Therefore the infection lasts for exactly one time step in the base model. Our implementation allows for a custom mean infection length.

Healthy cells have a chance of contracting the disease and thus turning exposed when coming into contact with exposed or infected cells. An exposed cell can turn to infected with a certain probability, representing incubation time. Exposed cells are contagious from day one. An infected cell in turn has the chance to end the disease progression by either passing away (dead) or surviving, attaining an immunity that way (immune). This process is visualized as a flow chart in Figure 3.

In our model immunity is permanent, as we are only considering the initial spread of a disease, not multiple waves.

  • Figure 3: Progression of a susceptible cell

To simulate the interaction between social milieus as they are described by SIGMA, we place 10 nodes (one for each milieu) in a graph structure in a two dimensional space, the dimensions being social status and value orientation (Figure 4). Social status stretches from the lower classes to the middle and upper ones while value orientation reaches from traditional over modern to postmodern. We chose the center coordinates of each milieu, as seen in Figure 4, to be representative of it as a whole.

In our model population density scales linearly (negatively) with social status, assuming the wealthier strata of society can afford more personal space. The probabilities for movement, resistance and recovery on the other hand scale linearly with value orientation, assuming more modern milieus to be more active and resilient. Keep in mind this is a rather arbitrary choice of parameter dependence with the aim of keeping the model as simple as possible. The grid size (resolution) of each CA is proportional to the actual population number of the corresponding milieu.

The interaction strength between the different milieus in our model is antiproportional to the euclidean distance squared of their respective nodes, meaning that milieus closer to each other interact more strongly. This too is an arbitrary pragmatic choice not rooted in any findings from social sciences.

Movement restrictions inside the CAs are the way we choose to simulate political interference in the course of a pandemic. (Since different social mileus are assumed to only interact in a necessary way with each other, restrictions of their interaction were not implemented.) They depend on the weighted mean of the infected ratio of every node. Nodes representing a more influential part of the population have a higher influence. This is rooted in the idea that more influential social groups, countries, cities or states have a higher influence on media perception than others. An example of this would be celebrities: It is reasonable to assume most people to know of a few celebrities or politicians that got infected during the still ongoing pandemic even though they make up only a very small part of the population.

Movement restrictions are simulated at three steps. The trigger percentages together with the strength of the restriction determine if the regulations are lax or strict. 

The regulations we chose for our model are rather lax, compared to real-world parameters.

To set these into relation to the current Covid19 pandemic they are rather lax regulations. E.g. the 50/100.000 rule for confirmed infected per week leading to movement restrictions in Germany would relate to 0.007% of the population being infected per day or 0.1% being infected (assuming an infection duration of 14 days).

  • Figure 4: The graph used for our simulations, milieus inhabit a two dimensional space of income and value orientation

Interactions on the graph level (Figure 5) can either take place with each cycle of the cellular automata in its nodes, or they can happen after a specified amount of these CA cycles. In any case, each individual CA keeps track of the state of its population, for example the percentage of active infections.

It is possible to halt any graph level interaction for a fixed number of cycles in the beginning of the simulation, this is represented by the condition box in the flow chart in Figure 5.

Once it updates, the graph will use the population statistics of each node and first calculate if any measures are to be taken. These measures represent real life policies to limit the spread of the disease by reducing the parameters for movement in the individual CAs.

The second interaction between the overarching graph structure and its nodes is the introduction of new infections. In our model thus simulates the exchange between social milieus. With this added source, even nodes that are effective at limiting the spread can have lots of new and unpredictable infections depending on how other nodes are doing. On the other hand, a node that deals poorly with the disease could endanger the rest of the system.

  • Figure 5: Update rule of the graph structure, condition refers to number of suspended cycles at the start of the simulation
Background: What does a cellular automaton config look like?

# The model configuration for the SocialContDisease model

# --- Space parameters --------------------------------------------------------
# The physical space this model is embedded in
periodic: false

# --- CellManager and cell initialization -------------------------------------
structure: square
resolution: 64 # in cells per unit length of physical space

mode: vonNeumann

# Cell initialization parameters
# Initial susceptible density, value in [0, 1]
# With this probability, a cell is initialized as susceptible (instead of
# empty)
p_susceptible: 0.6

# --- Model Dynamics ----------------------------------------------------------
# Probability per site and time step for a susceptible cell to not become
# infected if an exposed cell is in the neighborhood. This probability
# applies per event so it does _not_ mean that an immune cell is also immune
# in the next iteration step
p_resist_exp: 0.8

# This parameter only has an effect when the model is used in a graph structure
# Probability for the graph to add an infected cell at a this node
# Usage of this parameter depends on graph configuration
p_add_infect: 1

# Probability per site and time step for a susceptible cell to not become
# infected if an infected cell is in the neighborhood. This probability
# applies per event so it does _not_ mean that an immune cell is also immune
# in the next iteration step. A higher probability represents quarantine for
# cells showing symptoms
p_resist_inf: 0.95

# Probability per site and time step for a healthy or asymptomatic individual
# to move to a neighboring cell
p_move_no_sym: 0.5

# Probability per site and time step for an infected individual to move
# to a neighboring cell
p_move_inf: 0.05

# Probability per site and time step for an infected cell to end incubation
# and show symptoms
# The value is chosen such that incubation ends on average after 5 days
p_end_incubation: 0.2

# Probability per site and time step for an infected cell to end the infection
# with either death or imunity
# The value is chosen such that infection ends on average after 9 days
p_end_infection: 0.11

# Probability per site and time step for an infected cell to recover
p_recover: 0.95

# Probability per site and time step for a random point infection of a
# susceptible
p_infect: 0.

# Ability of living cells to move over dead ones
# Because of the way movement is currently implemented, this results in dead
# cells moving as well
move_over_dead_cells: true

# NOTE This is affected by the infection control, see below.

# --- Infection Control -------------------------------------------------------
# Infection control to investigate the time-dependent influence of the
# disease driving force. Note that infection control is applied at the
# beginning of an iteration step. It's effect is seen in the following
# time step
enabled: true

# The number of additional infections to be placed on the grid
num_additional_infections: 1

# Add the additional infections at the given times
# Note the the !listgen tag creates a list from the parameters
# (start, stop, step_size)
# To disable, pass an empty sequence.
at_times: [0]

# Change the probability of a random infection.
# The expected value is a list of [iteration_step, new_value] pairs, e.g.
# - [10, .5]
# - [42, 0.]
# ... will set p_infect from the default value to .5 at time 10 and set it
# back to 0. at time 42.
# To disable, pass an empty sequence.
change_p_infect: []

# --- Heterogeneities ---------------------------------------------------------
# Some cells can be permanently infected or given immunity.
# Both these features are using the `select_entities` interface; consult the
# documentation regarding information on available selection modes.

# Turn some cells immune: these do not take part in any of the processes
enabled: false
mode: clustered_simple

# Clustering parameters
p_seed: .02 # Probability with which a cell is a cluster seed
p_attach: .1 # Attachment probability (per neighbor)
num_passes: 5 # How many attachment procedures to perform

# Set some cells to be permanently infected (invoked after immunes are set)
enabled: false
mode: boundary

# Boundary selection parameters (requires space to be set to NON-periodic!)
boundary: bottom

# --- Output Configuration ----------------------------------------------------
# Whether to only write out the densities; useful for runs on large grids
# where spatial information is not needed.
write_only_densities: false

Background: What does a graph config look like?

# The model configuration for the SocialGroupGraph model

# This parameter decides weather or not the CAs that form
# the submodels have periodic boundary conditions

periodic: true

# Graph parameters:

# The number of vertices equals the number of cellular automata (CA) used.
num_vertices: 10
# The number of submodels infected at the beginning
# the amount of infected can be varied using the starting_infections
# list in the submodel parameters.
# If the list is empty or to short the default of 1 is used.
number_infected_submodels: 0

# Vertex interaction
# How many time steps the CAs perform between node interactions.
# It therefore gives the interaction frequency as 1/CA_substeps
# motivated by e.g. weekly interaction
CA_substeps: 5

# if true the interaction is not fixed every 5 time-steps but every interaction
# between every vertex has the probability of 1/CA_substeps starting_infections
use_random_interaction: true

# inclusive time without interaction at the beginning of the simulation
# can be used to let the infection in every submodel evolve independantly before interaction
offset_interaction: 0

# Additional Infected
# if true vertices can infect each other
use_add_infected: true

# Factor that scales the number of additional infected and therefore the interaction strength.
# Since the number of additional infected also scales with the percentage of infected,
# the percentage of susceptible and the population sizes of both vertices a direct translation to
# numbers is not possible.
global_interaction_factor: 500

# if true there is only a chance for inter vertex infections to be successful
# this chance is given by p_add_infect. If false p_add_infect=1.
use_p_add_infect: false

# Movement restrictions
# If "use_change_movement" is true "political_decisions" gives the movement restrictions.
# Movement restrictions are calculated from a weighted mean of all vertices.
use_change_movement: true
# the first list parameter gives the percentage of infected triggering this restriction
# the second parameter gives the factor the initial movement speed of all vertices is multiplied with
# if the percentage of infected falls below the threshold the restriction is released
political_decisions: [[1,0.5],[5,0.1], [10, 0]]

# Social Milieus
# If use_social_groups is true, the vertices become names given by "names" and
# values on the scales of social status and wertorientierung. (given by the respective submodel parameters)
use_social_groups: true

# If use_wo_scaling is true, the resistance and recover probabilities
# as well as the movement speed are scaled with the wertorientierung.
# The range for this is given by the tuples below
# This assumes e.g. an age discrepancy that correlates with wertorientierung
use_wo_scaling: true
lim_p_resist: [0.4, 0.8]
lim_p_recover: [0.9,0.99]
lim_movement: [0.3,0.9]

# If use_status_scaling is true, the probability for a cell to contain a susceptible
# and therefore the density of the CA is scaled with the social status
# this assumes a correlation between social status and crowded living conditions
use_status_scaling: true
lim_p_susceptible: [0.3,0.6]

# Submodel Parameter

# The resolution of the CAs
# If use_social_groups is set true it is a factor scaling the resolution,
# that changes with the size of the group. It gives the lower boundary.
resolution: 256

# parameters concerning single CAs (submodels)
# they are all given in lists so each submodel can get specific values
# if the list is empty or not long enough there are default values

# Parameter for Social Groups giving the names of the Milieu as well as their
# social status and wertorientierung
# If the list is to short name defaults to ""
# and social_status as well as wertorientierung default to 5

- "Etabliertes Milieu"
- "Traditionelles buergerliches Milieu"
- "Traditionelles Arbeitermilieu"
- "Konsum-materialistisches Milieu"
- "Aufstiegsorientiertes Milieu"
- "Liberal-intellektuelles Milieu"
- "Modernes buergerliches Milieu"
- "Modernes Arbeitermilieu"
- "Hedonistisches Milieu"
- "Postmodernes Milieu"

wertorientierung: [3, 2, 1, 3.5, 3.5, 7, 6, 8, 7, 9]
social_status: [10, 5, 2, 1, 4, 9, 6, 5, 3, 9]
# Population size of the groups
# it is used to determine the resolution of the submodel
pop_size: [6.7,7.5,2.9,8.0,12.3,5.3,8.9,5.9,7.4,4.4]

# The following parameters override the SocialContDisease particularisation
# if no value is specified the default from the config of the SocialContDisease model is taken.
p_susceptible: []

starting_infections: [1,1,1,1,1,1,1,1,1,1]
p_resist_exp: [0.8,0.8,0.2,0.3,0.4 ]
p_resist_inf: [0.95,0.95,0.8,0.85,0.9]
p_recover: [0.99,0.99,0.6,0.7]
movement: [0.3,0.5,0.2,0.8,0.7]

# Uses the SocialContDisease config as default
submodel_defaults: !model
model_name: SocialContDisease


Behavior of one Cellular Automaton

Certainly, to understand the workings of the graph model a certain familiarity with the behavior of the model's base unit, i.e. one Cellular Automaton, is necessary.

Video 1: Movie of the spread of a single point source infection (low density, high movement)

Looking into the video of one CA (Video 1), probably the first thing to note is the persistent flickering of the image. This is due to the random movement of the cells implemented to model social exchange within one milieu. We will have a deeper look into the effect of movement when discussing the complete model at a later point, however, it is clear that movement is one important factor in the transmittance of the disease.

From the video it can be seen that the spread from an initial point infection is lead by the orange-colored exposed cells, moving more excessively than the red-colored infected ones. Some of the infected cells even stay back within the field of the left-behind blue-colored immune and grey-colored dead cells. This behavior is a result of their much lower movement probability as well as the probabilistic nature of infection times (i.e. in each time step there is a probability for the infection or exposure to end).

Due to immunity being permanent, the disease either spreads through the whole CA or dies out before doing so. Whether it does and what percentage of the population is spared, depends on the complex interplay of the different CA parameters.


For the following exploration of these parameters, the time scale was probabilistically fixed to a 5-day incubation and a 9-day infection period, meaning that on average the exposed state changes to infected after 5 days and after that it takes 9 additional days for a cell to turn immune or dead.

As stated before, there is a critical density (depending on the other parameters such as movement and resistance probability), below of which the epidemic will come to a halt before spreading through all of the population.

  • Figure 6: Comparison of different initial densities. The given percentage is initialized as susceptible cells, the rest as empty cells.

However, due to movement, a spread can be sustained for some time, even if the density is subcritical. As can be seen in Figure 6, in that case the transmission is certainly much slower.

Another key parameter to the system dynamics is the resistance regarding infection of each cell. Here we chose to vary only the resistance to exposed cells being the main spreaders and leave that of infectious (i.e. symptomous) cells untouched at $p_\mathsf{resist,inf} = 0.95$.

  • Figure 7: Comparison of different resistance probabillities. Higher resistance results in slower spread.

As can be seen in Figure 7, a higher resistance which could also be translated to social distancing, wearing masks or self quarantine slows down the spread of the pandemic significantly.

Our last system parameter of interest in this section is the recovery probability of the cells.

  • Figure 8: Comparison of different recovery probabilities. Death rates increase as recovery probability decreases.

As one would expect, fewer cells turn dead if the recovery probability is higher (cf. Figure 8). However, on second glance, one also notices that the infection speeds up in that case. The reason is simply that dead cells do not move and thus block the spread of the infection by movement, similar to stones blocking the spread of a wild fire in the forest fire model.

Since this "feature" goes against the dynamics one would expect from a realistic model, we added the ability for other cells to move over dead ones as if they were empty. Consequently, the effect diminishes to what can be regarded as stochastic fluctuations (Figure 9). This setting can be toggled in the SocialContagiousDisease config file.

  • Figure 9: Comparison of different recovery probabilities. Death rates increase as recovery probability decreases. Cells can move over dead cells as if they were empty.
Config files for the behavior of one CA

If you want to recreate our work, these are the config files you can use to run the simulations discussed above. For technical reasons they are named .txt, but they are .yml files.

Influence of Graph Features

Let's now take a look at the influence of the graph features.

1) Movement speed.

Figures 10-12 show the time development of a graph of two cellular automata. Both have the same grid size of 250x250 cells, both have an initial density of 60% susceptible cells and both have 10 infected cells at the beginning. The movement speed is set to 0.8 and to make the diagrams clearer, all infected recover, i.e. the mortality rate is set to 0. In this first analysis the CAs are still uncoupled.

Figure 10 shows how both CAs behave independently without any movement restrictions.

In Figure 11 the movement restriction that is used later in the graph of the different milieus is implemented. For 1% infected the movement speed of all submodels is halved. For 5% the movement speed is reduced to one tenth and all movement is prohibited if the currently infected surpass 10%.

The restrictions shown in Figure 12 are more strict and are inspired by actual regulations during the Covid19 pandemic this year.
The movement speed is halved if the percentage of infected surpasses 0.05%. This threshold is based on the German government's decision to induce a local shutdown in every community with more than 50 infections per 100,000 inhabitants per week. The other two thresholds are set at 1% and 2% respectively. They are still arguably high but much stricter than before.

Video 2 shows what is actually happening in the CA when these strict restrictions are applied: an immediate slowdown of the flickering (the movement). Especially in the first 30 seconds the "stop-and-go" phenomenology of a single bidirectional threshhold can be observed as the percentage of infected circulates around it.

The effect of movement restrictions that symbolize social distancing on the single CA is therefore clear. It is the same as we would expect from above, where we see the effect of changing density, as high movement speed enables continued infections even at low densities. Overall the percentage of cells that were infected during the pandemic decreases.
The other effect we see is due to the restrictions being lifted whenever the percentage of infected falls below the threshold. Since at that point the mixing can increase again and the infection can survive, this leads to a long infection period with a low percentage of infected at any given time (key word: flatten the curve).

  • Figure 10: Development of two independent CAs without movement restrictions
  • Figure 11: Development of two independent CAs with moderate movement restrictions
  • Figure 12: Development of two independent CAs with strict movement restrictions
  • Video 2: Development of one independent CA with strict movement restrictions

2) Infections between submodels/vertices

Much like above we take a look at three progressive plots (Figure 13-15). The movement restrictions are now disabled and infections between vertices enabled. The only other difference in the setup is that we look at three submodels of which only one is infected at starting time.

The first figure (Figure 13) again shows the base plot without any graph feature.
The second figure (Figure 14) shows infections between vertices with a relatively low interaction factor while the third figure (Figure 15) has four times stronger interaction.

As is visible, the interaction speeds up the infection. This is probably because other than the infections on the celluar automata, that are localized, the inter-vertex infections are randomly placed and can therefore act as a new infection source. You can also see this in Video 3 showing the 0th CA for the strong interaction senario (first infection after 8 seconds corresponding to about 64 time steps). If you compare this with the video of a single CA (Video 1) you can see the difference these additional infections make when spread randomly. Since in areas where infected are the density of infected is high and the influence of each of them is little, it would make little difference if we used an exchange system (travel) instead of additional infections.

The interaction strength determines how fast the infection spreads to other vertices and thus to what extent the course of infection is accelerated.

  • Figure 13: Development of two independent CAs, i.e. no interaction between vertices
  • Figure 14: Development of two coupled CAs, infection between vertices with weak interaction strength
  • Figure 15: Development of two coupled CAs, infection between vertices with strong interaction strength
  • Video 3: Development of one (of two coupled) CA, strong interaction strength (submodel 1)

3) combining both infections and movement restrictions

We have seen above that movement restrictions and additonal infections have opposite effects. Movement restrictions change the effective density of the cellular automata and therefore reduce the total percentage of the population that gets infected as well as the percentage of infected at any time. Because of this the duration of the infection is prolonged.
Additional infections assume that the infections from other vertices are not localized and therefore lead to new sources of infection within every CA. Because of this the number of infected at every time increases and the duration of the infection is reduced.

We now look at how they counter each other out.
Figure 16 and Video 4 both assume strong interaction and vary in the strength of movement restrictions.

  • Figure 16: Development of two connected CAs, inter-vertex infections with strong interaction strength and strict movement restrictions
  • Video 4: Development of submodel 1 in a graph with strong interaction strength and strict movement restrictions

The infection now spreads over a far longer time span and in the end only about 60% of the population get infected which is even less than without vertex interaction. This is probably the case because the movement restrictions are implemented faster and the areas of infection are small and can die out easier.
Because the inter-vertex infection scales with the percentage of currently infected, movement restrictions also reduce infection spread between vertices.

Full Graph of Cellular Automata

Now that we have sufficiently explored the dynamics of a single Cellular Automaton and the influences of the graph features, we can move forward to our final configuration. As explained earlier, we connect 10 Cellular Automata using a graph (Figure 17). Each Cellular Automaton represents a milieu in society and has a unique dynamic depending on the parameters social status and value orientation. The interaction strength between two milieus is anti-proportional to their distance squared in this parameter space.



  • Figure 17: The structure of the graph. We can see the position of the nodes in our parameter space as well as the interaction strength between nodes, encoded in the line thickness.

Before diving deeper into the model dynamics, we want to quickly assess the qualitative behavior.

The model is initialized with a small number of infections on each Cellular Automaton. We visualize the relative number of states in each node using a kind of 'traffic-light' system: There is one dot for each state and the opacity changes proportional to the size of its population.

In practice that means we start out having only the susceptible dot visible, as almost all non-empty cells start out in that state. Then the yellow exposed dot and—with a slight delay—the red infected dot become visible. This means there is a high number of active cases. As a consequence of that, the green susceptible dot begins to fade. Around that time we should see the appearance of the blue recovered as well as the grey dead dot. Once the pandemic has ran its course, the yellow and red dots disappear.




Uniform Distribution


We initialize the simulation with a uniform distribution of starting infections.

  • Video 5: Time development of compartments. Start with 1 infection per milieu
  • Video 6: Time development of compartments. Start with 10 infections per milieu
  • Video 7: Time development of compartments. Start with 100 infections per milieu

We observe a blazing fast response in the lower left corner of the image, and a slower response in the upper right corner (Video 5-7). Put in other words: How susceptible a milieu is has a strong positive correlation with social status and a weak positive correlation with  value orientation.

We start runs with 1, 10 and 100 infections per cell. The higher numbers are mostly to check if the infection dies out randomly. In this scenario there are few differences between the starting infection numbers, aside from the obvious faster response at the start.

Figure 18 shows a more detailed view of the same data, initialized with 10 infections per milieu. One can see that some milieus are being almost fully infected, while in others less than 20% of its members contract it before the progress halts.

  • Figure 18: Total amount of infections (cumulative and if they ended in recoveries or death

So, what happens if we place an infection seed in only one of the nodes? To answer that, we picked a few interesting ones and did exactly that. The milieus w deem interesting (in this context) are:

  • Traditionelles Arbeitermilieu, with a low social status and the most traditional value orientation. It seems to be the most susceptible milieu.
  • Etabliertes Milieu. It has the highest status with a fairly traditional value orientation. Furthermore it also has very weak connections to other milieus, making it comparatively isolated.
  • Postmodernes Milieu: With a high social status and the most modern value orientation, it is almost a perfect opposite of the Traditionelles Arbeitermilieu.
  • Modernes Bürgerliches Milieu: It lies at the center of  our society and is connected somewhat evenly to all other milieus.

Traditionelles Arbeitermilieu

  • Video 8: Time development of compartments. Start with 10 infections in "Traditionelles Arbeitermilieu" at the bottom left corner
  • Video 9: Time development of compartments. Start with 100 infections in "Traditionelles Arbeitermilieu" at the bottom left corner
  • Video 10: Time development of compartments. Start with 1000 infections in "Traditionelles Arbeitermilieu" at the bottom left corner

We see in Video 8 that the number of infected increases quickly. The disease then spreads towards the neighbouring milieus and on towards the rest. Whether we start with 10 infections or more (Video 9 and 10) makes little difference, the latter videos are just included for the sake of completeness.

Etabliertes Milieu

  • Video 11: Time development of compartments. Start with 10 infections in "Etabliertes Milieu" at the top left corner
  • Video 12: Time development of compartments. Start with 100 infections in "Etabliertes Milieu" at the top left corner
  • Video 13: Time development of compartments. Start with 1000 infections in "Etabliertes Milieu" at the top left corner

The "Etabliertes Milieu" is isolated as well as resistant to the infection. As a result, if we place only 10 (Video 11) or even 100 (Video 12) infections at the start, the disease cannot take hold and dies out. Only at 1000 starting infections (Video 13) we see the disease jumping to a more susceptible milieu. As soon as that happens we again continue with the typical course of the disease: The highly exposed milieus react very fast and strongly. The barely critical ones react more slowly, but in the end most members of the milieu have had the disease anyway. The subcritical milieus have some infections, presumably starting from other milieus. But they quickly die out and in the end most members of those milieus still remain in the susceptible compartment.

  • Figure 19: Size of the compartements, starting with 100 infections in the "Etabliertes Milieu". The infection doesn't pass on.
  • Figure 20: Size of the compartements, starting with 1000 infections in the "Etabliertes Milieu". The infection spreads.

Figure 19 and 20 show a more detailed representation of the data. We see the infection dying out in the run with 100 starting infection and it reaching other milieus when starting with 1000. Something interesting that was not clearly observable in the videos is a small second resurgence in the "Etabliertes Milieu" at a time of around 150 steps. The infection has a hard time spreading within the milieu, but the introduction of new infections from other milieus causes a notable increase of infection numbers.

In Video 14 and 15 the state of the Cellular Automaton "Etabliertes Milieu" is shown for both the 100 and 1000 infections starting condition. It is again hard to see quantitative data, but one can see how initial infections slowly spread and finally die out.

  • Video 14: State of the cellular automaton "Etabliertes Milieu" when starting with 100 infections
  • Video 15: State of the cellular automaton "Etabliertes Milieu" when starting with 1000 infections

Postmodernes Milieu

  • Video 16: Time development of compartments. Start with 10 infections in "Postmodernes Milieu" at the top right corner
  • Video 17: Time development of compartments. Start with 100 infections in "Postmodernes Milieu" at the top right corner
  • Video 18: Time development of compartments. Start with 1000 infections in "Postmodernes Milieu" at the top right corner

Starting from "Postmodernes Milieu" we get a very similar result to the "Etabliertes Milieu" (Video 16-18): We need to start with 1000 infections for the disease to propagate onward. The spread starts at the close neighbours, "Modernes bürgerliches Milieu" and "Modernes Arbeitermilieu", but after the spread reaches the milieus in the lower left corner they respond strongly and have the highest infection numbers.

Modernes Bürgerliches Milieu

  • Video 19: Time development of compartments. Start with 10 infections in "Modernes Bürgerliches Milieu" at the center
  • Video 20: Time development of compartments. Start with 100 infections in "Modernes Bürgerliches Milieu" at the center
  • Video 21: Time development of compartments. Start with 1000 infections in "Modernes Bürgerliches Milieu" at the center

This milieu lies close to the center of our society. Interestingly 10 infections (Video 19) are not enough for a spread of the disease, despite infecting many of the milieu's members.  Starting with 100 or more infections (Video 20 and 21) yields the expected result of a spread through the whole network, with similar dynamics as seen before.


How do different social groups respond to a pandemic? Are there groups which are affected more strongly or only weakly? What is the impact of political decisions and how are these influenced by the different groups?

These are only some of the questions that came into our minds when we first discussed the idea of a graph-based model on the spread of a pandemic like COVID-19. We wanted to explore a society where people interact mainly with others of the same social group. The obtained results are and are becoming ever more relevant in countries where strong social segregation is already the reality (e.g. the US compared to Germany [6]) as well as with the current trend of social groups drifting more and more apart and the disintegration of the middle class [7].

We could indeed find different responses of social milieus to the onset of a pandemic, to the extreme where an outspread could only survive due to the interaction with other milieus. This effect has been observed in the upper class (i.e. high social status) where we assumed a lower population density and thus a lower risk of infection. The main motivation behind this was that members of the upper class can afford living conditions (e.g. housing) but also working conditions that minimize contact with others. While one could also argue that other parameters of the system change with social status, in the perspective of the parameter analysis done before, it appears to be safe to say that among them density has the highest influence. With the aim of keeping the model as simple as possible we thus decided to make density the only parameter to scale with social status and let all of the others correlate with value orientation alone. Even here we picked only the most interesting parameters which have the most profound impact on the spread within and the results of different social groups. For all parameters and parameter dependencies we picked interesting and reasonable values instead of trying to convert data on different milieus to abstact numbers like the resistance probability. Thus, our model explores the spread of a pandemic phenomenologically rather than claiming to yield an exact image of the current COVID-19 pandemic.

The whole idea of modeling the spread of a disease as a graph is based on the assumption that the infection between vertices is far less significant than the infections inside. For cities, countries or continents this is rather clear, as interaction within cities countries or continents is much easier and more frequent than traveling to the next entity. In addition, most everyday interactions (work, shopping) are available in one's own locality. If necessary, the exchange can also be estimated using travel data (e.g. flight data).
It is much more difficult to make this statement for social groups. People from the same milieus may often work in similar professions, live in the same neighborhood and be friends with each other, but it is almost impossible to quantify this.
Apart from the fact that the milieus merge into one another and are usually not clearly distinguishable, there are many opportunities for contact between people from different milieus (e.g. tram, supermarket, work, sport, restaurants, etc.). It is difficult to estimate how significant these interactions are for the spread of a disease.
It is also questionable whether these interactions change with varying value orientation and social status or are independent of it.

While we do not claim our results to be directly practicable in predicting and fighting COVID-19, our work asks the important question how the difference in social standing affects susceptibility and the effects a heterogenous importance of different groups has in the face of a pandemic.

Future Work

The model we implemented is well suited for the simulation of an infection in different social groups, as long as the spacial scale is small and milieus can be assumed to be well-mixed. If the spacial scale is large, a more localized interaction between the different milieus is needed to allow for a spatially cohorent spread instead of the current random point infections modeling contacts between different milieus.

Probably a more intuitive associaton with the graph used is a spatial net of interactions. Indeed, our implementation of a graph is similar to the one used to model interacting countries or cities and—assuming a large population—our model can—with slight changes—also model those. Of course a lot of parameters are needed to specify the infection dynamics inside each Cellular Automaton and between them.

One of the interesting aspects of this model is the split between node dynamics and graph dynamics. The exact model used for the nodes could be changed. One could therefore also use other simulation methods, e.g. a SIRS-model that allows for reinfection, a model that uses differential equations instead of cellular automata or even another graph based model.

The graph structure can also be adapted to other scenarios. We had in mind a society that occupies the same area, but choosing cities as nodes and the traffic volume as interaction strength would also be a very natural choice that requires only minimal adaptation of the model. (See Brockmann & Helbing, Gemoetry of Network-Driven Contagion [8] for a similar approach)




[1] Katharina Belwe: Soziale Milieus - Editorial. Bundeszentrale für politische Bildung, APuZ 44-45/2006. URL:
[2] Stefan Hradil: Soziale Milieus - eine praxisorientierte Forschungsperspektive. Bundeszentrale für politische Bildung, APuZ 44-45/2006. URL:
[6] GINI index (World Bank estimate),
[7] Foster, J. E., & Wolfson, M. C. (2010). Polarization and the Decline of the Middle Class: Canada and the US. The Journal of Economic Inequality, 8(2), 247-273.
[8] Dirk Brockmann, Dirk Helbing, The Hidden Geometry of Complex, Network-Driven Contagion Phenomena, Science 13 Dec 2013: Vol. 342, Issue 6164, pp. 1337-1342, DOI: 10.1126/science.1245200)


Christian Laun did Abstract, Introduction, Results: Full Graph of Cellular Automata, Future Work

Mathis Kunold did Model Description

Simon Lüdke did Model Description, Results: Influence of Graph Features, Discussion, Future Work

Leander John did Results: Behavior of one Cellular Automaton, Discussion, Future Work