# Assortative and preferential attachment lead to core-periphery networks

Javier Ureña-Carrion  Department of Computer Science, Aalto University School
of Science, 00076 Aalto, Finland Fariba Karimi  Department of Computer
Science, Vienna University of Technology, 1040 Vienna, Austria  Network
Inequality group, Complexity Science Hub, 1080 Vienna, Austria  Gerardo
Iñiguez  Department of Network and Data Science, Central European University,
1100 Vienna, Austria  Faculty of Information Technology and Communication
Sciences, Tampere University, 33720 Tampere, Finland  Department of Computer
Science, Aalto University School of Science, 00076 Aalto, Finland Centro de
Ciencias de la Complejidad, Universidad Nacional Autonóma de México, 04510
Ciudad de México, Mexico  Mikko Kivelä

###### Abstract

Core-periphery is a key feature of large-scale networks underlying a wide
range of social, biological, and transportation phenomena. Despite its
prevalence in empirical data, it is unclear whether this property is a
consequence of more fundamental network evolution processes. While
preferential attachment can create degree heterogeneity indistinguishable from
core-periphery, it doesn’t explain why specific groups of nodes gain dominance
and become cores. We show that even small amounts of assortative attachment,
e.g. homophily in social networks, can break this symmetry, and that the
interplay of the two mechanisms leads to one of the groups emerging as a
prominent core. A systematic analysis of the phase space of the proposed model
reveals the levels of assortative and preferential attachment necessary for a
group to become either core or periphery, depending on initial conditions. We
find that relative group size is significant, with minority groups typically
having a disadvantage on becoming the core for similar assortative attachment
levels among groups. We also find that growing networks are less prone to
develop core-periphery than dynamically evolving networks, and that these two
network evolution mechanisms lead to different types of core-periphery
structures. Analyzing five empirical networks, our findings suggest that core
nodes are highly assortative, illustrating the potential of our model as a
tool for designing and analyzing interventions on evolving networks.

## Introduction

Core-periphery is a ubiquitous property of group-level relationships in
networks of social, biological, and infrastructural phenomena (?, ?, ?, ?). It
involves a notion of meso-scale dominance, where a group of core nodes
captures a disproportionate number of connections, whereas the remaining
periphery nodes are largely connected to the core and sparsely among
themselves. Classical examples of core-periphery structure involve economic
and geopolitical networks between countries where a core group dominates trade
(?, ?, ?), economic relationships (?, ?) or soft power (?, ?), but also
encompass networks involving stakeholders or influential individuals (?), such
as the so-called Old Boys’ Club (?). Besides such classical examples, core-
periphery structures have been observed in a broad array of empirical
phenomena and domains of knowledge, including transportation networks where
most routes pass through urban hubs (?), social media networks that become
centralized depending on the type of information shared (?), and protein
interaction networks where structural centrality is related to relevant
biological functions (?). Certain types of core-peripheries, such as onion
networks, are some of the most resilient structures to random attacks (?, ?).

Core-peripheries were first introduced in social network analysis by Borgatti
and Everett (?). Despite the intuitive notion of group dominance, precise
definition and measurements of core-periphery have been the subject of debate
(?, ?). Borgatti and Everett defined “ideal” group dominance as a fully-
connected core, a spectrum of inter-group mixing, and a periphery disconnected
from itself, and measured core-periphery as the correlation between the
empirical adjacency matrix and an ideal matrix of the same size. Many authors
have since then proposed various definitions of core-periphery with different
underlying assumptions or for specific domains (?, ?, ?, ?). Some of the most
common formulations focus on group densities (?, ?, ?), but also include
$k$-cores (?), notions of centrality (?), and network capacity (?). More
recently, Gallagher et al. (?) have proposed a typology of core-periphery with
two main classes based on group densities: hub-and-spoke networks as a
generalization of Borgatti and Everett’s “ideal” structures, and layered
networks, where the periphery is as likely to connect to itself as to the
core.

Despite the number of analytical frameworks and empirical core-periphery
networks reported in the literature, their emergence has mostly been explored
in specific contexts (?), such as optimization of flows (?, ?), pruning of
weighted links in transportation (?), and banking systems (?). Some studies
also focus on engineering or modifying existing networks into classes of core-
periphery networks (?, ?, ?). Recently, Kojaku and Masuda have shown that
core-periphery can be solely explained by heterogeneous degree distributions,
particularly when nodes have not been partitioned into groups a priori (?).
Heterogeneous degree distributions, in turn, emerge naturally from network
evolution processes involving preferential attachment (?). This mechanism is
arguably behind many evolving phenomena in nature and society, and while it
has been extensively modelled as an explicit driver (where, say, a node is
selected with probability proportional to its degree), it also appears
implicitly as the consequence of other dynamic processes such as link or
vertex copying and triadic closure (?). Preferential attachment, however,
cannot solely explain why certain groups of nodes become the core and others
the periphery, especially when the core and periphery groups are characterized
by relevant node attributes (?).

To understand how core-periphery structure may arise on networks with a pre-
determined notion of groups, we need to include an additional network
mechanism based on node attributes. Nodes commonly display a preference for
forming links with nodes similar (or dissimilar) to themselves (?, ?). This
mechanism is known as homophily in social networks, or assortative mixing in
general (?). In sociology, homophily is used as an explanatory mechanism for a
wide array of social identities, including groups partitions based on, e.g.,
gender, socioeconomic status, or political affiliation. Homophily has also
been linked to emergent network phenomena like community structure (?, ?),
biased perceptions, and biases in the rankings of minority groups (?, ?).
Assortative attachment is, however, not constrained to sociological contexts
and appears in many other networked systems such as biological food networks
(?), phylogenetic networks (?), and functional brain networks (?). We clarify
that we use the term assortative mixing (or attachment) as an evolutionary
mechanism for group mixing, with nodes creating links based on the attributes
or labels that determine such groups.

We show how the combination of preferential and assortative attachment leads
to networks with a strong alignment between the predetermined groups and a
core-periphery structure. Our results show that even small amounts of
assortative mixing can break the symmetry of preferential attachment –which
favours high-degree nodes irrespective of their group– and lead instead to
prominent group-aligned core-periphery structures. These results can be
explained by the interaction of these two mechanisms resulting in a cumulative
advantage-like cycle: preferential attachment limits possible new connections
to high-degree nodes, and at the same time, assortativity becomes more
effective within the group that becomes the core, even if the other group is
also assortative. In cases where both groups are assortative enough, this
cumulative process leads to a bifurcation where either of the two groups can
end up being the core.

We use a combination of modelling and empirical data analysis to show the
implications of the interplay between preferential and assortative attachment
mechanisms on networks. Using a systematic mean-field analysis, we find the
amounts of assortative and preferential attachment that lead to core-periphery
structures in network models. Our results indicate that the two archetypes of
core-periphery structures, hub-and-spoke and layered (?), are typical outcomes
of both rewiring and growing network models. We also examine how relative
group sizes may have a large impact on the emergence of core-periphery
structures, including which group becomes the dominant one. Finally, by
fitting the appropriate types of network models to real-world networks, we
compute the size of the effects of interplay between the two mechanisms, and
discuss the implications of interventions that could reduce the emergence of
core-periphery structures by changing the strengths of preferential attachment
in the system.

## Results

### Characterizing core-periphery structure

Given the various approaches to characterizing core-peripheries in the
literature, we choose two metrics that capture different aspects of network
structure, both requiring a prior definition of which group is a potential
core. For a core $g=a,b$ where $a,b$ are the two groups in the network, we
introduce $\Omega_{g}$ as a measure of the difference between densities of
core and periphery, which leads to the classification of hub-and-spoke and
layered networks as in (?). We focus on the group with the largest density,
which we refer to as density-dominant. For example, group $a$ is density-
dominant if $\rho_{a}>\max\\{\rho_{ab},\rho_{b}\\}$, with $\rho_{g}$ the
fraction of links in group $g$ and $\rho_{ab}$ the fraction of inter-group
links. Then $\Omega_{a}$ takes the form

$\Omega_{a}=\frac{\rho_{ab}-\rho_{b}}{\rho_{ab}+\rho_{b}}\,,$

