mpred

# Network Formation and Dynamics Among Multi-LLMs

Marios Papachristou<EMAIL_ADDRESS>0000-0002-1728-0729
Cornell University107 Hoy RdIthacaNew YorkUSA14853 and  Yuan Yuan
<EMAIL_ADDRESS>0000-0001-6681-5710 Purdue UniversityWest
LafayettePAUSA47906

###### Abstract.

Social networks influence behaviors, preferences, and relationships and play a
crucial role in the dissemination of information and norms within human
societies. As large language models (LLMs) increasingly integrate into social
and professional environments, understanding their behavior within the context
of social networks and interactions becomes essential. Our study analyzes the
behaviors of standard network structures and real-world networks to determine
whether the dynamics of multiple LLMs align with human social dynamics. We
explore various social network principles, including micro-level concepts such
as preferential attachment, triadic closure, and homophily, as well as macro-
level concepts like community structure and the small-world phenomenon. Our
findings suggest that LLMs demonstrate all these principles when they are
provided with network structures and asked about their preferences regarding
network formation. Furthermore, we investigate LLMs’ decision-making based on
real-world networks to compare the strengths of these principles. Our results
reveal that triadic closure and homophily have a stronger influence than
preferential attachment and that LLMs substantially exceed random guessing in
the task of network formation predictions. Overall, our study contributes to
the development of socially aware LLMs by shedding light on LLMs’ network
formation behaviors and exploring their impacts on social dynamics and norms.

large language models, networks, network formation, link prediction, multi-
agent systems

††conference: ; ;

##  1\. Introduction

Recent progress in large language models (LLMs), such as GPT (OpenAI, 2023)
and LLaMA2 (Touvron et al., 2023), have underscored the importance of
understanding AI behavior. It is crucial to comprehend AI actions to ensure
they align with human expectations, mitigate potential risks, and maximize
their benefits. Misaligned AI actions can lead to unintended consequences,
such as biased decision-making, fairness issues, and the miscoordinative or
non-cooperative behavior (Rahwan et al., 2019). Additionally, researchers have
started to apply specific social science methodologies to study LLMs,
including methods analogous to laboratory experiments, agent-based modeling,
and qualitative methods. These methods help uncover the generative
capabilities of LLMs and their interpretability from a rigorous social science
perspective (Horton, 2023; Park et al., 2023; Chen et al., 2023; Leng et al.,
2023).

In human societies, social networks play a crucial role in shaping individual
behaviors, preferences, and connections, as well as influencing the diffusion
of information and norms across communities (Rogers, 2003; Bakshy et al.,
2012; Fowler and Christakis, 2008; Banerjee et al., 2013). LLMs have shown
great potential in social contexts, notably as intelligent personal assistants
facilitating social and business interactions (see, e.g., (Papachristou et
al., 2023; Chopra and Haaland, 2023; Veselovsky et al., 2023)). However, less
is known about how LLMs’ innate behaviors and preferences align with human
network formation principles (Jackson, 2008; Zhou et al., 2023; Park et al.,
2023).

Our study explores LLMs’ behaviors and preferences in network formation in
both synthetic and real-world networks. By analyzing interactions among
multiple LLMs (or multi-LLMs), we aim to understand the implications of LLMs
representing humans in social and business settings. Specifically, we examine
micro-level social network properties including preferential attachment
(Barabási and Albert, 1999), triadic closure (Granovetter, 1973), and
homophily (McPherson et al., 2001), as well as macro-level properties
including community structure (Newman and Girvan, 2004), and the small-world
phenomenon (Kleinberg, 2000; Watts and Strogatz, 1998).

In synthetic networks, our findings reveal that LLMs can generate networks
exhibiting preferential attachment and following scale-free degree
distributions. Moreover, LLMs demonstrate strong tendencies toward triadic
closure and exhibit significant homophily. These behaviors explain the
emergence of community structures with high modularity in networks formed by
multiple LLMs. Additionally, we show that LLM agents exhibit dynamics
consistent with small-world phenomena akin to those observed in the Watts-
Strogatz model (Watts and Strogatz, 1998).

Next, we compare across these principles and uncover the main drivers of
network dynamics among these factors. To do this, we consider real-world
networks and ask each LLM to simulate a node in the network. We provide
information on their network structure and ask for their decisions for the
next link formation or dissolution step. We approach this problem as a
discrete choice modeling problem (Liben-Nowell and Kleinberg, 2003; Overgoor
et al., 2019). In this real-world setting, we find that LLMs’ choices are
primarily weighted on homophily and triadic closure, compared to preferential
attachment, and that LLMs substantially exceed random guessing when predicting
new links. Additionally, the resulting choices of LLM agents strengthen the
network’s community structure.

Our study contributes to the literature on large language models (LLMs) in
several ways. First, it advances the discussion on aligning LLMs with human
social preferences, which has potential applications in developing socially
aware LLMs for real-life interactions. Understanding the behaviors of LLMs in
social network formation can inform the alignment of these models with human
social preferences. Additionally, this study serves as a step toward
developing LLMs that are more socially aware and sensitive to human
preferences, enhancing their effectiveness and acceptability in social
contexts. Insights into LLMs’ innate behaviors in network formation can inform
the design of LLMs for effective collaboration in social and professional
settings. Finally, our study could contribute to understanding the impact of
LLMs on social dynamics and norms, including their role in facilitating or
hindering social change and the adoption of new behaviors.

⬇ # Task Your task is to select a set of people to be friends with. # Profile
Your profile is given below after chevrons:
<PROFILE>$F(\\{i_{t}\\})$</PROFILE> # Candidate Profiles The candidate
profiles to be friends with are given below after chevrons:
<PROFILES>$F(A_{t})$</PROFILES> # Output The output should be given a list of
JSON objects with the following structure [ {{ "name" : name of the person you
selected, "reason" : reason for selecting the person }}, ... ] # Notes - The
output must be a list of JSON objects ranked in the order of preference. - You
can make at most $\delta$ selections.

ALGORITHM 1 Prompt used to implement $\mathcal{Q}(A_{t},i_{t},\delta)$
formatted as a Python f-string.

(a) Structure-based

(b) Degree-based

Figure 1. Networks with $n=200$ nodes created based on Principle 1 for various
temperatures. For the structure-based networks (Figure 1(a)), we provide the
multi-LLMs with the neighborhoods $\\{N_{j,t}:j\in i_{t}\\}$, and for the
degree-based networks (Figure 1(b)), we provide the degrees $\\{d_{j,t}:j\in
i_{t}\\}$ of the nodes $j\in i_{t}$. We also plot the degree distribution and
compare it against a BA network with $n=200$ nodes. Top: In Figure 1(a), we
observe that the resulting networks follow a power-law degree distribution
($P>0.5$, Bootstrap hypothesis test). When the temperature is 1.5, the
resulting network resembles the BA model ($P<0.001$, K-S test). Bottom: When
the degree information is provided only (Figure 1(b)), the resulting networks
correspond to unrealistic star-like formations that are far from a scale-free
network and resemble more a core-periphery network.

##  2\. Methods

Our study employs the state-of-the-art LLMs, such as GPT-3.5 and GPT-4
(OpenAI, 2023) with the OpenAI API111For GPT-3.5 we use the gpt-3.5-turbo
model provided by OpenAI, and for GPT-4 we use the gpt-4-1106-preview model..
We constructed multiple LLMs using multiple independent conservation threads
where each thread represents one multi-LLM. We prompt each LLM by providing
information about other LLMs’ network information as well as decisions they
are faced with. We test both state-of-the-art GPT-based models: for the
results of Sections 3.2 and 3.1, we use GPT-3.5 agents, and in Section 3.3, we
use GPT-4 agents. We obtained similar results using GPT-3.5 and GPT-4.
Overall, we adopted a standard framework for multi-LLMs but underscored the
multi-agent nature of the design in our setting (Leng et al., 2023; Akata et
al., 2023; Brookins and DeBacker, 2023; Aher et al., 2023; De Marzo et al.,
2023).

###  2.1. Procedure

In our study, we performed experiments to assess whether key network
principles at both the micro-level (such as preferential attachment, triadic
closure, and homophily) and the macro-level (including community structure and
weak ties) align with classical network models. Subsequently, we utilized
real-world networks to determine the factors that are most heavily weighted by
LLMs.

Our experiments span a time series of $T$ steps, with a sequence of network
structures denoted as $G_{1},G_{2},\dots,G_{T}$. The initial network, $G_{1}$,
is referred to as the _seed network_. At each step $t$, we select a _query
node_ $i_{t}$ (which may either be a new arrival or an existing node in the
graph) and assign it the task of forming new links. This is accomplished by
selecting nodes from a set of alternatives $A_{t}$ (meaning potential
candidates for link formation) and initiating a query call
$\mathcal{Q}(A_{t},i_{t},\delta)$ to the LLM (as outlined in Algorithm 1) to
create up to $\delta$ new links. The edge set selection process involves
presenting the LLMs with personal or network features of the alternatives,
denoted as $F(A_{t})=\left\\{f_{a}:a\in A_{t}\right\\}$, which may include
information such as the neighbors of the nodes, node degrees, common
connections with $i_{t}$, and community memberships, formatted in JSON. We
adopt a zero-shot learning approach, avoiding the provision of examples to the
model to prevent bias, in line with relevant studies such as (Brookins and
DeBacker, 2023). This approach allows for the exploration of the innate
preferences of LLMs.

We employ multiple temperatures to account for the variability in response
generation by LLM systems, which is also observed in classical statistical
models of network formation (Jackson, 2008). Our study conducts experiments
using three temperatures: 0.5, 1.0, and 1.5.

Moreover, the model is tasked with outputting a JSON object indicating the
node chosen for link formation and the rationale behind the choice.

##  3\. Results

In this section, we discuss three major micro-level network principles:
preferential attachment, triadic closure, and homophily. We then examine two
macro-level network principles: community structure and small-world
phenomenon. Subsequently, we test the strength of these principles when LLM
agents face real-world networks and compare the preferences in network
formation tasks between LLMs and humans.

###  3.1. Micro-Level Properties

#### Principle 1: Preferential Attachment

Preferential attachment is a well-known mechanism in network science that
explains how certain nodes in a network become more connected over time,
leading to the emergence of highly connected vertices and scale-free
distribution of degree (Barabási and Albert, 1999; Bianconi and Barabási,
2001).

We examine whether LLMs exhibit the preferential attachment mechanism in the
following way: First, we start with an empty network and add nodes at each
time step $t$. For each new time step, we add a new node $i_{t}$, providing
information on the network neighbors of all existing nodes222See Appendix B,
for information about how the features are represented in the prompt.. We
generated networks with $n=200$ nodes.

We plot one of the examples of resulting networks under each temperature in
Figure 1(a). As observed in all temperature setups, we observe a few nodes
that have many connections, and the majority of the notes have one or few
connections, which renders the degree distribution scale-free, i.e., the
probability $\pi(d)$ a node has degree $d$ is given by

$\displaystyle\pi(d)\propto d^{-\gamma},\quad\text{where }\gamma>1.$

Furthermore, we observe mode “super nodes” with many connections as the
temperature increases.

Figure 2. Distribution of reasoning across categories for the networks of
Figure 1(a). The classification is done using GPT-3.5 on a set of 20 randomly
sampled reasons repeated over five times (frequencies are micro-averaged). The
error bars correspond to 95% confidence intervals.

