Exploiting Community Emotion for Microblog Event Detection

Microblog has become a major platform for information about real-world events. Automatically discovering real-world events from microblog has attracted the attention of many researchers. However, most of existing work ignore the importance of emotion information for event detection. We argue that people’s emotional reactions immediately reﬂect the occurring of real-world events and should be important for event detection. In this study, we focus on the problem of community-related event detection by community emotions. To address the problem, we pro-pose a novel framework which include the following three key components: microblog emotion classiﬁcation , community emotion aggregation and community emotion burst detection . We evaluate our approach on real microblog data sets. Experimental results demonstrate the effectiveness of the proposed framework.


Introduction
Microblog has become a popular and convenient platform for people to share information about social events in real time. When an external event occurs, it will be quickly propagated between microblog users. During propagation process of an event, sufficient amount of users will express their emotions. Taking Sina Weibo 1 as an example, more than 12 percent of users use emoticons 2 when reposting an event-related microblog message.
The emotion information can not only help us better understand a given event, but also be utilized to discover new events. Figure 1 shows 1 http://weibo.com/ 2 An icon to indicate user's emotion, as shown in Table 1. Earthquake in Japan. We can see that emotional changes immediately reflect the occurring of realworld events, thus it is reasonable to use them to perform event detection. Most existing research on microblog event detection (Weng and Lee, 2011;Sakaki et al., 2010;Becker et al., 2010) only account for the factual information (e.g., burstness of topic keywords). They usually ignore the importance of emotion information for event detection. Although there have recently been a few papers (Zhao et al., 2012a;Nguyen et al., 2013;Akcora et al., 2010) in this direction, they have a number of disadvantages. Firstly, they can not detect communityrelated events. Since they all aggregate emotion at global level, they can only discover national attention events, such as public holidays ( "Christmas" and "Spring Festival") or natural disasters. In many applications, discovering events related to a certain group of users or a certain topic is more meaningful. Consider the following questions: "what happened in the football community last week?" and "what are the most significant events in the lawyer community last month?" Secondly, they assign equal weight to each microblog message or user when aggregating them to a global emotion score. Such approaches may lead to incorrect results when a user posts emotion spam in the community. Thirdly, there is a lack of quantitative evaluation using real-world events in existing work. For example, there is only case study in (Zhao et al., 2012a) and(Akcora et al., 2010).
In this study, we focus on a new task of detecting community-related events via community emotion. Our intuition is inspired from the social psychology theory of group emotion. In social psychology, group emotion refers to the moods, emotions and dispositional affects of a group of people 3 . It can arise as a result of group-relevant events (Smith et al., 2007). For example, people will feel happy when their favorite football team wins a game and feel sad when their team loses a game. Thus we can use the community emotion as signals to detect community-related events. To achieve good performance of this new task, the following two factors must be considered: 1) how to measure the community emotion based on microblog message or user emotion and 2) how to perform event detection based on the sequence of community emotion.
To measure community emotion, we argue that in a given community, different users have different emotional authorities. The emotion of highly influential people in the community may be more important in determining the community emotion (Barsäde and Gibson, 1998). We propose to use the user's emotion authority computed by the social network of the community to weight the user when aggregating community emotion. Since spam user is unlikely to have high emotion authority in the community, our method can reduce the effect of emotion spam. Based on the community emotion, we present an emotion burst detection algorithm for the community emotion distribution sequence. We identify two emotional states of the community: "emotion stable" state and "emotion burst" state. We use the Dirichlet distribution to model the generation process of the community emotion distribution. An efficient emotion burst detection algorithm is presented to detect community-related events.
We evaluate our approach on large-scale microblog data sets by using real-world event list for each community. Experimental results demonstrate that the community emotion is an effective signal for community-related event detection. In comparison with several baseline methods, our emotion burst detection algorithm also improves