which is $1$ for the ideal hub-and-spoke structure, $0$ for an layered
network, and $-1$ for two disjoint groups (Fig. 1 left). As a second measure
of core-periphery, we also consider Borgatti and Everett’s notion of how
“ideal” the core is by introducing the quantity $r_{a}$, a continuous analogue
of the correlation between discrete adjacency matrices (?). This measure
places particular focus on links within and from the core by comparing the
observed core to a fully-connected ideal matrix. The periphery group affects
$r_{a}$ only indirectly via its relative size and its role in the overall
network density (we include the analytical form in Materials and Methods [MM],
and the derivation and limitations in the Supplementary Information [SI]).

### Network evolution models

We develop two models, one for growing and another one for rewiring networks,
that combine preferential and assortative attachment and unequal group sizes.
The use of both growing and rewiring models allows us to examine core-
periphery structures in a wide variety of systems, as many real-world evolving
networks fall into one of these two categories (?). Our models are inspired by
well-known social network mechanisms: a rewiring model mixing homophily and
implicit preferential attachment (?), and a growing model mixing homophily and
explicit preferential attachment (?) (Fig. 1 right). Both models share central
iteration steps in which a focal node finds a candidate node to connect to. In
these central steps, a parameter $c$ controls the balance between two
candidate selection methods, preferential attachment and random choice. Once a
candidate node is selected, the assortativity parameter $s_{ab}$ controls the
probability that a focal node from group $a$ connects to a candidate from
group $b$. The two models differ in their initial and final steps. For the
growing model, the focal node is not connected to the initial network and
finds $m$ candidates to connect. In the rewiring model, the focal node is
randomly selected, and if a link is created, then a connection to a random
neighbor is deleted from the focal node. Instead of a matrix of independent
assortativity parameters, we only use two free parameters ($s_{aa}=s_{a}$ and
$s_{bb}=s_{b}$), which also determine the complementary probabilities of
choosing a candidate node from the other group ($s_{ab}=1-s_{a}$ and
$s_{ba}=1-s_{b}$). This approach reflects the actual acceptance rate for the
focal node’s group, so that group $a$ is assortative if $s_{a}>0.5$ and
disassortative otherwise (for details on rates see MM).

Figure 1: Core-periphery typology and network evolution models. (Left) Block-
model typology of group relations detected by our core-periphery measure
$\Omega_{a}$, with $a$ as core and group densities $\rho_{a},\rho_{b}$, and
$\rho_{ab}$. We characterize networks on a spectrum that ranges from hub-and-
spoke ($\Omega_{a}>0$) and layered networks ($\Omega_{a}=0$), both of which
are core-periphery relations, to disjoint groups ($\Omega_{a}<0$). (Right)
Main iteration steps of growing and rewiring models used in this work, for two
groups (circles and squares). Step I: Focal node. In the growing model, a
focal node (shaded) arrives in the network, with the node assigned to group
$a$ with probability $n_{a}$. This focal node finds $m$ candidates from the
existing network. In the rewiring model, a focal node is selected randomly
from the network. Step II: Candidate selection. For both models, with
probability $c$ a candidate is selected via preferential attachment, i.e. with
probability proportional to degree. With probability $1-c$, a candidate is
selected uniformly at random. Step III: Link creation. If the focal and
candidate nodes belong to the same group (e.g., $a$), a link is created with
the group’s choice homophily probability ($s_{a}$); otherwise a link is
created with probability $1-s_{a}$. Step IV: Iteration. In the growing model,
steps II-III are repeated for $m$ candidates, with the focal node possibly
rejecting some candidates. In the rewiring model, if the candidate node is
accepted, a link is created between the focal node and the candidate. At the
same time, the link with a random neighbor of the focal node is removed.

### Homophily and preferential attachment lead to core-periphery

We begin by a systematic analysis of our models, with a focus on examining the
fixed points that describe the final state of the network after the mechanisms
have had sufficient time to operate. Our results are obtained through the use
of both mean-field equations (MFEs), which yields analytic solutions, and
numerical simulations, which confirm our findings (further details in MM).

Our main results can be summarized in three key points. First, core-periphery
is an emergent structure of both growing and rewiring models. Second, these
models yield qualitatively different core-periphery structures: the growing
model is more likely to produce a diffuse core (low but positive $r_{g}$) and
a layered network ($\Omega_{g}\approx 0$). The rewiring model leads to more
acute structural changes, since it is more likely to produce a sharp hub-and-
spoke network with a clear core (large $r_{g}$ and $\Omega_{g}>0$). Last,
despite the qualitative differences between models, both can produce a wide
spectrum of core-peripheries across the parameter space, and capture other
configurations like disjoint communities and fully mixed groups.

Figure 2: Homophily and preferential attachment lead to core-periphery. Core-
periphery emergence in terms of differences in core-quality ($r_{a}-r_{b}$) in
the rewiring model as a function of assortativity ($s=s_{a}=s_{b}$) and
preferential attachment $c$, with equal group sizes $n_{a}=0.5$ and fitted
simulation values (crosses). Large homophily and preferential attachment lead
to a bifurcation where either group can become a core. The measure
$r_{a}-r_{b}$ helps visualize this bifurcation, since it is positive
(negative) when $a$ ($b$) is a core. The dotted line represents unstable and
stable solutions for different $c$ values: if $c$ has bifurcated for given
$s$, the dotted line is an unstable solution; otherwise the solution is
stable. Insets: visual representations of networks with $N=200$ nodes and
$L=1000$ links at four different stable points.

Core-periphery emerges from the interplay of assortative and preferential
attachment (see fixed points of our rewiring model in Fig. 2). In a stylized
scenario with a single assortative attachment parameter and equal group sizes,
any amount of assortativity ($s>0.5$) will create strong core-peripheries in
the presence of full preferential attachment ($c=1$). When some preferential
attachment is replaced with uniformly random selection ($c<1$), core-
peripheries still emerge, but a larger amount of assortative attachment $s$ is
required to reach the transition point. Note that in this scenario both groups
can become cores, since the MFEs have two stable fixed points corresponding to
the case where each group is the core ($r_{a}-r_{b}$ either positive or
negative). This happens because no group has clear assortative or size
dominance, resulting in two symmetric fixed points dependent on initial
conditions or small stochastic fluctuations. In the rewiring model, such
dependence occurs when both groups are assortative, including when one group
is smaller than the other (for dependence on initial conditions see SI). The
lack of core-periphery ($r_{a}-r_{b}=0$) can imply vastly different network
configurations: if both groups are disassortative the resulting network is
mostly mixed, but in an assortative scenario the network will consist of
mostly disjoint groups.

Figure 3: Fixed-point phase space analysis. Two measures of core-periphery for
(left) growing and (right) rewiring models. Bold grey lines enclose areas
where a group $g$ is density dominant (e.g., for $A+$ we have
$\rho_{a}>\max\\{\rho_{ab},\rho_{b}\\}$). Colors depict $r_{g}$ and dotted
lines contours of $\Omega_{g}$, with emphasis on $\Omega_{g}=0$ (a full onion
network). In the rewiring model, bold dotted red lines enclose areas with
three fixed points, where both groups can become a core ($A+$, $B+$), and an
additional fixed point is unstable ($U$). Strict hub-and-spoke core periphery
occurs when $\Omega_{g}>0$. (Top) Models with fixed high preferential
attachment ($c=0.95$) and equal group sizes ($n_{a}=0.5$), varying homophily.
(Bottom) Fixed associativity ($s_{a}=s_{b}=0.75$) varying preferential
attachment and minority size.

We explore the phase space of parameters in both models (Fig. 3). The growing
model has single fixed points over the whole phase space, implying density-
dominant areas (regions where the density of one group is larger than other
local densities). When a group is density-dominant, the growing model produces
diffuse cores (low $r_{g}$). For fixed assortativity, higher values of
preferential attachment largely result in layered networks ($\Omega_{g}\approx
0$). In contrast, the rewiring model generates cores with a higher correlation
to the ideal hub-and-spoke structure (large $r_{g}$), as well as increasingly
less dense peripheries ($\Omega_{g}$ grows along with $c$).