We also compare with the Barabási–Albert (BA) model (Barabási and Albert,
1999) where each incoming node $t$, the probability $p_{i,t}$ of it connecting
to node $i$ is proportional to ${d_{i,t}}$, where $d_{i,t}$ is the degree of
node $i$ at time step $t$, namely,

$\displaystyle p_{i,t}=\frac{d_{i,t}}{\sum_{j=1}^{t}d_{j,t}}.$

We find that for temperatures being 0.5 and 1.0, although
$\hat{\gamma}=1.50\pm 0.23$ and $1.92\pm 0.24$, respectively, the degree
distribution does not resemble the degree distribution of the generated BA
network, where the $P$-values satisfy $P<0.001$ and $P<0.05$ respectively
(two-sample K-S test compared to the empirical degree distribution of the BA
network333As (Barabási, 2013) showed, the BA model follows the scale-free
distribution of the form $\pi_{\mathrm{BA}}(d)\propto d^{-3}$ for sufficiently
large $n$. However, because here $n$ is small, we instead compared directly to
the sample from the BA model which has $\hat{\gamma}_{\mathrm{BA}}=2.24\pm
0.24$ instead of comparing with the limiting distribution
$\pi_{\mathrm{BA}}(d)$.). However, when the temperature is 1.5, the LLM-
generated networks resemble the BA model, where we have $P>0.9$ (two-sample
K-S test compared to the empirical degree distribution of the BA network) and
have $\hat{\gamma}=3.03\pm 0.40$.

Moreover, for all temperatures, the resulting degree distribution is scale-
free ($P>0.5$, bootstrapping hypothesis test comparing with the fitted scale-
free distribution).

We also examine the network formation when only degree information (rather
than network structure) is provided, in a similar spirit of (De Marzo et al.,
2023). We present the results in Figure 1(b). We observe “star-like”
formations around one node. The degree distributions differ from scale-free
distributions produced by statistical models such as the BA model ($P<0.001$,
two-sample K-S test compared to the empirical distribution of the generated BA
network), and are closer to a core-periphery network (Borgatti and Everett,
2000).

Finally, we employ text analysis of reasoning provided by the agents for the
results of Figure 1(a)444We do not provide the distribution of reasons for the
results of Figure 1(b) as all of the LLM’s decisions are made given the degree
information.. We observe two main categories of reasons (see Figure 2 for the
fraction under each temperature):

  * •

_Well-Connectedness_ : it corresponds to reasons related to the person being
well-connected and having many friends.

  * •

_Mutual Friends_ : it is related to having many friends in common with the
person so that the person can introduce them to their friends.

The well-connectedness reason becomes less prevalent as the temperature
increases, and the mutual friends’ reason becomes more prevalent. Note that
when the temperature is 1.5, the two reasons have almost the same frequency.

Taken together, networks created by LLM systems, when given a network
structure, demonstrate preferential attachment and exhibit scale-free degree
distributions.

#### Principle 2: Triadic Closure

(a) Structure-Based

(b) Common-Neighbor-Based

Figure 3. Networks created based on Principle 2. Top: Figure 3(a) shows the
resulting networks created by Principle 2 when the intersection of the
neighborhoods of the query node and each alternative is provided. The node
colors correspond to the stochastic block model (SBM) groups each node belongs
to. The red edges correspond to the newly created edges between nodes of the
red cluster, the blue edges correspond to the newly created edges between
nodes of the blue cluster, and the orange edges correspond to edges created
between the two clusters. The newly formed edges are drawn with a larger line
width. We observe that the probability of forming an edge within the same
community and the marginal transitivity, which indicate triadic closure, is
significantly larger than randomly creating links ($P<0.001$, t-test). Bottom:
Figure 3(b) shows the same networks with the only change that instead of the
intersection of neighborhoods between the query node and each alternative, we
provide the number of common neighbors (i.e., the size of the intersection)
between the query node and each alternative. Similarly, we observe that the
probability of forming an edge within the same community and the marginal
transitivity, which indicate triadic closure, is significantly larger than
randomly creating links ($P<0.001$, t-test). Figure 4. Distribution of
reasoning across categories for the networks of Figure 3(a). The
classification is done using GPT-3.5 on a set of 20 randomly sampled reasons
repeated over 5 times (frequencies are micro-averaged). The error bars
correspond to 95% confidence intervals.

The second micro-level principle we examine is triadic closure, which
describes the phenomenon that individuals are likely to form connections with
their friends’ friends, leading to closed triangles within the network. This
tendency enhances the network’s structure and cohesion, rooted in the
likelihood of two nodes forming a direct connection if they share a common
neighbor (Granovetter, 1973; Mosleh et al., 2024).

To test for triadic closure, we use an assortative stochastic block model
(SBM) (Newman, 2003) to generate an initial seed network $G_{1}$ with $n$
nodes divided into two equal-sized clusters $A$ and $B$. Connections within
each cluster have a probability of $0.5$, while connections across clusters
have a probability of $0.1$. This setup reflects our intuition that nodes
within the same cluster are more likely to form connections due to their
higher number of common neighbors. We then iterate over each node $i$,
providing features based on the intersection of the neighborhoods of all of
$i$’s non-neighbors or the number of common friends between $i$ and any non-
neighbor $j$. This modeling choice contrasts the results mentioned about
preferential attachment, where the neighborhood information is provided and
made to make the two settings consistent.

We compare this with the random null model, which selects a node at random to
connect to. We run ten simulations for $n=50$ nodes.555For better
visualization, we chose $n=50$ nodes instead of a large number of nodes such
as $n=200$. Moreover, the results are statistically significant even with
$n=50$ nodes.

To measure whether the principle of triadic closure exists, we measure the
fraction $\hat{p}$ of newly added edges between nodes of the same community,
i.e., the fraction of edges in $G_{T}\setminus G_{1}$ that have their ends
both at either $A$ or $B$, namely

$\displaystyle\hat{p}=\frac{\left|\left\\{\\{i,j\\}\in E(G_{T})\setminus
E(G_{1}):y_{i}=y_{j}\right\\}\right|}{\left|E(G_{T})\setminus
E(G_{1})\right|},$

where $y_{i},y_{j}\in\\{A,B\\}$ are the community memberships of nodes $i$ and
$j$ respectively, and $E(G_{T})\setminus E(G_{1})$ corresponds to the newly
added edges.

Generally, a value of $\hat{p}>0.5$ indicates the tendency of triadic closure
since an LLM agent, which is supposed to exhibit triadic closure given the
common neighbors, would ideally create a link within the same cluster.

Additionally, we report the marginal transitivity $D$ of the network, which is
defined as the change in the fraction of triangles in the network to open
triads from $G_{T}$ to $G_{1}$ (which corresponds to the SBM), i.e.

$\displaystyle D=3\times\frac{\text{\\# triangles}(G_{T})}{\text{\\#
triads}(G_{T})}-3\times\frac{\text{\\# triangles}(G_{1})}{\text{\\#
triads}(G_{1})}.$

We present our simulation results in Figure 3(a). We depict the sample
outcomes in Figure 3(a), where the upper panel presents the results when the
entire network structure is provided, whereas the lower panel only provides
the number of common neighbors. Node colors correspond to their respective
groups within the SBM. Red edges denote connections within the red cluster,
blue edges within the blue cluster, and orange edges between the two clusters.
Newly established edges are emphasized with a thicker line width.

We present the probabilities of network formation within a community in the
last panels in each row. We find that the probability of forming a within-
community tie across all temperatures is substantially larger than the random
network formation scenario ($P<0.001$, t-test comparing to Random), suggesting
LLMs’ tendency of triadic closure (since an LLM which is given the common
neighbors as features should ideally create links within the same community).

Additionally, we observe a statistically significant increase in the marginal
transitivity $D$ for all temperatures ($P<0.001$, t-test). Moreover, in all
cases, the marginal transitivity $D$ is statistically significant compared to
Random ($P<0.001$, t-test).

These results suggest that the LLM agents exhibit triadic closure. Similar to
the approach in earlier reasoning analysis, we present the most common reasons
provided by LLMs in Figure 4666We do not provide the distribution of reasons
for the results of Figure 3(b) as all of the LLM’s decisions are made given
the number of common neighbors information.. We find that most of the agents
base their decisions on the number of mutual friends.

#### Principle 3: Homophily

(a) Assortativity Coefficients

(b) LLM Reasoning

Figure 5. Left: Figure 5(a) shows the assortativity coefficients for each
network attribute created based on Principle 3. Each node can form at most
$\delta=5$ links with the other nodes based on their attributes. We observe
that for all temperatures, we have positive assortativity ($P<0.001$, t-test
with 0), which indicates homophily. The assortativities are significantly
different for all temperatures from random or heterophilous ($P<0.001$, t-test
comparing with Random). Right: Figure 5(b) shows the distribution of reasoning
across categories for the networks of Principle 3 (cf. Figure 6). The
classification uses GPT-3.5 on a set of 20 randomly sampled reasons repeated
over 5 times (frequencies are micro-averaged). The error bars correspond to
95% confidence intervals.

Homophily reflects the tendency for nodes with similar characteristics or
attributes to form connections and associate with each other. This phenomenon
is based on the principle that individuals in a network are more likely to
connect with others who share similar traits, interests, or demographics
(McPherson et al., 2001).

To test whether LLM agents exhibit homophily, we perform the following
experiment: We generate nodes with randomly generated attributes regarding a
hobby (randomly chosen among three hobbies), a favorite color (randomly chosen
among three colors), and a location within the US (randomly chosen among three
US locations) and provide the attributes of the other nodes and the node’s own
attributes, and each node is tasked to form up to $\delta=5$ links with
others. For each node $i$, we provide it with the features $x_{j}$ of all non-
neighbors $j$ of $i$. The seed network is taken to be the empty graph.

We run ten simulations for networks with $n=50$ nodes and $\delta=5$. We
compare with the Random null model, which chooses $\delta=5$ links at random.

To measure the presence of homophily, we measure the attribute assortativity
coefficient of each of the three features (hobby, color, location). For a
property $P$ which takes $K$ distinct values $P_{1},\dots,P_{K}$, its
assortativity coefficient $R$ is defined as

$\displaystyle
R=\frac{\sum_{i=1}^{n}M_{ii}-\sum_{i=1}^{n}a_{i}b_{i}}{1-\sum_{i=1}^{n}a_{i}b_{i}},$

where $M$ is the mixing matrix with entries $M_{ij}$ corresponding to the
fraction of edges where one end has value $P_{i}$, and the other end has value
$P_{j}$, $a_{i}=\sum_{j=1}^{n}M_{ij}$ and $b_{i}=\sum_{j=1}^{n}M_{ji}$. The
assortativity has values between -1 and +1, where a positive value denotes the
tendency of the nodes to connect to other similar nodes (hence yielding a
homophilous network), and a negative value corresponds to connecting to the
tendency to connect to dissimilar nodes (which indicates heterophily).

In Figure 5, we observe a consistent pattern of positive assortativity across
all temperature ranges, which is higher for lower temperatures. Moreover, the
observed assortativity at all temperatures significantly deviates from Random,
which has assortativity close to 0 ($P<0.001$, t-test comparing with Random).
Taken together, we conclude homophily emerges for the networks generated by
LLMs.

Moreover, we present the probability of each reason being mentioned in Figure
5. We find that shared hobbies appear to be much more important than shared
location or favorite color. This is consistent with our intuition that,
similarly to humans, LLMs care more about hobbies than other superficial
attributes when forming social connections.

