{'fraction_non_alphanumeric': 0.029117184146515953, 'fraction_numerical': 0.0067248533409643724, 'mean_word_length': 4.719721767594108, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Refining the Semantics of Social Influence

With the proliferation of network data, researchers are increasingly focusing on questions investigating phenomena occurring on networks. This often includes analysis of peer-effects, i.e., how the connections of an individual affect that individual's behavior. This type of influence is not limited to direct connections of an individual (such as friends), but also to individuals that are connected through longer paths (for example, friends of friends, or friends of friends of friends). In this work, we identify an ambiguity in the definition of what constitutes the extended neighborhood of an individual. This ambiguity gives rise to different semantics and supports different types of underlying phenomena. We present experimental results, both on synthetic and real networks, that quantify differences among the sets of extended neighbors under different semantics. Finally, we provide experimental evidence that demonstrates how the use of different semantics affects model selection.


Introduction
The growth of the internet has given rise to a plethora of online social systems that capture social and professional interactions among people, including Facebook, Twitter, LinkedIn, and many more. Such systems produce large amounts of data that record the attributes of individuals, but also information about the connections and interactions among those individuals. These rich data sets allow researchers to investigate various aspects of social behavior on a scale that previously was not possible. Many of these phenomena involve social or peer-effects which measure the level of influence exerted on individuals by their neighborhood-other individuals that are near to them in the network. Surprisingly, no clear semantics exist for defining the set of nodes that belong to that neighborhood. As we show in this paper, ambiguity in how neighborhoods are defined can have significant impact on analyses examining these effects. Specifically, values for the aggregates of these sets can differ substantially depending on the specific semantics used, which may lead to different conclusions. This is especially important considering the fact that large online studies often deem very small effect sizes to be significant. For example, in one study [5] an effect size of 10e −3 was declared to have a significant impact because it translates to tens of thousands of users for a large network such as Facebook.  Figure 1: Example of alternative semantics on a small network. The node with the highlighted outline is the central node of the analysis. Grey nodes are the ones that belong to the set of "friends of friends" for the central node under different types of semantics. 1. Only include individuals who are connected to one of her friends but not to her (friends of her friends who are not her friends).
2. Include all individuals connected to one of her friends, including those that are her friends (friends of her friends no matter whether they are her friends or not). Figure 1 provides a visualization of these different semantics for a given node of a small network. While both options are reasonable, they lead to significantly different estimates of the values of the set, as we show in this paper.
Intuitively, those semantics capture different phenomena. The first case captures phenomena where each node can be characterized by the length of the shortest path from that node to the central node of the analysis. That includes, for example, diffusion of information in networks. The second type, focuses on capturing properties of the extended neighborhood of a node.
The effects of using different semantics are amplified when considering longer paths of dependence (e.g., friends of my friends of my friends, etc.), since longer paths admit more semantics. Such longer-range dependencies are not unrealistic. In fact, according to Christakis and Fowler [2], social networks obey the "three-degrees of influence" rule. In other words, an individual can affect others that are up to three connections away (friends, friends of friends, friends of friends of friends).
In what follows, we provide a formal description of the problem and we define two different semantics. We then provide experimental evidence using the Erdös-Rényi model, Barabási model, and Watts-Strogatz model that quantifies the effect of using the different semantics on both set construction and subsequent model-selection. Finally, we examine the impact of these semantics on sixteen real-world networks from the Stanford network analysis project (SNAP) repository.

Problem Description
In this work, we consider attributed single-entity networks 2 . More formally, an attributed graph G = (V, E, W) consists of a set of vertices V , a set of edges E ⊆ V × V , and a n × |V | matrix of attribute values. Each vertex is labeled with n attributes and the value of the i-th attribute for vertex v is given by W[i, v]. We restrict our attention to undirected attributed graphs, but the main principles easily extend to directed graphs.
Here our focus is on peer or social effects, specifically, on the effect of the friends of your friends on you. Assume that we are given an initial vertex, v 0 ∈ V . Informally, we can think of v 0 as the individual of interest. In this work, we investigate the effect of two different semantics for constructing the set of friends of friends of v 0 . Let V k be the set of vertices that can be reached from v 0 with a path length of k (without repetition of edges along that path). One construction of our set is to simply consider all vertices that are found at path length 2, i.e., V 2 . Another approach is to include only the vertices whose shortest path is of length two, i.e. V 2 \ V 1 . The question that remains is what is the effective difference between employing those two strategies in terms of covariate estimation and model selection. This is our focus for the remainder of the paper.
3 Synthetic Experiments 3.1 How different are the sets constructed using the different semantics?
The simplest measure to capture the difference between these semantics is to quantify the disparity between the sets constructed using the two strategies described above. Note that we are ignoring attribute values and focusing on the simple presence/absence of a vertex in a set. In this experiment, we first generated random networks with varying size (10, 50, 100, 200, 300, 400, 500 nodes) using the following models: 1. Erdös-Rényi model [3]. Specifically, we used the G(n, p) model, which generates a random graph with n nodes and any two nodes are connected with probability p. For this experiment we used p =0.1-0.9 incremented by intervals of 0.1.
2. Barabási-Albert model [1]. This model creates networks starting with one vertex and adding new vertices at each time step that are connected to existing vertices with probability proportional to the number of links that a vertex has (preferential attachment). For this experiment, we varied the power of the preferential attachment (0-3 by increments of 0.5).
3. Watts-Strogatz model [9]. This model starts with a regular ring lattice with n nodes, each connected to k neighbors on both side. Then every edge is "rewired" with probability p to connect to a different node (avoiding self-loops). For this experiment, we varied the size of the neighborhood (1, 5, 10) and the rewiring probability (0.1-0.9 by increments of 0.2).
We then measured the Jaccard distance between the sets constructed under the different semantics, averaged across all nodes of a network and averaged over 500 trials. The Jaccard distance between two sets A and B is defined as J(A, B) = 1 − |A∩B| |A∪B| . Intuitively, this quantifies the overlap of two sets, while accounting for the size of both. For networks generated using the Barabási model, the two semantics lead invariably to the same sets (Jaccard distance is 0). The results for networks generated by Erdös-Rényi models are shown in Figure 2. As the density of the network increases (higher p), the Jaccard distance increases as well. Finally, the results for networks generated using the Watts-Strogatz model are shown in Figure 3. For values of the neighborhood parameter larger than 1, the two different semantics result in sets that have a non-zero Jaccard distance.

How does parameterizing w.r.t. different semantics affect fit of the model?
This experiment goes one step beyond measuring the distance between the sets created under different semantics. We seek to assess how the different semantics affect model selection. We consider attributed graphs, where each node has two attributes, treatment T and outcome O. We assume that the true generating model has a dependency of the form: "The treatment T of the friends of my friends affects my outcome O." We generated synthetic datasets using the following procedure.   (c) neighborhood=10 Figure 3: Average Jaccard distance for the two different semantics on random networks generated using the Watts-Strogatz model with varying neighborhood size, rewiring probability, and network size.
• We generated values for O using the conditional distribution O ∼ agg(FriendsOfFriends) + * N (0, 1), where is the noise coefficient, FriendsOfFriends is the set of X values for the nodes that belong to the set of friends of friends (defined using two different semantics), and agg is an aggregation function applied to the values of that set. For this part, we ran two sets of experiments, one using mean as the aggregation function (i.e., the mean of the set of values in the sets FriendsOfFriends), and one using degree (i.e., the size of the set FriendsOfFriends).
We then learned two types of models from the generated data, one for each alternative definition of the set of friends of friends, and computed their log-likelihood. The results for networks generated using the Erdös-Rényi model are shown in Figure 4 and for the Watts-Strogatz model in Figure 5. We use the term "strictly 2" to refer to the semantics that include only friends of friends who are not the central node's friends, i.e., node with a shortest path of length 2 from the central node. The term "2 and 1" refers to the semantics that would include friends in the set of friends of friends (nodes that have a path of length 2 from the central node, although the shortest path might be of length 1). In general, when the generating semantics match the semantics assumed for the analysis, the model has a higher log-likelihood. Moreover, when comparing the two cases where the true generating semantics do not match the applied semantics, it is generally the case that the model that assumed that friends of friends include friends, performs better. This is more pronounced for networks generated using the Erdös-Rényi model.  To provide a more realistic insight on the impact of using different semantics, we measured the Jaccard distance between the sets constructed under different semantics on real network structures from the SNAP datasets [6]. In this case, there are no attribute values on the nodes. The results are summarized in Table 1. These results indicate that there can be an average difference of up to 10% on the sets constructed under different semantics.

Related Work
There is a plethora of work analyzing the properties of social networks. However, the actual construction for sets of peers is relatively understudied. A closely related work is that of Ugander et al. [8], which focuses on analyzing the structure of the Facebook graph. The authors explicitly make a distinction between the number of non-unique friends of friends (the number of paths of length two from the initial node that do not return to the initial node) and unique friends of friends (the set of nodes that can be reached from the initial node with paths of length two). That distinction could be thought of as an additional type of semantics. It is worth pointing out that our work has connections to feature construction for relational learning, as well as to probabilistic relational models, such as PRMs [4] and Markov Logic Networks [7]. More specifically, relational models are lifted representations that can be grounded to propositional models, according to some grounding semantics. Those semantics specify how an edge on the relational level "translates" to an edge on the propositional level.

Conclusions and Future Work
The proliferation of network data presents an opportunity to study phenomena involving network effects such as social or peer effects at a scale previously unthinkable. While there has been a large amount of work in that area, there still exists a significant gap in terms of the exact semantics that can be used to describe the mechanism from which those phenomena arise. In this work we have looked at the semantics for constructing the set of peers in order to study a social or peer effect. While there is no definitive correct approach to construct these sets, the choice of strategy reflects assumptions about the underlying mechanism of influence. As both our synthetic and real-world experiments show, the difference is not merely theoretical; the use of one strategy over another can lead to significant differences in the aggregate values of network-based covariates. These results, when coupled with the importance of small-effect sizes in studies of large networks, demonstrate the necessity for clarity. Our work here represents a small fraction of the ambiguities that exist within the process of understanding phenomena in networks.
In future work, we plan to examine the effect of alternative semantics on causal estimates in network studies and to characterize the bias associated with inappropriately choosing the strategy for assembling sets. Another interesting line of inquiry is to extend our analysis to the case of multiple entity and multiple relation networks, such as networks that contain both friend and co-worker relations.