Related Work
In this section, we review the related work on sentiment analysis and event detection in microblog, respectively.
Sentiment Analysis in Microblog: Sentiment analysis (Pang and Lee, 2008;Liu, 2012) is mainly about analyzing people's opinions, sentiments and emotions towards a given event, topic, product, etc. Microblog platforms like Twitter and Weibo, provide people a convenient way to post their emotional reactions towards social events in almost real time. This leads to increasing number of interests on sentiment analysis in microblog data (Davidov et al., 2010;Go et al., 2009;Agarwal et al., 2011;Pak and Paroubek, 2010;Jiang et al., 2011;Speriosu et al., 2011;Bermingham and Smeaton, 2010). The training data for microblog sentiment analysis are usually obtained in an automatic manner by utilizing emoticons, hashtags and smileys. Davidov et al. (2010) propose an approach to automatically obtain labeled training examples by exploiting hashtags and smileys.  proposed an emoticon smoothed method to integrate both manually labeled data and noisy labeled data for Twitter sentiment classification.
Different from existing microblog sentiment analysis work, which aims at discovering sentiments and emotions for an event or topic given in advance, we are interested in utilizing the emotion information in microblog messages for real-world event detection. Our work use sentiment analysis as a tool to perform microblog emotion classification. Then we propose an event detection algorithm based on the sequence of community level emotion distribution.
Event Detection in Microblog: Event detection from microblog data has attracted increasing attention recently. We divide existing work into the following two categories: non-emotionbased methods and emotion-based methods. Nonemotion-based methods try to exploit keyword or activity patterns to discover events (Weng and Lee, 2011;Sakaki et al., 2010;Becker et al., 2010;Mathioudakis and Koudas, 2010). Mathioudakis and Koudas (2010) first identify "bursty" keywords and then discover events by grouping bursty keywords together. Zhao et al. (2012b) focuses on identifying event-related burst from social media based on multiple activities. They propose a unified optimization model to integrate multiple correlated activity streams based on the state machine in (Kleinberg, 2003).
Emotion-based methods try to exploit the emotional reactions to discover events (Zhao et al., 2012a;Akcora et al., 2010). Akcora et al. (2010) model public emotion as an emotion vector computed by counting emotion words and then use a rule-based method to identify public breakpoints. Zhao et al. (2012a) use a simple top-k method to detect abnormal events based on sequence of sentiment variance.
Our method is also an emotion-based method. However, our approach is different from existing emotion-based methods in the following aspects. Firstly, while existing work aggregates emotion for all users, we focus on emotion for a certain community to discover community-related events. Secondly, existing methods assume that the emotions of different users are of equal importance. We distinguish user's emotional authority based on the community structure of users.

Preliminary Definitions
In this section, we first give some basic concepts before formally defining our problem.
Topical Community: A group of connected users that are interested in a specific topic. A topical community can be denoted as C = {V, E, M }, where V is the set of community users, E is the set of relationships of between users. M = {M 1 , M 2 , ..., M T } is the microblog message collection in the community, which is segmented according to time. M t is the microblog message collection in time interval t.
Emotion Distribution: An emotion distribution e t is a real-value N -dimension vector sampled from the emotion space, satisfying the constraint ∑ N i=1 e ti = 1. It indicates the emotional state of a microblog message, a user or a community at time t. At a given time interval t, a user emotion distribution e t (u) is computed by an aggregation function over the emotion distribution of the microblog messages posted by u in time interval t. Community emotion distribution e t (c) is computed by an aggregation function over the emotion distribution of the community users in c at time interval t.
Community Emotion Burst: Given an emotion distribution sequence e t for community c, an emotion burst is defined as period [t s , t e ] in which some event relevant to c takes places. During the time period, the emotion distribution of c is :1) significantly different from its average emotion distribution, or 2) extremely uneven distributed.
Given the above definitions, our object is then to detect community-related events from the emotion distribution sequence of the community.

The Proposed Framework
In this section, we describe our microblog event detection framework. The framework aims to detect community-related events based on the community emotion. The overview of our framework is shown in Figure 2. In particular, we define the following four main components: 1) Microblog emotion classification: We train emotion classification model by automatically acquiring training data using the emoticons.
2) Community emotion aggregation: We assume that in a given community, different users have different weights when aggregating community emotion. Thus we propose a novel weighting approach based on the user's authority.
3) Community emotion burst detection: Given the community emotion, we propose an emotion burst detection algorithm to detect community emotion bursts. 4) Event extraction: The function of this component is to extract event keywords for each community emotion burst. We count the document frequency (DF) of each term contained in the microblog messages in the burst period. Then the top-5 DF terms are used to describe the event occurring during the burst period, although there exist alternative techniques (Ritter et al., 2012;Li et al., 2010).
Since the last component is not the main focus of this work, we only introduce the first three components in detail in the following subsections.