###  3.2. Macro-Level Principles

(a) Network Instances

(b) Community Structure

Figure 6. Top: Networks created based on Principle 3. Each node can form at
most $\delta=5$ links with the other nodes based on their attributes. The edge
widths correspond to the number of common attributes shared between the nodes.
We report the probability of forming a link as a function of the number of
common attributes between two nodes. The node colors correspond to the
communities found by running the Louvain algorithm. Bottom: Louvain
modularity, number of communities, and community sizes of networks created
based on Principle 3. Lower temperatures yield higher modularity ($P<0.001$,
t-test) and fewer and larger communities ($P<0.001$, t-test). For smaller
temperatures, the communities are more “well-separated”.

#### Principle 4: Community Structure

The community structure of networks refers to the organization of nodes or
individuals within a network into distinct and densely interconnected groups
or clusters (Newman and Girvan, 2004; Newman, 2006; Blondel et al., 2008;
Clauset et al., 2004). Identifying community structures is crucial for
understanding the overall dynamics of a network, as it reveals patterns of
relationships and interactions that might not be apparent at the global level.

We seek to examine how triadic closure and homophily contribute to the
formation of community structures in networks generated by LLMs. We use the
results presented in Section 3.1 to determine whether community structure in
networks generated by LLMs emerges from triadic closure or homophily.

First, we consider the networks generated in Figure 3. We examine how LLM
agents’ choices strengthen the network’s community structure. Specifically, we
leverage the fact that the SBM graph has a preexisting community structure and
measure how the newly formed links reinforce such a structure. Visual
inspection shows that the newly added links, represented by the bold edges,
happen mostly within each cluster, reinforcing the community structure. This
is further quantitatively verified by the fraction $\hat{p}$ newly created
inter-community edges. We find that $\hat{p}$ is significantly higher than 0.5
($P<0.001$, t-test comparing with 0.5). This indicates that most edges are
within the same community, strengthening the community structure.

Next, we use modularity maximization (Blondel et al., 2008) to examine the
community structure that arises due to homophily. Intuitively, the modularity
measure compares the number of edges inside a community with the expected
number of edges that one would find in the cluster if the network were a
random network with the same number of nodes and where each node keeps its
weighted degree, but edges are otherwise randomly attached according to the
Chung-Lu model (Chung and Lu, 2004). This random null model implicitly assumes
that each node can attach to another network node. Formally, for a graph with
weights $w_{ij}$ on its edges, the weighted modularity $Q$ (Clauset et al.,
2004) of a partition with $C$ communities given by

$\displaystyle
Q=\sum_{c=1}^{C}\left[\frac{L_{c}}{W}-r\left(\frac{k_{c}}{2W}\right)^{2}\right],$

Here $W$ is the sum of all weights, $L_{c}$ is the total weight of intra-
community links for community $c$, $k_{c}$ is the total weighted degree of the
nodes in the community $c$ and $r$ is the resolution parameter which (we take
$r=1$ from now on). A large positive value (such as greater than 0.5) of the
modularity corresponds to evidence of community structure, corresponding to
deviation from the random null model. Maximizing $Q$ is NP-Hard, we use the
Louvain algorithm (Blondel et al., 2008) to get a lower bound on the maximum
modularity.

In Figure 6, we plot the communities found from the Louvain algorithm for the
various temperatures, and the Louvain modularity values averaged over ten
simulations with 95% confidence intervals. As weights for the network, we use
the number of common attributes shared between each pair of nodes, i.e.,
$w_{ij}=\left|\left\\{k:x_{i}^{(k)}=x_{j}^{(k)}\right\\}\right|$ for each link
$(i,j)$ in the final network, where $x_{i}^{(k)}$ and $x_{j}^{(k)}$ correspond
to the $k$-th features of $x_{i}$ and $x_{j}$, respectively. We find that for
all temperatures, the Louvain partitions exhibit community structure which
corresponds to positive modularity ($P<0.001$, t-test compared to the
modularity $Q=0$ of the random graph), which is most concentrated for smaller
temperatures, and that as the temperature increases, the Louvain modularity
increases ($P<0.001$, t-test). Also, the smaller the temperature, the fewer
(and larger) on-average communities the Louvain algorithm finds ($P<0.001$,
t-test). Finally, the communities tend to be visually more “separated” for
lower temperatures. We argue that this is because higher temperatures indicate
more randomness in the decisions.

Our results indicate that community structure emerges in networks generated by
LLMs. Namely, the networks generated by LLMs obey triadic closure, and as a
result, the community structure is reinforced. Moreover, networks generated by
LLMs are also homophilous, allowing community structure to emerge. Finally, in
Section 3.3, we show that the community structure is reinforced in real-world
networks where LLMs take a variety of factors, such as homophily and triadic
closure jointly into account in their choices of whom to form a link with.

#### Principle 5: Small-World

(a) $\beta=0.25$

(b) $\beta=0.5$

(c) $\beta=0.75$

Figure 7. Networks and distribution of reasoning created based on Principle 5
using the altered Watts-Strogatz Model for
$n=50,k=5,\beta\in\\{0.25,0.5,0.75\\}$, together with plots of the average
clustering coefficient $C$ and the average shortest path length $L$. The
comparison is made with respect to a Watts-Strogatz graph with
$n=50,k=5,\beta\in\\{0.25,0.5,0.75\\}$. In most cases we observe strong
evidence that $L\sim\log(n)$ and $C\sim 1/\log(n)$.

The small-world phenomenon in networks (Watts and Strogatz, 1998; Kleinberg,
2000) refers to the principle where most nodes in a network are only a few
connections away from each other despite the network’s large size. In a small-
world network, there is a delicate balance between local clustering and short
average path lengths: Nodes tend to form clusters or groups (triadic closure),
exhibiting a high level of interconnectedness within these local
neighborhoods, whereas at the same time, the existence of a few long-range
connections ensures that the entire network is reachable with relatively few
steps (Park et al., 2018; Lyu et al., 2022; Jahani et al., 2023).

Formally, a small-world network is a network where the average shortest path
length $L$ grows proportionally to the network size $n$, namely

$\displaystyle L\sim\log(n),$

while the average clustering coefficient is not small (Watts and Strogatz,
1998). One of the models shown to exhibit the “small-world” phenomenon is the
Watts-Strogatz model (Watts and Strogatz, 1998), which we use as a basis for
our analysis below. Empirical work has shown that many real-world
organizational networks that exhibit the small-world phenomenon have an
average shortest path length $L$ that varies as $\log(n)$ and the average
clustering coefficient $C$ varies as $C\sim 1/\log(n)$ (Jacobs and Watts,
2021).

To investigate whether LLMs can generate networks that exhibit the small-world
phenomenon, we employ a stochastic process analogous to the Watts-Strogatz
model (Watts and Strogatz, 1998) and then fit regression models for the
average shortest path length and the average clustering coefficient. This
approach allows for a direct comparison of the emergence of small-world
properties, such as decreasing average path lengths and increasing clustering
coefficients, with those observed in the Watts-Strogatz model, which serves as
a null model. The generation process is parametrized by three numbers: the
number of nodes $n$, the number of long-range connections $k$, and the
rewiring probability $\beta$. The algorithm proceeds as follows:

  1. (1)

Similarly to Watts-Strogatz, we first create a ring network with $n$ nodes.
After that, for each node $[n]$, we create $k$ edges where $k/2$ edges connect
to its rightmost neighbors and $k/2$ edges connect to its leftmost neighbors.

  2. (2)

To create $G_{t}$, for each node $[n]$, we take its $k/2$ rightmost neighbors
and rewire them with probability $\beta$. For each of the $k/2$ rightmost
neighbors that are to be rewired, we make one query to the LLM, which
indicates how the edge will be rewired. The choice is made by providing the
LLM with all the network nodes and each node’s neighbors (i.e., the network
structure).

The model closely resembles the Watts-Strogatz model, with the primary
distinction being the method of edge rewiring. Instead of randomly selecting
edges for rewiring, as in the Watts-Strogatz model, we determine the rewiring
of an edge by inquiring about the LLM and providing it with the current
network structure.

To test the relation of the average shortest path length and the average
clustering coefficient with $n$ and compare with the results reported in
(Jacobs and Watts, 2021), we create networks of various sizes from $n=10$ to
$n=100$ and Figure 8 for $\beta\in\\{0.25,0.5,0.75\\}$ and $k=5$. Some
instances of these networks are shown in Figure 7 We run regressions relating
to the average shortest path length with $\log(n)$ and observe that for all
temperatures, we obtain statistically significant results (see the
significance indicators in Figure 8, where most regresssions have $P<0.001$)
being that the average shortest path length scales proportionally to $\log(n)$
per existing works (Jacobs and Watts, 2021). Similarly, we show that the
average clustering coefficient scales as $1/\log(n)$ (again, most regression
results have $P<0.001$), in agreement with (Jacobs and Watts, 2021).

(a) $\beta=0.25$

(b) $\beta=0.5$

(c) $\beta=0.75$

Figure 8. Regression plots relating average shortest path length and average
clustering coefficient with $n$ for $\beta\in\\{0.25,0.5,0.75\\}$ and $k=5$.
$a$ represents the slope of the regression lines. $*$ indicates $P<0.05$, $**$
indicates $P<0.01$, and $***$ indicates $P<0.001$.

(a) $\beta=0.25$

(b) $\beta=0.5$

(c) $\beta=0.75$

Figure 9. Estimated values $\hat{\beta}$ of $\beta\in\\{0.25,0.5,0.75\\}$ for
LLM-generated networks based on matching the average clustering coefficient
and difference in the average shortest path between LLM-generated networks and
Watts-Strogatz with rewiring probability $\hat{\beta}$.

While we have shown that we have strong evidence that $L\sim\log(n)$ and
$C\sim 1/\log(n)$ for the networks of Figures 7 and 8 indicating small-world
properties do exist, we have not identified whether these networks have
similar statistics with the actual Watts-Strogatz model. Specifically, as
Figure 7 shows, we obtain weak evidence that the final generated networks have
the similar average shortest path length as Watts-Strogatz with
$\beta\in\\{0.25,0.5,0.75\\}$ ($P<0.1$, t-test comparing the resulting average
shortest path lengths of the networks generated by multi-LLMs and the Watts-
Strogatz average shortest path lengths for $\beta\in\\{0.25,0.5,0.75\\}$) and
a larger average clustering coefficient than Watts-Strogatz ($P<0.1$, t-test
comparing the resulting average clustering coefficient of the networks
generated by multi-LLMs and the Watts-Strogatz average clustering coefficient
for $\beta\in\\{0.25,0.5,0.75\\}$).

This raises the following question: Does a value $\hat{\beta}\neq\beta$ exist
such that Watts-Strogatz networks generated with rewiring probability
$\hat{\beta}$ “resemble” the LLM-generated networks? To find such values
$\hat{\beta}$, we do a binary search on $\hat{\beta}$ such that the average
clustering coefficient of a Watts-Strogatz network with rewiring probability
$\hat{\beta}$ matches the empirical average clustering coefficient of the LLM-
generated network. In Figure 9, we plot the estimated values for $\hat{\beta}$
for each value of $\beta$, each simulation and each temperature. Additionally,
we plot the average shortest path length _difference_ between the Watts-
Strogatz graph generated having rewiring probability $\hat{\beta}$ for each
simulation and the LLM-generated networks. To this end, we observe that,
although not identical, the two quantities are close to each other.
Specifically, a t-test comparing with the average shortest path length of
Watts-Strogatz with rewiring probability $\hat{\beta}$ yields $P>0.1$ for all
temperatures for $\beta=0.25$, and $P>0.1$ for the temperatures being 0.5 and
1.5 and $0.05<P<0.1$ for the temperature being 1.0 for
$\beta\in\\{0.25,0.75\\}$.