When comparing both models over the same phase space, rewiring has a symmetry-
breaking effect on the baseline growth model. This occurs when varying
homophily, as both the quality of core-periphery (in terms of $\Omega_{g}$ and
$r_{g}$) and their range in phase space are expanded. When both groups are
homophilous in the rewiring dynamics, either can become the core. The
symmetry-breaking effect also occurs when both groups are equally homophilous
(lower panel in Fig. 3). Whereas for the growing model the density-dominant
group is usually the larger group, in the rewiring model increasing
preferential attachment results in either group becoming a core. Although our
models show that larger groups can more easily become a core when
assortativity parameters are equal, preferential attachment can boost an
assortative minority group to become a core (see additional regions of the
phase space in SI). These differences between growing and rewiring models are
likely explained by link rigidity in the growing model, where a given link
remains static once it has been added to the network (conversely, links in the
rewiring dynamics are constantly shuffled).

Note that the assortative attachment parameters alone can explain core-
periphery relations in both growing and rewiring scenarios (see SI), e.g.,
when one group is assortative and the other disassortative. However,
preferential attachment changes these baseline relations and induces sharper
core-periphery configurations, particularly in terms of $\Omega_{g}$.

### Core-periphery in real-world networks

We showcase an empirical association between preferential attachment,
assortativity and core-periphery, and also illustrate the potential of our
models in predictive settings by fitting five network datasets using maximum
likelihood (ML) estimates. We select datasets with the criteria that they are
temporal in nature and have at least two predetermined groups of nodes. These
datasets cover different fields and span large observation periods, including
Twitter discussions about climate politics collected in Finland for 11 months,
with the core group composed of political actors; the evolution of gendered
dynamics in boards of directors over 9 years (Boards); two citation networks
with groups determined both by geography (Cit-geo) and sub-fields within
physics (APS); and airport use networks in the United States (Airport). When
discussing social networks, we refer to assortative attachment as choice
homophily (?). For each dataset, we fit the model that is more likely to
capture the evolution mechanisms, so that our two citation datasets are
growing networks, while Twitter, Boards and Airport are rewiring (even if
these datasets also include node growth, we focus on link rewiring as the more
prominent mechanism). All datasets allow for the construction of various
networks based on metadata or different temporal and geographical
aggregations. We systematically filter for networks that (i) display some
degree of core-periphery and (ii) show evidence of preferential attachment
(see MM for details on each dataset).

Our data analysis confirms several key results regarding core-periphery in
networks. Fig. 4 depicts both the empirical association and theoretical
predictions of our models, where each group’s density is related to their
estimated assortativity. We find that the predefined groups in the data have
an aligned core-periphery structure. In such alignments, the core groups are
more assortative than peripheries ($s_{a}>s_{b}$). We corroborate that the
evolution mechanisms follow their more common typologies, i.e. rewiring
networks are hub-and-spoke, whereas growing networks fall between layered and
slightly disjoint structures. This likely occurs due to the effect of
preferential attachment, which largely increases inter-group links for the
growing model, and intra-core links for the rewiring models.

Figure 4: Empirical association between group densities in core-peripheries
and effect of preferential attachment. Core nodes ($g=a$) tend to be highly
assortative, while growing (G1) and rewiring (R1) models follow the typologies
of layered and hub-and-spoke structures based on the order of group densities,
with an average $\Omega_{g}=.224$ for rewiring networks and $\Omega_{g}=-0.04$
for growing networks (top). This is likely explained by the effect of
preferential attachment that increases inter-group mixing in the growing model
(G2) and core-mixing in the rewiring model (R2; bottom). Each line represents
an evolving network, the color is the estimated $c$, and the x-axis depicts
estimated homophily values ($s_{a}$ by triangles, $s_{b}$ by dots). For the
visualization of inter-group density $\hat{\rho}_{s_{a-b}}$, we define
$s_{a-b}=\frac{s_{a}+s_{b}}{2}$. (Top) In the y-axis, we normalize group
densities to render datasets visually comparable as empirical densities vary
widely. The normalization $\hat{\rho}_{a}=\frac{\rho_{a}}{\sum_{g}\rho_{g}}$
then affects the range but not the order of group densities. (Bottom) Effect
of preferential attachment when comparing with a homophilous-mixing baseline.
$P^{*}-P^{*}_{c=0}$ depicts the difference in fixed points between the
estimated full model ($c,s_{a},s_{b},n_{a}$) and the model for $c=0$, where
positive (negative) values imply a loss (gain) of links on the entries of the
$P$-matrix of link distributions. For the Airport and Twitter datasets,
estimated parameters cluster together.

Our model predicts that the preferential attachment mechanism strongly
amplifies core-periphery structures that would otherwise be weak if solely
explained by different assortative preferences within core and periphery
nodes. In order to quantify this, we examine the effect of preferential
attachment via the the group mixing matrix $P$, defined as the fraction of
links that fall within/between groups
$P_{ab}=\frac{L_{ab}}{L_{aa}+L_{ab}+L_{bb}}$. We compare $P^{*}$ and
$P^{*}_{c=0}$, i.e. the MFE fixed points using the estimated parameters
$P^{*}$ against the fixed points with no preferential attachment ($c=0$). We
find that in the growing model preferential attachment increases the number of
inter-group links at the expense of the periphery when the periphery is
disassortative, while slightly increasing the number of within-periphery links
when it is assortative. Notably, for the rewiring model preferential
attachment vastly increases the fraction of links within the core at the
expense of links within the periphery.

The Twitter dataset of discussions of climate policy is an interesting example
of a network with a homophilous core and a heterophilous periphery. The
majority group –composed of non-politician Twitter users– displays
heterophilous behaviour. This could be related to the fact that the minority
group (politicians), are clear stakeholders in public policy which implies a
form of influence. Indeed, such public positions might already be a form of
preferential attachment in the sense that people retweet politicians because
of their importance outside of Twitter. From our model’s perspective, this is
captured as a heterophilous choice to retweet; and indeed such heterophilous-
homophilous pairing could already explain some forms of core-periphery.
However, modeling preferential attachment in terms of node degrees allows us
to see a distinct effect: retweeting popular people means that even more
people are exposed to them in a way that cumulatively amplifies their
messages. In the end, our models strongly suggest that these compound effects
yield structural group dominance in the overall network where the peripheral
nodes are more likely to be connected to politicians than to non-politicians,
while politicians form a tight net. This result is in line with (?), which
reports that discourse networks on Twitter shift to core-peripheries when
sharing specialized information from government agents (which form the core),
but become decentralized in generic discussions. We highlight that this
analysis does not account for a polarized discourse. However, one could
hypothesize that different political parties have central roles within their
own political spheres.

Our empirical analysis is constrained by some limitations that hinder our
capacity to predict mixing patterns $P$ for some datasets. Real-world data
might deviate from some of our models’ assumptions. For example, nodes might
not be uniformly active in link creation but display more heterogeneous
behaviour. Nodes might also follow additional mixing patterns, e.g., other
assortativity groupings based on political positions on Twitter. In the case
of the rewiring model, link deletion might not necessarily follow from link
creation. Despite these shortcomings, our model can provide further insights
in datasets where these constraints are not as strong. In the following
section we examine an application where parameters are not static, and how
parameter changes affect mixing patterns and core-periphery.

### An application: Effect of interventions on levels of core-periphery in
social networks

Core-periphery is closely related to the concept of Old Boys’ Club in social
sciences, in which wealthy people with similar social and educational
background help each other in business and restrict opportunities for
outsiders (?). In social networks, people in the core are more likely to be
connected to well-connected people, therefore they enjoy advantages that come
with social capital such as access to novel ideas, job opportunities and
referral (?). Here, we examine the use of our model in the Boards network (?),
which includes monthly data on boards of directors in Norway between 2002 and
2011. The groups are determined by two genders and a link reflects that two
people belong to the same board. We contextualize three dates that reflect
significant behavioural changes affecting our parameters: in 2004 women made
up less than 12% of the boards, triggering talks between the Norwegian
government and companies to address such gender disparity. Since this issue
was not addressed, in 2006 the government established a two-year period for
reaching at least 40% representation of each gender. On average, boards
complied and this was the case after 2008 (?).

