Network Science Institute | Northeastern University
NETS 7983 Computational Urban Science
2025-03-31
This week:
Agent-Based Models
Data -> Methods -> Models -> Applications.
An agent-based model (ABM) is a form of computational social science. They are computational models used to simulate the actions and interactions of autonomous agents (individuals, groups, or entities) within a defined environment, with the goal of assessing their effects on the system as a whole.
Parts of an ABM:
Agents: autonomous entities that interact with each other and the environment. Agents can be individuals, groups, or entities. For example, in traffic simulations, agents can be cars, pedestrians, or traffic lights.
Environment: the space in which agents interact. The environment can be physical, social, or abstract. For example, in traffic simulations, the environment can be a road network, a city, or a virtual world.
Rules: the rules that govern the behavior of agents and the environment. Rules can be deterministic or stochastic. For example, in traffic simulations, rules can be traffic laws, traffic signals, the cost of different modalities, etc.
Interactions: the interactions between agents and the environment. Interactions can be direct or indirect. For example, in traffic simulations, interactions can be collisions between cars, congestion on the road, different types of modalities, etc.
Key steps in building an ABM:
Calibrate the model by adjusting the parameters to match the observed past data.
Validate the model by comparing the results with new empirical data or other theoretical predictions.
Sensitivity analysis to test the robustness of the model to small changes in the parameters.
ABMs are used to study complex systems where the interactions of agents produce emergent properties that cannot be understood by studying the agents in isolation.
This is the famous “more than the sum of its parts” idea in which macro behavior emerges from micro decisions [3].
ABMs are bottom-up models, in which the behavior of the system is determined by the behavior of the individuals, contrary to top-down, which assumes that all agents in the city are identical.
ABMs are used to study systems that are not amenable to mathematical, empirical, or experimental analysis. For example, ABMs are used to study the behavior of crowds, traffic, and the spread of diseases.
ABMs are used to study systems that are too large or too complex to be studied by other methods. For example, ABMs are used to study the behavior of cities, economies, and ecosystems where multiple systems of systems interact.
ABMs are used across many disciplines, including physics, economics, biology, sociology, geography, engineering, computer science, and urban science.
They are called different names in different disciplines, including
Economics: ABMs are used to study the behavior of markets, firms, and consumers.
For example, Palmer, Lebaron, Brian Arthur, and many others built the famous Santa Fe artificial stock market model to study the behavior of financial markets [4] [5]. The idea was to see whether the heterogeneous behavior of traders could explain the stylized facts of financial markets (fluctuations, fat tails, etc.)
Example of decision-making flowchart in a stock market ABM, from [6]
Let’s use this example to describe the main components of an ABM:
Even a slight preference for living near people of the same type can lead to large-scale segregation. This model is one of the most famous examples of how macro behavior can emerge from micro decisions.
Let’s use this example to describe the main components of an ABM:
This ABM model can be used to simulate public health and economic interventions in urban areas during epidemics.
Traffic and Congestion: ABMs are widely applied to understand vehicle flows in urban areas. For example, ABMs are used to study the impact of new transportation policies on urban mobility, the effect of traffic congestion on the economy, and the behavior of drivers in traffic jams.
The MatSim model of Berlin
Let’s use this example to describe the main components of an ABM for transportation simulations:
More recently, researchers are using LLMs as agents in ABMs. Since LLMs incorporate more detailed information about individuals, agents are more context-aware, have more flexibility in their behavior than fixed rules, can adopt more human-like interaction, etc.
llustration of how large language model-empowered agents in ABMs, from [8]
Calibration: the process of adjusting the parameters of the model to match the observed data. Calibration is used to ensure that the model is consistent with the real-world system.
Validation: the process of comparing the results of the model with empirical data or theoretical predictions. Validation is used to determine whether the model is an accurate representation of the real-world system.
Sensitivity analysis: the process of testing the robustness of the model by varying the parameters and observing the effects on the results. Sensitivity analysis is used to determine how changes in the model’s parameters affect the model’s predictions.
Flexibility: ABMs can be used to study a wide range of phenomena, from the behavior of individuals in social networks to the spread of diseases in populations.
Emergent behavior: one of the most powerful features is the ability to reproduce emergent behaviors from individual actions
Heterogeneity: ABMs can represent the heterogeneity of agents, which is often not possible in other models.
Complexity, non-linearity and mutiple equilibria: ABMs can describe complex systems with multiple equilibria, non-linear dynamics, and feedback loops.
ABMs can be seen also as experimental laboratories to test different hypotheses and scenarios (experiments in silico)
What-if analysis: ABMs can be used to study the effects of different policies, interventions, or scenarios on the system as a whole.
Causality: ABMs can be used to study the causal relationships between interventions and changes in behavior.
Too much freedom: the sheer extent of choice in constructing ABMs compared to more traditional models means that
Calibration and validation: ABMs are typically calibrated and validated using empirical data at the macro-level. But given the amount of degrees of freedom to construct them we can always find a model that fits the data. Thus, ABMs models typically overfit the data.
Interpretation: ABMs can be difficult to interpret because they are often complex and involve many interacting components. It can be difficult to understand how the behavior of individual agents leads to the behavior of the system as a whole.
NetLogo interface
GAMA interface
GLEAM epidemic model
More tools:
Agent-based models (ABMs) are computational models used to simulate the actions and interactions of autonomous agents in complex systems.
ABMs are used to study a wide range of phenomena, from traffic in urban areas and consumption of goods to the spread of diseases in populations.
ABMs can explain the emergence of collective behavior from individual actions and, thus, they are use to study complex systems but also to simulate what-if scenarios and causal relationships
However, ABMs are complex and difficult to interpret, and they require careful calibration, validation, and sensitivity analysis.
Chapter 4: “Sorting and Mixing” by Schelling in his book “Micromotives and Macrobehavior” [3]
The Idea of Agent-Based Modeling by Gilbert, in the SAGE Research Methods Book on Agent-Based Modeling [9]
Agent-Based Models in empirical social research by Bruch and Atwell [10]
Agent-Based Modeling and the City: a gallery of applications by Crooks et al. [11]
Modelling the impact of testing, contact tracing and household quarantine on second waves of COVID-19 by Aleta et al [1]
Agent-Based Models: understanding the Economy from the Bottom Up [12]
CUS 2025, ©SUNLab group socialurban.net/CUS