These results suggest that LLMs do exhibit small-world properties.
Specifically, the average shortest path length scales as $\log(n)$, and the
average clustering coefficient scales as $1/\log(n)$, which are considered
important statistical properties of small-world networks by (Jacobs and Watts,
2021). Moreover, these networks have similar (though not identical) average
shortest path lengths with Watts-Strogatz networks with rewiring probabilities
$\hat{\beta}\neq\beta$.

###  3.3. Real-World Networks

To understand the behavior of LLMs in the context of real-world network
formation, we utilize the Facebook100 dataset (Traud et al., 2012) and a
discrete choice modeling framework (Overgoor et al., 2019; McFadden, 1972).
The dataset consists of “friendship” networks at one hundred American colleges
and universities at a single point in time from Facebook’s online social
network. We model the network formation process as a discrete choice process
in which nodes are sequentially asked to form links from a set of
alternatives.

#### Discrete Choice Model

For each node $i$ that we consider at time $t$, we randomly remove one of its
current friends from the real-world network. Subsequently, we present each
node with a set of candidate nodes (denoted by $A_{t}$), comprising one of the
removed friends and other nodes that were not originally its friends. We then
instruct the LLM to form a link with one of the candidates, providing the
attributes of the candidates and the social network structure to aid its
decision-making. These choices are made sequentially.

We use the utility of the model for each node for each sequential decision of
network formation:

$\displaystyle U_{ij,t}=\theta_{\mathrm{PA}}\log
d_{j,t}+\theta_{\mathrm{H}}\log w_{ij}+\theta_{\mathrm{TC}}\log
c_{ij,t}+\epsilon_{ij,t},$

In this equation, $\theta_{\mathrm{PA}}$ measures the strength of preferential
attachment based on the degree $d_{j,t}$ of $j$ at step $t$,
$\theta_{\mathrm{H}}$ measures the strength of homophily based on the
similarity $w_{ij}$ (i.e. number of common attributes) between $i$ and $j$,
and $\theta_{\mathrm{TC}}$ measures the strength of triadic closure, based on
the number of common neighbors $c_{ij,t}$ between $i$ and $j$ at step $t$. The
error term $\epsilon_{ij,t}$ is distributed as i.i.d. standard Gumbel777The
standard Gumbel distribution has CDF $e^{e^{-x}}$.. The covariates are range-
normalized.

The multinomial logit model (MNL) indicates that the probability that $i$
links to $j$ at step $t$ is given by

Temp. | $\hat{\theta}_{\mathrm{PA}}$ | $\hat{\theta}_{\mathrm{H}}$ | $\hat{\theta}_{\mathrm{TC}}$ | LL | AIC | % Change | % Change | % Change |  $\Delta Q$ (t-stat)
---|---|---|---|---|---|---|---|---|---
|  |  |  |  |  | Acc. | $L$ | $C$ |
| Caltech36 (769 nodes, 33,312 edges)
0.5 | 0.41*** (0.31) | 1.95*** (0.64) | 0.59*** (0.37) | -1,377.47 | 2,762.94 | 171.8 | -0.008 | -9.94 | 3.45**
1.0 | 0.36*** (0.13) | 1.85*** (0.52) | 0.58*** (0.33) | -1,435.07 | 2,878.13 | 179.6 | -0.18 | -11.08 | 3.49**
1.5 | 0.36*** (0.16) | 1.72*** (0.31) | 0.55*** (0.20) | -1,522.47 | 3,052.94 | 127.6 | -0.06 | -11.46 | 3.37**
| Swarthmore42 (1,659 nodes, 12,2100 edges)
0.5 | 0.18*** (0.13) | 1.62*** (0.23) | 0.65*** (0.08) | -2,838.33 | 5,684.66 | 124.2 | 0.01 | -11.46 | 7.42***
1.0 | 0.26*** (0.07) | 1.70*** (0.35) | 0.58*** (0.12) | -2,927.99 | 5,863.97 | 91.6 | -0.10 | -4.25 | 1.96*
1.5 | 0.19*** (0.14) | 1.50*** (0.33) | 0.59*** (0.10) | -3,139.42 | 6,286.83 | 87.39 | -0.20 | -4.52 | 4.03***
| UChicago30 (6,591 nodes, 416,206 edges)
0.5 | 0.23*** (0.06) | 2.00*** (0.24) | 0.41*** (0.09) | -3,444.33 | 6,896.67 | 217.2 | -0.24 | -2.52 | 7.46*** [0.34]
1.0 | 0.23*** (0.10) | 1.98*** (0.17) | 0.38*** (0.06) | -3,578.18 | 7,164.36 | 219.2 | -0.12 | -2.66 | 9.56*** [1.05]
1.5 | 0.22*** (0.12) | 1.78*** (0.27) | 0.41*** (0.07) | -2,033.49 | 4,074.98 | 222.4 | -0.17 | -2.42 | 10.19*** [0.24]
_Notes_ |  $\hat{\theta}_{\mathrm{PA}}$ = Coefficient of log degree, $\hat{\theta}_{\mathrm{H}}$ = Coefficient of log # of common attributes, $\hat{\theta}_{\mathrm{TC}}$ = Coefficient of log # common neighbors
| LL = Log-likelihood, AIC = Akaike Information Criterion
|  Acc. = Accuracy, $L$ = Average Path Length, $C$ = Average Clustering
Coefficient, $\Delta Q$ (t-stat) = Modularity change t-statistic
| ${}^{*}:P<0.05,\;^{**}:P<0.01,\;^{***}:P<0.001$
Table 1. Multinomial logit coefficients for three networks from the
Facebook100 dataset. The standard errors of the estimates are shown in
parentheses. The full regression tables can be found in Appendix A. The null
hypothesis corresponds to the respective parameter being equal to 0. We report
the percent change in accuracy, average path length, and average clustering
coefficient compared to the initial network (before the deletion of edges).
For the change in modularity, we run the Louvain algorithm ten times and
perform a t-test with the resulting modularities. For the UChicago30 dataset,
we report the t-statistic value in the subgraph induced by the 2,000 sampled
nodes. We also report the modularity change (t-statistic) in the whole graph
inside brackets.

$\displaystyle p_{ij,t}=\Pr\left[\mathrm{argmax}_{r\in
A_{t}}U_{ir,t}=j\right]=\frac{d_{j,t}^{\theta_{\mathrm{PA}}}w_{ij}^{\theta_{\mathrm{H}}}c_{ij,t}^{\theta_{\mathrm{TC}}}}{\sum_{r\in
A_{t}}d_{r,t}^{\theta_{\mathrm{PA}}}w_{ir}^{\theta_{\mathrm{H}}}c_{ir,t}^{\theta_{\mathrm{TC}}}}.$

Given a sequence of nodes $i_{1},\dots,i_{T}\in V$ and choices (denoted by
subscripted $j$) $j_{1}\in A_{1},\dots,j_{T}\in A_{T}$, the parameters can be
found by maximizing the log-likelihood function. To get the standard errors of
the coefficients and the corresponding $P$-values, we follow the process
outlined in (Overgoor et al., 2019).

#### Experiment Setup and Rationale.

We use datasets that refer to three US colleges – Caltech36, Swarthmore42, and
UChicago30. They represent different sizes of networks: $n=769$, $n=1,659$,
and $n=6,591$ nodes, respectively.

After the removal procedure we described, we obtain the initial network
$G_{1}$. For the Caltech36 ($n=769$) and Swarthmore42 ($n=1,659$) datasets, we
consider all of the nodes of the networks as nodes that have to make a choice.
For the UChicago30 dataset, we consider a randomly sampled subset of 2,000
nodes because of the limited context window of GPT models. We set the size of
the alternative sets to 20, and thus, the accuracy of random guessing is 5%.

#### Regression Results and LLM-based Reasoning

We present the regression results in Table 1. Our analysis reveals that the
degree, the number of common neighbors, and the number of shared interests are
all statistically significant factors influencing the choices of LLMs
($P<0.001$) across all datasets. Furthermore, we find that LLMs place the
greatest emphasis on the number of common attributes
($\hat{\theta}_{\mathrm{H}}$), followed by the number of common neighbors
($\hat{\theta}_{\mathrm{TC}}$), and then the degree
($\hat{\theta}_{\mathrm{PA}}$).

These results suggest that LLMs exhibit a strong preference for homophily,
followed by a tendency towards triadic closure, and finally, preferential
attachment. Specifically, the relationship
$\hat{\theta}_{\mathrm{H}}>\hat{\theta}_{\mathrm{TC}}>\hat{\theta}_{\mathrm{PA}}$
holds across all examined datasets and temperature settings.

Moreover, Figure 10 demonstrates that the reasoning provided by LLMs aligns
with the aforementioned findings. In particular, LLMs emphasize homophily,
indicating that nodes sharing similar characteristics—such as student/faculty
status, high school, and graduation year—are more likely to form connections.
Conversely, the effects of triadic closure and preferential attachment are
less prominent.

In summary, our analysis indicates that although preferential attachment,
homophily, and triadic closure are all present in the network formation
behaviors of LLMs, homophily emerges as the predominant driving force.

Figure 10. Distribution of reasoning across categories for the real-world
networks. The classification is done using GPT-4 on a set of 20 randomly
sampled reasons repeated over 5 times. In agreement with Table 1, the multi-
LLMs put more weight on homophily, then on triadic closure, and then on
preferential attachment. The error bars correspond to 95% confidence
intervals.

#### Percent Increase in Accuracy Compared to Random Guessing

We evaluate the percentage increase in accuracy, where accuracy is defined as
the likelihood of selecting a previously existing neighbor from a set of
alternatives, compared to making a random selection from 20 possible options.
As shown in Table 1, LLMs demonstrate a substantially higher accuracy in their
selections than would be expected from random guessing.

#### Average Shortest Path Length.

We measure the percent change in the average shortest path length between the
network before the edge deletions and the network after the choices made by
the LLM agents (see Table 1). We observe a small decrease in the average path
length in the new network in almost all cases indicating that the average
shortest path length decreases slightly, indicating strengthening of the
small-world phenomenon.

#### Triadic Closure.

In addition to the coefficient $\hat{\theta}_{\mathrm{TC}}$ of triadic
closure, we measure the percent change in the average shortest path length and
the average clustering coefficient between the network before the edge
deletions and the network after the choices made by the LLM agents (see Table
1). We observe that the average clustering coefficient also decreases compared
to the initial network, indicating the weakening of triadic closure compared
to the initial network.

#### Community Structure.

We run the Louvain algorithm 10 times for both the initial graph $G_{1}$ and
the final graph $G_{T}$ and perform a t-test between the resulting
modularities (see Table 1). We observe that the modularity increases in all
cases and is statistically significant. This suggests that LLMs make choices
that naturally yield a reinforcement of the community structure.

##  4\. Related Work

In this section, we review the following collections of literature on networks
and LLMs: _(i)_ classical models in network science, _(ii)_ concurrent works
at the intersection between networks and LLMs, and _(iii)_ broad applications
of LLMs to social sciences.

