{'fraction_non_alphanumeric': 0.0331919681495586, 'fraction_numerical': 0.008222260688938896, 'mean_word_length': 4.271213503649635, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Theoretical Model for Understanding the Dynamics of Online Social Networks Decay

Online social networks represent a main source of communication and information exchange in today's life. They facilitate exquisitely news sharing, knowledge elicitation, and forming groups of same interests. Researchers in the last two decades studied the growth dynamics of the online social networks extensively questing a clear understanding of the behavior of humans in online social networks that helps in many directions, like engineering better recommendation systems and attracting new members. However, not all of social networks achieved the desired growth, for example, online social networks like MySpace, Orkut, and Friendster are out of service today. In this work, we present a probabilistic theoretical model that captures the dynamics of the social decay due to the inactivity of the members of a social network. The model is proved to have some interesting mathematical properties, namely \textit{submodularity}, which imply achieving the model optimization in a reasonable performance. That means the maximization problem can be approximated within a factor of $(1-1/e)$ and the minimization problem can be achieved in polynomial time.


Introduction
Today's online social networks represent a main source of communication and information exchange among people all over the world. Many online social networks have proven their superiority, like Facebook, Twitter, and Linkedin, in connecting people and facilitating an exquisite new medium for sharing news, forming groups of people of the same interests, and eliciting knowledge. The growth of these networks 1 in terms of user activity shows that these online social networks have become a vital part in today's human activities. Thus, studying the human behavior in these networks has become a necessity in order to understand the behavior of humans and their interactions in these networks.
Social network growth: One well studied aspect of online social networks dynamics is the growth phenomenon of a network. The work by Barabási et al. [1] presented a simple model for understanding the growth dynamics of a network, namely Preferential Attachment which is a rich get richer model. Jin et al. [2] noticed that the model by Barabási et al. [1] and other similar models, like the work by Dorogovtsev et al. [3] for modeling the growth of random networks, are not suitable to understand the growth dynamics of social networks. Thus, they provided a model that considers the specialty of social networks like not having, seemingly, a power law distribution and the existence of clustering property [2]. With the avaliability of the online datasets, Newman [4] studied empirically the growth of social networks using the scientific collaboration networks against the Preferential Attachment [1] model. Then, Leskovec et al. [5] came with law-like properties of networks over time, namely, densification of networks and shrinking diameter of networks over time, assuming that the dynamics is growth dynamics. The previous work and the avaliability of rich datasets pushed the research to an in-depth investigation of the properties of the networks over time. Kumar et al. [6] studied the growth of a large social network in terms of network component analysis, Kossinets et al. [7] studied the tie formation process within the social networks that is affected by internal and external factors, and Capocci et al. [8] studied the statistical properties of and the growth characteristics of Wikipedia collaboration social networks. Likewise, Backstrom et al. [9] studied empirically how groups are formed and evolved over time in MySpace social networks and Mislove et al. [10] provided a study for the growth of Flicker social network.
Social network decay: Even though there are many successful social networks, the evolution of social network in general is not restricted to a growth process. In the last decade, it has been noticed that some of the online social networks were closed after a huge abandon or inactivity of their members. Online social networks, like Friendsfeed, Friendster, MySpace, Orkut, and many websites of the Stack Exchange platform, are now out of service, where some of these websites, Orkut and Myspace, were a rich environment to study the social growth dynamics [11] just a decade ago. The decay of these networks poses many questions about the reasons behind their fall down. Garcia et al. [12] and Chhabra et al. [13] studied the static properties of Friendster and MySpace, respectively, in order to understand the networkrelated properties of these networks as an example of a decayed network. Recent studies by Malliaros et al. [14] and Bhawalkar et al. [15] provided theoretical models for understanding the social engagement in online social networks with a potential to predict social inactivity. While investigating the reasons behind the inactivity of the members of the online social networks is not in the scope of this work, some recent studies proposed some answers [16,17], suggesting that the main reason behind this decay is the inactivity of the members of the online social networks. Building a sound understanding of the decay dynamics of networks requires not only studying the static properties of these networks, but also requires investigating their behavior over time, and this is what we are interested in. Here, we consider the Stack Exchange websites that were closed after a period of time due to the lack of enough activity required to keep the website alive 2 . The closed websites are an example of the social network decay, where we model the members of a closed website as the nodes of the network and an edge exists between any two nodes if they post, comment, or answer in the same question in the websites.
The decayed websites of Stack Exchange: Before proceeding, we will present some analysis and comparisons between the decayed websites (websites that are closed) and alive ones. Figure 1 shows the distribution of the number of users comments for alive and decayed websites. The figure shows that the decayed websites clearly have different distribution characteristics with a low mean and low standard deviation. A similar behavior is found in Figure 2 and Figure 3 that represents the distribution of users total received Reputation and Upvotes, respectively. These two properties reflect the level of knowledge and experience that the members of a website have. For the decayed websites, it is clear that, on average, the members have much less reputation and upvotes than those in the alive websites. This may indicate that one reason behind closing websites is the lack of experienced members. All of the three figures, Figures 1, 2, and 3 show that there is less social activity in the decayed websites, which may be used as an indication for studying the future of the alive websites. However, understanding the decay dynamics of the decayed websites requires a deeper investigation and modeling for the nature of the interaction among the members.
Our approach to better understand what happen during the decay process is to make a network representation of the members interactions, like comments, upvotes, and posts, as networks. Then, we build a network based model for modeling the decay process. Figure 4 shows the real-data network representation of the Startup Business decayed website over time 3 . In the figure, there is clear decrease in the number of nodes and the number of edges in the network over time, which is another indication about the decay of the social interaction over time in the decayed websites.  Our contribution: Modeling a human behavior (the online social decay in our case) is not an easy task. Thus, we are interested in modeling the consequences of this behavior. Having that said, we are answering how, not why, the social decay happen. We are not interested in knowing the reasons behind social decay, instead we are interested in modeling the consequences (the effects) of this behavior, which may help in understanding the reasons of social decay (the causes). In this work, we provide a probabilistic model for understanding the social decay phenomenon in online social networks. We think that providing a mechanistic model will be a useful tool to better understand what we call the decay dynamics, which will certainly enhance our understanding of the human behavior in online social networks. Although the human behavior has some regularities, we strongly believe that it is not deterministic, unlike the physical systems. Thus, a probabilistic modeling is a good way to mitigate the non-determinism of human behavior. Our contribution in this work is split into: -A probabilistic model for capturing the social decay. The model represents a step by step mechanistic model that captures the leave of a node in a network under decay and quantify the consequent properties of the network after its leave. -Measures for understanding the network resilience to node leaves and the influence of a node leave on both the neighbors and the network. -Theoretical proof of the submodularity of the model that leads to viable optimization. Being submodular, the maximization problem of the model can be approximated to a reasonable factor, and the minimization problem can be done in polynomial time.

Model and notations
is a tuple of two sets V and E, where V is the set of nodes and E is the set of edges such that an undirected edge e is defined as e = {u, v} ∈ E, where u, v ∈ V . As we consider the a dynamic system, the notation G t is a network at time t. We assume that every node w ∈ V has an initial Leave Probability π 0 w which determines whether the node w will leave 4 at time 1, and generally at t + 1, or not. If a node w did not leave at t + 1, i.e., w ∈ V (G t+1 ), then its current leave probability, π t w , will be increased depending on its neighbors who left at t − 1. The details of this process are described in the following sections. The notion l(w) denotes the time at which the node w left the network.
We assume the model starts with a Decaying Network, where neither new nodes nor new edges appear in the network, and thus the network dynamics are restricted to node and link removal. Even though this assumption sounds unrealistic for many networks, but we emphasis that it is only unrealistic for networks with growth dynamics, not for the networks under decay which is what we are modeling here. The main idea of the model is that the leave of a node will increase the leave probability of its adjacent nodes ( Figure 5 gives an example).

Probability Gain
At any point of time time t where t>0, the node leave probability is changed from π t−1 w to π t w depending on the leave of w's neighbors. Assume that a node w did not leave the network at time t, then we have two sets: w : the set of w's neighbors who left the network at t − 1.
-Γ t−1 w : the set of w's neighbors who did not leave the network at t − 1.
Thus, at any point of time t > 0 we have: |Γ t w | = |Γ t−1 w | − |Γ t w | for a decaying network. We assume that in the online social settings that when many neighbors (friends) of a node w leave the social network at time t − 1, then the probability that the node w will leave at t + 1 will increase due to the probability gain the node w gained at t. This difference of the probability between the time t − 1 and the time t is called Probability Gain, ∆π t w . Thus, a node w will leave at time t + 1 with probability π t+1 w such that: We model the probability gain as directly proportional to the number of neighbors who left the network as follows: for t>0.
Fig. 5: An illustration of the model. The color of the nodes represents how likely a node will leave in the future, where white nodes are very unlikely to leave and the level of grayness correlates with the probability to leave. Whenever a node leaves the network it is marked as black, all its edges are removed, and all of its neighbors get affected by its leave by increasing their leave probability. The dotted edges are the removed edges.
Probability gain due to one node leave: In order to capture the probability gain meaningfully in the model, we first provide the probability gain due to the leave of one neighbor v of the a node w at time point t − 1, and then generalize it to the all of left neighbors Γ t−1 w . In social networks, the interaction between members is not a constant value, different members interact with each other with different intensity. We capture this property in our model by introducing δ t−1 v,w ∈ (0, 1], Tie Strength between the members v, w at time point t − 1. Now, the probability gain that a node w will get at t due to the leave of its neighbor node v at t − 1 is: where the edge e = (v, w) ∈ E(G) t−2 and e = (v, Equation 3 can be generalized to calculate the probability gain produced by the leave of a node v to all of its neighbors, see Figure 6 for an illustration, that did not leave at the same time l(v). Thus, we have: At time t − 1, the middle network, the node v leaves the network affecting its neighbors by increasing the leave probability of nodes 1, 2, 4, 5. Here we assume that the tie strength between v and the nodes 1, 2, 5 is greater than the tie strength between v and 4. That is why the nodes 1, 2, 5 gain more leave probability than node 4, which is represented in the figure as nodes 1, 2, 5 have colors closer to red than node's 4 color.
Probability gain due to multiple nodes leave: Now, we will formalize what happens when many neighbors of a node w leave the network. We start with a node w that did not leave the network at t − 1, but some of its neighbors did. So, the leave probability of node w will increase due to the leave of its neighbors, see Figrue 7, according to the following: Leave probabilities effect where ξ t−1 w = |Γ t−1 w | |Γ t−1 w | and the quantity 1 − ξ t−1 w assures that when all of the neighbors of the node w leaves, then the node w will (be forced to) leave too as it will be, intuitively, disconnected.
Thus, Equation 5 becomes: and π t−2 4 , respectively, which were gained by the node's initial leave probabilities π 0 1 and π 0 4 and possible probability gain due to leave of their neighbors in earlier time. At time t − 1, the middle network, the nodes 1, 4 leaves the network affecting their neighbors, here we are interested in the node w. The leave of nodes 1, 4 left node w with an increased leave probability at t. Note that nodes 2, 3, 5, 6 are affected also by the leave of 1, 4, but for simplicity and for visualization traceability we concentrated on node w.

Node loss
Let ϑ t be the set of nodes that left at time t, then the expected number of nodes that will leave the network at t = 1 is |ϑ 1 | = v∈V π 0 w , and generally we have The set of all nodes that left the network between i and j, ∀i, j > 0 is: The probability that a node w gets disconnected, i.e., deg(w) t+1 = 0 is:

Edge loss
We also can model the number of edges over time for these networks as follow. Let Ω t−1 , edge loss, be the set of edges that were removed due to node left at t − 1, then we have: Based on this, the expected number of edges that will be removed one step forward in time is: and generally n steps in future, where n > 0, as follows: The probability that an edge e = (u, v) ∈ G t is removed at t + 1, i.e., e = (u, v) ∈ E(G t+1 ), is:

Node leave influence
The leave influence LI is how much a node affects its neighbors and causes them to leave. Informally, it is the number of w's neighbors who left before the leave of w. Assume that a node w ∈ ϑ t that left the network at time t, then the LI is calculated by the following equation: where n > t is greater than the time t at which node w left. The value of n specifies how many steps in time are considered for finding the LI. The leave influence is a useful measure that enables us to predict which members of a network will have a bigger effect after their leave.
Another interesting issue is to find the fraction of your friends who unexpectedly left before you leave. Assume that a node w left the network at time j, then the fraction of nodes that left the network before the node w left the network at j is the Neighbors Leave Resilience(NLR):

Monotonicity and submodularity
In this section, we prove the monotonicity and submodularity properties of the model equations. We start by defining submodularity.
, be an arbitrary function that maps the subsets S and T to a non-negative real value, where S ⊆ T ⊂ V . Then, the function f is submodular [18] if it satisfies the following inequality: Lemma 1 (Order preserving of the probability gain sum). Let π t = {π 1 , π 2 , · · · , π n }, where π i ∈ π t and π i ∈ (0, 1]. Then we have: π i where π t ⊆ π t+1 , and the sets π t and π t+1 are defined like above.
Proof. For π t = π t+1 , the proof is trivial. Now, Assume that π t+1 = π t ∪ H, where |H| = k and k > 0. For k = 1 the inequality holds as the set H will contain one element whose value is (0, 1]. The proof concludes by induction over k. Proof. Assume that a node w left the network and the set Γ t−1 w is the set w's neighbors before leaving the network. Using the definition 2 and Equation 4, we prove the theorem by proving the following inequality: w . For S = T , the equality holds, and now we need to show that the inequality is correct for the case where S ⊂ T . Simplifying the previous equation, we get: simplifying the previous inequality we obtain: Using the fact that the sets S ∪ {v} and T ∪ {v} are larger than the sets S and T , respectively, with only one element, namely v, we can further simplify the previous inequality to: The interpretation of the theorem is that, the more friends a left node has, the more leave probability gain the left node leaves in the network. This suggests that the leave of the nodes with high degrees in a network makes bigger disruptions than the nodes with smaller degrees.
Theorem 2. The leave probability gain function, Equation 5, is monotone, i.e., for a node w we have π t w ≤ π t+1 w if the node w did not leave the network at t + 1.
Proof. The proof of this theorem follows the proof in Lemma 2. Based on this, we need to show that the function f , the probability gain function defined in Equation 5, is submodular. For the first case, S = T , the proof is trivial. In the rest, we proof the second case. The probability leave gain due to the leave of one node is defined in Equation 5 can be rewritten as the following in order to prove the submodularity 5 where S * = S ∪ {v}, T * = T ∪ {v}, and ∆π t−1 w (H) is the leave probability gain due to the set of nodes H = Γ t−1 w . Not that Equation 12 can not be zero as S = T . Suppose that an arbitrary function h(f (·)) returns the sign of the value of the function f (x). Then, for the gain function in Equation 6 we have: That is because, in Equation 6 the quantity (1 − ξ t−1 w ) is always greater than zero (because we have S ⊆ T ⊂ V and v ∈ V \ T ), then it will never change the sign of the entire formula. Thus, we can ignore it safely if we only want to check the sign of the formula. So, we simplify the left hand side of Equation 12, benefiting also from the simplification done in Equation 13 to: We can simplify the previous equation further based on the fact that the sets S * and T * contain one more element, v, than the sets S and T , respectively. Thus we get: Obviously, Quantity 1 has a negative value and Quantity 2 is a positive value. However, Quantity 2 is greater than Quantity 1 because |S| < |T | and the value of ∆ t−1 w (v) is the same in both quantities, then Quantity 2 minus Quantity 1 is greater than zero, See Lemma 2.
The theorem state that the more of your friends leave, the less effect the others who stay have on you. I.e., The more of your friends leave, the less important the others become. Submodulariy entails an interesting properties: the minimization problem of submodular function can be performed in polynomial time [19], and the maximization problem of the submodular function (which is NP-Hard problem) can be approximated within a factor of α = (1 − 1/e) using a greedy algorithm [20]. In the following we formalize the optimization problem of the model.

Maximization problem
The maximization problem under the settings of the model is defined as: Select a set of nodes A of maximum size k such that the number of left nodes at time t + 1 is maximum. Equation 14 shows this definition formally.
Intuitively, the number of left nodes is directly proportional to the probability gain. Thus, and based on Equation 4, the maximization problem in Equation 14 becomes: The previous definition is one-step optimization, which means we maximize for a one step in the future only.

Minimization problem
Conversely, the minimization problem under the settings of the model is defined as: Select a set of nodes A of maximum size k such that the number of left nodes at time t + 1 is minimum. Equation 16 shows this definition formally.
Subject to|A| ≤ k, A ⊆ V (G) (16) 5 The potential of the model Having described the model and proved some of its properties, especially the submodularity and the optimization implication, there are different applications.
-Leave cascade detection: a single member leave is not as harmful as a cascade of leaves for the networks that seek growth dynamics. The presented model captures the dynamics of cascade leave by tracking the leave probabilities of the nodes and their increase. -Maximizing the leave effect: for a network where a dissolving (disruption) process is required, like criminal social networks, the model is able to provide an accepted level of disruption maximization (thanks to the submodularity property of the model) to the network with insights about the influential members and the effect of the leave of each one. -Social network resilience: the resilience against huge disruptions, like Churn Activities particularly in game industry, in social networks is not well studied. We think that the model provides a first step towards engineering a resilient social network via understanding the decay dynamics of a network.

Challenges and future work
We aim at providing a simple model, and the simplicity imposes some challenges. One of these challenges is estimating the initial leave probabilities. It is not clear whether these probabilities exist in reality or not, however, some analysis like that shown in the Figure 8 for the number of active days before being inactive, may give some insights regarding how to model the initial leave probability. The model's intended scope are social networks where edges between members denote common interest and where the time interval is so short that it can be assumed that these do not change within the observed interval.
In this case, only the inactivity of nodes (not of edges) needs to be modeled. However, future step is to test and the compare the results of the model with the Stack Exchange data sets as it is the only data set with social decay information we have at the moment.