TTERGM: Social Theory-Driven network simulation
Abstract
Temporal exponential random graph models (TERGM) are powerful statistical models that can be used to infer the temporal pattern of edge formation and elimination in complex networks (e.g., social networks).
TERGMs can also be used in a generative capacity to predict longitudinal time series data in these evolving graphs.
However, parameter estimation within this framework fails to capture many real-world properties of social networks, including: triadic relationships, small world characteristics, and social learning theories which could be used to constrain the probabilistic estimation of dyadic covariates.
Here, we propose triadic temporal exponential random graph models (TTERGM) to fill this void, which includes these hierarchical network relationships within the graph model.
We represent social network learning theory as an additional probability distribution that optimizes Markov chains in the graph vector space.
The new parameters are then approximated via Monte Carlo maximum likelihood estimation.
We show that our TTERGM model achieves improved fidelity and more accurate predictions compared to several benchmark methods on GitHub network data.
Introduction
Social networks have been studied for over a century, and graph theory techniques have been used for decades to model relationship patterns amongst individuals and social entities [Wasserman et al., 1994].
Graph network statistics have provided fundamental and theoretical insight into social phenomenal across political, economic and behavioral data.
However, historically, these techniques have been applied to study static ‘snapshots’ of a network, limiting the ability to make large-scale inferences about social network dynamics.
In recent years, online social networks have provided a wealth of open source empirical data, providing new opportunities to test and adjudicate amongst competing theories and quantitative models [Borgatti et al., 2009].
Online social networks are formed by nodes (e.g., individuals) and edges, embedding social relationships (e.g., friends, relatives, colleagues) within a complex graph network.
Both network structure and nodal connectivity constraint the flow of information or resources through the network [Kane et al., 2014].
However, online social networks are ever expanding, and their connectivity evolves rapidly over time.
Thus, statistically modeling these data for generative and predictive purposes is challenging.
Temporal exponential random graph models (TERGM) have become a core tool for modeling dynamic social networks.
Although a variety of approaches including variations of TERGM have been applied to education [Mamas et al., 2020], finance, [Park et al., 2018] and political data [Abrams, 2019], few TERGM variations have attempted to quantify the effect of "influencers" alongside triadic relationships within a dynamic network.
Here, we expand the classic TERGM model to support triadic relationships to make predictions on dynamic graphs.
We apply this new triadic temporal exponential random graph model (TTERGM) to data derived from Github.
Github has been studied extensively within the context of graphical network modeling due to its popularity, open access, and transparency.
Thus, these data provide a benchmark for model comparison.
GitHub also provides network programming functionality [Borges et al., 2016], offering the opportunity to study "influencers", their affect on network structure, and triadic relationships within a dynamic network.
Related Work
Social network models have been applied for many purposes to include: modeling an individual’s behavioral patterns to predict future nodal attributes (e.g., connections) over time [McConnell et al., 2018]
[McAvoy et al., 2020], modeling interactions and cluster formation within online communities [Fortunato and Hric, 2016]
[Xu et al., 2020]
[Liu et al., 2018], and modeling how network characteristics (e.g., centrality) influences its users [Qiu et al., 2017].
Overall, these models attempt to characterize the relationship amongst network structure and information diffusion, decision making, and individual behavior.
[Jackson et al., 2017].
General classes of network formation methods include: 1) exponential random graph models (ERGMs)
[Lusher et al., 2013][Pattison and Wasserman, 1999], meta-networks, and meta-matrices [Carley and Hill, 2001][Krackhardt and Carley, 1998] for multilayer social networks.
2) block modeling [Guimerà and Sales-Pardo, 2009] 3) geographic or characteristic based approaches, [Boucher and Mourifié, 2012][Leung, 2014]; 4) link formation techniques
[Christakis et al., 2010][Bramoullé et al., 2012], and 5) subgraph model-based approaches (SUGMs) [Chandrasekhar and Jackson, 2016].
Numerous studies have examined the formation of cascades of network activity, characterizing and predicting network growth [Bakshy et al., 2012][Gruhl et al., 2004][Yang and Counts, 2010].
Typically, spikes of activity occur within a few days of content’s introduction into the network.
This property forms the backdrop to a line of temporal analyses that focus on the basic rising-and-falling pattern that characterizes the initial occurrence of information burst.
Influence on the Github platform can be quantified by the number of followers, stars, mentions, quotes, and up-votes received from other users.
Social network metrics such as centrality indicate how broadly influence extends (e.g. geographic interest)
[Weber and Luo, 2014].
Other features include project size, file volume, critical folder, lines of code and calling of basic functions.
The popularity rate can be measured by (Total_Stars / project_life).
Few studies have examined influence of user-popularity, repo-popularity, and triadic relationships in dynamic graphs.
Methodology 3.1 Preliminaries
Exponential random graph models (ERGM) are static.
Temporal exponential random graph models (TERGM) are an extension of ERGMs to handle dynamic information in real-world online social networks [Hanneke et al., 2010].
ERGM can be written as in (1).
TERGM with Markov assumption can be written as in (2).
[Equation]
[Equation] P ( N ) represents the probability of the network N ; Z represents the normalization constant that is usually difficult to compute; γ is the vector of network characteristics such as number of edges, triangles, 2-stars, etc.
t represents the sequence of network observations; σ is the vector of socialtheory driven temporal network characteristics such as homophily, transitivity, reciprocity, etc.
t represents the sequence of network observations; Compared to ERGMs, TERGMs are able to model the distribution on time series data (either embedded in the network or in separate timesteps), hence certain temporal patterns can be captured and reflected in the parameter values for phenomenon interpretation.
Examples of these dynamic patterns of triadic effects in influencer networks are shown in Figure 1.
TERGM provides significant advantages over ERGMs, since certain static patterns can be enriched in higher dimensions when the sequence order is considered.
TERGMs are also capable of modeling observed friendship networks with bootstrap methods estimated by maximum pseudolikelihood [Leifeld et al., 2018], or networks of infectious disease transmission using statistical methods in network analysis [Jenness et al., 2018].
The flexibility of TERGMs make it possible to adapt to a variety of input data types, such as cross-sectional or longitude data [Henry et al., 2016][Block et al., 2018].
3.2 Triadic Temporal Exponential Random Graph Model
TERGM models estimated within the markov chain assumption are typically incapable of generating and reproducing realistic dynamics observed in real-world online social networks.
We hypothesized that increasing the model’s capacity to describe triadic network properties would reduce the error between the model and empirical observations.
We propose TTERGM here to sequentially predict network probabilities by integrating the dynamics between influencers and followers.
TTERGM was run on a computer with 12900K CPU, 1080TI and 128GB RAM.
Figure 2 shows the framework of TTERGM that has five major components - data collection module, network processing module, feature extraction module, pattern analysis module, and a generative network module.
Influencer-follower networks N t were identified and constructed by connecting users by events in
Table 1. In the subsequent module, temporal features and triadic features listed in Table 2 were extracted from the influencer-follower networks.
Network characteristics were then estimated using the Markov chain Monte Carlo (MCMC) method.
In the pattern analysis module, the TTERGM model was applied to model the data.
The general form of TTERGM can be written as in Equation (3).
P ( N ) represents the probability of a given network architechture, N; Z represents the normalization constant as done in classic TERGM models; γ is a vector of network characteristics (e.g, number of edges, triangles, 2-stars), t represents the temporal sequence of network observations, and σ is the vector of social-theory driven temporal network characteristics such as homophily, transitivity, reciprocity, etc.
To fit the TTERGM model to the data, algorithm 1 is used to initialize and traverse each node in the network to construct the generative influencer-follower networks.
Finally, we used these observed features to simulate real-world influencer-follower networks and compared the predictive of TTERGM performance with the classic TERGM model and the Block Model using left-out validation data.
[Equation]
Input: Online social network N 1 Initialization G =
G t 0 repeat while t ̸ = t n do read current node n i ; if n i is not traversed then for each link l ij in graph G t 0 do calculate the network statistics of each link and fill the values to the feature vector N ij
[Equation]
else read the next node n i +1 ; t =
[Equation]
Calculate P ( N t )
=
1 Z exp ( (cid:80) ij σ ( N tij , N t − 1 ij , ..., N t 0 ij ) where
Z = MCMC ( exp ( (cid:80) ij u ( N tij , N t − 1 ij , ..., N t 0 ij ))
where
Z is the normalization constant, u is the network statistics, MCMC is the
Markov Chain Monte Carlo method 15 until k iterations ;
The GitHub dataset is from 1/1/2015 to 8/30/2017 including 2 million users and 13 million projects.
We selected the 100 most popular repositories because we aimed to characterize top GitHub repositories, and the impact of influencers on the popularity of repositories using the TTERGM model.
The number of repositories is a hyperparameter which can be adjusted, depending on the goal of the model.
We selected the top 10 users, in terms of number of followers, as the influencers in this study.
This threshold was chosen because the number of followers drops off sharply after that point, but can be chosen arbitrarily for different datasets.
The data was acquired using the API from GitHub [Gousios and Spinellis, 2012]. The API can be used to stream GitHub repository interactions with customized formats.
Optionally, meta data from user relation events can be retrieved as well. The dataset contains 14 types of events which are listed in Table 1. We implemented the TTERGM technique to model the dynamics between repository popularity and networks. The 3 most followed anonymized influencers had 52,722, 30,161, and 25,827 followers respectively.
Each of the top 10 most popular influencer has at least 14 thousand followers. We divided the 15 types of events into 2 categories - participative events and contributive events to highlight the social characteristics.
Participative events demonstrate a user’s engagement to a project repository. Contributive events indicate the cooperation among developers in a software repository. Followers tend to have more participative events than influencers, while influencers generally have more contributive events than followers. [Table]
someone stars a repository
[Table]
When comment on a pull request’s unified changes
[Table]
When an issue comment is created or
[Table]
user is invited or removed as a collaborator to a
[Table]
an issue is created or
[Table]
a wiki page is created or edited
[Table]
[Table]
Influencer’s activity
[Table]
a repository triggered his/her follower’s activity on the same repository, then a trian-
[Table]
correlation coefficient of degree
[Table]
network
[Table]
Ratio of number of triangles over maximum possible number of trian
[Table]
edges
[Table]
To evaluate the performance of the TTERGM
[Table]
we compared the simulation with two benchmark models - TERGM and Block model.
Each model is evaluated using a set of metrics (average degree of incoming edges and average degree of outgoing edges) to see how well the predicted network distribution matched the real-world network characteristics.
The evaluation result (average ofruns) was shown in Table 4.
The Block model and TERGM perform similarly in month 2017-07 and
[Table] [Table] Comparing to TERGM, TTERGM has 26.45% less errors in 2017-07 for incoming degree of errors, 13.17% less errors in 2017-07 for outgoing degree of errors, 17.15% less errors in 2017incoming degree of errors, and 25.28% less errors in 2017-08 for outgoing degree of errors.
We believe the consistent improvement stems from the extra computation from TTERGM in the markov chain.
Conclusion
We implemented a social-theory driven temporal exponential random graph model to infer the temporal pattern of edge formation and elimination in complex networks (e.g., social networks), and examine the effect of influencers and triadic relatinships on predicting future network dynamics.
When popular repositories are formed or influencers act, the structure of the social network alters, affecting network metrics.
The TTERGM technique build upon previous statistical models by incorporating information flow across hierarchical configuration features.
We represent social network learning theory as an additional probability distribution that optimizes Markov chains in the graph vector space.
The new parameters are then approximated via Monte Carlo maximum likelihood estimation.
The TTERGM model is capable of reproducing the dynamics observed empirically in large-scale social network data, and produced more accurate predictions on left-out data compared to the classic
TERGM and block models.
However, the TTERGM model imposes additional computational burden during parameter estimation, which may hinder its ability to scale to larger datasets.
Future work may include expanding this approach to model the influence of more "distant" users in the network, or those that do not directly follow an influencer.