###  4.1. Classical Network Formation Models

Here we review the literature on network formation models.

The Barabási–Albert (BA) model (Barabási and Albert, 1999) is among the most
well-known science models. It describes the “the-rich-get-richer” effect
regarding network connections using minimal assumptions, including
preferential attachment. Although our study only examines the BA model, this
stream has multiple extensions. For example, the fitness model – or Bianconi-
Barabási model – (Bianconi and Barabási, 2001) where nodes form new links
proportionally to each alternative’s fitness, the generalized preferential
attachment model. Chung-Lu model (Chung and Lu, 2004) creates random networks
from a prescribed degree sequence. Geometric preferential attachment models
(Flaxman et al., 2006; Bonato et al., 2010, 2012) combine preferential
attachment with geometric constraints.

As for homophily, triadic closure, and community structure in networks, there
has been a significant amount of research has been devoted to studying
stochastic blockmodels (Holland et al., 1983; Abbe, 2018) that combines these
three. The stochastic block model is a random graph model with a community
structure. To this end, our study uses stochastic block models as the basic
networks upon which the LLMs make choices, showing that triadic closure and
community structure emerge in networks generated by LLMs, which are similar to
real-world networks (Mosleh et al., 2024; Granovetter, 1973). Moreover, our
paper utilizes modularity maximization methods (Blondel et al., 2008; Newman
and Girvan, 2004; Newman, 2006) to recover communities in the networks
generated by multi-LLMs.

The Watts-Strogatz model is characterized by short average shortest path
lengths and high clustering coefficients (Watts and Strogatz, 1998; Kleinberg,
2000). It explains the “small-world phenomenon,” which means the average
distance between any two people is short (in fact, logarithmic in the network
size) (Travers and Milgram, 1977). Recently, it has been observed in (Jacobs
and Watts, 2021) that real-world organizational networks have logarithmic
average shortest path lengths and clustering coefficients that vary inversely
with the logarithm of the number of nodes. Our work contributes to this line
of work by designing a multi-LLM-based random graph model that exhibits
logarithmic average shortest path lengths and a clustering coefficient that
varies inversely with the logarithm of the size of the network consistent to
small-world networks.

Finally, our study treats the choices made by multi-LLMs in real-world network
scenarios (cf. Section 3.3) as a discrete choice modeling problem where each
agent’s utility is modeled after a homophily, a triadic closure, and a
preferential attachment term as these are the main micro-level principles that
emerge in networks simulated by multi-LLMs. To this end, we mention that
treating network growth as a discrete choice modeling problem in classical
network science problems has been studied in (Overgoor et al., 2019). Our work
leverages techniques from the work of (Overgoor et al., 2019) to fit discrete
choice models to model the choices made by LLM-based agents (contrary to real-
world networks that the work of (Overgoor et al., 2019) studies).

###  4.2. Existing studies on networks and multi-LLMs

Our study serves as the first comprehensive examination of social networking
behavior in LLMs. While a few studies have explored one or a few aspects of
networking behavior in LLMs, our research provides a more holistic view.

For example, (De Marzo et al., 2023) exclusively examines the emergence of the
preferential attachment mechanism in networks simulated by LLM-based agents.
However, their study only provides degree information rather than network
structure, and they observe a ”star-like” network where only one central node
receives all the connections. This observation aligns with our discussion in
Figure 1(b). In contrast, we find that providing LLMs with the topology of the
network (i.e., each agent’s neighbors) allows us to recover networks that
follow a power-law degree distribution, which, in some cases, are identical to
the BA model (cf. Figure 1(a)).

Concurrently, (He et al., 2023) examines how LLMs interact in human-like
societies by conducting a sandbox experiment on a social network platform. The
authors show that homophily patterns emerge between the agents similarly to
humans. However, our study not only examines multiple aspects of network
formation in addition to homophily but also compares the strengths of
different drivers.

Moreover, (Park et al., 2023) designs interactive environments among multiple
LLMs with synthesized memories and dynamic planning. Similarly, the works of
(Li et al., 2023a) and (Zhou et al., 2023) leveraged LLMs to simulate complex
social interactions such as collaboration, coordination, exchange, and
competition and observed the emergence of such phenomena. However, they did
not explicitly examine the network formation behavior of LLMs.

Finally, (Gao et al., 2023) introduces the $S^{3}$ system, where LLMs are
emulated similarly to a real human society (with emotions, attitudes, and
interactions) and observe the emergence of phenomena that exist in human
societies. Relevantly, (Jiang and Ferrara, 2023) presents Social-LLM and
proposes a user modeling approach based on social network data and large
language models focusing on detection tasks. However, our focus is on the
emergence of network principles in contrast to social simulations or detection
tasks.

###  4.3. Broad literature on understanding the behavior of LLMs in social
science contexts

Our study contributes to the emerging field of understanding LLMs’ behavior in
social science contexts. While the computer science literature has extensively
examined LLMs from multiple perspectives, including bias and fairness (Liang
et al., 2022), understanding how LLMs’ behaviors mirror human behaviors from a
social science standpoint remains limited.

Recent studies have explored various aspects of LLMs’ behavior, such as
rationality (Chen et al., 2023), social preferences (Horton, 2023; Leng and
Yuan, 2023), social learning (Leng and Yuan, 2023), strategic thinking (Akata
et al., 2023; Brookins and DeBacker, 2023), the diffusion of ideas and
opinions (Chuang et al., 2023), and cooperation and coordination (Papachristou
et al., 2023; Fish et al., 2023). Furthermore, research in psychology has
sought to understand the personality and values of LLMs, as demonstrated by
studies (Miotto et al., 2022) and (Pellert et al., 2023).

These investigations provide valuable insights into LLMs’ behavior, offering
opportunities to employ LLMs for social simulations or agent-based modeling
and to undertake efforts in model alignment. The ongoing work in this area,
including studies (Park et al., 2023; Li et al., 2023b; Gao et al., 2023;
Griffin et al., 2023), highlights the potential for paradigm shifts in social
science studies and a deeper understanding of human-AI interactions.

By synthesizing these insights, our research aims to contribute to the broader
conversation on LLMs in social contexts, emphasizing the importance of
understanding both human and AI behaviors and their interactions. This
approach enriches our comprehension of LLMs and opens new avenues for
interdisciplinary research in social sciences and artificial intelligence.

##  5\. Discussion

Our study conducted a comprehensive evaluation of LLMs’ network formation
preferences, encompassing both micro-level network principles such as
preferential attachment, triadic closure, and homophily and macro-level
network principles like community structure and the small-world phenomenon.
Our findings indicate that networks generated by multiple LLMs do exhibit
these properties, particularly when primed with network statistics such as the
number of mutual friends or the degree of alternatives.

Furthermore, through discrete choice modeling, we explored the emergence of
these properties in real-world networks. Our results reveal that the agents’
selections are predominantly driven by homophily, followed by triadic closure,
and then preferential attachment. Additionally, we observed a strengthening of
community structure in real-world network experiments.

Our study enhances our understanding of the behavior of LLMs. For example, our
findings reveal varying strengths of network formation properties, suggesting
that when LLMs are employed to coordinate social networks in social or work
environments, they may exhibit behaviors similar to humans. This insight
contributes to developing socially aware LLMs that align with human
preferences, with potential applications ranging from chatbots and virtual
assistants to collaborative systems and social media platforms.

Furthermore, our research provides valuable insights into network science by
exploring how LLMs can be utilized in network science studies. As LLMs possess
fundamental network principles and exhibit human-like network formation
behaviors, their use in simulations of social systems or agent-based modeling
holds great promise. This advancement aids in the further development of
social science studies, particularly in the areas of network formation and
social dynamics.

Looking ahead, we propose two promising directions for future research. First,
we propose investigating LLM behavior in more complex interactions, such as
simulated dialogs or specific environments like companies, schools, or
parties. By examining LLMs in these contexts, we can better understand their
network formation preferences and how they adapt to different social dynamics.
This research could shed light on the nuances of LLM behavior in realistic
settings and inform their integration into diverse social environments.

Second, we suggest exploring the application of our findings in specific
settings, particularly in organizational contexts. For example, considering
the potential use of LLMs to assist HR professionals, our study’s insights
could guide the alignment of LLMs with organizational goals. By leveraging
network information, LLMs could help HR departments identify their firms’ best
fit or talent, optimizing recruitment and talent management processes.

###### Acknowledgements.

M.P. is supported by a scholarship from the Onassis Foundation (Scholarship
ID: F ZT 056-1/2023-2024).

