Ranking VK Stories

Stepan Malkevich24 May 2025

Problem

The VK Feed team orders the author circles (friends and public pages) in the stories feed. The goal is that users see the most interesting stories from their subscriptions, and the key metric is story views. The first ML ranker scored each story and aggregated scores per author. It gave +30% views, but it trained on likes and similar events whose link to views nobody had checked, and it scored stories while the feed sorts authors.

Example from the article: a view is counted only after the user taps an author circle and the viewer opens, so a model trained on "like" never learned the event that actually creates views.

Solution in brief

Train on the event that produces the key metric (a tap that opens the author's viewer) and rank authors rather than stories. Add features built around that tap, then refine the target and tune hyperparameters. Together with a network effect this took story views to 2.5x of the starting level.

Questions this case answers
  • How to choose a training target for ranking content sources in a feed when dozens of engagement events exist and only one of them creates the key metric
  • How to train one ranking model on many weighted targets without fitting a separate classifier per target
  • How to rank authors in a stories feed so that story views grow
  • How to choose a training target for a ranker when dozens of engagement events are available

Tools and methods

  • XGBoost Multi-Target Pairwise — pairwise ranker with a weighted sum of losses over several targets; the team runs XGBoost on Spark
  • Author-level dataset — one row per user-author pair, with the target "opened the viewer"
  • ALS and Word2Vec embeddings — collaborative features and similarity to the user's recent opens
  • Optuna — hyperparameter tuning
  • A/B tests — each step is measured by story views
Continue reading — it's free

Google or a one-time email code. No password.