We examine the effect of policy interventions, namely to increase the minority
size (fraction of women) per board, on the dynamics of core-periphery in the
network. To do so, we analyze the Boards dataset using the rewiring model
(Fig. 5). Although there is only one direct policy, such an increase of the
minority size per board entails several indirect effects in homophily and
preferential attachment. We find that in the beginning women are much more
homophilious than men (Fig. 5A, $s_{a}>s_{b}$), whereas at the end of the
observation period, both genders largely converge in near-random mixing values
($s_{a},s_{b}$ around 0.44). This is largely in line with the policy, as it
encourages mixing by increasing the fraction of women per board, not at a
global scale. However, we also find that the preferential attachment value $c$
largely increases over time. At the same time, women still make up less than
40% of all nodes (despite being, on average, at least 40% of members in each
board). This is on par with findings from (?), who observed that some women
directors became “prominent directors” in the field, participating in several
boards. Similar observations regarding positive homophilous tendencies among
women has been also shown in the case of Japanese board networks (?).

Figure 5: Analysis of the Boards dataset, including the effect of government
policy at different times, and simulated policies affecting preferential
attachment. In this data, women are the minority group $a$ (red), and men the
majority group $b$ (blue). (A) Evolution of our four fitted model parameters
following five stages of an affirmative action government policy. (B) We
sequentially display the evolution of the group mixing $P$ matrix at each time
range (five panels with dates), and include the effect of changing
preferential attachment values. Y-axes represent within-group mixing $P_{aa}$
and $P_{bb}$, and x-axes the full spectrum of possible preferential attachment
values ($c$). Fixed points of the group mixing matrix $P^{*}$ are depicted as
solid lines, and shaded areas represent regions where the fixed points are in
core-periphery with $a$ as the core. We show the actual network evolution
during the observation period (large dots are initial values $P^{0}$, crosses
the final values $P^{n}$, and $c^{0}$ the estimated value in the data), and
compare it to “simulated policies” (arrows) of increasing or decreasing $c$
given the initial conditions of the time range. Both simulated policies and
empirical evolution tend towards the fixed points, with the empirical
observations largely matching predicted trajectories.

We also take the five temporal snapshots of the Boards networks and show how
the data evolves (Fig. 5B). The trajectories predicted by our model capture
the changes in the data; by the last time interval, the behaviour seems to be
near stationary. In the first two periods men capture between 80-60% of
connections, with a decreasing trend. In latter periods, dynamics show that
$c$ has increased to $0.70$ and homophilies are near random mixing. At this
stage the effect of $c$ on group mixing $P$ is small, likely changing the
distribution of links within groups, not between them. Our model demonstrates
that interventions that modify homophily and preferential attachment have a
profound impact on the fixed points, leading to more favorable outcomes for
women. Although the network structure is gradually approaching these fixed
points, our model predicts that the transition to fully realize the potential
of these new circumstances may be impeded by substantial structural inertia.

Our model allows us to examine the level of group mixing $P$ if there had been
an alternative policy that would affect a different parameter, such as
preferential attachment (we include full interventions in SI). This could
happen, e.g., by restricting the number of boards that a single person can
belong to, or by encouraging multiple board memberships. We track the
evolution of the initial $P$-matrix from new $c$ values (red and blue arrows
in Fig. 5). According to our model, increasing preferential attachment could
result in women becoming a core at the fixed point if such a policy did not
affect other parameters. In most cases, reducing $c$ would be disadvantageous
to women as a group, as they would likely share an even smaller fraction of
connections. This investigation can pinpoint scenarios in which boys’ clubs
(or elites in general) emerge in social networks and examine ways to mitigate
their effect. In the case of the Boards network, the indirect increase of
preferential attachment leads to some female directors becoming prominent,
with an emergent “elite” not only determined by gender, but by participation
on several boards (?).

## Discussion

Our findings show that core-periphery is an emergent effect of the interaction
between two common network evolution patterns, assortative and preferential
attachment. We explore two minimal network evolution models that incorporate
varying group sizes, preferential and assortative attachment, and basic
mechanisms of real-world evolving networks: a growing model where nodes are
added, and a rewiring model where links are redistributed. Our models
disentangle assortative and preferential attachment by creating connections
with a two-step mechanism. First, a focal node finds a candidate to connect
to, selected with varying degrees of preferential attachment. Then, the focal
node accepts or rejects the candidate via assortativity or choice homophily.
Preferential attachment exposes focal nodes to “popular”, high-degree
candidates irrespective of their group partitions, while assortativity
determines whether the two nodes will actually connect.

These two mechanisms interact in a way that leads to core-periphery, even in
the presence of two assortative groups (which would otherwise be largely
disjoint communities). Once one of the groups starts gaining dominance in
number of links, the focal node is mostly exposed to the dominant core, so
links within that group are favoured by both mechanisms, making the periphery
group lose even more connections relative to the core. This iterative process
promotes cumulative effects that lead to a specific group gaining a dominant
position in the network. This scenario can be triggered by several factors
including the initial network configuration, one group being more assortative
than the other, relative group sizes, or even random perturbations.

We have found that group dominance differs qualitatively for growing and
rewiring network dynamics. The growing model develops structures more akin to
layered networks with high inter-group connectivity and diffuse cores, while
the rewiring model produces cores connected mainly to themselves, and highly-
disconnected peripheries. We largely attribute these differences to edge
deletion when rewiring. Indeed, both models have the same mechanism for link
creation, and differ when a neighbor detaches from the focal node. Over longer
time scales, this means that links can effectively get “transferred” from one
group to another. Although real-world link formation and deletion might
involve more elaborate mechanisms, the joint analysis of minimal growing and
rewiring models sheds light on the various ways in which the interaction of
assortative and preferential attachment leads to groups of nodes gaining
dominant positions.

In empirical networks that display core-periphery, our model fitting shows
that core nodes tend to be highly assortative, with the more distinct core-
peripheries having a larger amount of preferential attachment. We have found
evidence that some empirical core-periphery networks may be driven by an
assortative core and a disassortative periphery, highlighting the importance
of asymmetric group mixing. We have also observed that empirical data largely
follows the core-periphery typology displayed by our theoretical models: hub-
and-spoke networks with sharp cores for the rewiring dynamics, and layered
networks for growing dynamics. Still, real-world networks probably display
more diverse behaviours than our models suggest and are likely to be in
different evolution stages. For instance, it is possible that networked
systems may not evolve purely through growing or rewiring mechanisms, and that
more intricate versions of the link deletion mechanism exist beyond those
included in our model. Thus, we mostly avoided linking evolution mechanisms to
mean-field predictions (we do so only for the Boards dataset, where rewiring
conditions resemble those of our models). Instead, we have compared the effect
of removing preferential attachment on all networks. We find that preferential
attachment amplifies existing disparities in homophily, increasing the share
of links within the core for the rewiring model, and inter-group links for the
growing model.

An example of how our model can potentially be used for real-world
applications comes out of the analysis of the Boards dataset, a historical
scenario with a clear policy intervention that directly affected minority
group sizes, and the unforeseen effect of increasing preferential attachment.
While the two gender groups became more likely to connect to each other
(minimizing homophily disparities), the female group remained a nominal
minority at a global level, with some of its members gaining dominant
positions. Our model serves as an analysis tool for designing and
understanding alternative interventions. Policies that decrease preferential
attachment (by, e.g., limiting the number of boards a person can belong to
within a time period) would have largely decreased the fraction of links
within the minority, whereas increasing preferential attachment might have
increased the fraction of minority links, assuming homophily and gender ratios
remained constant.

Our findings demonstrate that the combined effects of preferential and
assortative attachment can provide a compelling explanation for the emergence
of core-periphery structures in networks. Furthermore, our models reveal that
the different core-periphery typologies outlined in the literature (?) can
arise organically as a result of network evolution governed by these simple
mechanisms. By understanding core-periphery structures as natural outcomes of
network evolution, we can begin to extract valuable insights about how these
networks were formed and developed.

## Materials and Methods

### Measuring core-periphery structure