## References

  * (1)
  * Abbe (2018) Emmanuel Abbe. 2018\.  Community detection and stochastic block models: recent developments.  _Journal of Machine Learning Research_ 18, 177 (2018), 1–86.
  * Aher et al. (2023) Gati V Aher, Rosa I Arriaga, and Adam Tauman Kalai. 2023\.  Using large language models to simulate multiple humans and replicate human subject studies. In _International Conference on Machine Learning_. PMLR, 337–371.
  * Akata et al. (2023) Elif Akata, Lion Schulz, Julian Coda-Forno, Seong Joon Oh, Matthias Bethge, and Eric Schulz. 2023\.  Playing repeated games with Large Language Models.  _arXiv preprint arXiv:2305.16867_ (2023).
  * Bakshy et al. (2012) Eytan Bakshy, Itamar Rosenn, Cameron Marlow, and Lada Adamic. 2012.  The role of social networks in information diffusion. In _Proceedings of the 21st international conference on World Wide Web_. 519–528.
  * Banerjee et al. (2013) Abhijit Banerjee, Arun G Chandrasekhar, Esther Duflo, and Matthew O Jackson. 2013.  The diffusion of microfinance.  _Science_ 341, 6144 (2013), 1236498.
  * Barabási (2013) Albert-László Barabási. 2013\.  Network science.  _Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences_ 371, 1987 (2013), 20120375\.
  * Barabási and Albert (1999) Albert-László Barabási and Réka Albert. 1999.  Emergence of scaling in random networks.  _Science_ 286, 5439 (1999), 509–512.
  * Bianconi and Barabási (2001) Ginestra Bianconi and A-L Barabási. 2001.  Competition and multiscaling in evolving networks.  _Europhysics letters_ 54, 4 (2001), 436.
  * Blondel et al. (2008) Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre. 2008.  Fast unfolding of communities in large networks.  _Journal of statistical mechanics: theory and experiment_ 2008, 10 (2008), P10008.
  * Bonato et al. (2010) Anthony Bonato, Jeannette Janssen, and Pawel Prałat. 2010\.  The geometric protean model for on-line social networks. In _Algorithms and Models for the Web-Graph: 7th International Workshop, WAW 2010, Stanford, CA, USA, December 13-14, 2010. Proceedings 7_. Springer, 110–121.
  * Bonato et al. (2012) Anthony Bonato, Jeannette Janssen, and Paweł Prałat. 2012\.  Geometric protean graphs.  _Internet Mathematics_ 8, 1-2 (2012), 2–28.
  * Bordia and Bowman (2019) Shikha Bordia and Samuel R Bowman. 2019.  Identifying and reducing gender bias in word-level language models.  _arXiv preprint arXiv:1904.03035_ (2019).
  * Borgatti and Everett (2000) Stephen P Borgatti and Martin G Everett. 2000.  Models of core/periphery structures.  _Social networks_ 21, 4 (2000), 375–395.
  * Brookins and DeBacker (2023) Philip Brookins and Jason Matthew DeBacker. 2023.  Playing games with GPT: What can we learn about a large language model from canonical strategic games?  _Available at SSRN 4493398_ (2023).
  * Chen et al. (2023) Yiting Chen, Tracy Xiao Liu, You Shan, and Songfa Zhong. 2023\.  The Emergence of Economic Rationality of GPT.  _arXiv preprint arXiv:2305.12763_ 120, 51 (2023), e2316205120.  https://doi.org/10.1073/pnas.2316205120 arXiv:https://www.pnas.org/doi/pdf/10.1073/pnas.2316205120
  * Chopra and Haaland (2023) Felix Chopra and Ingar Haaland. 2023.  Conducting qualitative interviews with AI.  (2023).
  * Chuang et al. (2023) Yun-Shiuan Chuang, Agam Goyal, Nikunj Harlalka, Siddharth Suresh, Robert Hawkins, Sijia Yang, Dhavan Shah, Junjie Hu, and Timothy T. Rogers. 2023.  Simulating Opinion Dynamics with Networks of LLM-based Agents.  arXiv:2311.09618 [physics.soc-ph]
  * Chung and Lu (2004) Fan Chung and Linyuan Lu. 2004.  The average distance in a random graph with given expected degrees.  _Internet Mathematics_ 1, 1 (2004), 91–113.
  * Clauset et al. (2004) Aaron Clauset, Mark EJ Newman, and Cristopher Moore. 2004\.  Finding community structure in very large networks.  _Physical review E_ 70, 6 (2004), 066111.
  * De Marzo et al. (2023) Giordano De Marzo, Luciano Pietronero, and David Garcia. 2023\.  Emergence of Scale-Free Networks in Social Interactions among Large Language Models.  _arXiv preprint arXiv:2312.06619_ (2023).
  * Fish et al. (2023) Sara Fish, Paul Gölz, David C. Parkes, Ariel D. Procaccia, Gili Rusak, Itai Shapira, and Manuel Wüthrich. 2023.  Generative Social Choice.  arXiv:2309.01291 [cs.GT]
  * Flaxman et al. (2006) Abraham D Flaxman, Alan M Frieze, and Juan Vera. 2006.  A geometric preferential attachment model of networks.  _Internet Mathematics_ 3, 2 (2006), 187–205.
  * Fowler and Christakis (2008) James H Fowler and Nicholas A Christakis. 2008.  Dynamic spread of happiness in a large social network: longitudinal analysis over 20 years in the Framingham Heart Study.  _Bmj_ 337 (2008).
  * Gao et al. (2023) Chen Gao, Xiaochong Lan, Zhihong Lu, Jinzhu Mao, Jinghua Piao, Huandong Wang, Depeng Jin, and Yong Li. 2023\.  S3: Social-network Simulation System with Large Language Model-Empowered Agents.  _arXiv preprint arXiv:2307.14984_ (2023).
  * Granovetter (1973) Mark S Granovetter. 1973\.  The strength of weak ties.  _American journal of sociology_ 78, 6 (1973), 1360–1380.
  * Griffin et al. (2023) Lewis D Griffin, Bennett Kleinberg, Maximilian Mozes, Kimberly T Mai, Maria Vau, Matthew Caldwell, and Augustine Marvor-Parker. 2023.  Susceptibility to Influence of Large Language Models.  _arXiv preprint arXiv:2303.06074_ (2023).
  * He et al. (2023) James He, Felix Wallis, and Steve Rathje. 2023.  Homophily in An Artificial Social Network of Agents Powered by Large Language Models.  (2023).
  * Holland et al. (1983) Paul W Holland, Kathryn Blackmond Laskey, and Samuel Leinhardt. 1983.  Stochastic blockmodels: First steps.  _Social Networks_ 5, 2 (1983), 109–137.
  * Horton (2023) John J Horton. 2023\.  _Large language models as simulated economic agents: What can we learn from homo silicus?_ Technical Report. National Bureau of Economic Research.
  * Jackson (2008) Matthew O Jackson. 2008\.  _Social and economic networks_. Vol. 3.  Princeton university press Princeton.
  * Jacobs and Watts (2021) Abigail Z Jacobs and Duncan J Watts. 2021.  A large-scale comparative study of informal social networks in firms.  _Management Science_ 67, 9 (2021), 5489–5509.
  * Jahani et al. (2023) Eaman Jahani, Samuel P Fraiberger, Michael Bailey, and Dean Eckles. 2023.  Long ties, disruptive life events, and economic prosperity.  _Proceedings of the National Academy of Sciences_ 120, 28 (2023), e2211062120.
  * Jiang and Ferrara (2023) Julie Jiang and Emilio Ferrara. 2023.  Social-LLM: Modeling User Behavior at Scale using Language Models and Social Network Data.  _arXiv preprint arXiv:2401.00893_ (2023).
  * Kleinberg (2000) Jon Kleinberg. 2000\.  The small-world phenomenon: An algorithmic perspective. In _Proceedings of the thirty-second annual ACM symposium on Theory of computing_. 163–170.
  * Kotek et al. (2023) Hadas Kotek, Rikker Dockum, and David Sun. 2023.  Gender bias and stereotypes in Large Language Models. In _Proceedings of The ACM Collective Intelligence Conference_. 12–24.
  * Leng et al. (2023) Yan Leng, Tara Sowrirajan, Yujia Zhai, and Alex Pentland. 2023.  Interpretable stochastic block influence model: measuring social influence among homophilous communities.  _IEEE Transactions on Knowledge and Data Engineering_ (2023).
  * Leng and Yuan (2023) Yan Leng and Yuan Yuan. 2023.  Do LLM Agents Exhibit Social Behavior?  _arXiv preprint arXiv:2312.15198_ (2023).
  * Li et al. (2023a) Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, and Bernard Ghanem. 2023a.  Camel: Communicative agents for” mind” exploration of large scale language model society.  _arXiv preprint arXiv:2303.17760_ (2023).
  * Li et al. (2023b) Yuan Li, Yixuan Zhang, and Lichao Sun. 2023b.  Metaagents: Simulating interactions of human behaviors for llm-based task-oriented coordination via collaborative generative agents.  _arXiv preprint arXiv:2310.06500_ (2023).
  * Liang et al. (2022) Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, et al. 2022\.  Holistic evaluation of language models.  _arXiv preprint arXiv:2211.09110_ (2022).
  * Liben-Nowell and Kleinberg (2003) David Liben-Nowell and Jon Kleinberg. 2003.  The link prediction problem for social networks. In _Proceedings of the twelfth international conference on Information and knowledge management_. 556–559.
  * Lyu et al. (2022) Ding Lyu, Yuan Yuan, Lin Wang, Xiaofan Wang, and Alex Pentland. 2022.  Investigating and modeling the dynamics of long ties.  _Communications Physics_ 5, 1 (2022), 87.
  * McFadden (1972) Daniel McFadden. 1972\.  Conditional logit analysis of qualitative choice behavior.  (1972).
  * McPherson et al. (2001) Miller McPherson, Lynn Smith-Lovin, and James M Cook. 2001\.  Birds of a feather: Homophily in social networks.  _Annual review of sociology_ 27, 1 (2001), 415–444.
  * Miotto et al. (2022) Marilù Miotto, Nicola Rossberg, and Bennett Kleinberg. 2022\.  Who is GPT-3? an exploration of personality, values and demographics.  _arXiv preprint arXiv:2209.14338_ (2022).
  * Mosleh et al. (2024) Mohsen Mosleh, Dean Eckles, and David Gertler Rand. 2024\.  _Tendencies toward triadic closure: Field-experimental evidence_.  Technical Report. Center for Open Science.
  * Newman (2003) Mark EJ Newman. 2003\.  Mixing patterns in networks.  _Physical review E_ 67, 2 (2003), 026126.
  * Newman (2006) Mark EJ Newman. 2006\.  Modularity and community structure in networks.  _Proceedings of the national academy of sciences_ 103, 23 (2006), 8577–8582.
  * Newman and Girvan (2004) Mark EJ Newman and Michelle Girvan. 2004.  Finding and evaluating community structure in networks.  _Physical review E_ 69, 2 (2004), 026113.
  * OpenAI (2023) OpenAI. 2023.  GPT-4 technical report.  _arXiv_ (2023), 2303–08774.
  * Overgoor et al. (2019) Jan Overgoor, Austin Benson, and Johan Ugander. 2019\.  Choosing to grow a graph: Modeling network formation as discrete choice. In _The World Wide Web Conference_. 1409–1420.
  * Papachristou et al. (2023) Marios Papachristou, Longqi Yang, and Chin-Chia Hsu. 2023\.  Leveraging Large Language Models for Collective Decision-Making.  _arXiv preprint arXiv:2311.04928_ (2023).
  * Park et al. (2023) Joon Sung Park, Joseph C O’Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. 2023.  Generative agents: Interactive simulacra of human behavior.  _arXiv preprint arXiv:2304.03442_ (2023), 1–22.
  * Park et al. (2018) Patrick S Park, Joshua E Blumenstock, and Michael W Macy. 2018\.  The strength of long-range ties in population-scale social networks.  _Science_ 362, 6421 (2018), 1410–1413.
  * Pellert et al. (2023) Max Pellert, Clemens M Lechner, Claudia Wagner, Beatrice Rammstedt, and Markus Strohmaier. 2023\.  AI Psychometrics: Using psychometric inventories to obtain psychological profiles of large language models.  (2023).
  * Rahwan et al. (2019) Iyad Rahwan, Manuel Cebrian, Nick Obradovich, Josh Bongard, Jean-François Bonnefon, Cynthia Breazeal, Jacob W Crandall, Nicholas A Christakis, Iain D Couzin, Matthew O Jackson, et al. 2019\.  Machine behaviour.  _Nature_ 568, 7753 (2019), 477–486.
  * Rogers (2003) E. M. Rogers. 2003\.  _Diffusion of Innovations_ (5th ed.).  Simon and Schuster.
  * Touvron et al. (2023) Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Silva Ruan, Smith Eric Michael, Subramanian Ranjan, Tan Xiaoqing Ellen, Tang Binh, Taylor Ross, Williams Adina, Xiang Jian, Xu Kuan Puxin, Yan Zheng, Zarov Iliyan, Zhang Yuchen, Fan Angela, Kambadur Melanie, Narang Sharan, Rodriguez Aurelien, Stojnic Robert, Edunov Sergey, and Scialom Thomas. 2023\.  Llama 2: Open Foundation and Fine-Tuned Chat Models.  _arXiv preprint arXiv:2310.12345_ (2023).
  * Traud et al. (2012) Amanda L Traud, Peter J Mucha, and Mason A Porter. 2012\.  Social structure of facebook networks.  _Physica A: Statistical Mechanics and its Applications_ 391, 16 (2012), 4165–4180.
  * Travers and Milgram (1977) Jeffrey Travers and Stanley Milgram. 1977.  An experimental study of the small world problem.  In _Social networks_. Elsevier, 179–197.
  * Veselovsky et al. (2023) Veniamin Veselovsky, Manoel Horta Ribeiro, and Robert West. 2023\.  Artificial Artificial Artificial Intelligence: Crowd Workers Widely Use Large Language Models for Text Production Tasks.  arXiv:2306.07899 [cs.CL]
  * Vig et al. (2020) Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. 2020.  Investigating gender bias in language models using causal mediation analysis.  _Advances in neural information processing systems_ 33 (2020), 12388–12401.
  * Watts and Strogatz (1998) Duncan J Watts and Steven H Strogatz. 1998.  Collective dynamics of ‘small-world’networks.  _nature_ 393, 6684 (1998), 440–442.
  * Zhou et al. (2023) Xuhui Zhou, Hao Zhu, Leena Mathur, Ruohong Zhang, Haofei Yu, Zhengyang Qi, Louis-Philippe Morency, Yonatan Bisk, Daniel Fried, Graham Neubig, et al. 2023\.  Sotopia: Interactive evaluation for social intelligence in language agents.  _arXiv preprint arXiv:2310.11667_ (2023).

