# Outlier Detection and Prediction in Evolving Communities
## 3 Background
To achieve this, the algorithm intervenes in community formation procedures to ensure that a node can become a community member only if its content is similar to the content of that specific community. To describe the content of a community, the notion of the _Community Label Set_\(L_{c}\) is introduced, which represents the set of labels that accompany the community's nodes at that time. **Definition 2** (Community Label Set). : _Given a community \(c\) at time point \(t\), \(L_{c}\) represents the set of labels which at that time describe the contents of \(c\)._  
In particular, the community label set is formed by accumulating the labels of each edge leading to a node entering a community. When an edge connects a node outside the community with a community member, the Community Label Set is compared with the Edge Label Set; if they match, the node can enter the community with which it already has structural connections. In the same way, each node inherits the content of the interactions in which it takes part in the form of _Node Labelset_\(L_{u}\). The _LabelConstraint_ needs to be validated before a node enters a community's periphery. This ensures that the intersection of the label sets of the community and the candidate node is not empty, while the user can set a context-dependent threshold to restrict the similarity terms. The importance assigned to each of the characteristics (structure and content) can be leveraged through the proposed alpha \(a\) weight, as different \(a\) values lead to community detection being more focused on structural or content relations. As referred to previously, COTILES, which we further extend in this paper, is an incremental algorithm for analyzing the topology of social networks in an online way. The algorithm incorporates a time-to-live (\(ttl\)) parameter to reflect decaying social relationships in evolving graphs. Each interaction has a limited lifetime specified by the \(ttl\) input and disappears from the network unless it appears again; thus, the \(ttl\) needs to be updated. The contents of each interaction inherit its lifetime to ensure that the communities' content evolves and does not remain restricted to its early topics. When the time-to-live of an edge expires and it has not been updated, the edge is deleted from the graph along with its corresponding labels. The labels are deleted from the corresponding Node, Edge, and Community Label Sets only if they were not updated either. It is possible that the same edge could appear however with different content, meaning that only its structural part would update its time-to-live. Furthermore, a Node or Community Label Set could accumulate the same labels from another edge, meaning that they are not necessarily deleted. The evolution of the network is tracked through a predefined observation window time (\(obs\)), with the updates on the network occurring on its end, as the incoming edges are in the form of a stream. Whether the deletion of an edge leads to a community disconnection is checked at the end of each observation window time when the update of the graph is performed. The main steps of the algorithm are as follows:Preprocessing, where labels are extracted from the attributed graph. For each incoming edge, corresponding timestamps and label sets are appropriately updated, then the edge is examined. If the edge leads a node into a community's periphery, the node's content is checked; if it matches the content of the community, then it is inserted into the community and its labels are inserted into the Community Label Set. At the end of every observation window time, the graph, communities, and label sets are updated. In summary, COTILES is a community detection algorithm requiring an attributed social graph with temporal and content information as input, resulting in communities formed by nodes based on their structural and content relations.