{'fraction_non_alphanumeric': 0.033483301609274964, 'fraction_numerical': 0.011334140854819173, 'mean_word_length': 5.149773876030859, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Exposing individual differences through network topology

Social animals, including humans, have a broad range of personality traits, which can be used to predict individual behavioral responses and decisions. Current methods to quantify individual personality traits in humans rely on self-report questionnaires, which require time and effort to collect and rely on active cooperation. However, personality differences naturally manifest in social interactions such as online social networks. Here, we demonstrate that the topology of an online social network can be used to characterize the personality traits of its members. We analyzed the directed social graph formed by the users of the LiveJournal (LJ) blogging platform. Individual users personality traits, inferred from their self-reported domains of interest (DOIs), were associated with their network measures. Empirical clustering of DOIs by topological similarity exposed two main self-emergent DOI groups that were in alignment with the personality meta-traits plasticity and stability. Closeness, a global topological measure of network centrality, was significantly higher for bloggers associated with plasticity (vs. stability). A local network motif (a triad of 3 connected bloggers) that correlated with closeness also separated the personality meta-traits. Finally, topology-based classification of DOIs (without analyzing the content of the blogs) attained>70% accuracy (average AUC of the test-set). These results indicate that personality traits are evident and detectable in network topology. This has serious implications for user privacy. But, if used responsibly, network identification of personality traits could aid in early identification of health-related risks, at the population level.


Introduction
Each individual (human and animal) has his/her own unique characteristics, formed by a combination of both nature and nurture 1,2 . Availability of detailed individual-level data has demonstrated the value of personalized treatment in numerous domains [3][4][5] , ranging from medicine, marketing, education, consumption of news, digital and retail products.
Simultaneously, the discovery of the effectiveness of personalized treatment has led to a surge in the concern for individual privacy and privacy-oriented research. Extensive research has demonstrated over the years that a number of personal characteristics are closely associated with behavior and can be used to explain the response to interventions. However, quantifying these traits remains a labor-prone task with numerous privacy implications.
Many current methods for quantifying personality differences across individuals rely on selfreported measures (such as questionnaires), or they are subject to lab-based conditions (which are often conducted over small samples). Accordingly collection of such data requires significant effort, and its scale is limited 6-8 thus narrowing their use in practice.
The development of modern computational tools combined with the exponential growth of data in recent years allows for the large-scale analysis of individual differences, without the need for explicit questionnaires. Specifically, network analyses using big data, applied in several recent animal experiments, have yielded important insights, inferred directly from behavior.
For example, different brain activity patterns in zebrafish have been linked to inter-individual behavioral differences 9 , and individual traits in mice have been linked to gene expression in the brain 10 . Also, two recent studies of rock hyrax natural social networks found that specific network properties (centrality and ranking) were related to longevity and mating success 11,12 . This shows that non-questionnaire-based approaches can be used to infer individual differences (including personality differences) which can also be applied to humans. So too, the goal of studying natural human behavior using large data could be further advanced by network analysis techniques.
Despite the abundance and richness of the available data, it rarely contains direct information on personal traits, thus limiting the application of the available theory for practical purposes.
Some methods to relate observable user-generated data to personal traits were developed in recent years. For instance, one could apply natural language processing techniques to reveal individual traits with relatively high accuracy 13 . Here we suggest tackling this issue by mining online social networks for associations between their topology and personal attributes.
Social network formation is governed among other factors by the activity of the individuals comprising the network, their interests, demographics, and other attributes [14][15][16] . One can expect that the topology of online social networks retains at least part of that information and that it can be mined. Several network properties were previously associated with specific personality traits [17][18][19] . However, these studies have typically relied on questionnaires and were performed in small networks. The need to investigate whether this information can be extracted from large-scale networks without self-reported measures still lacks a good solution.
In online social media platforms, humans interact by posting their opinions and sharing information from other users and from around the web. To optimize information exchange, they develop and maintain social networks thus altering the information they are exposed to and the reach of the content they publish. Finally, to establish a solid online presence, social media platform users publish details about themselves on their profile pages. Together, these data provide a rich source of information about the relation between personality traits, content, and network structure.
In this study, we analyzed user profiles and social network data from LiveJournal (LJ)-a largescale social network of bloggers 20,21 . To analyze the LJ network, we defined the bloggers as nodes, connected by directed and unweighted edges according to the bloggers' friendships.
Blogger's domains of interest (DOIs, a free text keyword or phrase the blogger chooses to describe his/her interests) were associated with personality traits. This was done based on previously described relationships between keywords/free text (here, DOIs) and personality traits [22][23][24][25] .
We further used this relationship to show how individual user's personality traits, inferred from their DOIs, are evident in LJ network. For that, we leverage LJ structure so that each node (blogger) was characterized by a set of 20 topological features (in a network attribute vector approach 26 -NAV). An empirical clustering of the correlations of DOIs with these 20 NAV features, from an unsupervised perspective, yielded two main DOIs groups. We found that these groups were in alignment with personality meta-traits -plasticity and stability. Plasticity (vs. stability) associated bloggers (by DOI proxy) had significantly larger values of closeness, a global topological feature of network centrality. This difference was also evident in a local network triad (a specific motif of 3 connected bloggers), that correlated with closeness. Finally, we demonstrate that DOI's are related to the network structure, and enable the classification of DOIs. Using a graph-based learning approach based on network topology and label propagation alone (without using the actual blog content), we attained accuracy (by AUC of test-set) exceeding 70% over the first and final snapshots. Analysis of sequential network snapshots (first and final snapshots) helped to further increase the scale of the training set and validated our method.

Network data
The social network analyzed in this study was the LiveJournal (LJ) blogging platform 20,21 which is a free online platform that allows bloggers to communicate and share information in the form of distinct text entries (stories, ideas, etc.). LJ is a large network, which at the time of this study had around 10 million bloggers with over 120 million friendships among them. LJ friendships are not necessarily symmetric as each blogger can select the profiles he/she follows independently.
Blogger profiles contain a section with a list of self-declared domains of interest (DOI). We used these details to characterize each blogger's main personality traits [22][23][24][25] . For that, from the list of 100 most popular DOI's, we extracted 94 which were in English.
The structure of LJ is dynamic, and can change over time -i.e., DOIs and/or edges (friendships) can change (created or eliminated) at a particular point in time. For computational reasons, we analyzed the first and final snapshots of LJ (out of the sequence of 19 snapshots collected over the course of about 22 months). We mainly focused on the final snapshot (unless explicitly stated), since it reflects a more evolved version of the LJ network.

Individual differences and free text
One of the popular frameworks used to characterize human personality uses the Five-Factor Model to produce five key attributes designated as "the big five" 27 . The big five personality traits can be split into two personality meta-traits, stability and plasticity 28,29 . The stability meta-trait reflects an individual's tendency to restrain potentially disruptive behavior. It comprises a combination of three traits from the big five personality dimensions: conscientiousness (an individual's degree of organization and persistence), agreeableness (an individual's degree of kindness), and neuroticism (reversed; the degree to which an individual experiences the world as distressing, threatening, or unsafe). The plasticity meta-trait reflects an individual's tendency for exploration. It comprises a combination of the other two traits from the big five personality dimensions: openness to experience (an individual's degree of curiosity) and extraversion (an individual's degree of assertiveness and dominance).
The lexical hypothesis proposes that an individual's choice of language is indicative of his/her personality traits 22 . Specific keywords have been previously associated with the big five personality traits 24,25 . It was shown that an online profile is reflective of user's real "offline" personality 30,31 . Hence, these keywords can be used as proxies for individual personality differences, when studying a network. Accordingly, we used these associations to couple DOIs from the network with the personality meta-traits (Table 1; Not enough DOIs are associated with each of the big five personality traits with high enough accuracy to study them individually).

Network measures
A network can be projected onto a graph consisting of nodes (also known as vertices, their count represented by V) and edges (count represented by E) that connect pairs of nodes. Nodes were defined by the bloggers, and edges were defined by (directional) friendships between bloggers. When a blogger had marked someone as a friend, an edge was defined 'out' from that blogger, 'in' to his/her friend. When available, the directionality and weights of an edge (i.e., with a beginning and an end node) carry additional information. Here, we studied directional edges, assuming all friendships are equal, i.e., unweighted edges. Accordingly, we projected the LJ network onto a directed and unweighted graph.
To learn the association between the blogger's personality traits and the topology of his/her social network, we analyzed each blogger's social network to compute a list of network measures. This list of features packed in a vector is sometimes designated as the Network Attribute Vector 32 (NAV) and reflects both local and global network topology associated with the specific user. The following features were used for each blogger: (a) In-degree, out-degree: the number of other nodes that are connected to (in) or from (out) the measured node. In-degree is proportional to how many times the blogger was chosen as a friend, and the out-degree is proportional to how many friends the blogger had chosen to follow.
(b) Four node centrality measures: Closeness, k-core, and breadth-first search (BFS) first and second moments.
Closeness (formally known as closeness centrality) is the average length of the shortest path between the node and all other nodes in the graph 33 . Closeness is sometimes associated with the rate at which the information originating at a node can reach the entire network 34 .
K-core is a measure of a node's degeneracy. This feature reflects the maximal degree (k) for which the node remains a member of a k-degenerate subgraph (one in which all nodes have k or more edges) and can help ranking nodes by access to other central nodes in the network 35 .
BFS first and second moments are the average and the standard deviation of the BFS distance distribution (respectively).
(c) PageRank: the probability of reaching the node by a random walk with episodic random relocations, when starting at a random location. This is a global measure, that models navigation over the network and was used by Google to rank nodes, by the probability that they are the target of one's search 36,37 . Together these measurements comprise the 20-features-long NAV.

Network analysis
First, we uniformly sampled the original network over ~2×10 6 nodes (bloggers), taking the largest connected component (Fig. 1a). This reduction (from 1×10 7 bloggers to ~2×10 6 bloggers) was done for computational reasons. It was recently shown that this type of random selection of nodes is less biased on larger samples 39 .
This resulted in a sample of V = 1,218,319 unique bloggers (with E = 7,225,480 links defined by friendship relations). We then calculated the NAV for each blogger in the sampled network, forming a V (blogger) × 20 (NAV features) matrix. This network features matrix is complemented with a V × 94 matrix in which each row represents one-hot encoded (binary) DOI's of the corresponding blogger (Fig. 1b).
To understand the relationship between the user network properties and his/her domains of interest, we calculated a network topology correlation matrix. Each cell of this 94 x 20 matrix contains the correlation between one DOI and one social network feature (Fig. 1c). Considering that the relationship between many of the pairs of these variables is not linear and many of the network measures are heavy-tailed 40 , we used Spearman's rank correlation rather than the more common Pearson 41 (calculated using the SciPy python library 42 ).
The importance of topological features varies among different social networks 32

Neural network
To demonstrate that this relationship can be used to decode DOIs, we implemented an artificial neural network (ANN) for the classification of DOIs, based on the raw NAV features. The goal was to train a classifier to predict DOIs by their network properties and by label propagation.
We implemented a binary classifierspecifically a feedforward neural network composed of three layers. This was defined similarly to our recent publication 32 . However, we implemented two minor adjustments to prevent overfitting when optimizing the parameters. First, we applied a penalty to prevent the weight matrices from being too large (regularization). We used L2 regularization -with a 0.1 rate regulation (penalty) for the first layer, and 0.01 rate regulation for the second layer. We used a dropout rate of 0.2 for both the input layer and the hidden layer.

Results
This study aimed at testing whether individual personality differences can be detected in social network topology, without the use of self-reported personality measures like questionnaires.
For this, we projected a sample of LJ bloggers onto a connected (directional) network. The network nodes were defined as bloggers, and edges/links were defined as friendships among them (i.e., an edge exists from blogger 'i' to blogger 'j' only if 'i' had marked 'j' as his/her friend). We analyzed the network by the DOIs from profiles of the LJ bloggers, which reflect different personal interests (see Methods). Using earlier studies, the association of the ninetyfour most popular English language DOIs with one of the two personality meta-traits 24,25 (stability and plasticity) were defined (Table 1; we studied the 100 most frequent DOI, but 6 were not in English). This resulted in three groups: stability (N = 9), plasticity (N = 12) and non-associated DOIs (N = 73). Based on these DOIs, we investigated how individual differences in personality traits (by DOI proxy) are represented in the network.

Topology-based clustering of DOIs reveals two main groups
We first analyzed the network topology correlation matrix to find DOI groups (see 'Network analysis' section in Methods and Fig. 1). Specifically, we looked at the self-emergent grouping of DOIs by their topological similarity using unsupervised hierarchical clustering 26 .  traits of personality. The split of DOIs by hierarchical clustering and by meta-traits of personality is presented in Table 2. There was a significant relationship between the unsupervised hierarchical clusters (cluster I and II as presented in Fig. 2

Network topology exposes meta-traits of personality
To find the most influential topological features we projected the DOIs onto a low-dimensional representation of network topology using principal component analysis (PCA). The PCA projection can be seen in Fig. 3, wherein the first PC accounts for 63.0% of the variance.
Therefore, we further studied the specific NAV features that contributed most to PC1. To constrain the number of comparisons, we compared the top five topological features (the top five contributors, based on their PC1 weights; Fig. 3b) between plasticity vs. stability associated DOIs.      Figure 1d, together with the two DOIs with highest ('manga') and lowest ('internet') AUC are presented in Figure 5a. These data show that topology-based classification of DOIs is possible (compared to a random classification), with above 70% accuracy over these two snapshots (1 st and 19 th snapshots).
Finally, by grouping DOIs according to their associations with personality traits (Table 1), we classified personality using the combination of network topology and label propagation. For extraversion (which was associated with more than three DOIs) we randomly selected 3 DOIs from its list ('video games', 'manga', 'fantasy') to be comparable to the others. Practically, we concatenated the DOIs, forming a topological profile of personality by feature dimension.
These profiles of personality were then decoded, with an average classification accuracy (AUC of the test set) of 73.4% ± 1.4% and 73.7% ± 2.3% on the 1 st and 19 th snapshots respectively (Fig 5b; mean ± SD).

Discussion
In this study, we tested the relationship between the structure of LJ, a real-life social network of bloggers, and personality traits. Specifically, we tested whether individual personality differences are empirically evident in the network topology. An important advantage of our approach is that it does not depend on personality questionnaires, which are the primary method to measure personality differences. Rather, we found that personality differences can be  29,60 . Plasticity reflects an exploration tendency of bloggers, characterized by both behavioral and cognitive aspects 28 (by extraversion and openness to experience respectively). We found evidence for a combination of those aspects, in more central locations throughout the network. As recently suggested 18,61,62 , this might strengthen the existence of personality homophily, affecting the underlying structure of online social networks -where individuals with higher levels of plasticity (reflecting a higher exploration tendency) are connected to individuals who are more likely to explore ideas with them. This is consistent with efficient knowledge sharing in strategic network locations 51,53 .
The significant differences in personality we found (i.e. higher closeness for plasticity) might be explained by confounding variables. Demographical information (e.g. age 63 or geographic locations 62,64 ) and specific cognitive/social skills (e.g. information seeking preferences 65 and/or relationships quality 66 ) should be dissociated in future work. We only analyzed here the correlation between personality traits and network topology (we do not prove a causal relation).
Additional evidence for this causal relationship between humans behavior and social online networks was recently shown 15 . We did not study individual items of the big five because there were not enough DOIs associated with each, but our approach provides the basis for future research. Here we identified personality from network topological features without selfreported measures. Future work should specifically label DOIs or text to expand our analysis to the big five, test other (directed) social networks, and introduce additional global and local network measures (not included as part of the NAV features used in this work, such as betweenness centrality 67 or motif4).
An online social network user does not expect to reveal details about his/her personality, without an explicit approval. These details can potentially be processed to obtain personality profiles for every user, and provide a better understanding of their online behavioral aspects.
Such "personality hacking" can be used in negative manners (e.g., mass persuasion by psychological targeting 68 or the Facebook-Cambridge Analytica scandal 69 ). Thus, the possibility to accurately extract such details directly from online activity raises privacy concerns. And this should not be neglected by policymakers (or users), who should strive for transparency regarding the utility derived from the collected data (e.g., "personality hacking" warnings, a clear third-party data distribution policy and data compartmentalization could repel violation of user privacy).
From a different point of view, an improved ability to detect a specific personality profile (directly from online behavior in social networks) can be implemented positively across different domains. First, high extraversion is associated with an increased risk for accidents 70 (on average they are more prone to take risks) so that accurate detection of this personality profile, can be the target for safety education. Second, a specific combination of the big five dimensions (high neuroticism combined with low extraversion and low openness to experience) was associated with a higher risk of developing Parkinson's disease 71 (PD) or Alzheimer's disease 72 (AD). This example is of unique importance, wherein the communality of PD and AD might be used for early identification without self-report measures over online social networks. The clinical evaluation of these neurodegenerative diseases includes elements of self-report measures -part II of UPDRS 73 for PD or MMSE 74 for AD. Therefore, alternatives should be further explored (e.g. 75 ) based on real-life behavior and decisions.