We use two different measures that capture different aspects of core-
peripheriness, with (i) $\Omega_{g}$ distinguishing between hub-and-spoke,
layered and disjoint groups; and (ii) $r_{g}$ measuring the correlation
between the observed and a fully-connected core. All of our theoretical and
empirical experiments are based on the group mixing matrix $P$, defined as
$P_{ab}=\frac{L_{ab}}{L}$, where $L_{ab}$ is the number of undirected links
between groups $a$ and $b$, and $L$ the total number of links. Both measures
of core-peripheriness can be written in terms of $P$, the total density
$\rho=\frac{2L}{N(N-1)}$ for $N$ nodes, and the minority group size $n_{a}$.
For (i), it suffices to see that (derivation on SI)

$\rho_{a}\approx P_{aa}\frac{\rho}{n_{a}^{2}}$

For (ii), instead of Borgatti and Everett’s discrete adjacency matrix (?), we
use a continuous form. Considering $n_{a},n_{b}$ as the number of nodes in
each group, and $0<\alpha\leq 1$ a continuous parameter that regulates the
inter-group link distribution, we have (derivation on SI)

$r_{a}(\alpha)=\frac{(P_{aa}+\alpha P_{ab})\rho-(n_{a}^{2}+2\alpha
n_{a}(1-n_{a}))\rho}{\sqrt{\rho(1-\rho)}\sqrt{(n_{a}^{2}+2\alpha
n_{a}(1-n_{a}))(1-n_{a}^{2}-2\alpha n_{a}(1-n_{a}))}}$

We find $r_{g}$ by maximizing over all possible $\alpha$ values, so that
$r_{g}=\max_{\alpha}{r_{g}(\alpha)}$. Notably both discrete and continuous
$r_{g}$ measures are dependent on overall network density, which implies that
comparing $r_{g}$ values is only possible for networks of the same density. We
use $\rho=0.1$ in all theoretical experiments rendering them comparable. We
discuss additional limitations of $r_{g}$ in the SI.

### Network evolution models

In our models we set $s_{aa}=s_{a}$ and $s_{ab}=1-s_{a}$, which we refer to as
the actual acceptance rate. For our analysis, this means that out of four
possible parameters $(s_{aa},s_{ab},s_{bb},s_{ba})$, the model can be reduced
to two free parameters $\hat{s}_{a}$ and $\hat{s}_{b}$ that capture the rate
at which focal nodes accept candidates from its own group. To see this, we
show that given $s_{aa},s_{ab}$ there exists a reparametrization constant $k$
that defines new variables $\hat{s}_{aa}=ks_{aa}$ and $\hat{s}_{ab}=ks_{ab}$,
such that $\hat{s}_{ab}=1-\hat{s}_{aa}$. It is easy to see that setting
$k=\frac{1}{s_{aa}+s_{ab}}$ meets that requirement, and so
$\hat{s}_{a}=\hat{s}_{aa}$ is our free parameter for group $a$. To see that
this reparametrization is valid, it suffices to note that
$0\leq\hat{s}_{a}\leq 1$. Such a reparametrization impacts the evolution rate
of the model, but not the its fixed points. We can see this as $k$ has a
multiplicative effect over the mean-field equations, which becomes negligible
at the fixed points.

### Mean-field analysis

We model the evolution of group interactions in both of our network models
using a combination of mean-field approximations (MFE) and simulations. The
former captures the group-level dynamics of our network models by representing
the intra- and inter-group link distributions in a continuous fashion, whereas
the latter serves as a validation for the MFEs. In our mean-field methodology,
we first find the fixed points of the group mixing and then characterize their
core-peripheriness through the parameter space. We compare these results with
simulated networks of 5,000 nodes for 100,000 time steps from three different
initial conditions.

We track the evolution of MFEs for the group mixing matrix $P$. Since the
elements of $P$ satisfy the linear constraint $P_{aa}+P_{ab}+P_{bb}=1$, it
suffices to characterize the evolution of the intra-link distributions
$\frac{\partial P_{aa}}{\delta t}$ and $\frac{\partial P_{bb}}{\delta t}$ for
each of our models. Both growing and rewiring models share a candidate-
selection process, which constitutes the main building block of our
algorithms. This is mirrored in the MFEs by constructing an $M$-matrix, where
$M_{ab}$ is the probability of creating a link between groups $a$ and $b$:
with probability $c$ we find a candidate node from $b$ via preferential
attachment, and with probability $1-c$ we find it via random choice; this
candidate with then accepted with probability $s_{ab}$,

$M_{ab}=\left[c\left(\frac{1}{2}P_{ab}+P_{bb}\right)+(1-c)n_{b}\right]s_{ab}\,$
(1)

which is derived from a formulation in terms of total degrees $K_{a}$
($K_{b}$), or sum of degrees of all nodes in group $a$ ($b$), see SI. The MFEs
for each model are a function of the network parameters and probabilities $M$.
Unlike the group mixing matrix $P$, $M$ is not symmetric, since the
probability of creating a link from $a$ to $b$ focuses solely on selecting
nodes from $b$.

Starting with the rewiring model, we track the change of $\frac{\partial
P_{aa}}{\delta t}$ as the difference between added links ($P_{aa}^{+}$) and
the deleted links ($P_{aa}^{-}$), so that $\frac{\delta P_{aa}}{\delta
t}=P_{aa}^{+}-P_{aa}^{-}$. We use $T_{ab}$ to characterize the probability
that, starting from $a$, we follow a link and end up in $b$. In terms of the
P-matrix, $T_{aa}=\frac{2*P_{aa}}{2*P_{aa}+P_{ab}}$. Using this notation, we
have that the added links depend on the probability of selecting $a$ and then
creating a link to $a$, $P_{aa}^{+}=n_{a}*M_{aa}$. Then, $P_{aa}$ will
decrease under the scenario that first, (i) a link is created starting form
$a$ to any group ($M_{aa}+M_{ab}$) and then (ii) a random neighbor is deleted
that also belongs to $a$ (which happens with probability $T_{aa}$). Therefore,
$P_{aa}^{-}=n_{a}*T_{aa}(M_{aa}+M_{ab})$.

By definition, the growing model only adds links, and thus $P_{aa}$ only
decreases when new links are connected to group $b$, and not as a function of
itself. For this reason we write the growing MFEs in terms of the number of
edges $L$, noting that

$\frac{\partial P_{aa}}{\delta t}=\frac{\partial}{\delta
t}\left(\frac{L_{aa}}{L}\right)=\frac{1}{L}\left(\frac{\partial L_{aa}}{\delta
t}-\frac{\partial L}{\delta t}P_{aa}\right)$ (2)

We model $\frac{\partial L_{aa}}{\delta t}=mn_{a}M_{aa}$ for $m$ the number of
candidate neighbors for each new arrival, while $\frac{\partial L}{\delta
t}=\sum_{ij}\frac{\partial L_{ij}}{\delta t}$. Although equation 2 depends on
the total number of links $L$, it is possible to eliminate such dependency to
find fixed-points for the P-matrix. A step-by-step methodology is available on
the SI.

### Empirical data analysis

We analyze two growing and three rewiring datasets. From each case, multiple
possible networks can be built. A description of the datasets can be found on
the Data section, which includes details of the variables used and the
aggregation periods considered for each dataset. We systematically chose
networks that display evidence of (i) core-peripheriness and of (ii)
preferential attachment.

For (i), we construct networks for each dataset. We do not use Borgatti and
Everett’s correlation $r$ since it depends on the overall network density,
making comparisons between networks difficult. Instead, we use a two-step
approach based on group densities at their final stage. First, we identify
whether a group $g$ is density-dominant in the sense that
$\rho_{g}>\max\\{\rho_{gp},\rho_{p}\\}$. Second, we characterize the
relationship to the periphery group $p$ using $\Omega_{g}$. For the growing
network we chose networks where $\Omega_{g}>-0.1$, whereas for the rewiring
scenario the criteria is $\Omega_{g}>0.1$. The different cutoff values
correspond to differences in the networks, since the growing models tend to
concentrate more inter-group values in the datasets.