Microblog Emotion Classification
We build an emotion classifier using the multinomial Naïve Bayes classifier for each community to classify microblog messages into different emotion classes. Here we are interested in the setting where the microblog messages arrive as stream, thus it is not appropriate to use a constant set of manually labeled messages. To avoid manual annotation cost, we adopt a distant supervision approach (Go et al., 2009;Davidov et al., 2010;Hu

Community Emotion Burst Detection
Community Network

Microblog Streams Event Extraction
Figure 2: Overview of our community-related event detection framework  , 2013) to acquire labeled microblog messages automatically by using the emoticons. We first select a set of emoticons which are most frequently used to express emotion in microblog. Then we manually map each emoticon into four emotion classes (26 for happy, 19 for anger, 13 for sad and 11 for fear). We only show the top five emoticons for each emotion type in Table 1.
The labeled emoticons can then be used to acquire training data to train an emotion classifier for a community in any time period. We combine the features which have been proven effective by previous work, such as punctuation and emotion lexicons. Specifically, we use the following features : 1) Words appearing in the microblog message serve as word features, 2) Number of "!" characters and "?" in the microblog message, and 3) Each term in a general emotion lexicon serves as an emotion lexicon feature.
The emotion distribution e(m) of a microblog message m is represented by a N -dimension distribution vector. For example, if a microblog message m is classified as happy, then its emotion distribution e(m) is [1, 0, 0, 0]. The emotion distribution of e(u) of user u at time t is average emotion distribution of the microblog messages posted by him during time t.
where N ut is the number of microblog messages posted by user u at time t.

Community-level Emotion Aggregation
A common strategy to measure community emotion is to compute the average emotion of the community users. It is based on the assumption that the emotion of different community users are with equal importance. This is implemented by employing an average aggregation function on the individual emotion distribution e t (u): where N c is the number of users in community c.
Intuitively, the emotion of user with higher authority in community should be more important in determining community emotion. Thus we estimate community emotion by taking into account user's emotional authority, which is based on the assumption that different users in a community have different emotional authorities.
We employ HITS algorithm (Kleinberg, 1999) to compute the user authority auth(u) based on the user network {V, E} of the community. Then auth(u) is used to represent the emotional authority of user u. This authority-based community emotion aggregation approach can also reduce the effect of spam users, since they usually have low authorities in the community network. For simplicity and computation efficiency, we assume that auth(u) is time independent, which means that we only need to run the HITS algorithm once for each community. Given the user emotion distributions and the user emotional authorities, the emotion distribution for a community c in time interval t can be measured as: where A ct = ∑ u∈ct auth(u) is the normalization term.

Community Emotion Burst Detection
We formulate our problem into the binary state model framework (Kleinberg, 2003). For a given community c, there are T time intervals in total, with community emotion distribution sequence e = (e 1 , e 2 , ..., e T ) and state sequence q = (q 1 , q 2 , ..., q T ). Each q t can be one of the following two states: q t = 0 ("emotion stable" state) and q t = 1 ("emotion burst" state). Our objective (a) "emotion stable" state (b) "emotion burst" state Figure 3: Emotion probability density for "emotion stable" state and "emotion burst" state is to find an optimal state sequence q * given the emotion distribution sequence e.
Since each e t is a distribution rather than positive integer, the emotion generation process can no longer be modeled by a Poisson distribution. We choose to model the emotion generation process by the Dirichlet distribution. This process is analogous to the document-level topic generation in the LDA topic model (Blei et al., 2003).
If community c is in an "emotion stable" state in time interval t, its emotion distribution e t should be close to the average emotion distribution e a . The density function is defined as f (e t , e a , s t = 0) = Dirichlet(α 0 e a ), where s t = 0 indicates that the community is in an "emotion stable" state and α 0 is a positive parameter. To ensure that e t closer to e a will get higher probability, α 0 should satisfy the constraint α 0 · min e a > 1. An example of the probability density function of f (e t , e a , s t = 0) in a three dimension emotion space is shown in Figure 3(a).
If community c is in an "emotion burst" state in time interval t, the emotion distribution of c is : 1) significantly different from its average emotion distribution, or 2) extremely uneven distributed. For example, assume e a = [0.25, 0.25, 0.25, 0.25], if community is in burst in time interval t, its emotion distribution is more likely to be [0.1, 0.4, 0.1, 0.4] (significantly different from e a ) or [0.1, 0.7, 0.1, 0.1] (extremely anger). The density function is then defined as f (e t , e a , s t = 1) = Dirichlet(α 1 e a ). s t = 1 indicates that the community is in an "emotion burst" state and α 1 should satisfy the constraint: α 1 · max e a < 1. An example of the probability density function of f (e t , e a , s t = 1) in a three dimension emotion space is shown in Figure 3(b).
Based on above discussion, the cost function for an emotion state sequence q can be defined as: − ln(f t (e t , e a , q t )) + b ln( 1 − π π ) (4) where π is the probability the community will change the emotion state in two consecutive time intervals t and t + 1. b denotes the number of emotion state changes in the whole time intervals Equation 4 is exactly the objective function we need to optimize. This optimization problem can be efficiently solved by using a dynamic programming procedure, as summarized in Algorithm 1. Algorithm 1 mainly consists of two phases: a forward phase (line 5 -line 10) which calculates the minimal cost for emotion distribution subsequence and a backward phase to construct the optimal emotion state sequence (line 11 -line 14).
For convenience, we use f t (s) to denote f t (e t , e a , s). π s ′ s = π if s ′ ̸ = s, otherwise π s ′ s = (1 − π). c t (s) denotes the minimal cost of generating the emotion distribution sub-sequence {e 1 , ..., e t } with q t = s. q ′ t (s) stores the state of time interval t − 1 for the most likely state subsequence so far with q t = s.