##  Appendix A Full Regression Tables

Temp. | $\hat{\theta}_{\mathrm{PA}}$ | $\hat{\theta}_{\mathrm{H}}$ | $\hat{\theta}_{\mathrm{TC}}$ | Log Likelihood | AIC
---|---|---|---|---|---
0.5 | 0.50*** (0.04) |  |  | -2,236.36 | 4,476.71
0.5 |  | 2.78*** (0.07) |  | -1,511.42 | 3,026.85
0.5 |  |  | 1.53*** (0.04) | -1,506.01 | 3,016.02
0.5 | 0.64*** (0.06) | 2.99*** (0.19) |  | -1,414.71 | 2,835.41
0.5 | -0.02 (0.10) |  | 1.53*** (0.08) | -1,505.95 | 3,017.90
0.5 |  | 1.43*** (0.11) | 0.82*** (0.06) | -1,406.39 | 2,818.78
0.5 | 0.41*** (0.31) | 1.95*** (0.64) | 0.59*** (0.37) | -1,377.47 | 2,762.94
1.0 | 0.48*** (0.04) |  |  | -2,242.85 | 4,489.70
1.0 |  | 2.69*** (0.07) |  | -1,558.67 | 3,121.34
1.0 |  |  | 1.47*** (0.04) | -1,556.68 | 3,117.37
1.0 | 0.58*** (0.05) | 2.86*** (0.08) |  | -1,473.13 | 2,952.26
1.0 | -0.04 (0.06) |  | 1.47*** (0.06) | -1,556.24 | 3,118.48
1.0 |  | 1.40*** (0.28) | 0.79*** (0.06) | -1,457.76 | 2,921.52
1.0 | 0.36*** (0.13) | 1.85*** (0.52) | 0.58*** (0.33) | -1,435.07 | 2,878.13
1.5 | 0.50*** (0.04) |  |  | -2,233.25 | 4,470.50
1.5 |  | 2.51*** (0.07) |  | -1,646.83 | 3,297.65
1.5 |  |  | 1.36*** (0.04) | -1,636.20 | 3,276.40
1.5 | 0.57*** (0.07) | 2.65*** (0.13) |  | -1,559.57 | 3,125.15
1.5 | -0.01 (0.05) |  | 1.37*** (0.04) | -1,636.19 | 3,278.37
1.5 |  | 1.29*** (0.11) | 0.75*** (0.06) | -1,546.78 | 3,099.55
1.5 | 0.36*** (0.16) | 1.72*** (0.31) | 0.55*** (0.20) | -1,522.47 | 3,052.94
_Note_ | ${}^{*}:P<0.05,\;^{**}:P<0.01,\;^{***}:P<0.001$
Table 2. Multinomial logit coefficients for Caltech36. The standard errors of the estimates are shown in parentheses. Temp. | $\hat{\theta}_{\mathrm{PA}}$ | $\hat{\theta}_{\mathrm{H}}$ | $\hat{\theta}_{\mathrm{TC}}$ | Log Likelihood | AIC
---|---|---|---|---|---
0.5 | 0.33*** (0.03) |  |  | -4,978.28 | 9,960.56
0.5 |  | 2.91*** (0.05) |  | -3,027.03 | 6,058.06
0.5 |  |  | 1.37*** (0.02) | -3,014.28 | 6,032.57
0.5 | 0.44*** (0.15) | 2.99*** (0.10) |  | -2,948.91 | 5,903.82
0.5 | -0.18*** (0.09) |  | 1.36*** (0.07) | -3,002.17 | 6,010.35
0.5 |  | 1.42*** (0.11) | 0.72*** (0.07) | -2,847.16 | 5,700.32
0.5 | 0.18*** (0.13) | 1.62*** (0.23) | 0.65*** (0.08) | -2,838.33 | 5,684.66
1.0 | 0.38*** (0.03) |  |  | -4,959.02 | 9,922.04
1.0 |  | 2.83*** (0.05) |  | -3,119.06 | 6,242.11
1.0 |  |  | 1.32*** (0.02) | -3,118.13 | 6,240.26
1.0 | 0.50*** (0.16) | 2.92*** (0.09) |  | -3,018.85 | 6,043.71
1.0 | -0.11** (0.09) |  | 1.32*** (0.07) | -3,113.21 | 6,232.43
1.0 |  | 1.41*** (0.15) | 0.69*** (0.11) | -2,947.89 | 5,901.78
1.0 | 0.26*** (0.07) | 1.70*** (0.35) | 0.58*** (0.12) | -2,927.99 | 5,863.97
1.5 | 0.36*** (0.03) |  |  | -4,952.51 | 9,909.02
1.5 |  | 2.64*** (0.05) |  | -3,324.71 | 6,653.43
1.5 |  |  | 1.24*** (0.02) | -3,306.06 | 6,616.11
1.5 | 0.44*** (0.11) | 2.71*** (0.05) |  | -3,241.67 | 6,489.35
1.5 | -0.14*** (0.10) |  | 1.24*** (0.05) | -3,298.07 | 6,602.13
1.5 |  | 1.30*** (0.14) | 0.67*** (0.09) | -3,150.29 | 6,306.57
1.5 | 0.19*** (0.14) | 1.50*** (0.33) | 0.59*** (0.10) | -3,139.42 | 6,286.83
_Note_ | ${}^{*}:P<0.05,\;^{**}:P<0.01,\;^{***}:P<0.001$
Table 3. Multinomial logit coefficients for Swarthmore42. The standard errors of the estimates are shown in parentheses. Temp. | $\hat{\theta}_{\mathrm{PA}}$ | $\hat{\theta}_{\mathrm{H}}$ | $\hat{\theta}_{\mathrm{TC}}$ | Log Likelihood | AIC
---|---|---|---|---|---
0.5 | 0.28*** (0.02) |  |  | -5,983.56 | 11,971.13
0.5 |  | 2.93*** (0.05) |  | -3,637.18 | 7,278.37
0.5 |  |  | 1.11*** (0.02) | -3,740.78 | 7,485.55
0.5 | 0.38*** (0.04) | 3.06*** (0.21) |  | -3,523.06 | 7,052.12
0.5 | -0.04 (0.08) |  | 1.11*** (0.04) | -3,739.31 | 7,484.61
0.5 |  | 1.68*** (0.13) | 0.51*** (0.07) | -3,477.37 | 6,960.75
0.5 | 0.23*** (0.06) | 2.00*** (0.24) | 0.41*** (0.09) | -3,444.33 | 6,896.67
1.0 | 0.28*** (0.02) |  |  | -5,982.66 | 11,969.32
1.0 |  | 2.85*** (0.05) |  | -3,759.78 | 7,523.56
1.0 |  |  | 1.07*** (0.02) | -3,879.04 | 7,762.08
1.0 | 0.36*** (0.07) | 2.96*** (0.31) |  | -3,649.84 | 7,305.68
1.0 | -0.04 (0.06) |  | 1.07*** (0.03) | -3,877.83 | 7,761.66
1.0 |  | 1.67*** (0.11) | 0.49*** (0.08) | -3,611.48 | 7,228.95
1.0 | 0.23*** (0.10) | 1.98*** (0.17) | 0.38*** (0.06) | -3,578.18 | 7,164.36
1.5 | 0.30*** (0.03) |  |  | -3,241.67 | 6,487.34
1.5 |  | 2.71*** (0.06) |  | -2,145.02 | 4,294.03
1.5 |  |  | 1.03*** (0.02) | -2,175.32 | 4,354.64
1.5 | 0.37*** (0.08) | 2.81*** (0.10) |  | -2,080.67 | 4,167.34
1.5 | -0.01 (0.04) |  | 1.03*** (0.04) | -2,175.25 | 4,356.49
1.5 |  | 1.50*** (0.10) | 0.51*** (0.04) | -2,051.61 | 4,109.23
1.5 | 0.22*** (0.12) | 1.78*** (0.27) | 0.41*** (0.07) | -2,033.49 | 4,074.98
_Note_ | ${}^{*}:P<0.05,\;^{**}:P<0.01,\;^{***}:P<0.001$
Table 4. Multinomial logit coefficients for UChicago30. The standard errors of
the estimates are shown in parentheses.

##  Appendix B Feature Representations for Prompts

Below, we give examples of the features used in the prompt presented in
Algorithm 1. The features are formatted as a list of JSON objects which are
provided to the prompt.

###  B.1. Principle 1: Preferential Attachment

For the structure-based information (Figure 1(a)) we have the following
features:

⬇

[

{

"name" : 0,

"neighbors" : [5, 7, 1, 6]

},

...

]

And for the degree-based information (Figure 1(b)) we have the following
features:

⬇

[

{

"name" : 0,

"degree" : 4

},

...

]

###  B.2. Principle 2: Triadic Closure

For the structure-based information (Figure 3(a)) we have the following
features:

⬇

[

{

"name" : 0,

"common_neighbors" : [5, 7, 1, 6]

},

...

]

And for the degree-based information (Figure 3(b)) we have the following
features:

⬇

[

{

"name" : 0,

"num_common_neighbors" : 4

},

...

]

###  B.3. Principle 3: Homophily

We have the following features:

⬇

[

{

"name" : 0,

"favorite_color" : "red",

"hobby" : "hiking",

"location" : "Boston"

},

...

]

###  B.4. Principle 5: Small-World

We have the following features:

⬇

[

{

"name" : 0,

"neighbors" : [5, 7, 1, 6]

},

...

]

###  B.5. Real-World Data

We have the following features:

⬇

[

{

"name" : 0,

"status" : "student",

"major" : 10,

"second major" : 93,

"accommodation" : "house",

"high_school" : 5,

"graduation_year" : 2008

},

...

]

We note that the initial Facebook100 dataset included gender information as a
feature. We chose not to include the gender as one of the features as it has
been shown that language models exhibit gender bias (Vig et al., 2020; Kotek
et al., 2023; Bordia and Bowman, 2019).


# Defense against DoS and load altering attacks via model-free control:
A proposal for a new cybersecurity setting