For (ii), given the maximum-likelihood method described in the following
section, we test for evidence that the model with preferential attachment
improves the description of the data than the model that only includes the
homophily estimates. To do so, we perform a likelihood ratio test for $c$,
retaining networks that strongly reject $c=0$.

#### Maximum likelihood estimation

We use a temporal ML approach to fit both of our models to real-world data. We
use ML estimates for parameters $\theta=(s_{a},s_{b},c)$, and assume $n_{a}$
to be directly observed from the data. We focus on parameter inference,
meaning that the non-parameterized mechanistic components of our model are not
modelled. These components include the randomized selection of the focal node
– assumed to occur with probability $n_{a}$ –, and the link deletion step. In
practice, the focal node is determined by the data itself, and link deletion
occurs when a link’s lifespan is longer than the sliding window $\Delta_{t}$,
and not when a focal node creates a new connection. These deviations could
effect differences between observed and predicted group mixing matrices $P$;
however, we found this approach to be the least invasive solution for
disparities between our evolution model and the empirical data. We model the
temporal dynamics as a Markovian process, in the sense that the probability of
observing $G_{t}$, a network at time $t$, solely depends on the network at the
previous time step $P(G_{t}|G_{t-1},\theta,i_{t})$ – where $i_{t}$ is the
group of the focal node at time $t$, and is given by the data –. As such, for
T steps, our log-likelihood functions are of the form

$l(\theta)=\sum_{t=1}^{T}\log P(G_{t}|G_{t-1},\theta,i_{t})$

The step-wise likelihoods $P(G_{t}|G_{t-1},\theta,i_{t})$ are based on the
multinomial distribution, although they differ for the growing and rewiring
models. The multinomial distribution captures how $m$ independent trials are
divided between $\hat{k}$ categories. As an example, using the M-matrix
notation, a focal node from group $b$ might choose a rewiring candidate
($m=1$) from $\hat{k}=2$ categories $a$ or $b$ with probabilities $M_{ba}$ and
$M_{bb}$, respectively. Although a plausible likelihood function, this form is
mathematically degenerate for estimating $c$, and so we use a degree-based
approach: we model the probability $p_{k}^{ab}$ that a focal node from group
$a$ creates a link to a node of degree $k$ in group $b$. Considering that
$n^{b}_{k}$ is the number of nodes in group $b$ of degree $k$, and obviating
the notation for temporal data $t$, this probability is

$p^{ab}_{k}=\left(c\frac{n^{b}_{k}k}{\sum_{j}(n^{a}_{j}j+n^{b}_{j}j)}+(1-c)\frac{n^{b}_{k}}{\sum_{j}(n^{a}_{j}+n^{b}_{j})}\right)s_{ab}$

For $x_{k}^{ia}$ the observed number of links created from a focal node in
group $i=i_{t}$ to a node of degree $k$ in group $b$, and generalizing $m$
trials at each time-step, we have that the likelihoods at time $t$ for the
rewiring model are

$P(G_{t}|G_{t-1},\theta,i_{t})=\frac{m!}{\prod_{k}x^{ia}_{k}(t)!x^{ib}_{k}(t)!}\prod_{k}p^{ia}_{k}(t)^{x^{ia}_{k}(t)}p^{ib}_{k}(t)^{x^{ib}_{k}(t)}$
(3)

The likelihood function for the rewiring model is the previous expression when
$m=1$. The growing model, however, includes several candidate connections
$m\geq 1$ and an unobserved number of rejected candidates (denoted $x^{in}$
with probability $p^{in}$). We obtain the partial probability distribution by
integrating over the unobserved variable, thus yielding two different
expressions for the likelihood functions of our models. Details on these
functions are available on SI. The functions do not have easy analytic
solutions, and thus we use a numerical optimization approach with a BFGS
algorithm. We validate our procedure by reconstructing the parameters from
simulated data, details also available on SI.

#### Considered datasets

We use five temporal datasets from which we analyze several core-periphery
pairs. For the Airport, ASP and Cit-geo datasets, many two-group sub-networks
could be reconstructed, in those cases we systematically analyzed possible
sub-networks.

For the rewiring model we used a $\Delta t$ sliding window approach, where we
construct a network using data for $\Delta t$. As we advance in time, we
delete the links and nodes that are not within $\Delta t$ of the most recent
item. The datasets for the rewiring model are:

  1. 1.

Boards: boards of directors in Norway during 2002-2011, with monthly
aggregation where groups are women ($a$) and men ($b$), with the gender
determined either by analyzing the names or researching the individuals for
ambiguous cases (?). We use this dataset for a detailed analysis and use known
policy details to construct the networks, without filtering out by core-
peripheriness. We use $\Delta t=1$ year.

  2. 2.

Twitter: Twitter dataset from Finland, collected between February 2020 and
January 2021. The data collection included hashtags related to climate change
discussions. Group $a$ are politicians from all political parties as well as
political candidates from previous the previous election, while group $b$ are
all other actors in the network. We constructed several datasets with $\Delta
t=0.5,1,3,6$ months, with ”retweet” actions on the platform.

  3. 3.

Airport: Passenger use of airport network in the United States from the
Airline Origin and Destination Survey (DB1B) from the United States Department
of Transportation (?), with our dataset spanning the years 1993-1995. Nodes
represent airports and links are flights between them. For the groups, we used
nine regional divisions defined by the United States Census Bureau, we tested
all pairwise interactions. We constructed networks on 2 year-periods, with
$\Delta t=1$ year.

For the growing model we construct networks by adding nodes and their
associated links as they appear in the data. To account for parameter changes,
we divide the data into five observation periods. Starting from the second
period, we use all preceding data as initial conditions. The datasets used for
the growing model are:

  1. 1.

APS: Citation networks for the American Physical Society APS journal of
physics, where groups are different pre-defined sub-fields of physics. We used
the version of the data that was obtained in 2015 (?).

  2. 2.

Cit-geo: Citation network from publications in the Clarivate Analytics Web of
Science database, where we focused on regional interactions during the period
1900-2010. We defined groups using different geographical and political
aggregations, including USA, Western Europe, Eastern Europe, Latin America,
among others.

#### Data and code availability

The code used in this paper is available at https://github.com/javurena7/core-
periphery-emergence/. The data for Boards is available on (?), Airport on (?)
and APS on (?). Cit-geo is subject to a non-disclosure agreement and belongs
to Clarivate Analytics Web of Science database. Non-public Twitter data is
available from the authors upon reasonable request.

#### Acknowledgments

G.I. acknowledges support from AFOSR (Grant No. FA8655-20-1-7020), project EU
H2020 Humane AI-net (Grant No. 952026), and CHIST-ERA project SAI (Grant No.
FWF I 5205-N). M.K. acknowledges support from Academy of Finland grant numbers
349366, 353799, and 352561. We acknowledge the computational resources
provided by the Aalto Science–IT project. We used data from the Science
Citation Index Expanded, Social Science Citation Index and Arts & Humanities
Citation Index, prepared by Thomson Reuters, Philadelphia, Pennsylvania, USA,
Copyright Thomson Reuters, 2013.

#### Author contributions

JUC, FK, GI, and MK conceived, designed, and developed the study. JUC
implemented and analyzed the models and empirical data studies. JUC wrote the
initial manucript while FK, GI, and MK wrote the paper.

#### Competing interest statement

All authors declare no competing interest.

