Complex Systems for Biology and Environmental Science
Complex Systems for Biology and Environmental Science
Wolfram Research, 2024 - Phileas Dazeley-Gaist
What are Complex Systems?
Questions
Questions
Here are some questions to get us going.
◼
How do ecosystems sustain themselves and evolve?
◼
Why does biodiversity tend to increase with ecological succession?
◼
What processes allow ants to organise and act collectively as a single intelligent and self-sustaining unit?
◼
How do microeconomic interactions between economic agents give rise to the global economy?
Working Definition
Working Definition
◼
Complex systems are systems composed of many interacting parts, in which the local interaction between the parts result in global emergent phenomena.
◼
Complex Systems exhibit a gestalt, or “more than the sum of the parts” behaviour.
Out[]=
Visual, Organizational Map of Complex Systems Science (Sayama, 2015) |
Real World Complex Systems
Many real-world systems are also complex systems. Let’s consider a few along with some computational examples of how we might study them:
◼
Note that there are many ways we might choose to study any given complex system.
◼
We don’t aim to comprehensively capture how complex systems are studied through the examples in this presentation.
1. Flocking, Herding, and Schooling
1. Flocking, Herding, and Schooling
Consider flocking birds, the migration of a herd of grazers, or schooling fish.
Out[]=
Note:
◼
In all these cases, the local actions and interactions of individual animals entail the emergence large scale dynamic formations (the flock, herd, or school).
◼
These formations persist through time and organise into various states depending on the behaviours of their members. For example, a school fish might form a packed swirling ball to defend against predators.
Giorgio Parisi, who was awarded the Nobel Prize in Physics in 2021 for his work on complex systems, discusses murmurations of starlings as an example of a complex system in his book “In a flight of Starlings”, published in July 2023.
2. Forest Fires, Earthquakes, and Brains
2. Forest Fires, Earthquakes, and Brains
Complex systems self-organise, sometimes towards critical states where small perturbations result in event cascades (called avalanches) which can have large scale consequences.
◼
When a system self-organises towards a critical state, we say it exhibits self-organised criticality (SOC).
◼
The frequency distributions of avalanche magnitudes and durations in systems exhibiting SOC follow power laws.
Challenge: Spot the intruder:
Out[]=
Computational Example: The Abelian Sandpile Model
Computational Example: The Abelian Sandpile Model
The Abelian Sandpile Model, or Bak-Tang-Wiesenfeld model is the first discovered model of self-organised criticality.
On a rectangular grid, it is a cellular automaton with the following rules:
◼
Each cell can hold up to 3 grains of sand and remain stable.
◼
If a cell holds more than 3 grains, it is unstable, and topples, sending 1 grain off to each side.
Imagine dropping 100 sand grains in the same place:
In[]:=
ListAnimate&/@FixedPointList[SandStep[#1,"InfiniteGrid"->True]&,{{100}}],AnimationRunning->False
Out[]=
As we add sand grains, we increase the instability of the sandpile. Cell toppling events avalanche until the sandpile reaches a minimally stable configuration.
In this case, the minimally stable condition has remarkable emergent structure. What if we continued the process until we had dropped 10000 grains?
In[]:=
Out[]=
What does self-organised criticality look like in this model?
This is roughly the setup Per Bak and colleagues explored in their paper: Self-organized criticality: An explanation of the 1/f noise:
◼
1) Start with an array in which each cell is assigned a number of grains a little above 3.
◼
2) Let the pile topple to its minimally stable state.
◼
Drop a grain of sand on this sandpile at a random position, and observe the resulting avalanche. Repeat, recording avalanche magnitudes.
Steps 1 and 2:
Step 3, part 1: Drop a grain of sand on the sandpile and observe the resulting avalanche:
In this case, the sandpile took a while to stabilise.
◼
The stabilised sandpile is another critical sandpile
◼
If we iterate this process of adding a grain, then stabilizing, we would find:
◼
The frequency distribution of avalanche sizes is a power law.
◼
There is no characteristic avalanche size.
Computational Example: A Forest Fire Model
Computational Example: A Forest Fire Model
The forest fire model is one of the simplest computational models to display self-organised criticality. The model captures important statistical properties of real forest fires.
The model is a probabilistic cellular automaton with the following rules. At each computation/time step:
◼
Trees on fire burn down, leaving wasteland.
◼
Trees catch fire if they are adjacent to at least one tree already on fire.
We'll use the following values for the possible cell states:
Compute and animate 200 steps of a forest fire trajectory on a partitioned landscape:
Compute and animate 200 steps of a forest fire trajectory exhibiting self-organised criticality:
Bonus: Dynamic Simulation
Earthquakes, Brains, and Avalanches
Earthquakes, Brains, and Avalanches
◼
Self-organised criticality is hypothesised to explain:
◼
the power law distribution of earthquake magnitudes (Marković & Gros, 2014)
◼
the power law distributions of neuronal avalanches in the brains of human beings, monkeys, cats, and mice (Marković & Gros, 2014)
◼
Snow avalanches in nature likely do not result from self-organised criticality (McClung, 2007).
Challenge Solution: Number 3.
A note on SOC and Power Laws:
A note on SOC and Power Laws:
◼
Power laws and other fat-tailed distributions can suggest the influence of complex processes. Many complex systems produce power-law frequency distributions, and other distributions with fat tails.
◼
SOC is one explanatory mechanism for the appearance of power laws in nature, and describes some systems well. However, many systems exhibit power law distributions that are not the result of SOC.
◼
Observing power laws in nature is not necessarily an indication that SOC is at play, nor is it enough on its own to indicate complexity.
3. Biological Systems, Ecosystems, and Earth Systems
3. Biological Systems, Ecosystems, and Earth Systems
Complex systems come in many sizes. We often find them assembled into layered, hierarchical modular structures.
The components at each level are separated by constraints that act as membranes between them and their surroundings.
Biological Systems
Biological Systems
We find the layered, hierarchical modular structures characteristic of complex systems in many biological systems.
In multicellular organisms:
◼
Cells assemble to form tissues
◼
Tissues form organs
◼
Organs assemble into organ systems
◼
Organ systems assemble into whole organisms
Note the levels of organisation produced by this hierarchical assembly.
◼
Each level conveys its own set of insights about the whole organism system.
◼
Going “up a level” (cells → tissues, tissues → organs, and so on) implies projecting many states onto fewer states. For example:
◼
You could describe the state of a heart at a given time with the states and interactions of every one of its cells, but you don’t need to.
◼
The reason you don’t need to is that at higher levels, fewer states are needed to represent the overall function and behavior of the heart.
◼
We can use this principle to model complex biological processes such as immune system response to vaccination mathematically.
Computational Example: Compartmental Model of Immune System Response to Vaccination (ODEs)
Computational Example: Compartmental Model of Immune System Response to Vaccination (ODEs)
Consider this example from Xu et al., 2023 of a model of immune system response to vaccination:
One approach to modelling biological processes is using compartmental modelling with differential equations.
As long as we can specify the components, their interactions, and interaction parameters, we can express them as a system of differential equations.
We can represent the components and their interactions as a graph:
Using this knowledge of the variables, parameters, and interactions between the variables, we can write the set of differential equations for the system:
Plot the solution:
Ecosystems
Ecosystems
Ecosystem: An ecosystem is a system composed of a biological community of interacting organisms in their physical environment.
◼
Ecosystems form large networks of interactions containing subnetworks with high recirculation of resources and signals (Holland, 2014).
◼
At a microscopic scale, such subnetworks might be cells in an organism, or they might be an organism as a whole (Holland, 2014).
◼
At a macroscopic scale, ecosystems contain subnetworks of this kind made of interdependent organisms. These are called niches (Holland, 2014).
◼
Niches result from the emergence of patterns of recirculation of resources and signals in ecosystems.
Ecosystems themselves are components of larger complex systems. Most obviously, the biosphere.
The Biosphere: The global ecosystem that includes all other ecosystems on Earth.
Again, note the hierarchical layered modular structure of these systems.
Just as we demonstrated for biological systems, if we can describe the components of an ecosystem (for example, its species, or its organisms, individually), their interactions, and the parameters affecting these interactions, then we can express the system using differential equations.
Computational Example: Predator-Prey Dynamics with Generalized Lotka-Volterra Model
Computational Example: Predator-Prey Dynamics with Generalized Lotka-Volterra Model
The generalised Lotka-Volterra model is a model of population dynamics given a web of relationships between interacting species in an ecosystem.
We can specify the interactions between n species in an n×n interaction matrix, where a cell at the ith row and jth column represents the effect of the average species j individual on species i’s population growth rate.
I have defined the functions GeneralizedLotkaVolterraODEs and CommunityMatrixGraph.
Using CommunityMatrixGraph, we can construct a weighted graph from the interaction matrix for a more intuitive picture of chosen species interaction parameters:
We can use GeneralizedLotkaVolterraODEs to generate the system of ODEs for the given initial parameters:
◼
vars - a list of variable names (optional),
◼
init - a list of initial population sizes
◼
r - a list of species intrinsic growth rates
◼
interactionMatrix - a matrix describing community interactions.
Generate a system of ODEs for a Generalised Lotka-Volterra model from provided parameters:
And NDSolve to numerically approximate the population trajectories of the model.
Numerical solutions to the model ODEs:
We can then plot the solutions in the time domain and state space:
Time domain plot:
State space portrait:
Earth Systems
Earth Systems
The biosphere itself is a component of larger complex systems. For instance, the Earth System, which we can simplistically represent as the network of interactions between the Biosphere, Atmosphere, Hydrosphere, and Geosphere.
Computational Example: Earthquake Data
Computational Example: Earthquake Data
The Wolfram Language offers many ways to access information about real-world systems such as:
Retrieve data for earthquakes recorded b/w 2000-2023 with magnitudes between 6 and 10:
Plot locations of recorded earthquakes from 2000 to 2023:
Plot a heat map of 2000-2023 earthquakes:
The frequency distribution of earthquake magnitudes is also a power law:
Computational Example: Remote Sensing
Computational Example: Remote Sensing
Remote Sensing Includes:
◼
Aircraft and Satellite Imagery
◼
Lidar
◼
Radar
◼
…and many more.
Remote sensing provides some of the best tools with which to study earth systems.
Here are examples of remote sensing products we might use to study the Biosphere:
4. Language, Human Societies, and More
4. Language, Human Societies, and More
Many human systems, including living languages and social systems, are complex systems.
Languages
Languages
◼
In human languages, meaning emerges from assemblages of words constrained by grammars.
◼
The use of living languages constantly produces and diffuses new meanings within the speaking population.
◼
The diffusion of new meanings contributes to the evolution of languages through time.
Complex anthropogenic systems also often exhibit power law distributed phenomena. For instance, the rank-order distribution of words by frequency in writing and speech is a power law:
Social Systems
Social Systems
◼
Social systems are comprised of many agents (people, groups, institutions, …).
◼
Patterns of recirculation of resources emerge from the interactions of system agents, forming cultural norms, economies, cities, and more.
As in languages, we find power laws in complex social systems. For instance, in the way companies scale:
Fleshing Out Working Definitions
Complex Systems
Complex Systems
Characterising Complex Systems
Characterising Complex Systems
◼
Complex systems are networks of typically nonlinearly interacting components.
◼
They are dynamic and far from equilibrium.
◼
In these systems, local component interactions result in spontaneous-self-organisation, such that the systems are neither completely random or regular, resulting in macroscopic emergent behaviour (Sayama, 2015).
◼
“[Component] interactions are strong enough that they cannot be treated as non-interacting” (Feldman, 2009).
◼
Complex systems never behave randomly or completely chaotically. They are always somewhere in between.
Adaptive Systems
Adaptive Systems
We distinguish between complex systems in which the components and the rules governing their interactions are fixed, and those for which they are not.
◼
Complex Physical Systems are made of fixed components interacting according to fixed rules. While the component states change through time, the components themselves to not (Holland, 2014).
◼
Complex Adaptive System components (agents) are not fixed, nor are the rules according to which they interact. Instead, both are also emergent properties of the system as it adapts to changes in its environment (Holland, 2014).
Complexity (Optional)
Complexity (Optional)
There are competing definitions of complexity. Depending on context, complexity refer to:
◼
A computational or mathematical property of a system
◼
Computational Complexity, Kolmogorov Complexity, Information fluctuation complexity, …
◼
A perceptual phenomenon (possibly caused by our failure to compress information)
◼
“You know it when you see it”
◼
“what we most often mean when we say that something seems complex is that the particular processes that are involved in human visual perception have failed to extract a short description.” (Wolfram, 2002)
Self-Organisation
Self-Organisation
Defining Self-Organisation
Defining Self-Organisation
◼
Self-organisation is a dynamical process by which a system acquires and maintains macroscopic structures and/or behaviours without external control (De Wolf & Holvoet, 2005; Sayama, 2015).
◼
Self-organisation entails an increase in the order of a system’s behaviour.
Example: Consider a heated pan of water which, once boiling shifts from conduction, where heat diffuses through the water without causing it to move, to cellular convection, where the the difference in density between the water at the top and bottom of the pan causes it to flow in convection cells. (Hooker, 2011).
Emergence
Emergence
Characterising Emergence
Characterising Emergence
Emergence is fuzzier and more subjective than self-organisation and complexity.
◼
A system exhibits emergence when coherent properties, behaviours, structures, and/or patterns (emergents) dynamically arise at the macroscopic scale from the interactions between its components at the microscopic scale. These emergents are new with regard to the system components (De Wolf & Holvoet, 2005).
So what does it mean for an emergent to be coherent?
◼
Coherence refers to the interdependence of sets of constraints that enable the persistence of a system’s organisational structures through time by preserving system boundary conditions (Mossio & Moreno, 2010). (See Mossio & Moreno for a formal mathematical definition.)
◼
Coherence is also referred to as “organisational closure”.
Characterisations of emergence are inherently subjective because they fundamentally depend on our abilities to recognise and describe patterns.
◼
Emergents are, first and foremost, surprising detected phenomena that result from the interactions between components of a system, that are not explainable by simple addition of those same components (gestalt).
◼
This raises all sorts of ontological and epistemological questions about human perception which are beyond the scope of this presentation.
Strong/Weak Emergence:
Strong/Weak Emergence:
You might come across the strong/weak emergence dichotomy.
◼
Scholars debate criteria for true emergence.
◼
The case where emergents are ontologically new is known as strong emergence.
◼
The case where emergents are only epistemologically new is knows as weak emergence.
◼
Strong emergence results in causally potent phenomena, whereas the latter “weak emergence”, does not (Hertz & Mancilla García).
Self-Organisation and Emergence in Relation to One Another
Self-Organisation and Emergence in Relation to One Another
Self-organisation and emergence can occur independently of one another. The presence of the two is characteristic of complex systems.
◼
Self-organisation without emergence: A centralized system regulates temperature in a building; Individual thermostats adjust local temperature settings based on occupancy, but overall temperature control is managed centrally, resulting in self-organisation without emergence.
◼
Emergence without self-organisation: The volume of a gas in space is an emergent property of the interactions of its constituent particles, but the gas, in its stationary state, is not self-organising (De Wolf & Holvoet, 2005).
◼
Self-organisation with emergence: Ants exhibit self-organisation by following simple rules for foraging, nest building, and defense, leading to emergent behavior such as complex colony structures and coordinated activities.
Computational Example: One-Dimensional Cellular Automata
Computational Example: One-Dimensional Cellular Automata
From Wolfram MathWorld: “A cellular automaton is a collection of ‘colored’ cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules based on the states of neighboring cells.” (Weisstein, n.d.)
One-dimensional cellular automata are cellular automata on one dimensional arrays.
Stephen Wolfram famously explored these models in the 1980s.
At each step, each cell updates based on its previous state and the state of its neighbour cells, according to the mapping defined below, to the left. The resulting behaviour is illustrated to its right:
The rules are numbered according to a scheme proposed by Stephen Wolfram in 1983 that has since become standard. You can find a rule’s number by reading the bottom row of a rule plot as a binary number, and converting that number to base 10.
Cellular automata showcase emergent structures:
Rule 110 is famously Turing complete.
Sources Cited and Further Readings
Related Wolfram Community Articles and Wolfram Resources
Related Wolfram Community Articles and Wolfram Resources
◼
A Forest Fire Model in 1, 2, and 3 Dimensions: https://community.wolfram.com/groups/-/m/t/3096615?p_p_auth=itNsnr1f
◼
Abelian Sandpiles - SandpileTopple - Wolfram Function Repository: https://resources.wolframcloud.com/FunctionRepository/resources/SandpileTopple/
◼
A dynamical model of immune-system response to mRNA, live virus, and inactivated vaccines: https://community.wolfram.com/groups/-/m/t/3055726?p_p_auth=LCWJCry0
◼
Lotka-Volterra Models in the Wolfram Language: https://community.wolfram.com/groups/-/m/t/3028599
Sources Cited
Sources Cited
Code Initialisations
Remote Sensing
Remote Sensing
Abelian Sandpile Model
Abelian Sandpile Model
Forest Fire Model
Forest Fire Model
Generalized Lotka-Volterra Model
Generalized Lotka-Volterra Model
Compartmental Model of Immune System Response to Vaccination
Compartmental Model of Immune System Response to Vaccination
Initialisation: CompartmentalModelling Paclet Setup
Initialisation: CompartmentalModelling Paclet Setup
Initialisation: Model Reactions, Parameters, and State Variables
Initialisation: Model Reactions, Parameters, and State Variables
Implementation: Compartmental Model Graph
Implementation: Compartmental Model Graph
Initialisation: ODEs
Initialisation: ODEs