
Alejandra walks through epidemic models on networks, from simple SIR models to agent-based simulations. She shows how transmission rate beta and recovery rate gamma determine R0, then demonstrates the models on real networks like the Florence family and American college football, revealing how network structure shapes whether diseases die out or become endemic.
Questions this video answers
February 10, 2024
SI, SIR, and SIS
R0 = beta / gamma (transmission rate divided by recovery rate)
Florence family / state adjacency network, American college football network, dolphin social network, Zachary's Karate Club
Wolfram (Wolfram Language / Wolfram Documentation, Wolfram Data Repository, Wolfram Community, Wolfram Blog)
Chapters
Hi, I'm Alejandra and I'm going to talk about graphs in the metaphor. We'll focus on epidemics on network. So this talk will be an overview of graph based models for analyzing infection disease dynamics. The tile conveys deterministic compartmental models and explore agent based simulations illustrating how graph theory plays an important role in modern epidemiology and can help us to understand and analyze the motor interconnected work. So when it comes to study epidemics, various models have been developed. These models are mathematically formalized as system of partial differential equations and they offer different perspectives on disease dynamics allowing us to study various aspects of epidemics such as recovery, reinfection and persistent states of infection. We will explore the si, SIR and SIS model. So let's begin with the SI susceptible infectious model. That is one of the simple epidemic models used to study the spread of infectious diseases diseases within a population. In this model, individuals in deflation can be classified into two groups. The susceptible individuals who can be infected if they come into contact with an infectious individual and the infectious individuals, the ones that are already infected and can transmit the disease to susceptible individuals. This transmission is governed by the transmission rate beta. Here, once an individual becomes infected, they remain infectious forever and the number of individuals is contacted. Overall, the fraction of the population of the susceptible state decreases and the fraction of the population in the infectious state increases following this S shaped curve known as the logistic route curve that saturates when all the population has been infected. Certainly this model simplifies many biological details, but it captures some of the fundamental factors of disease dynamics. So in the end, this model can help us to understand and model the spread of diseases characterized by lifelong infectiousness. Then, the SIR susceptible infectious recovery model is another important epidemiological model. It builds upon the SI model by introducing a new disease state, the recovery. So now we have the susceptible individuals, the infectious individuals, the ones that can transmit the disease at the transmission rate beta and the recovery individuals that had been infected but are not recovered and immune to their infection. They also cannot transmit the disease to others and well. This recovery is governed by the recovery rate gamma. And based on the relationship between the transmission rate and the recovery rate, an important parameter in epidemiology arises the basic reproduction number. They know that's R and that is defined as beta betting gamma. This parameter holds a critical role in understanding the dynamic of disease spread within a population. When R is greater than one, each infected individual is infecting more than one person. This situation leads to epidemic outbreak where the infected population Increases until it reaches a peak value. And after reaching the peak, the infected population starts to decline. Also, the infected individuals recover from the disease, so they recover individuals begin to rise. Now, when R is less than 1, each infected individual is infecting preorder down one person. In this scenario, the disease doesn't result in a major outbreak and it might even die out over time. At the end, not all population gets infected. And finally, when R1, the disease is neither spread rapidly nor die enough. It can persist at a constant level in the population, but it doesn't cause a major outbreak at the end. This model can be helpful in understanding and modeling the spread of diseases like messlage, hepatic disease A and sickest pox, also called varicella, which are characterized by lifelong immunity after the recovery from the infection. Now, the SIS susceptible infectious susceptible model is another crucial epidemiological model. This model doesn't assume that individuals who recover from the infection gain immunity. Instead, individuals who recover from the infection return to the susceptible state and can potentially become infected again. So again we have to state the susceptible and infectious individuals. These ones can transmit the disease to susceptible individuals, the transmission rate beta, and they can also recover and become susceptible again at a recovery rate gamma. In this case R. It's also important as when R is greater than 1, the epidemic reaches a steady state. In this state, the rate of new infection is balanced by the rate of recoveries, leading to a consent fraction of the population being infected. This is now at the endemic state where the disease can persist in the population indefinitely. Then when R is less than 1, the disease in the population, in the long term, it eventually dies out and the fraction of infected individuals approaches zero. When R equals one, the disease can persist at a constant level. It doesn't cause a major outbreak and the disease is considered endemic. In the SIS model, we are describing the cyclical patterns of infection, so it helps researchers to understand how diseases persist in a population when there is no permanent immunity and individuals can be infected multiple times. This model is often used to simulate diseases like the common cold, gonorrhea and syphilis, as people who contract these diseases do not typically develop lasting immunity after treatment or recovery. Now, diseases can spread to various models of transmissions. For example, diseases like employees or tuberculosis are transmitted when individuals share enclosed species and breathe the same air. Others, like other diseases and parasitism, can spread to direct physical contact with hiv. And various sexual transmitting diseases are primarily communicated through sexual contact. These different patterns of contact can be effectively represented using various types of networks like physical Contact networks, sexual contact networks and shared networks. Understanding how epidemics spread on these social networks and contact network is crucial as they enable the development of various intervention strategies and appropriate plans to mitigate disease outbreaks. Furthermore, epidemics model can be applied to other types of networks like the special networks and technological networks to study a wide range of phenomena beyond diseases. To mention some examples, I can think of simplification and the spread of computer viruses. Now, before exploring the contact network, let's see some important definition. Let's begin with networks. Networks are used to represent relationship and interaction among various entities. The key components of a network include the vertices that are the individual entities within the network, such as people on a social network computer network. And the edges represent the connection or relationship between vertices. For example, in a social network, edges may represent friendships between individuals within a computed network. Edges represent physical or logical connection between devices. Other important definitions related to this is that we say that vertices A and B are adjacent if they are joined by an edge. And finally, the last definition is a graph. A graph is a mathematical structure used to represent a network. It consists of vertices and edges. But here we don't really care about the interpretation for them nor what they represent. And we can specify a graph in the Wolfram language by specifying the edge of the network. Now let's see what happens when we consider the spread of epidemics on network using the partial differential equation approach. First, let's see one interpretation for this. We can visualize the vertices as different group of population as they edges as the interaction of contact between these population groups. So it can help us to model the spread on a group level. For example, if we consider the Florence family social network, where the vertices represent families and the edges represent marriage between members, the two linked families. Other example is that we can also apply it to scenarios like the continuous state networks where the vertices represent different states and the edges represent the state adjacency between them. This approach of modeling epidemics on network acknowledges that in reality people don't interact randomly with the entire population. Instead, they interact with their communities or social groups. And these groups also have interaction with each other to some extent. Now, when modeling these transmission on networks in differential equation approach, the equations are adapted into a vector format. In this format, each vertex or population within the network has its set of state equations. For example, for the SI model, each vertex will be associated with two vectors representing susceptible and infected individuals within that vertex. However, instead of literally using the number of infected individuals, we usually employ this expression. This modification is essential because it restricts the disease transmission to only the adjacent vertices. Using this term includes using the adjacency matrix that indicates the connection of edges between different vertices in the network. So this term is indicating that the transmission can only occur between connected vertices. So if we try to run the simulation in a disease that follow the SI epidemic model, like the US state continuous network, where the vertices are the states and the edges represent the adjacency between these states, we just need to define the network, define the parameters, the parameter beta, the distance matrix and the model. We also define the initial conditions. We find the solution for each vertex and we float the solution. We can see that even if a single vertex start with a small percentage of its population infected, the simulation will resulting in the infection spread to the entire population. Following this logistic curve, we can also visualize the graph showing the progression of the epidemic through this dynamical illustration. Here, the nodes are represented by pie charts depicting the percentage of infected individuals. Now for the SIR epidemic model and the network, the equation will also be adapted into a vector format and the infected individual will be represented by this expression. So we'll have the following equations. For each vertex, we can run the simulation for a disease that follows the SIR epidemic models such as meslege on the American college football network where the nodes represent college football teams and the axis indicate whether they have competed in a game or not. So they are representing contact and potential infection between teams. To do this, we can define the network, define the parameters beta and gamma. The adjacent matrix and the model define the initial conditions, the percentage of infected, susceptible and recovery individuals and find the solution. For each vertex we can plot the solution and we can see how as time progresses, infected population increases, indicating the spread of the epidemic. The infected population continues to rise until it reaches the peak of the epidemic. And after reaching the peak, the infected population starts to decline. As the infected population decreases, the recovered population begin to rise and the susceptible population also decreases as more individuals become infected. In this case, we will have a more connected network so they have more communication between the edges. So in the end all the vertices will kind of be following the same dynamics. Well, now for the SIS epidemic model on the network, the equation will also be adapted into a vector format and the infected individuals will be represented by this term. So we will have the following equation. For each vertex, we can run a simulation for a disease that follows the SIS epidemic models such as Common Core and the fluorenkin family network. Here, the vertices, if we remember, represent the families and the X represent the marriage between members so it represents constant contact and probably contagious. Now we can do this by defining the network, defining the parameters, defining the initial conditions, finding the solution for each vertex and plotting the solution. We can observe how the number of infections initially rises, resulting in an upward trajectory on the plot, and eventually the epidemic reaches a steady state. This is called the endemic disease state. Here, the number of infected individuals remain relatively constant over time and well, in this model, the disease doesn't naturally die out. Instead, the epidemic persists in the population at a certain level, with the individuals moving between the susceptible and infectious states in an ongoing circle. One takeaway from this model in networks is that the network structure will affect the spread of the epidemic. So we can get more complex behavior and this can help us to model a more broad kind of situations. Well, now let's see the agent based simulations. They offer a detailed individual level model. This approach is vertex or agent represent an individual and they just represent interaction between them. In this framework also, vertices no longer possess all the distinct states. They just possess one of the states of the epidemic world. Additionally, as before, nodes can only become infected if they are susceptible and connected to an infected node. But in this case, we use a random number generation to determine whether the transmission occurs or not. This is the reason why we cannot just solve an equation. Instead, we need to run a simulation. And sometimes this can be computationally intensive, especially when it's applied to large scale networks due to the high level of detail. Now let's take a look at how the simulation for the SI model works within the agent based framework. As probably mentioned, each vertex represents an individual agent and its agent can have only one state at a time. Therefore, we need to specify which vertices initially start in the infectious state. Next, we define the behavior of the agent in the simulation. This includes specifying the nodes that can only be infected if they are susceptible and connected to an infected node. Well, since this probability of transmission is determined by this transmission beta, we can calculate a random number to represent the probability, helping us to determine whether the transmission occurs or not. If the transmission occurs, which is the state of the susceptible agent to infection. For example, if we consider the online messaging network where the vertices represent individuals and the connection are established to the online messages they send to each other. So we're saying that if an individual is connected to another individual, it means that they have shared message. Now if we imagine that one of those messages contain a verus, anyone who open it has a better probability of getting the virus in their computer. And once they get the virus, every Message tells them will also be sent with the virus. This can be modeled using the SI model on the network with the agent based simulation in the following way. We define the network, we set the simulation parameters, we define the initial state of the nodes, we define the behavior of the atom, we run the simulation, we plot the simulation and we can observe that it follows the same trend as the differential equation approach. Here, the growth in the number of infected nodes follows this logistic like curve. And we can also observe in the simulation that the more external nodes, the ones that are antiperiphery, are the last ones to become infected. This is because they have a fewer probabilities of getting their susceptible individuals infected because they have the best connection. But however, in the long run, the disease will spread to all the reachable vertices. Now, in the SIR model for agent based simulation, we know that in this model, infectious individuals recover at a concentric gamma and transition to the recovery state. But to determine whether this recovery occurs, we calculate a random number to represent this probability. And if the recovery occurs, we change the state from infected to recover. For example, if we consider the social network of dolphins, where the birds represent dolphins in the community living in New Zealand and the x's represent the associations between them. And if we imagine that there is a disease that follows the SIR model, like the more biliborous infection, in which dolphins that occur from infection, this infection is really similar to measles in humans. So at the end the dolphin does develop immunity. And this can be modeled using the SIR model. Network we take by simulation in the following way. We define the network, we set the simulation parameters, we define the initial states of the nodes, we define the behavior of the agents, we run the simulation, we plot the simulation and we can observe that this follows the same trend as the differential equation approach. Here, as time progresses, the infected population increases, indicating the spread of the dynamics. The infected population continues to rise until it reaches a peak of the epidemic. And after reaching the peak, the infected population start to decline. As the infected population decreases, the recovered population begin to rise. Here we can also observe the visualize the progression of the epidemic. Well, now in the SIS model for agent based simulation, we know that the susceptible individuals become infectious. When they come into contact with infectious individuals, following the transmission rate beta, they also recover at a recovery rate gamma. But here the infectious individual that recover from the disease return to the susceptible state, so they are susceptible to infection again. And well, to determine whether this infection or recovery occurs, we calculate any random number that represents the probability. And if it occurs, we Change the status accordingly. One example is the Sakari karyotic loop. In this network not represent members of the KARATE clock and the links signify the social interaction between those members. If we imagine that there is a disease that follows the SIS model like the flu, in this model we can define the network, set the simulation parameters, define the initial state of the nodes, define the behavior of the agents, run the simulation and plan the simulation. We can observe that it's followed the same trend as the differential equation approach. Initially, the number of infected individuals rises and eventually the epidemic reaches a steady state, the endemic disease state. Here, the number of infected individuals remain relatively constant over time and we can also observe this oscillatory behavior. In this case, individuals are switching between the susceptible and infectious state, but maintaining a relatively persistent percentage. Now, in conclusion, we have explored how both eigenbase simulation and differential equation models are valuable to us in epidemiology. We also saw how all the epidemics models are important and usable for different disease behavior. Of course, the choice of which one to use depends on their research objectives, available data, computational resources and the level of detail required to answer specific questions related to the disease dynamics and the control studies. Will some researchers even use the combination of both methods to gain a more comprehensive understanding of infectious disease spread in complex networks? If you like this kind of content, there are some additional resources that are related to all this graph. During the modern world you can find lots of information especially in the Wolfram Documentation center that has lots of examples the world from Data repository, the WallFarm Data Community Columns and the Wolfram block. So go check it now and well, don't forget that we will have an office hour, so come and join us. And don't forget to follow our Wolfram RND YouTube channel. You can find us as Wolfram RD. Well, many thanks for your attention and of course any question comment, dub suggestion will be more than welcome. Thanks.
Well, hi, I don't know if you can listen to me, but yeah, of course if you. I will be reading the questions and to start, for example, I think some examples were the ones that we mentioned like how to model a disease spread in a real world network. That will be the real world part like the college football team. So if you have a real world network, we can always apply this model and then that can help us to plan strategies for a better control of the epidemic. To answer the second question, yes, we can also do those progression graph with real time data. Of course this just applies if the data is available. This can usually be a problem because there is not a lot of places to obtain the real world data. But we can also add a more realistic touch by using the real parameters of the epidemics. And they are sometimes also usually available.
So that's also something that we can.
Do to make it more realistic. Well, the first question is they. Yeah, they are indeed a complete system of ordinary differential equations. There are a system for each node. So for example, if we have a graph of 100 vertices, we will have a full system of 300 equations if we are working with the serum model, or 200 if we are working with the SI or SIS model. We can see how it was really easy to code it. And also the they are one liner. So that's a cool part.
But.
Well, yeah, if there are no more questions, I can give you a little bit of information as some praise for Wolfram graphs. All these emulations and visualizations and gifs and animations are possible in other language. But to be really honest, they are never that nice or easy to do. I don't know if you have ever tried to do this kind of visualization in other places, but they can be a real nightmare.
So this is a good part of the Wolfram graph.
They are really easy to do. They are really user friendly. They are usually one liners.
So that's cool.
So if you are working with graphs and networks, you should really try Wolfram graphs.
Well, yeah, just try that.
The cool part about this is that you don't spend a lot of time doing the visualization. So this will give you, Well, more time to focus on the real important part like the core aspects of the models. But yeah, once again, many thanks for your attention and have a great day and keep having a nice time in the world. From Technology conference.
Thank you.
Bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






