Назад к подготовке

ML System Design

When would you use a pure collaborative ALS or matrix-factorization baseline for a social feed, and what are its limitations?

Ответить самому

Сначала сформулируйте ответ как на собеседовании, затем откройте разбор и оцените себя.

Загрузка

Короткий ответ

Use ALS as a simple collaborative baseline when you have enough interactions. It is fast and interpretable, but weak for cold users/posts and content-only personalization.

Полный разбор

ALS is a useful early baseline when the feed already has exposure and engagement logs. Convert views, clicks, likes, comments and saves into an implicit-feedback confidence matrix, factorize users and posts, and retrieve high dot-product posts for each user.

It is attractive because it is simple, scalable and debuggable. It can also provide one candidate generator alongside content and popularity generators.

Its limitations matter in social feeds: new posts and new users arrive constantly, semantic content is ignored unless you use a hybrid variant, and popularity/exposure bias can dominate. Regular retraining is needed because the interaction matrix changes as interests and inventory drift.

Теория

Collaborative baselines are strong when history is dense enough, but social-feed systems need hybrid content and freshness signals.

Типичные ошибки

  • Expect pure ALS to solve new-post cold start.
  • Treat all engagement actions as equal without weights.
  • Use ALS as the only candidate generator.
  • Forget retraining as the interaction matrix changes.

Как отвечать на собеседовании

  • Position ALS as a baseline or one generator, not the whole system.
  • Call out cold start immediately.