Brifing

Hacker News Ranking Algorithm: Penalties and Controversy Explained

How 20% of front-page stories get penalized through hidden scoring mechanics

Hacker News4 min

1Core ranking formula mechanics

Hacker News uses a gravity-based algorithm where an article's score decays exponentially over time. The formula prioritizes recent upvotes by giving time a larger exponent than vote count. Stories are reranked individually upon upvotes, with random reranks every 30 seconds for top stories to prevent stagnation. Caching occurs for 90-second intervals, meaning rankings may temporarily appear inaccurate during this window.

2Automatic penalty triggers

Specific keywords like 'NSA' in titles trigger automatic penalties (0.4 penalty factor). Certain domains including GitHub, Medium, and The Guardian receive 0.25-0.8 penalties regardless of content. Controversial posts with more comments than upvotes get penalized once exceeding 40 comments, with severity increasing exponentially based on the votes-to-comments ratio. These automated systems account for 20% of front-page penalties.

3Impact of penalty factors

A 0.4 penalty makes each vote count as only 0.3 votes equivalent, causing articles to drop 66% faster in rankings. Severe 0.1 penalties reduce vote weight to 0.05, accelerating rank decay by 3.6x. Controversy penalties scale as (votes/comments)^3, creating sudden drops - one article fell from #5 to #22 immediately upon hitting 40 comments. Penalized stories show 38% prevalence on page two versus 20% on the front page.

4Real-time ranking dynamics

Analysis of November 11 data shows top articles typically peak within 1-2 hours then gradually decline. The scoring curve steepens because voting rates drop sharply after initial traction. Articles like 'Linux ate my RAM' briefly reached #1 when higher-scoring posts got penalized. 'Why You Should Never Use MongoDB' maintained #7 despite penalties that would normally drop it further, demonstrating exceptional popularity.

5Moderation patterns

Penalty application spikes at 9 AM suggest moderator activity commencement. Three penalty tiers emerge: 0.2 (mild), 0.4 (moderate), and 0.8-0.9 (severe). The 'contro-factor' function activates differently than published - requiring >40 comments rather than >20. Some penalties appear temporary, with articles regaining position after initial drop, indicating manual intervention or penalty expiration.

6Case study: Controversy penalty

The 'Why Chromebook pundits are out of touch' article demonstrates controversy mechanics perfectly. At exactly 40 comments, its ranking collapsed from #17 to completely off the top 60. This aligns with the empirical finding that the penalty exponent is likely 3 (not 2 as published). Such penalties create sudden discontinuities in ranking trajectories visible in raw score charts.

7Score vs. position discrepancy

On November 9, three top-10 articles showed ranking anomalies: The NY Times piece (0.47-0.85 penalty), Marelle (0.87-0.93), and ISO 1 (0.60-0.82). These were consistently ranked below their raw scores would predict. The scoring formula's accuracy was confirmed by stable expected rankings - no gradual drift occurred that would suggest different gravity exponents in production.

8Domain-specific penalties

Analysis revealed consistent penalties for 16 domains including Arstechnica (0.25-0.8), Business Insider, and YouTube. This creates an uneven playing field where identical content performs differently based on source. One theory suggests popular sources get parallel submissions inflating votes, making penalties a counterbalance. However, the exact criteria for domain penalties remain undocumented.

9Temporal ranking patterns

The scoring system creates distinct daily patterns: articles either achieve rapid early traction then decline, or maintain steady voting. Very few sustain top positions beyond 6 hours. The #1 spot averages 2-3 different articles per day, with frequent turnover. Penalties create artificial churn - on November 11, 14 different articles held #1 position due to successive penalties on front-runners.

10Data collection methodology

The study crawled HN's /news and /news2 pages every minute (staying under rate limits), parsing HTML with Beautiful Soup. Python scripts processed 60-story snapshots, comparing computed raw scores against actual rankings to detect penalties. Matplotlib visualized scoring trajectories, though noise required algorithmic filtering. The approach identified penalties by finding consistent ranking positions below calculated score expectations.

11Limitations of analysis

Several factors complicate penalty calculation: neighboring articles may also be penalized, temporary ranking inconsistencies occur due to caching, penalties might change over time, and suppressed 'bad' votes make reported counts unreliable. These create numerical instability in precise penalty determination, though general patterns remain clear from aggregate data.

12Community impact

The penalty system creates a self-reinforcing quality filter - penalized articles become less visible, reducing subsequent voting. Controversy penalties effectively prevent flamewars but may overcorrect, burying legitimate discussions. Domain penalties disadvantage established publishers while benefiting niche sources. The system's opacity leads to user speculation, with only partial confirmation from published Arc code.

Original article: Hacker News — Hacker News Ranking Algorithm: Penalties and Controversy Explained