Analyzing Temporal Dynamics in Twitter Profiles For Personalized Recommendations in The Social Web
Analyzing Temporal Dynamics in Twitter Profiles For Personalized Recommendations in The Social Web
The rest of the paper is organized as follows: based on an The above model for creating the representation of a topic
analysis of the temporal characteristics of user interests into expects a timestamp as input because concepts that relate
trending topics presented in the next section, we will in- to a certain topic may change over time. On the one hand,
troduce the core model of our user modeling framework in the importance of concepts could vary at different points
Section 3. Our framework allows for the creation of user in time and, on the other hand, new concepts could arise
modeling strategies that consider temporal dynamics of user while other concepts that were once representing the topic
behavior on Twitter. In Section 4 we study how the specifics could entirely become useless to describe the topic. Hence,
of the different user modeling strategies impact personaliza- the representation of a topic depends on the time when the
tion before we conclude in Section 5. profile is demanded.
!"#$%&'()'"*%&*''
(!"!!#$ 'hijacked' by Egypt
!""#$$%&"%'()%*'
$
&&
&&
&&
&&
&&
&&
&&
&&
&&
!"
'!
'!
'!
'!
'!
'!
'!
'!
'!
&*
&*
&*
'*
'*
'*
'*
'*
'*
*!
*!
*!
*!
*!
*!
*!
*!
*!
'!
')
'+
!&
!%
!,
&(
&-
'&
$"
$"
"
$"
$"
$"
"
$$
$$
!$
!$
!$
!$
!$
%!
%!
'%
'%
'%
'%
'%
()%'
&'
&'
%!
%(
$!
$(
%)
%'
&'
$'
$'
%'
%'
%'
(a) Entities with short lifespan for the topic. +#%'
14.00%
12.00%
Egypt
10.00%
Mubarak
nounced that the Egyptian authorities had hijacked Voda-
8.00%
Cairo fone’s network.
6.00% United States
4.00%
Our analysis presented in Figure 1 thus demonstrates that
2.00%
the importance of entities for a given topic changes over
0.00%
time. While there are some entities that are continuously
11
11
11
11
11
11
11
11
11
20
20
20
20
20
20
20
20
1/
1/
1/
2/
2/
2/
2/
2/
2/
/0
/0
/0
/0
/0
/0
/0
/0
/0
24
28
01
05
09
13
17
21
()%'
a short period in time. When creating the representation of
(b) Entities with long lifespan for the topic.
a topic it is thus reasonable to consider multiple concepts
(e.g. entities and hashtags) and to compute the importance
Figure 1: Relative occurrence frequencies of entities of each concept as a function of the time when the topic
related to the Egyptian revolution. representation is requested.
100 14
ST User B
ST User C 12
80
10
60
8
40 6
4
20
2
0
0
11
11
11
11
11
11
11
11
11
11
0 100 200 300 400 500 600 700 800 900 1000
20
20
20
20
20
20
20
20
20
20
1/
1/
1/
2/
2/
2/
2/
2/
3/
3/
/0
/0
/0
/0
/0
/0
/0
/0
/0
/0
users who adopted the topic of 'Egypt Revolu,on'
20
25
30
04
09
14
19
24
01
06
1me
(a) Daily activities of users interested in the topic for a
short time period (short-term adopters). Figure 4: Standard Deviation of Timestamps of Re-
lated Tweets Posted by Each User
40
LT User A
35
# of tweets related to the topic
LT User B
30 LT User C
be considered as long-term adopters. All the three long-
term adopters became interested into the topic at the very
25
beginning of the revolt and can thus also be described as
20 early adopters. In contrast, the short-term adopters char-
15 acterized in Figure 3(a) are not among the first users who
10
publish about the incidents in Egypt. In fact, for the Egyp-
tian revolution it seems that there is a correlation between
5
the time when a user adopts a topic and the duration dur-
0 ing which the user is interested into the topic, i.e. early
adopters overlap stronger with long-term adopters than with
11
11
11
11
11
11
11
11
11
11
20
20
20
20
20
20
20
20
20
20
1/
1/
1/
2/
2/
2/
2/
2/
3/
3/
/0
/0
/0
/0
/0
/0
/0
/0
/0
20
25
30
04
09
14
19
24
01
06
1me
the short-term adopters regarding the Egyptian revolution
(b) Daily activities of users interested in the topic for a
long time period (long-term adopters). is apparently more influenced by public trends than the be-
havior of the long-term adopters. For example, as depicted
in Figure 3(a), ST User A, B and C show a peak after
Figure 3: Daily activities of users who are interested the riot on February 2nd that was entitled the “Battle of
in the Egyptian revolution. the Camel” and which was heavily discussed in social and
mainstream news media. In contrast, the peaks of the long-
term adopters, shown in Figure 3(b), happen much more
frequently and also occur on days on which were not packed
tian regime shut down the Internet on January 26th, about
with epic events.
300 users became interested into the protests on the “Friday
of Rage”, January 28th, and another 150 users took for the
Figure 4 overviews the sample users who were interested in
first time part in the Twitter discussions on the following
the Egyptian revolution with respect to the duration the dif-
day.
ferent users expressed their interest into the topic on Twit-
ter. In particular, it shows for each user the standard devi-
Having seen when individual users become for the first time
ation of the timestamps of tweets that were related to the
interested in a topic, we were also interested for how long
topic as similarly proposed by Huang et al. [8] who measure
those users were interested in the topic. Figure 3 shows
the temporal stability of hashtags. For Figure 4, we apply
the amount of Twitter messages that selected users were
standard deviation as follows.
posting on different days. The users whose tweeting activ-
ities on the topic of the Egyptian revolution are displayed
in Figure 3(a) can be characterized as short-term adopters s
as they published tweets about the event for less than one PN
k=1 (time(tweetk ) − time)2
week. It is interesting to see that the amount of messages σ(topic, user) = (2)
N −1
these users posted about the topic is fairly high. For exam-
ple, ST User A, who adopted the topic two days after the
beginning of the revolt, published almost 100 tweets about Here, time(tweetk ) is the timestamp of the k-th tweet pub-
the revolution on a single day. Nevertheless, she quickly lished by the given user that refers to the given topic, time
became disinterested. The interests of these three example is the average timestamp of the user’s tweets that relate to
users thus seem to change quickly. Hence, user modeling the topic and N is the overall number of tweets in which the
strategies that aim for capturing users’ interests into topics user refers to the topic.
have to adapt quickly as well.
Figure 4 shows that for nearly 150 users the σ(topic, user) is
Figure 3(b) displays the Twitter activities of three other zero which means that those users just published one tweet
users who were concerned with the Egyptian revolts for a that we could relate to the happenings in Egypt. Overall, for
long time period of more than one month and can therefore more than 75% of the users, the standard deviation of times-
tamps which specify when they published about the topic is are limited to 140 characters it may become difficult to
less than one week. The fraction of long-term adopters for extract meaningful concepts from the tweets. For exam-
whom σ(topic, user) is higher than ten days is with less than ple, given a tweet such as “President’s son and family flee:
2.5% rather low. http://fb.me/J6SmQF7q” it is difficult to understand to which
president, son and family the user refers to. However, the
2.3 Findings semantics of the message can be interpreted when follow-
ing the link posted in the tweet. In this paper, we thus
In summary, we can thus answer the research questions
include a semantic enrichment component into the Twitter
raised at the beginning of this section as follows.
user modeling process that follows hyperlinks, extracts the
main content of the linked Web pages and identifies enti-
ties mentioned in those pages. This allows us to represent a
1. Topics that are discussed on Twitter can be repre-
tweet via both concepts which are extracted from the tweet
sented via the concepts that are referenced from the
and concepts that are extracted from Web sites that are
tweets that relate to the topic. Those concepts can
referenced from the tweet. Based on the semantically en-
be arbitrary entities such as persons, organizations or
riched Twitter messages of a user, we create strategies that
locations as well as cryptic hashtags like “#jan25”. As
infer user interest profiles. In this paper, we represent those
different concepts may be of different relevance for a
profiles in the same way as we represent topics.
topic, it is desirable to weigh the concepts according
to their importance for the topic.
Definition 2 (User Profile). The profile of a user
2. Topics change over time: different concepts are of dif- u is a set of weighted concepts where a concept c may be
ferent importance for a given topic. For example, con- represented via a named entity or hashtag.
cepts such as SMS or Vodafone became important for
P (u, time) = {(c, w(c, time, Ttweets,u )|c ∈ CH ∪ CE } (3)
the Egyptian revolution only for a short time when the
government of Egypt shut down the Internet and took Here, w(c, u, time) is a function that computes the weight
over the telecommunication network of Vodafone. Due associated with the concept c for the given user u based on
to this event-like nature of a Twitter topic, it is help- messages Ttweets,u published by u and based on the given
ful to compute the weight of a concept for a topic as a timestamp. CH and CE denote the set of hashtags and en-
function of time. tities respectively.
term adopters who are concerned with a topic only for t∈Ttweets,u,c
maxtime − mintime
a short period in time and are rather driven by current (4)
trends. In Equation 4, Ttweets,u,c denotes the set of tweets that have
been published by u and refer to the concept c. time(t) re-
turns the timestamp of a given tweet t and maxtime and
3. USER MODELING WITH TEMPORAL mintime denote the highest (youngest) and lowest (oldest)
DYNAMICS timestamp of a tweet in Ttweets,u,c , for example: maxtime =
Given the findings presented in the previous section, we now max({time(t)|t ∈ Ttweets,u,c }). The parameter d is used to
introduce a lightweight user modeling framework that allows adjust the influence of the temporal distance. The higher d is
for the creation of strategies that infer user interests from the set, the higher the penalty of concepts that occur with a high
Twitter activities of a user and allow for capturing temporal distance to the input time as the corresponding scores will
dynamics in these profiles. We implemented our approach be lower than for those concepts for which |time − time(t)|
as extension to the Twitter-based user modeling framework is smaller. In the subsequent sections we set d = 4. Fur-
introduced in [1] and make our strategies also available via thermore, we normalize the weights of a profile P (u, time)
Web services4 . so that the sum of weights in a profile is equal to 1.
Our user modeling strategies aggregate and monitor Twit- Our hypothesis is that the time-sensitive strategy character-
ter messages of an individual user and process each tweet izes the actual demands and concerns of a user better than
by means of a semantic enrichment pipeline that extracts the non-time-sensitive baseline strategy.
hashtags and named entities (e.g. persons, locations or
organizations) from a given tweet. As Twitter messages 4. TIME-SENSITIVE USER MODELING FOR
4
http://wis.ewi.tudelft.nl/tums/ PERSONALIZED RECOMMENDATIONS
To investigate the above hypothesis, we deploy the user mod- each day of our recommendation period which is given by
eling strategies in a personalized recommender system. The the last ten days of January (Jan 20th - Jan 31st). Hence,
recommender provides Web site recommendations to a user our recommendation period overlaps with the beginning of
based on her user profile. We thus apply the Twitter-based the Egyptian revolution. However, the Web sites that are
user modeling strategies to personalize the Social Web ex- recommended to the users in this period may refer to any
perience of the users and point them to Web sites which are topic and are not necessarily related to the revolution in
according to their profiles of interest in their current tempo- Egypt. The ground truth of URLs, which we consider as
ral context. We then study the following research questions. relevant for a specific user u on a particular day, is given
by those Twitter messages which link to the corresponding
Web site and which have been re-tweeted by u on that day.
1. How do semantic enrichment and (time-sensitive) weight- Following this evaluation strategy, we identified, on average,
ing functions of the user modeling framework influence 24.5 relevant URLs for each of the 1619 sample users per
the performance of the recommender system? day. The candidate set of URLs, which were published on a
2. Are there any correlations between characteristic pat- recommendation day, contained, on average, 24549 items.
terns in the generated Twitter profiles and the gained
recommendation quality? For example, how does the Given the ground truth and candidate sets, we applied the
recommendation quality differ between users who have different user modeling strategies together with the above
a tendency to be short-term or long-term adopters on algorithm (see Definition 3) and set of candidate items to
a given topic? compute fresh, personalized Web site recommendations for
each user on each day. The user modeling strategies were
only allowed to exploit tweets published before the start of
4.1 Evaluation Methodology the recommendation period. The quality of the recommen-
We examine the user modeling strategies in the context of
dations was measured by means of S@k (Success at rank k),
a recommender system that we developed for providing per-
which stands for the mean probability that a relevant item
sonalized Web site recommendations to the user. In par-
occurs within the top k of the ranking, and MRR (Mean
ticular those fresh Web sites that are referenced in Twitter
Reciprocal Rank), which indicates at which rank the first
messages (cf. [5, 6]). Recommending Web sites, which are
item relevant to the user occurs on average. For Success@k,
posted on Twitter, is a non-trivial task as URLs, which are
we will focus on S@10 as our recommendation system will
going to be recommended, often refer to news articles or
list 10 Web site recommendations to a user.
other types of fresh, news-like content [9]. This makes it
difficult to apply collaborative filtering methods, but rather
calls for content-based or hybrid approaches [11]. Our main
goal is to analyze and compare the applicability of the dif- 4.2 Results
ferent user modeling strategies in the context of the rec- Figure 5 summarizes the result of our recommendation ex-
ommender system. We particularly analyze how the time- periment. In Figure 5(a), we first analyze the impact of the
sensitive user modeling strategy, introduced in Section 3, in- semantic enrichment provided by our user modeling frame-
fluences personalization and performs in comparison to non- work. We observe that the recommendation quality is posi-
time-sensitive variants. We do not aim to optimize recom- tively influenced by the enrichment component that follows
mendation quality, but are interested in comparing the qual- the links in Twitter messages to also extract named enti-
ity achieved by the same recommendation algorithm when ties from those Web pages. While the performance regard-
inputting different types of user profiles. Therefore we ap- ing MRR increases just slightly, S@10 improves by more
ply a lightweight content-based algorithm that recommends than 15%. For the entity-based user modeling strategy, we
items according to their cosine similarity with a given user thus apply the semantic enrichment method that exploits
profile. We thus cast the recommendation problem into a the links posted in Twitter messages also for the subsequent
search and ranking problem where the given user profile, recommendation experiments.
which is constructed by a specific user modeling strategy, is
interpreted as query. Figure 5(b) shows the performance of the entity-based and
hashtag-based user modeling strategies and illustrates how
the time-dependent weighting function (cf. Equation 4) in-
Definition 3 (Recommendation Algorithm). Given fluences the personalization quality. Regarding S@10, the
a user profile vector p ~(u) and a set of candidate Web re- entity-based user modeling strategy performs slightly better
sources (URLs) R = {~ p(r1 ), ..., p
~(rn )}, which are represented than the hashtag-based method (improvement: 5%). How-
via profiles using the same vector representation that is used ever, there is no significant difference in performance be-
for a given user profile p~(u), the recommendation algorithm tween entity-based and hashtag-based user modeling strat-
ranks the candidate items according to their cosine similarity egy. In contrast, the time-dependent weighting function in-
to p
~(u). creases the recommendation performance clearly. For the
~(u) · p
p ~(ri ) hashtag-based user modeling strategy, weighting the occur-
simcosine (~
p(u), p
~(ri )) = (5) rence frequency according to the time for which a profile
||~
p(u)|| · ||~
p(ri )||
is demanded (hashtag (time)) improves the recommenda-
tion quality over the baseline strategy (hashtag) by 10.4%
Given the Twitter dataset which contains more than 30 mil- and 12% regarding S@10 and MRR respectively. We thus
lion tweets and more than 1.3 million distinct Web sites that find first evidence for our hypothesis that the time-sensitive
are linked from the tweets, we compute personalized recom- strategy characterizes the actual demands and concerns of a
mendations for each user of our sample (cf. Section 2) on user better than the non-time-sensitive baseline strategy.
100% size of profile
'()*+,-'(."/01'2" <=="
40%
34/'5"0(".6''./"
20%
'()'*(+" 60%