How individual decisions shape religious groups over time

Written by Jessie Saeli, edited by Nicole R. Smith and Rachel J. Bacon

Modeling religious change with agent-based models

Societies are comprised of diverse individuals, each one characterized by their own goals, relationships, and personality. Modeling Religious Change uses cutting-edge agent-based models to incorporate and track individual characteristics, allowing us to measure the impact of complex factors on personal (non)religious identity and general religious change.

Society-wide religious change results from millions of people inheriting certain (non)religious characteristics from their family and choosing to change or retain those characteristics into adulthood. Most parents, but especially highly religious parents, “transmit” their own (non)religious affiliation to their children. Additionally, switching away from childhood religion usually occurs before the age of 30.

Let’s imagine four different American family situations and the potential impact they may have on the (non)religious identity of the children as they become independent adults.

First, let’s imagine the classic Norman Rockwell-esque American Christian family. The entire family regularly attends church. The children underwent the initiation rituals of baptism and confirmation. Although three of the children remain in the fold, one son disaffiliates in his 20s.

Next, let’s imagine the opposite: the modern nonreligious American family. Likely living on the East or West Coasts and surrounded by nonreligious family and friends, the children retain their nonreligious identity as adults.

Now, let’s consider the influence of extended family: an ex-religious couple with a daughter and son, whose Jewish grandparents are highly religious and traditional. The grandparents encourage the parents to celebrate bar mitzvah and bat mitzvah for their son and daughter. The daughter, rather than inheriting her parents’ nonreligion, identifies with traditional Judaism as a child and into adulthood. However, her brother remains nonreligious.

Finally, let’s consider an interfaith couple, since 39% of married Americans are married to someone outside of their faith. A Catholic mother and Baptist father combine their beliefs and traditions when raising their children, but the children inherit only their mother’s Catholic identity. But will that identity remain? The answer is, quite possibly, no. Both children identify as nonreligious by the time they are 30.

Made from photos from Wikimedia Commons and by Thérèse Westbymenachem weinreb and Roberto Nickson on Unsplash

These four vignettes explore some of the factors underlying how and why American adults, influenced by their family circumstances, first inherit and then decide to retain or switch their (non)religious identity.

However, traditional demographic projections, such as those by Pew, have difficulty accounting for these important relationships. These projections use the cohort-component method (CCM), which divides a given population into groups called “cohorts”. This limits the ability for CCMs to account for factors which don’t fall along cohort divisions.

For example, in Pew’s most recent projections, transmission of religious identity from parent to child considers only the mother’s (non)religious identity, with no reference to any other person. Because of the constraints of CCM, Pew is unable to account for the influence of fathers, grandparents, and peers on the child’s initial religious identity and future development.

Modeling Religious Change uses agent-based models (ABMs) to model and project religious change in the countries we are studying by re-creating the real-world phenomena of religious change in an artificial society. With ABMs, we can account for individual characteristics, track the impact of complex interpersonal relationships, and incorporate environmental, economic, and societal factors.

Ultimately, ABMs allow us to explore and experiment with the underlying causes and mechanics of religious change, in addition to making projections of future populations.

The basics of agent-based modeling

Agent-based models operate by calculating the actions and interactions of a number of agents. Our ABMs model artificial societies in which each agent represents an individual person. These agents respond to external environmental and social factors and interact with each other according to the model’s causal architecture, or rules.

Each agent’s actions are determined by artificial intelligence: they have “goals” and make “decisions” which line up with those goals. Whereas the cohort-component method references a number of monolithic groups, our ABMs track unique individuals and calculate the interactions which result in emergent phenomena.

These two images come from an ABM developed by economist Thomas Schelling in the 1970s to represent segregation (you can download and play with this version of the model). The segregation shown in the images “emerges” from the simple rule that each agent move to be next to similar neighbors.

Society — in all its complexity — is simply the combination of many, many individuals who belong to families, neighborhoods, workplaces, and social networks. Complex outcomes “emerge” from simple underlying rules, so we call these outcomes emergent phenomena. Aggregate rates of religious switching arise out of the combined results of a multitude of individual decisions.

While traditional demographic projections impose rates of change from above, ABMs are coded with simple rules which result in complex — and often unpredictable — outcomes. The challenge, then, lies in how to create realistic, complex results from simple starting conditions. We can’t predict how the model’s causal architecture will influence the artificial society until we try.

Building an Artificial Society

To create our agent-based models, we initialize the population with the proper demographic make-up: gender, age, and (non)religious affiliation, using real-world demographic data. Instead of tuning each agent by hand, we usually set the parameters so that the collection of agents will form the kind of society which we are modeling.

The model’s causal architecture (underlying calculations and parameters) determines our agents’ actions and decisions. Our agent-based models employ causal architecture which reflects a synthesis of the best theories of religious and nonreligious identity and change for the countries we are studying. These theories incorporate family relationshipspeer interactionssocietal conditions, and other factors that are nearly impossible to capture in traditional demographic models.

The causal architecture for this model consists of a combination of six highly-regarded secularization theories (represented by the colored arrows). How and why does a society become mostly non-religious?

Each of our our many religion-related ABMs has a different causal architecture. In one model, we code with whom our agents interact, how often, and how strongly those interactions impact their religious identity. In another, we combine multiple theories of religious change to code the influence of environmental factors such as economic development and social liberalization toward secularization.