Algorithm 1 Emotion Burst Extraction
Input: The emotion distribution sequence e = (e 1 , e 2 , ..., e T ), the state transition cost π and the parameters α 0 and α 1 1: for each s ∈ {0, 1} do 2: Initialize c 1 (s) = − ln f 1 (s) 3: Initialize q ′ 1 (s) = 0 4: end for 5: for each t = 2, · · · , T do 6: end for 10: end for 11: q * (T ) = arg min s c T (s) 12: for each t = T − 1, · · · , 2 do 13: q * (t) = q ′ t+1 (q * (t + 1)) 14: end for Output: The optimal emotion state sequence q * We choose four communities: "legal cases", "football", "economy" and "singer". To obtain the members for each topical community, we manually selected several keywords and input them as queries to the user search page 4 . After filtering out the users whose microblog messages are not collected in our corpora, we extract the sub-network of the users from the whole following network.
We use a simple but efficient method to extract microblog messages for each topical community: 1) If a microblog message is posted by the community members and also contains keywords of the community, it belongs to the community; 2) If a microblog message is posted by community member u and it is reposting, commenting on or replying to another microblog posted by community member v, then it belongs to the community. The basic statistics of our data sets are shown in Table 2.

Ground Truth Generation
Algorithm 1 generates a list of emotion bursts for each community. Since our goal is to identify community-related events, we need to evaluate how well the generated emotion bursts correspond to the ground truth real-world events. To generate the ground truth for evaluation, we utilize the news website Sina News 5 . Two PhD students are invited to manually generate a list of real events for each community by referring to the annual top-ic summary page 6 of Sina News. The annotation agreement is higher than 90%. Each event is also associated with its occurred date. The number of events for each community is shown in the last column of Table 2. For each community, the event list is then used to evaluate the performance of different event detection models.

Evaluation Metric
We use precision, recall and F-measure as evaluation metric. For each community, we compare the event list E c and the generated burst list B c to compute the above metric. Specifically, the precision, recall and F-measure for a community c are defined as follows: where E c j is the occurring time of the j-th event in community c, B c k is the k-th identified burst for community c. I(.) is the indicator function (which equals 1 if its argument is true and 0 otherwise).
The final precision, recall and F-measure are averaged over different communities.

Compared Methods
We now introduce four methods used for comparison as follows: EmoPeakFind: The method proposed in (Akcora et al., 2010), which aims at discovering breakpoints from public emotion. They use the following simple rule to find breakpoints from emotion sequences: Sim(e t−1 , e t ) < Sim(e t−2 , e t−1 ) Sim(e t−1 , e t ) < Sim(e t , e t+1 ) where Sim is a similarity function. We use the cosine similarity function in our evaluation. TopKEmoVar: The method used in (Zhao et al., 2012a). They first derive a sequence of relative variation V n for each single emotion sequence e n . Then they define a sequence of emotion variation as ( ∑ 4 n=1 |V n t |). This sequence is sorted in descending order and the top-k t is selected as burst state points, where k is set to be the size of the event list for each community. KLB: The method proposed in (Kleinberg, 2003). Note that KLB can only deal with a single sequence e n = (e n 1 , ..., e n t , ...e n T ) for emotion type n. We first apply KLB to find the optimal state sequences for each emotion type. Then we perform an OR function to merge the N state sequences to a global emotion state sequence.
MBurst: The method proposed in (Zhao et al., 2012b) for multi-stream burst detection. MBurst is evaluated on three activity streams in (Zhao et al., 2012b). Here we apply MBurst to the N emotion streams. Then we perform an OR function to merge the N state sequences to a global emotion state sequence.
6 Experimental Results