Michel Fliess1,3, Cédric Join2,3 and Dominique Sauter 2 1LIX (CNRS, UMR 7161),
École polytechnique, 91128 Palaiseau, France
<EMAIL_ADDRESS>(CNRS, UMR 7039)), Université de
Lorraine, BP 239, 54506 Vandœuvre-lès-Nancy, France
{cedric.join<EMAIL_ADDRESS>7 rue Maurice
Barrès, 54330 Vézelise, France
{michel.fliess<EMAIL_ADDRESS>
###### Abstract

Cyberattacks, load altering attacks, Denial of Service, fault-tolerant
control, actuator’s fault accommodation, packet loss, power grid, load
frequency control, model-free control.

###### Index Terms:

Cyberattacks, load altering attacks, Denial of Service, fault-tolerant
control, actuator’s fault accommodation, packet loss, power grid, load
frequency control, model-free control.

##  I Introduction

The design of secure and safe _Networked Control System_ (_NCS_) is of high
importance in the control of large-scale critical infrastructures or
industrial plants such as power grids, transportation systems, communication
networks, oil and gas pipelines, water distribution or waste-water treatment
systems and irrigation networks [c1]. Using “open” public and also wireless
networks for the communication within NCS can generate severe security
problems since an unauthorized access (“cyberattack”) is possible in the
control system. The security of control systems against malicious attacks has
received a great deal of attention over the past few years, in particular
after the Stuxnet attack against Iran nuclear installations in 2010 [c2].
Specific analysis tools as well as monitoring mechanisms have been developed
to enforce system security and reliability [c3, c4]. Information security
approach may provide some protection methods that help in improving the
security of control systems, but these methods appear to be not sufficient for
the defense of the systems against malicious attacks able to bypass
information security layers, as in the case of Stuxnet incident in 2010. As
pointed out in [c5] the security of _Cyber-Physical Systems_ (_CPS_)
integrating computation, communication and physical capabilities must be
improved from both information technology and control theory. The _cyber-
physical attacks_ (_CPA_), on both the physical layer and the cyber layer, are
modeled as additive signals of short duration on both system equations.
Attackers can break into the communication channels, enabling them to modify
the command signals, control signals or sensor measurements for disrupting the
systems. CPA in CPS, summarized in [c5, c6, c7], may be divided into several
categories:

  * _Denial of Service_ (_DoS_) attacks in [c8, c9]: adversaries aim at disrupting temporarily or indefinitely the exchange of data among entities in the network.

_Integrity_ or _Man in The Middle_ (_MITM_) attacks in [c10, c11, c12, c13,
c14]: adversaries inject false data on control signals or on information
transmitted by sensors to the plant via communication channels, and finally
physical attacks on sensors and actuators close to faults.

_Replay attack_ in [c15] can be viewed as a deception attack on control
signals coordinated with the generation of artificial delays on measurements.

Among such a huge number possibilities (see also [review, survey, md0, zhao]),
we concentrate here on Denial of Service and _load altering_ _attacks_ which
correspond to a large body of concrete situations. The defense against those
strikes is connected to a classic topic in control engineering, namely _fault-
tolerant control_ (see, e.g., [noura2, blanke]), i.e., a set of techniques for
mitigating the effects of the unavoidable faults which occur in any control
system.

_Model-free control_ , or _MFC_ , in the sense of [mfc13, nicu] is chosen for
the following reasons:

  * It has been already successfully applied many times (see, e.g., [wang] for an automated vehicle) including in fault-accommodation [toulon, park].

Most of the existing defense approaches rely on a mathematical modeling (see,
e.g., [c25, c26, c27, c28, md] for power systems) which too often is most
difficult to derive. A model-free setting might therefore be fruitful (see,
e.g., [kemal, cui, qiu]).

Load altering attacks ought to be related to actuator’s faults. It has been
proven [mfc13], [toulon] that model-free control is quite efficient in
actuator’s fault accommodation.

Some DoS attacks might look as _packet losses_ (see, e.g., [loss]). It has
been shown [iot] via numerical and concrete experiments that model-free
control exhibits excellent performances in spite of severe losses.

Our proposal is illustrated by several computer experiments. They are based on
[ex1, ex2] where

  * the application of network technology in the power grid makes the _load frequency control_ (_LFC_) system more vulnerable to various kinds of attacks (see, e.g., [bevrani] for a general presentation);

DoS and load alteration attacks fit very well.

Our paper is organized as follows. Section II reviews MFC which is certainly
unknown to most of the experts in cybersecurity. In particular Section II-E
explains how to react against load altering attacks. Computer experiments are
displayed in Section III with many Figures and $2$ Tables, which show the
efficiency of our approach. Some concluding remarks may be found in Section
LABEL:conclusion.

##  II What is model-free control?

###  II-A Ultra-local model

The unknown global description of the plant is replaced by the following
first-order _ultra-local model_ :

$\dot{y}=F+\alpha u$ (1)

where:

  1. The control and output variables are respectively $u$ and $y$.

$\alpha\in\mathbb{R}$ is chosen by the practitioner such that the three terms
in Equation (1) have the same magnitude.

The following comments are useful:

  * $F$ is _data driven_ : it is given by the past values of $u$ and $y$.

$F$ includes not only the unknown structure of the system but also any
disturbance.

###  II-B Intelligent controllers

Close the loop with the _intelligent proportional controller_ , or _iP_ ,

$u=-\frac{F_{\text{est}}-\dot{y}^{\ast}+K_{P}e}{\alpha}$ (2)

where

  * $y^{\ast}$ is the reference trajectory,

$e=y-y^{\star}$ is the tracking error,

$F_{\text{est}}$ is an estimated value of $F$

$K_{P}\in\mathbb{R}$ is a gain.

Equations (1) and (2) yield

$\dot{e}+K_{P}e=F-F_{\text{est}}$

If the estimate $F_{\text{est}}$ is “good”: $F-F_{\text{est}}$ is “small”,
i.e., $F-F_{\text{est}}\simeq 0$, then $\lim_{t\to+\infty}e(t)\simeq 0$ if
$K_{P}>0$. It implies that the tuning of $K_{P}$ is straightforward. This is a
major difference with the tuning of “classic” PIDs (see, e.g., [astrom]).

###  II-C Estimation of $F$

A real-time estimate of $F$ is given by (see [mfc13] for more details)

${\small
F_{\text{est}}(t)=-\frac{6}{\tau^{3}}\int_{t-\tau}^{t}\left[(\tau-2\sigma)y(\sigma)+\alpha\sigma(\tau-\sigma)u(\sigma)\right]d\sigma}$
(3)

where $\tau>0$ is “small.” This integral, which is a low pass filter, may of
course be replaced in practice by a classic digital filter.

###  II-D MIMO systems

Consider a multi-input multi-output (MIMO) system with $m$ control variables
$u_{i}$ and $m$ output variables $y_{i}$, $i=1,\ldots,m$, $m\geq 2$. It has
been observed in [toulon] and confirmed by all encountered concrete case-
studies (see, e.g., [pmsm]), that such a system may usually be regulated via
$m$ monovariable ultra-local models:

$\dot{y}_{i}=F_{i}+\alpha_{i}u_{i}$

where $F_{i}$ may also depend on $u_{j}$, $y_{j}$, and their derivatives,
$j\neq i$.

###  II-E Actuator’s fault accommodation

We assume that cyberattacks can be represented as additive signals applied to
the controller output. In Equation (1) write the input variable

$u=u_{\rm attack}+v$

where $u_{\rm attack}$ (resp. $v$) is an unwanted (resp. the desired)
quantity. It yields

$\dot{y}=\mathfrak{F}+\alpha v$

where

$\mathfrak{F}=F+\alpha u_{\rm attack}$

It is straightforward to adapt the iP (2)

$v=-\frac{\mathfrak{F}_{\text{est}}-\dot{y}^{\ast}+K_{P}e}{\alpha}$

and the estimate $\mathfrak{F}_{\text{est}}$ of $\mathfrak{F}$ in Formula (3)

${\small{\mathfrak{F}}_{\text{est}}(t)=-\frac{6}{\tau^{3}}\int_{t-\tau}^{t}\left[(\tau-2\sigma)y(\sigma)+\alpha\sigma(\tau-\sigma)v(\sigma)\right]d\sigma}$

##  III Application to power network

In power systems, LFC used for frequency stabilization [c16, c17] is one of
the most essential operational functions. Considering interconnected
generation/distribution systems the main objective of LFC is to ensure the
balance between load and generation in each control area [c18, c19, c20].
However, the LFC system in modern power systems tends to use open
communication networks to transmit control/measurement signals, thus making
the LFC system more vulnerable to cyberattacks such as denial of service (DOS)
attacks.

Defense against cyberattacks is an emerging topic for power transmission and
distribution systems [c21, c22]. While many works focus on detection [c23,
c24] and isolation of the attack signal, few of them actually consider the
design of a complete defense mechanism, which is essential for the robustness
of the control system under attack.

To date, many researchers have applied a significant effort in favor of the
LFC system regarding the defense against DoS attacks. Considering DoS attacks
as network-induced sent disturbances, some robust LFC systems for
interconnected power systems have been developed as for example in [c25, c26,
c27, c28]. Nevertheless, most of these approaches rely on the knowledge of a
model of the LFC system. More recently another _model-free_ approach, inspired
by _fault tolerant control_ (_FTC_) [c29], has been proposed [c30, c31].

###  III-A Power grid

A large power system consists of a number of interconnected control areas,
which are connected by tie lines. The LFC is used to maintain the system
frequency and power exchange between the tie lines at a predefined value (see,
e.g., [bevrani]). As illustrated in Figure 1, the typical components of an LFC
system installation are the controller, turbine, generator and load. The input
to the controller is the _Area Control Error_ , or _ACE_. The ACE is defined
for each zone as a linear combination of the total power exchanged and the
frequency deviations from the respective programmed and nominal values. The
LFC system relies on the communication between the sensors and the _Energy
Management System_ , or _EMS_ , and is therefore exposed to high risks of
cyber-intrusion. In the device displayed in Figure III-A load variations are
mitigated via phase shift minimization by two generators (see [ex1, ex2] for
more details). Note moreover that power grids were already investigated via
model-free control [sarajevo, ferrari].

Block diagram of a power system

Nominal load variations

Three types of attacks are considered:

  1. Type 1 attack (blue): very important additive load variation of short time (load altering attack).

Type 2 attack (red): blocking the control to generator 2 (DoS attack).

Type 3 attack (green): blocking the measures of generator 2 (DoS attack).

The pure integrators $\frac{K_{1}}{s}$, $\frac{K_{2}}{s}$ in Figure III-A are
replaced by two model-free controllers defined by Equations (1)-(2) in order
to insure a better defense. See [alinea], which is devoted to traffic
regulation on motorways, for a similar result.

###  III-B Various scenarios

In all our computer simulations, $K_{1}=K_{2}=1$, and $\alpha=10$, $K_{P}=0.3$
in Formula (2). Pure integrators are compared to model-free control. The load
variations, which are depicted in Figure III-A, are identical.

Sum of tracking errors for 2 lines Control types/scenarios $\Sigma_{t}|e_{1}|$
$\Sigma_{t}e_{1}^{2}$ $\Sigma_{t}|e_{2}|$ $\Sigma_{t}e_{2}^{2}$
Integrator/scenario 1 $9.1106$ $0.3763$ $2.8981$ $0.0283$ MFC/scenario 1
$6.7965$ $0.2832$ $1.7452$ $0.0118$ Integrator/scenario 2 $29.4256$$4.6806$
$9.3662$ $0.3597$ MFC/scenario 2 $21.8710$ $3.4752$$5.5665$$0.1418$

Integrator/scenario 3 $212.0977$ $1.8926.10^{4}$
$1.3241.10^{3}$$5.8470.10^{5}$ MFC/scenario 3 $7.3609$ $0.2884$ $2.5912$
$0.0232$ Integrator/scenario 4 $6.0832.10^{9}$$1.2731.10^{19}$$2.4134.10^{10}$
$1.7941.10^{20}$ MFC/scenario 4 $9.6472$$0.5017$$11.1365$$2.4834$