## References

  * 1. S. P. Borgatti, M. G. Everett, Models of core/periphery structures, Social Networks 21, 375-395 (2000).
  * 2. M. P. Rombach, M. A. Porter, J. H. Fowler, P. J. Mucha, Core-periphery structure in networks, SIAM Journal on Applied Mathematics 74, 167-190 (2014).
  * 3. P. Csermely, A. London, L.-Y. Wu, B. Uzzi, Structure and dynamics of core/periphery networks, Journal of Complex Networks 1, 93-123 (2013).
  * 4. R. J. Gallagher, J.-G. Young, B. F. Welles, A clarified typology of core-periphery structure in networks, Science Advances 7, eabc9800 (2021).
  * 5. O. Kostoska, S. Mitikj, P. Jovanovski, L. Kocarev, Core-periphery structure in sectoral international trade networks: A new approach to an old theory, PLOS ONE 15, e0229547 (2020).
  * 6. P. Gala, J. Camargo, E. Freitas, The economic commission for latin america and the caribbean (ECLAC) was right: scale-free complex networks and core-periphery patterns in world trade, Cambridge Journal of Economics 42, 633–651 (2017).
  * 7. J. Gray, P. B. Potter, Trade and volatility at the core and periphery of the global economy, International Studies Quarterly 56, 793–800 (2012).
  * 8. D. Hartmann, M. Bezerra, B. Lodolo, F. L. Pinheiro, International trade, development traps, and the core-periphery structure of income inequality, EconomiA 21, 255–278 (2020).
  * 9. M. Bordo, M. Flandreau, Core, periphery, exchange rate regimes, and globalization, Tech. rep., National Bureau of Economic Research (2001).
  * 10. D. Snyder, E. L. Kick, Structural position in the world system and economic growth, 1955-1970: A multiple-network analysis of transnational interactions, American Journal of Sociology 84, 1096–1126 (1979).
  * 11. W. Y. W. Lo, Soft power, university rankings and knowledge production: distinctions between hegemony and self-determination in higher education, Comparative Education 47, 209–222 (2011).
  * 12. F. Villesèche, E. Sinani, From presence to influence: Gender, nationality and network centrality of corporate directors, Work, Employment and Society p. 095001702110185 (2021).
  * 13. M. Gamba, B. H. Kleiner, The old boys’ network today, International Journal of Sociology and Social Policy (2001).
  * 14. T. Verma, F. Russmann, N. Araújo, J. Nagler, H. Herrmann, Emergence of core–peripheries in networks, Nature Communications 7 (2016).
  * 15. M. Bastos, C. Piccardi, M. Levy, N. McRoberts, M. Lubell, Core-periphery or decentralized? topological shifts of specialized information on twitter, Social Networks 52, 282–293 (2018).
  * 16. F. Luo, B. Li, X.-F. Wan, R. H. Scheuermann, Core and periphery structures in protein interaction networks, BMC Bioinformatics 10 (2009).
  * 17. Y. Hayashi, N. Uchiyama, Onion-like networks are both robust and resilient, Scientific Reports 8 (2018).
  * 18. X. Zhang, T. Martin, M. Newman, Identification of core-periphery structure in networks, Physical review. E, Statistical, nonlinear, and soft matter physics 91 (2014).
  * 19. S. Kojaku, N. Masuda, Finding multiple core-periphery pairs in networks, Phys. Rev. E 96, 052313 (2017).
  * 20. P. Holme, Core-periphery organization of complex networks, Phys. Rev. E 72, 046111 (2005).
  * 21. M. da Silva, H. Ma, A.-P. Zeng, Centrality, network capacity, and modularity as parameters to analyze the core-periphery structure in metabolic networks, Proceedings of the IEEE 96, 1411–1420 (2008).
  * 22. J. Moody, D. R. White, Structural cohesion and embeddedness: A hierarchical concept of social groups, American sociological review pp. 103–127 (2003).
  * 23. T. Lux, Emergence of a core-periphery structure in a simple dynamic model of the interbank market, Journal of Economic Dynamics and Control 52, A11–A23 (2015).
  * 24. C. M. Schneider, A. A. Moreira, J. S. Andrade, S. Havlin, H. J. Herrmann, Mitigation of malicious attacks on networks, Proceedings of the National Academy of Sciences 108, 3838–3841 (2011).
  * 25. Z.-X. Wu, P. Holme, Onion structure and network robustness, Phys. Rev. E 84, 026106 (2011).
  * 26. S. Kojaku, N. Masuda, Core-periphery structure requires something else in the network, New Journal of Physics 20, 043012 (2018).
  * 27. A.-L. Barabási, R. Albert, Emergence of scaling in random networks, science 286, 509–512 (1999).
  * 28. A. Asikainen, G. Iñiguez, J. Ureña-Carrión, K. Kaski, M. Kivelä, Cumulative effects of triadic closure and homophily in social networks, Science Advances 6, eaax7310 (2020).
  * 29. M. McPherson, L. Smith-Lovin, J. M. Cook, Birds of a feather: Homophily in social networks, Annual review of sociology pp. 415–444 (2001).
  * 30. M. T. Rivera, S. B. Soderstrom, B. Uzzi, Dynamics of dyads in social networks: Assortative, relational, and proximity mechanisms, Annual Review of Sociology 36, 91–115 (2010).
  * 31. M. E. J. Newman, Mixing patterns in networks, Physical Review E 67 (2003).
  * 32. T. P. Peixoto, Disentangling homophily, community structure, and triadic closure in networks, Physical Review X 12 (2022).
  * 33. Y. Murase, H.-H. Jo, J. Török, J. Kertész, K. Kaski, Structural transition in social networks: The role of homophily, Scientific Reports 9 (2019).
  * 34. F. Karimi, M. Génois, C. Wagner, P. Singer, M. Strohmaier, Homophily influences ranking of minorities in social networks, Scientific reports 8, 1–12 (2018).
  * 35. E. Lee, et al., Homophily and minority-group size explain perception biases in social networks, Nature Human Behaviour 3, 1078–1087 (2019).
  * 36. L. Peel, J.-C. Delvenne, R. Lambiotte, Multiscale mixing patterns in networks, Proceedings of the National Academy of Sciences 115, 4057–4062 (2018).
  * 37. D. B. Larremore, A. Clauset, C. O. Buckee, A network approach to analyzing highly recombinant malaria parasite genes, PLoS Computational Biology 9, e1003268 (2013).
  * 38. S. Lim, F. Radicchi, M. P. van den Heuvel, O. Sporns, Discordant attributes of structural and functional brain connectivity in a two-layer multiplex network, Scientific Reports 9 (2019).
  * 39. M. Lalanne, P. Seabright, The old boy network: Gender differences in the impact of social networks on remuneration in top executive jobs, Available at SSRN 1952484 (2011).
  * 40. D. Zeltzer, Gender homophily in referral networks: Consequences for the medicare physician earnings gap, American Economic Journal: Applied Economics 12, 169–97 (2020).
  * 41. C. Seierstad, T. Opsahl, For the few not the many? the effects of affirmative action on presence, prominence, and social capital of women directors in norway, Scandinavian Journal of Management 27, 44 – 54 (2011). Part Special Topic Forum on “Architectural Competitions”.
  * 42. M. Raddant, H. Takahashi, Interdependencies of female board member appointments, International Review of Financial Analysis 81, 102080 (2022).
  * 43. D. of Transportation, Airline origin and destination survey (db1b), Bureau of Transportation Statistics (2022). Available at BTS: https://www.transtats.bts.gov/DatabaseInfo.asp?QO_VQ=EFI&Yv0x=D. Accessed February 10, 2022 [Organization as author].
  * 44. H. Kong, S. Martin-Gutierrez, F. Karimi, Influence of the first-mover advantage on the gender disparities in physics citations, Communications Physics 5, 1–11 (2022).


# Toward using GANs in astrophysical Monte-Carlo simulations

Ahab Isaac  Oxford e-Research Centre, Department of Engineering Sciences,
University of Oxford, 7 Keble road, OX1 3QG, Oxford, United Kingdom  Wesley
Armour  Oxford e-Research Centre, Department of Engineering Sciences,
University of Oxford, 7 Keble road, OX1 3QG, Oxford, United Kingdom  Karel
Adámek E-mail address<EMAIL_ADDRESS>Oxford e-Research Centre,
Department of Engineering Sciences, University of Oxford, 7 Keble road, OX1
3QG, Oxford, United Kingdom

###### Abstract

Accurate modelling of spectra produced by X-ray sources requires the use of
Monte-Carlo simulations. These simulations need to evaluate physical
processes, such as those occurring in accretion processes around compact
objects by sampling a number of different probability distributions. This is
computationally time-consuming and could be sped up if replaced by neural
networks. We demonstrate, on an example of the Maxwell-Jüttner distribution
that describes the speed of relativistic electrons, that the generative
adversarial network (GAN) is capable of statistically replicating the
distribution. The average value of the Kolmogorov-Smirnov test is 0.5 for
samples generated by the neural network, showing that the generated
distribution cannot be distinguished from the true distribution.

