Wednesday, April 8, 2015

How do I become a Twitter Stud ?

Today,Twitter is one of the most trending OSN. People are crazy for popularity on twitter. Do you post your tweet and keep endlessly waiting whether some of your friend/family will retweet it and it will give you an adrenaline rush ? Believe me,Deep down your heart even you do that ! So,The questions is How do I become popular on twitter ? This is a two step process - The first step being following massive number of people.Many of them will follow you back because of the "Follow back syndrome" .Once you have enough number of followers,it's time for some math. ( You might wish to  unfollow few of the people who trusted you and followed you back! Thanks to twitter,it doesn't show unfollow notifications)


The second step being increasing the visibility of your tweets. To increase the visibility of your tweets,you would like to mention few users in your tweet which you think would retweet it.Now,the question is How do we select the users ??

  • The user must be popular. duh! 
  • The users are active on twitter while you want to post the tweet
  • The users have a good history of retweeting
  • The users are susceptible of being interested in the tweet
Here are few statistics on the tweet proportion v/s number of retweets for different number of mentions.


Now,the following picture shows us this mention-dependency of top 10 trending hashtags .It seems that highly popular hashtags are heavily dependent on mention links.

```


Several users can be mentioned in a tweet, however this number is limited as the tweet should be less than 140 characters. This problems thus leads to finding the right features evaluating these three components and the trade-off between them.What if we assign a utility score to each user and map them to a knapsack problem ? 

The knapsack problem with the following constraints.
Total Budget : 140 - number of characters in the message(m).
Value of the user : S(u,m) ( This my friend is the utility score which we calculate for user u based on his popularity and the expected probability of retweeting m)
Weight of user : Number of characters in his name + 2 ( Well,one for @ and one for space between multiple users)
This problem will return the set of users which we will mention in our tweet.

Okay,Knapsack is defined.Brace yourselves! Here comes the most important part,the utility score for a user.

This score is the product of three functions that respectively evaluates the Popularity of the user to
mention, its Activity and its Interest to the message. 
The score is given by: S(u, m) = f (u) * pow(g(u),α) *pow(f (u, m), β ) 

where 

f(u) = the number of followers of u.
g(u) = the number of retweets made recently by u
f(u, m) = the similarity of the message m to the last messages of u.(Standard NLP techniques used )

Obviously,now is the time for Twitter's beautifully made Twitter API! Sadly,there are few constraints within a 15 minutes window.
  • get 5000 followers (resp. friends) of a user: 15 requests.
  • get the basic information of a user (particularly its number of followers): 180 requests.
  • get the 200 last tweets of a user: 180 requests.
So,the algorithm goes as follows :
  • Crawl the followers wishing to tweet the message m.
  • Select the friends of the user which are not his followers and among these users select randomly 180 users
  • For each of these 180 users u, crawl its number of followers and set the value of f(u), crawl its 200 last tweets and compute g(u) and f(u, m) out of it
  • Now that the S(u,m) is calculated for all users,Solve the knapsack problem defined above and return the set of users.
Now,Tweet the message m followed by a newline character and the screen names of the users selected, each one preceded by the character @ and separated by spaces. (Now realized why did we do a +2 in the knapsack problem ?? )

After one day the tweets of the users mentioned are crawled to check which users retweeted. The coefficients α and β are then updated taking all available data to improve the utility score.

Increasing the visibility of your tweets will have a higher chance of retweets. More the retweets,more viral your tweet,more viral you and voila,you're a twitter stud!

Please follow me on twitter for further updates. ( See what I did there ?)

References :


  1.  An empirical approach towards an efficient “whom to mention?” Twitter app
  2. Adrien Guille, Hakim Hacid, Cecile Favre, and Djamel A Zighed. Information diffusion in online social networks: A survey. ACM SIGMOD Record, 42(1):17–28, 2013
  3. Kyumin Lee, Jalal Mahmud, Jilin Chen, Michelle Zhou, and Jeffrey Nichols. Who will retweet this? In Proceedings of the 19th international conference on Intelligent User Interfaces, pages 247–256. ACM, 2014.


2 comments: