{'fraction_non_alphanumeric': 0.02620042817820369, 'fraction_numerical': 0.007595065755938424, 'mean_word_length': 4.861667164625038, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Modelling transitions between egalitarian, dynamic leader and absolutist power structures

Human groups show a variety of leadership dynamics ranging from egalitarian groups with no leader, to groups with changing leaders, to absolutist groups with a single long-term leader. Here, we model transitions between these different phases of leadership dynamics, investigating the role of inequalities in relationships between individuals. Our results demonstrate a novel riches-to-rags class of leadership dynamics where a leader can be replaced by a new individual. We note that the transition between the three different phases of leadership dynamics resembles transitions in leadership dynamics during the Neolithic period of human history. We argue how technological developments, such as food storage and/or weapons which allow one individual to control large quantities of resources, would mean that relationships became more unequal. In general terms, we provide a model of how individual relationships can affect leadership dynamics and structures.


Introduction
There are many different types of leadership dynamics found in human societies. For instance, many small groups, such as private companies, have a permanent leader. In other groups the leader changes over time, such as in university departments or social societies. These patterns are also seen at larger scales. During the decades before and after Julius Caesar crossed the Rubicon in 49BCE, the Roman Republic transitioned from a system of Consuls who held power for only one year, to the Roman Empire where there was a single Imperator Caesar who ruled for life and passed the title to a chosen successor.
A notable feature of many human groups is that they often do not explicitly coerce their members to join a hierarchy. Instead, soft power and prestige play a strong role [1,2], with status being an abstraction of more tangible material resources such as land, food, weapons or other commodities [3]. Status is then voluntarily conferred upon leaders by their allies [2][3][4][5][6][7][8][9], with many of these relationships being asymmetric [2,5,[9][10][11]. The member with the highest status is usually deemed the leader [2,4,6,8] Considering society at a large scale, we observe a shift between different forms of leadership dynamics in evidence from the Neolithic Era. Before this era, human societies consisted of egalitarian hunter-gatherer groups where material resources such as food were shared relatively equally [12] and leadership roles were facultative and of a temporary duration. There followed a transition to sedentary groups where high-status individuals had more resources but leaders still changed relatively regularly [13]. Finally, hereditary leadership became institutionalised, where the role of a chief was passed down a paternal line, which monopolised most of the resources [14].
Previous work has argued that these shifts were due to social and technological developments, which meant that interactions between individuals became increasingly asymmetric. These asymmetries were likely due to control of agricultural surpluses [15][16][17][18], land [15], ideologies [19], or military units and weapons [14]. In light of this evidence, the model we present here investigates how asymmetry in status interaction can generate the different classes of leadership dynamics observed during the Neolithic Era.
Network analysis has proved to be a useful approach for studying the interactions of members of a population [3,7,20]. Quantitative study of hierarchical networks is usually static in nature and networks are presented as snapshots in time [21,22]. However, when using the nodes of a network to represent individuals, the properties of the nodes are often in flux, and the connections between nodes change over time. When there is a feedback effect between node properties and node-to-node connections, the network is said to be coevolutionary. These coevolutionary networks can generate complex dynamics [23,24].
In order to investigate the factors underlying different types of leadership dynamics, we present a dynamic coevolutionary network which incorporates the status of individuals as properties of the nodes. We take status to represent the control of tangible and intangible resources such as food, land, money or other assets, or authority. An edge on the network represents a relationship between two individuals, over which exchanges of status are made. An exchange of status might be the trade of goods or services, an employment contract, or a political endorsement. An important factor of our model is the concept that many of the trades in a relationship are somewhat unequal, both in the absolute value assigned to each partner, and the relative value to each partner. Based on this we also specify rules for how edges between nodes are rewired so that individuals can maximise the status they receive. Given these rules, we allow the network to evolve over time and observe its dynamics.

Model
The model consists of a dynamic network of n nodes which represent individual people. All individuals are considered to be identical and are unable to coerce one another to form relationships. Leadership among individuals is solely determined by status. Each individual in the model has a status level which depends on their relationships with others, meaning that status is adjusted according to the status of those who they are linked to. Individuals distribute a proportion of their status amongst those they are linked with, and may not expect the same quantity of status in return. Individuals can change who they associate with according to the marginal utility of the relationships.
Each individual's node i maintains a status s i , which translates to how much influence they have within the group. Status acts as a multivariate aggregate of an individual's level of money, prestige (titles, jobs, etc), and ownership (land, valuable resources, etc). For simplicity, we assume that individuals must maintain a fixed number of necessary relationships, which is constant for all individuals. These relationships might be needed to participate in society, providing land to live on or food to survive the winter. In our model, each node is assigned λ unidirectional outgoing edges which represent their relationships and are linked to other nodes. Nodes can have any number of incoming edges from others in the network.
The statuses of the nodes are updated according to their edges in the status update stage, and nodes may rewire an edge in the rewiring stage. The model is run forward in time to observe the distribution of status and changes of that distribution amongst the nodes. We concentrate on looking for leader individuals with nodes of high status and check to see whether they were superseded by other leaders. Models are run until patterns of leadership dynamics stabilised, or for a substantially long time (up to 5 million time steps) to confirm that there is an extremely low likelihood of a new leader rising to high status.

Status update stage
In the model, a proportion of r of each node's status is distributed amongst each of its edges (including both incoming and outgoing edges). This formalisation of sharing status amongst edges is based on Katz's prestige measure [25]. For each edge, we assign a temporary status value. This is calculated by adding the status contributions from both of the nodes that are linked. To model unequal relationships we introduce the inequality parameter (q) which unequally reassigns the edge's status back to those joined by the edge. In this formulation, the total amount of status in the model is constant. The steps are done in the following order at time t: 2. Each node deducts the status distributed to its edges: 3. The status of each edge is redistributed back to the nodes: 8e i!j , s j (t + 1) = s j (t + 1) + qe i!j and s i (t + 1) = s i (t + 1) + (1 − q)e i!j

Rewiring phase
In order to maximise status, each individual determines which of its outgoing relationships is of the least value, and, with probability w chooses a new relationship according to the following rules.
1. For node i at time t we identify the edge of minimum value (i ! j � ) from the node's outgo-

PLOS ONE
2. With probability w, we rewire the edge to a new node by choosing a random node z such that there is no edge (i ! z). Delete edge (i!j � ) and add edge (i ! z).

Results
We will present our analysis of the dynamics that result from the interplay between the processes we have defined. Simulations were run of the model choosing parameter values to explore their effects on dynamics over the extremes of their ranges. Depending on the parameters, we either observe relatively equal statuses among the population, or a relatively high status level for one or a few individuals' nodes. An example of a typical network with a single dominant individual can be seen in Fig 2.

Inequality in relationships affects leadership dynamics
A key parameter in the model is the inequality parameter (q), which models an unequal transfer of status from a relationship originator to the receiver. As we increase q, we observe different phases of dynamics in the model, which are shown in Fig 3. We dub the individual whose node has the highest level of status as the leader. The model exhibits three different types of leadership dynamics: No leader, transient leader(s), and permanent leader(s).

Exploration of a broader range of parameters
We find our simulations demonstrate all three phases of leadership dynamics over a wide range of parameters, including the population size, and numbers of edges. To show this, we run simulation models for each parameter set and record the number of times over the simulation there is a change of individual with the highest status. We find a similar pattern across the parameters tested (see S1-S9 Figs) to that shown in Fig 3. At lower values of q there is a very fast turnover of the highest-status individual. As q is increased, we find a transient phase

PLOS ONE
where new leaders emerge, but there is still turnover of leaders. At higher values of q there are very few new leaders. When leaders are stable, we observe that the number of stable high-status leaders with high levels of q is equal to λ − 1. We also found that the number of relationships per individual has an impact on the transitions between phases. As that parameter increases,

PLOS ONE
we observe how transitions between the three different types of leadership dynamics start to occur at lower values of q (see S1-S9 Figs).

Transient leader phase demonstrates a power vacuum
An interesting phase in the dynamics demonstrates transient leaders (Fig 3, panel B). In this case, at any particular time-point in the simulation, there is only one high status leader. This leader can lose status in a riches-to-rags event, but another quickly replaces it. We have produced a video animation of the model of this phase of the model which is available in the S1 video. We ran simulations over a range of values for the inequality parameter (q) in Fig 4  which shows how there are ranges of the inequality parameter (q) where leader turnover is relatively high, but the number of leaders at any particular time-point is relatively constant, thus demonstrating a power-vacuum effect in our model.

Distribution of status and node degree
We find heavy-tailed distributions of node status and node degrees in our network model ( Fig  5). We looked more closely at the distribution of node degrees for q = 0.525 using the Python Powerlaw package [26,27]. As the parameters of our model stipulate that all nodes have at least degree 3, it makes sense to set a lower bound for the distribution we investigate, which we set to X min = 6. A likelihood-ratio test [26] is used to compare the goodness of fit between the power-law distribution and two other distributions. We found no evidence (p � 10 −100 ) for

Shifts in leadership dynamics are consistent with the Neolithic
In the introduction we argued that shifts in human leadership dynamics were due to technological advances that allowed individuals to control greater pools of resources. These advances would have had the effect of increasing the inequality parameter as seen in Fig 3. The analysis in that figure was done with a relatively high rewiring rate at the same frequency as status update. In human relationships, the rate at which relationships are changed is often at a relatively low frequency compared to how often status changes. For instance, new contracts take months to draw up but money and goods may change hands quite frequently. Adjusting the parameters, we can generate leadership dynamics over a broad range of timescales. We have selected one which is consistent with timelengths observed in the Neolithic era (see Fig 6).

Discussion
The model presented here demonstrates three different phases of leadership dynamics: a phase with no leader, a phase with changing leaders, and a phase with a constant leader or leaders. Which phase is present in the network depends on the inequality of relationships between individuals. This demonstrates how different leadership dynamics seen in human societies can be due to how status is transferred between the individual members of the society. This suggests that self-organisation of social norms around inequality can play a role in keeping a system parameter near to a critical point where leadership changes relatively frequently. This work demonstrates a dynamic hierarchy in human networks where all individuals are have equivalent traits and fitness. Our model is a form of preferential-attachment, where nodes are more likely to connect to other nodes which are already of high status [22]. However, this is usually applied to growing networks [28,29], and once one individual gains

PLOS ONE
leadership, it is unlikely to change. In an alternative model, new individuals may dominate if they have a fitness advantage [30,31]. Our model presents a riches-to-rags alternative where a high-status individual can lose status. In our model, we see how nodes have high numbers of connections (relationships) at some points and then other nodes take over. We find that the predicted exponent of our power law distribution is higher than that found in some friendship networks [22]. However friendship networks are only one type of relationship, and humans can relate to each other in many different ways. An example being where a chieftain controls access to food. Further study is needed to investigate how a model like ours can be challenged against empirical data.
Evidence for human societies with dynamic leaders during the Neolithic transitions [13] is consistent with the dynamic leader phase of our model. There is a transition between three phases of leadership dynamics in human societies from relatively egalitarian power structures, through a period where leaders change over time, to dominant institutionalised leaders [13].

PLOS ONE
Our model can be interpreted as a conceptual model for these leadership dynamics. Many have argued that control of surplus physical resources such as food and land, or intangible resources such as religious authority, can play an important role in promoting individuals to leadership rank [15,19,32,33]. Having a surplus means an individual is able to form relationships where they need only exchange a small proportion of their resources, while their partners must exchange a larger proportion. Such inequality can be further exacerbated by scarcity of resources created by high population density [34]. This form of inequality is modelled by the level of the inequality parameter (q) in our model. Interestingly, our results present an alternative to this picture, suggesting that increases in the numbers of relationships per individual might also play an important role in creating conditions for absolutist power structures. More than one factor may have played a role in the transitions in leadership structure that happened during the Neolithic.
The three phases of human leadership dynamics correspond to three phases identified in the organisational psychology literature. Lewin has identified three modes of leadership: Laissez Faire, Democratic and Autocratic [35]. These three modes largely correspond to the three phases of leadership dynamics found in our model. Lewin's study linked increasing control of central resources to more Democratic and Autocratic modes. A controlled surplus of this central resource enables a leader to pay off many individuals and maintain their leadership [36]. This reflects an inequality of alliances which is key to our model.
A interesting feature of our model is that it demonstrates heavy-tailed distributions of status and node-degree. Many systems are known to demonstrate such heavy-tailed distributions when they are at a critical point [37], i.e., when the rate-of-change of a variable is close zero. Further analysis of our model in the Supporting Information, which assumes that edge-rewiring is relatively slow compared to status update, shows an expected rate-of-change of node degree close to 0.0 when q � 0.5. This suggests our model reaches a critical point, but further work is needed to investigate this in more detail.
The work we have presented has some limitations. The model we have presented is complex and difficult to analyse. Future models will hopefully simplify our approach while maintaining the interesting dynamics of changing leaders we have found in the model. Other models could add more realism, incorporating mortality of individuals and inheritance, or varying the numbers and types of relationship between individuals. Finally, it is important to find methods for challenging leadership models against data.
In this paper we focused primarily on applying this model to the development of insights regarding the Neolithic transitions from flat power structures to hierarchical societies. Future work can build upon these foundations to examine whether this model can be applied to other changes in societal structure, such as the movements from monarchy toward parliamentary democracies in 18th-century Europe, or a detailed study of the transitions of Roman civilization between various different structures including monarchy, through annually electing two concurrent consuls in the Roman Republic, a phase with three 'Triumvirate' leaders, to a single Imperator Caesar in the Roman Empire. As well as human societies, this theory can be of value to studying hierarchies in animal societies [38]. Other work might investigate the impact of relaxing some of our assumptions. For instance, exploring different rewiring rules where nodes have different numbers of edges, or rewire to others based on a similar or higher levels of status or numbers of edges. The model can also be extended in various ways to better represent the real-world contexts in which leadership dynamics operate; these could include representations of technological innovations, changes in social norms, or power struggles between potential leaders. These extensions would enable us to develop the model further into a powerful exploratory tool for human leadership dynamics. As we increase q, leaders have increased time of leadership, at around 10 4 the average leader has quite a long period with the highest status but there is still a large turnover. On the right side there are very few leaders in the chart and we see a single leader or several leaders. Parameters: w = 0.1, n = 1000, and as shown in the figure.