##  1 Introduction

The concept of Generative adversarial networks (GAN), where the neural network
(generator) is not trained directly on the data but rather through a proxy
network (discriminator), has been successfully used in generating samples from
underlying, often multidimensional, probability distributions in many
applicationsChakraborty et al., [2023]. However, GANs are less often used to
generate samples from probability distributions for scientific purposes.
Previously, GANs were used in the generation of 1D probability distribution
with varying success as demonstrated by Zaheer et al., [2017]. Recently GANs
have been used to simulate particle showers in electromagnetic calorimeters by
Paganini et al., [2018].

When simulating astrophysics processes around compact objects, particularly
simulation of accretion flows and thick accretion discs, Monte Carlo
simulations are often used [Schnittman and Krolik,, 2013]. Among many
different probability distributions that are required to describe the state of
the simulated system is the Maxwell-Jüttner distribution (MJD), describing an
electron’s speed in high energy plasma. This distribution is used in
evaluations of Compton scattering during radiative transfer, Bhabha scattering
that describes electron-positron scattering, or in many other fields
[Zenitani,, 2015]. The Maxwell-Jüttner distribution is given by

$P_{\mathrm{MJ}}(\gamma)=\frac{\gamma^{2}\beta}{\Theta
K_{\mathrm{2}}\left(1/\Theta\right)}\exp\left(-\frac{\gamma}{\Theta}\right)\,,$
(1)

where $\gamma$ is relativistic Lorentz factor, $\beta=v/c$ is normalised
velocity of an electron, and $K_{\mathrm{2}}$ is the modified Bessel function
of the second kind. Lastly, $\Theta=k_{\mathrm{B}}T/(mc^{2})$, where $T$ is
the temperature of the gas, $k_{\mathrm{B}}$ is Boltzmann constant, $m$ is the
electron mass, and $c$ is the speed of light. The parameter $\Theta$
represents the ratio of kinetic and rest energy of the electron and indicates
how relativistic the electron speed distribution is. If MJ distribution 1 is
evaluated in normalised speed $\beta$ it’s support is limited to an interval
$\left[0,1\right[$

We demonstrate that it is possible to use GANs to draw samples from the MJ
distribution and that per sample of 100 elements statistical test we have used
is not able to distinguish between true and generated samples.

##  2 Network and training

We have used GAN to train a multi-layer perception network to generate a
sample from MJ distribution. The GAN approach requires two networks to be
trained at the same time, a generator and a discriminator. Each sample
produced by the generator contains 100 numbers which are then classified by
the discriminator to either be from true distribution or not. Both the
generator and discriminator are learning at the same time. The loss function
is calculated based on the discriminator’s performance and used to train both
networks.

For the generator, we have used two hidden layers each 400 neurons in size, an
input and output layer of 100 elements. The input is a vector of uniformly
distributed pseudo-random numbers. The ratio of 4:1 regarding the size of the
hidden layers and input/output layers is one that produces the best results. A
smaller number of neurons in the hidden layer does not produce correct
results. Larger values, on the other hand, do not substantially improve
results for high values of $\Theta$. The activation function used was
$\tanh()$. Other activation functions (hardtanh, SELU, SiLU, LeakyReLU, ELU)
did not lead to similar or better results.

For the discriminator, we have used two hidden layers, 40 and 20 neurons wide,
with a binary output layer. The input layer is the size of the generator
output, which is a vector of 100 elements. As an activation function, we have
used LeakyReLU.

The Maxwell-Jüttner distribution was normalised into the interval
$\left[-1,1\right[$ so that it coincides with the support of $\tanh()$
activation function.

For training, we have used the binary cross entropy as our loss function. For
both the generator and discriminator we have used ADAM as an optimiser with
learning rate $l_{\mathrm{r}}=0.002$. The batch size was 512 samples. Training
steps were as follows: First real MJ distribution is sampled using the
rejection method; next a vector of uniformly distributed pseudo-random numbers
is generated using NumPy built-in generator (PCG64), and a fake distribution
is produced by the generator; after this the discriminator classifies both
true and fake samples and the loss function is calculated on both groups; the
training of the discriminator and generator follows, and then cycle repeats.
The discriminator is trained on a loss function calculated on both true and
fake samples, whilst the generator is trained only on a loss function
calculated on fake samples. There is one training step for both the generator
and discriminator. For each value of $\Theta$, we have trained a separate
network.

Training progressed until the loss function stabilised, and then the best-
performing network (set of weights and biases) was selected using the KS test
applied to data composed from multiple generated samples. The networks
selected are presented in the result section.

##  3 Results

Figure 1:  Comparison of histograms of true (blue) and generated (red)
Maxwell-Jüttner distribution for different values of $\Theta$ parameter.

Figure 2: Visual representation of generated samples from Maxwell-Jüttner
distribution with increasing value of $\Theta$. The randomness is good for
lower values of $\Delta$, but for higher values of $\Theta$, we can see clear
correlations.

The resulting histograms for different values of $\Theta$ are shown in the
Figure 1. Histograms show that for all tested values of $\Theta$, the
generator is able to produce samples that approximate the MJ distribution
well. When individual samples produced by the generator are compared to
samples from the MJ distribution using the Kolmogorov-Smirnov (KS) test, we
get $P_{\mathrm{\Theta=0.2}}=0.56$; $P_{\mathrm{\Theta=0.4}}=0.53$;
$P_{\mathrm{\Theta=0.6}}=0.45$; $P_{\mathrm{\Theta=0.8}}=0.43$. These KS
values show that individual samples generated by the network cannot be
distinguished from true distribution. However, when multiple samples are
combined, the KS test rejects generated samples confidently.

Visual depiction of the randomness of the generated samples is shown in Figure
2. For lower values of $\Theta<0.5$ the generated samples do not show any
visible pattern or correlation, this is not true for values $\Theta>0.5$ as
shown in Fig. 2 by two pictures on the right, where there is clear
correlation.

The correlation in generated samples, while those samples pass the KS test,
suggests a mode collapse of the generator, where the generator identifies one
or few solutions with which it is able to fool the discriminator. To mitigate
this, we have tried Wasserstein GAN as suggested by Arjovsky et al., [2017]
without success, however.

##  4 Conclusions

We have applied GAN to the problem of sampling the Maxwell-Jüttner (MJ)
distribution that describes electron speed in a relativistic regime. We have
shown that a multilayer perception network can learn the MJ distribution even
for skewed distribution for highly relativistic electrons. The Kolmogorov-
Smirnov test performed on the samples generated by the network cannot
distinguish between true and generated samples. However, when the test is
performed on a larger set of samples, the test fails.

In future work, the neural network used should be expanded to include variable
parameter $\Theta$ as a hyperparameter. Furthermore, the training process
needs to be adjusted to counter mode collapse visible for higher values of
parameter $\Theta$.

## References

  * Arjovsky et al., [2017] Arjovsky, M., Chintala, S., and Bottou, L. (2017).  Wasserstein gan.
  * Chakraborty et al., [2023] Chakraborty, T., Reddy, U., Naik, S., Panja, M., and Manvitha, B. (2023).  Ten years of generative adversarial nets (gans): A survey of the state-of-the-art.
  * Paganini et al., [2018] Paganini, M., de Oliveira, L., and Nachman, B. (2018).  Calogan: Simulating 3d high energy particle showers in multilayer electromagnetic calorimeters with generative adversarial networks.  Phys. Rev. D, 97:014021.
  * Schnittman and Krolik, [2013] Schnittman, J. D. and Krolik, J. H. (2013).  A monte carlo code for relativistic radiation transport around kerr black holes.  The Astrophysical Journal, 777(1):11.
  * Zaheer et al., [2017] Zaheer, M., Li, C.-L., PÃ³czos, B., and Salakhutdinov, R. (2017).  Gan connoisseur: Can gans learn simple 1d parametric distributions?  In NIPS Workshop on Deep Learning: Bridging Theory and Practice.
  * Zenitani, [2015] Zenitani, S. (2015).  Loading relativistic Maxwell distributions in particle simulations.  Physics of Plasmas, 22(4):042116.