r/technology • u/misnamed • Dec 10 '13
By Special Request of the Admins Reddit’s empire is founded on a flawed algorithm
http://technotes.iangreenleaf.com/posts/2013-12-09-reddits-empire-is-built-on-a-flawed-algorithm.html
4.0k
Upvotes
View all comments
7
u/SirPsychoS Dec 10 '13 edited Dec 10 '13
Pasting this comment at the top level, because I originally posted it in the middle of nowhere:
People seem to be misunderstanding a few things.
First, a post's score won't change over time in the absence of new voting activity, so there's a false dichotomy between old and new posts in some comments. However, the score of untouched brand-new posts is constantly increasing, because the post dates are increasing. This is how newer posts are rated higher, not because old posts' scores are decaying, but because of score "inflation". Side note: this has the nice property that posts' scores only change if their votes do. Reddit doesn't have to re-score every post whenever a user loads the front page; just compute the score on voting, stick it in a DB column, and query by the highest values.
For clarity, here's the simplified formula as an expression: score(net_votes, create_date) = log(abs(net_votes)) + signum(net_votes)*create_date
The simplifications were:
So, for posts created all at the same time:
Positive net votes:
net votes = -1:
Net votes << -1:
Now, time passes, say 1000 seconds, and more posts are created and are voted exactly the same as before; let old_time be the create date of the last set of posts:
Positive net votes: log(net_upvotes) + old_time + 1000. This post is 1000 seconds newer with the same net votes, and has 1000 more score. Good!
net votes = -1: 0 - create_date - 1000. What? This post is newer; it should be higher than an older equally-voted post.
net votes << 0: log(abs(net_votes)) - old_time - 1000. Okay, let's look at create_date here. At the time of writing, the Unix timestamp is about 1386664202. 1386664202 - 1134028003 = 252636199. So, for this highly downvoted post to beat a post with 1 net positive vote (i.e. new and untouched), log(abs(net_votes)) must be greater than twice the score contribution from create_date. So, log(net_downvotes) = 2*252636199/45000 = 11228; 1011228 = net_downvotes. That's still an insane number. To make it out of the hole of negative voting, you have to have far, far more than billions of downvotes. Never going to happen; it's more downvotes than there ever have been humans. For all practical purposes, a negative-net-vote post cannot out-score a positive-net-vote one.
Edit: Replaced part of the above paragraph. Old text:
So, log(net_downvotes) = 2*252636199 = 505272398; 10505272398= net_downvotes. That's an insane number. It takes more than 1515817194 bits to count that high. That's 180 MB. That's more votes than all posts ever on Reddit have accumulated (I haven't done the math on that claim, but I feel comfortable with it anyway, and will work it out if you so demand.) For all practical purposes, a negative-net-vote post cannot out-score a positive-net-vote one.This is wrong; I missed the constant 45000.So, even if Hot were meant to represent "the strength of sentiment on a post, with newer posts rated higher," it doesn't. That would be: score(net_votes, create_date) = log(abs(net_votes)) + create_date. I'd be fine with that fix, too -- heavily downvoted posts might be interesting! And, in that case, slightly-downvoted posts would also be slightly bumped over neutral posts. Weird, but interesting.
Furthermore, I don't think Hot is intended to represent the above. That might be a good ranking if Redditors interpreted upvotes as "I agree" or "I think the thing this post refers to is good", and downvotes as "I disagree" or "I feel negatively about the thing this post refers to". Then, a high score would mean that Reddit is in strong agreement about the content of the post, and also that many people felt strongly enough about it (i.e. were interested enough) to vote on it. So, a high score would mean an interesting post. Great! Where's the problem? Well, that's not how I vote, and that's not how I think other Redditors vote.
My understanding is that upvotes mean "this is interesting" and downvotes "this is uninteresting", which makes strongly-downvoted posts mean "a lot of people thought this was uninteresting." In that case, those are exactly the posts that should disappear -- but not beyond any hope of ever finding them.
Appendix: Variations of the formula and what they mean in English:
Edit:
I upvoted you because you made a contribution to the conversation (interest!), but I think you misunderstood how the time part of the equation is calculated.That was intended for the person to whom I originally was replying. My understanding matches that of the blog's author.Edit: Second appendix: So, you wonder why this bug hasn't destroyed Reddit's popularity? The algorithm as-is works perfectly for positively-scored posts! And, other than the people who post them, nobody really cares too much about the missing negatively-scored posts. People have noticed that Reddit is fickle with new posts (and that's because of the bizarre negative-date-sorting for negative-scored posts), but nothing has exploded.