These kinds of rules can be used to set thresholds for religious switching: at what point does an agent “choose” to switch (non)religious identity, and at what point does this become a societal trend?

ABMs can also be used to code different kinds of change. For example, Primer uses ABMs and mathematical formulas to simulate different mechanics of evolution in an artificial society of blobs. In this video, Primer shows how inheritance of “altruism” or “cowardice” influences the survival of those behavioral styles, and explains how the simulations both follow and differ from mathematical formulas which describe the same phenomena.

Inheritance and Switching

To model the vignettes of our four families, we would need to code two steps: initial inheritance and subsequent religious switching.

First, an algorithm could determine how agents inherit religious affiliation from their family as a young child. The algorithm could consider factors such as the parents’ and grandparents’ genders and affiliations, religious makeup within the extended family, and societal conditions in the geographic region. This would set the agent’s initial (non)religious affiliation.

Once initial affiliation has been set, interactions — including with peers and the broader world — could influence the growing child’s (non)religious identity. The influence of these interactions and the thresholds at which switching occurs would reflect each individual’s unique situation, rather than the same impact and threshold holding for all agents. This would determine whether and how each agent switches or retains their inherited (non)religious identity.

Children “inherit” their (non)religious affiliation from their parents, as shown on the left. Adults retain or switch their (non)religious affiliation in response to “influence” from their peers, as shown on the right.

The interactions of hundreds of individual agents of diverse religious faiths and nonreligious identities will result in emergent patterns of switching.

Matching real-world results

Complex societal patterns ultimately emerge from individual decisions. Similarly, when thousands of agents interact in an artificial society, interesting and unpredictable results emerge. We compare the emergent outcomes of these actions against real-world data to determine whether the agents have been properly initialized and whether our causal architecture is adequately realistic.

For example, we check that the number of children born in our model matches the fertility rates of that population and time period. In an ABM, this must be coded from the bottom-up: how do agents “decide” to have a child? When and if to get married? To whom to get married?

In an artificial society, to whom a new agent is “born” matters, because the characteristics of the parents influence the way the rules are applied to their child. New agents make decisions based on their environmental and family relationships as they move through time. They do not simply pop into existence!

Many trial runs and fixes are needed to validate the causal architecture. After each unsuccessful simulation, we slightly alter the initial conditions, rules, and the level of influence different variables hold on each other. Researchers must conceptualize the range of different possibilities and understand the influence of starting conditions and the specific order of calculations in the causal architecture. This process of calibrating and validating the model may be done manually, algorithmically, or by a mix of both.

Once the model produces the expected results according to past and present-day real-world data, then we may use it to project the future of religious change with more confidence.

Smooth scalability for complexity

Modern advances in computer processing power have made agent-based models the ideal method for simulating artificial societies. ABMs smoothly and intuitively incorporate increases in complexity, allowing researchers to easily add or subtract additional factors, such as individual characteristics, personality traits, interpersonal relationships and interactions, and environmental, economic, and societal influences.

This smooth increase in complexity contrasts with cohort-component models. In CCMs, any increase in complexity prompts an exponential increase in tracked variables and calculations. Although CCMs are better for simple demographic projections, they cannot handle higher levels of complexity.

Because our ABMs track individuals, we can include nuanced traits and inter-agent relationships, in contrast to CCMs monolithic and segregated “cohorts”. For example, attributing a marriage to two ABM agents requires modifying a characteristic; CCM requires creating an entirely new cohort which describes that marriage pair. ABMs allow us to incorporate individualized and dynamic levels of religiosity and easily include interfaith marriages and other influential relationships on religious switching.

ABMs also enable us to avoid the pigeonholing of CCM cohorts. In an ABM, agents can belong to multiple (non)religious identities or races and individuals can easily change their characteristics — as in religious switching — without the cumbersome method of “changing cohorts”. This also allows researchers to divide up the resulting data however they want, without being restricted by the cohorts which initially formed the model.


The crowning jewel of agent-based models is their ability to provide an arena for researchers to experiment with the underlying causal passages by which emergent phenomena arise. By running a model multiple times with small changes, we can identify which factors “explain” the results. Researchers call this explainability.

Earlier, we described how validating the results of our ABMs against real-world data challenges our researchers to define in fine detail how their theories of religious change affect the agent-based simulation. This allows us to conduct “experiments” according to the rules and theories of religious change incorporated in the model. Although we cannot necessarily draw real-world conclusions from these “experiments,” they allow us to evaluate these theories of religious change and make conjectures about real-world phenomena.

For example, in one model, we combined several theories of religious change to model how societal and economic factors influence religious change in an artificial society. We wanted to determine which factors were required for secularization to result. Using this methodology, we ran the model under different initial conditions and identified which factors were always present whenever secularization occurred — that is, secularization never occurred without these factors. Based on the assumptions and rules of that model, secularization was only possible in a society with economic security, freedom of expression, scientific education, and pluralistic attitudes.

A New Frontier for Social Science

Agent-based models are core to the Modeling Religious Change project’s interdisciplinary nature: combining social science with computer science. Our experience working with social-science ABMs in the past and our interdisciplinary team and partners uniquely enable us to pioneer this new field.

ABMs like ours are rare in demography so we are excited by the opportunity to pursue a deeper and more rigorous understanding of social and demographic phenomena. We strive to achieve more fine-grained population projections that reflect real-world dynamics between individuals.

Scroll to Top