Performance Comparison Results
In this experiment, we compare our method with different baseline methods as introduced in Section 5.4. We use Equation (3) to aggregate community emotion for all the compared methods. The parameter α 0 and α 1 are empirically set to be 5 minn e n a and 0.5 maxn e n a , respectively. The experimental results are shown in Table 3. Table 3 shows that EmoPeakFind and TopKE-moVari are less effective than other methods. The simple rule used in EmoPeakFind produced many noisy bursts, leading to low precision. TopKE-moVari only considers the relative variation of two consecutive time intervals. The choose of k is also nontrivial since it is hard to know the number of events before the events are identified. Note that EmoPeakFind and TopKEmoVari are both rule-based methods, while KLB, MBurst and Our Method are state machine based methods. This demonstrates that for community-related emotion burst detection, it is more appropriate to use a state machine based model.
It looks surprising that MBurst performs worse than KLB, since MBurst is specifically designed for multiple streams. However, MBurst is based on the assumption that the states of multiple streams in the same time interval tend to be the same (i.e., there is positive correlation between two different streams). This assumption no longer holds in the context of different emotion streams. For example, if a negative event occurs in the community, while sad emotion is likely to be in a burst state, happy emotion is not likely to be in a burst state. We can see from Table 3 that our method outperforms the four baselines. The main reason is that our burst detection method is based on the sequence of community emotion distribution. Modeling community emotion as a distribution is more suitable than modeling several different emotion types.
We further show some example events detected by our model in Table 4. Since the event keywords are manually translated from Chinese, one keyword may include more than one English words. We can see that community emotion can help to detect emotionally significant events for different communities. For example, the "legal cases" community is in a strong anger emotional state on December 25, 2010, which indicates an important event "Qian Yunhui's case".

Effect of Emotion Aggregation Functions
In this experiment, we show the importance of correctly aggregation community level emotion for community-related event detection. We compare the two aggregation approaches introduced in section 4.2. The first approach assigns equal weight to each community users, while the second approach assigns weights to users based on their authorities in the community.
The performance in terms of F-measure is shown in Table 5. It is obvious that, for all commu- We further perform an empirically analysis of the events that successfully identified by HITSbased approach but failed by equal weighting approach. By manually analyzing the microblog messages of the corresponding time intervals, we found that most of the errors of equal weighting approach were caused by emotion spam. Users of low authority post many microblog messages with extreme emotion to claim the attention of the community. Since there is no significant communityrelated events at that time interval, we do not observe emotional changes of the high authority uses. In the equal weighting method, the existence of emotion spam lead to wrong result of community emotion. Since the weights of users who post emotion spam are small in the HITS-based approach, they have little effect on the community emotion. This is the main reason why HITSbased weighting method is more effective than equal weighting method.

Parameter Sensitivity
In this experiment, we test the sensitivity of our model by different choices of the parameters α 0 and α 1 . α 0 min n e n a is set to be [2,3,4,5,6,7,8] and α 1 max n e n a is set to be [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]. The event detection results of different parameter settings are shown in Figure 4.
It can be seen from Figure 4 that: 1) The performance is relatively good in a particular range of the parameters. When consistently larger than 0.55. 2) In general, the performance is more sensitive to α 1 than to α 0 . Note that α 1 controls the generation process of the emotion distribution when the community is in the "emotion burst" state, thus it is relatively more important to tune α 1 than α 0 . The experimental results demonstrates that when 0.3 maxn e n a ≤ α 1 ≤ 0.7 maxn e n a , the performance can be relatively good.

Conclusion
Microblog has become a popular and convenient platform for people to share information about social events in real time. In this paper, we focus on the problem of community-related event detection by community emotions. We propose a novel method to compute community-level emotion by considering the user authority in the community network. Then we present an effective emotion burst detection algorithm for the community emotion distribution sequence.
We evaluate our approach on real microblog data sets. Experimental results demonstrate that it is important to take into account the user authority when aggregating community emotion for community-related event detection. Our emotion burst detection algorithm also achieves better performance than several baseline methods.