Recommendation System
A recommendation system predicts the content a user is likely to be interested in based on that user's past behavior and preferences. It is the core growth engine of e-commerce, short video, and news platforms: the rise of ByteDance owes much to its recommendation algorithms.
Three Main Paradigms
Collaborative filtering: based on the assumption that similar users like similar content. UserCF finds similar users, ItemCF finds similar items. The advantage is that no content features are needed; the drawback is a hard cold start and poor results on sparse data.
Content-based: matches item features (title, tags, category) against the user profile. It solves the cold start but easily falls into an information cocoon, recommending only similar content with no surprise.
Deep models: feed user, item, and context features into a neural network. YouTube DNN (a two-tower recall and ranking design), Wide&Deep, and DeepFM are classic architectures. Today the mainstream is a three-stage design: two-tower recall, then fine-grained ranking, then re-ranking.
Industrial System Architecture
Recall layer: quickly narrow a pool of millions of candidates down to hundreds or thousands, demanding high recall and low latency. Multiple recall channels are common (collaborative filtering, vector retrieval, trending, rules). Ranking layer: score candidates precisely with a complex model, predicting click-through rate (CTR) or conversion rate (CVR). Re-ranking layer: a final adjustment for diversity, freshness, and business rules.
Core Difficulties
Cold start: new users and new items have no history and must rely on content features and exploration strategies. Information cocoon: over-optimizing short-term clicks narrows content further and further, so exploration must be introduced. Feedback loop bias: the model only sees data that was shown, and content never shown never gets a chance, needing inverse propensity scoring (IPS) and similar corrections. Real-time behavior: user interest shifts in real time and needs streaming features and online learning.
Evaluation Metrics
Offline evaluation uses AUC, GAUC, and NDCG; online evaluation looks at CTR, CVR, time spent per user, and retention. Watch out when offline metrics rise while online metrics fall: offline evaluation cannot simulate the real user feedback loop.