MLCrack

    RECOMMENDATION SYSTEMS · INTERVIEW QUESTION

    Explain matrix factorization for collaborative filtering. How does it handle the cold start problem?

    🟡 intermediate · Collaborative Filtering

    Hint: Think about user and item latent factors, and what happens when there's no interaction data.

    Answer

    Matrix factorization decomposes the user-item interaction matrix R ≈ UVᵀ where U (users × k) and V (items × k) are latent factor matrices. Training minimizes ||R - UVᵀ||² + λ(||U||² + ||V||²) on observed entries. Predictions: r̂_ui = u_i · v_j. Cold start problem: new users/items have no interactions to learn factors from.

    Interview reasoning

    Solutions:

    1. Content-based features as side information (hybrid models)
    2. Metadata-initialized embeddings
    3. Explore-exploit strategies
    4. Popular item fallback
    5. Ask for preferences on signup.

    Modern approaches: Two-tower models (user/item encoders), transformers for sequential recommendation.

    Matrix factorization predicts an interaction using a user-vector/item-vector inner product, often with biases and regularization. Shared latent directions let behavior from related users inform an item score. Pure learned-ID factors cannot identify a new entity's preferences before evidence arrives; content priors or fallback policy are required.

    Worked example. A user vector [1,0] scores an item [0.8,0.2] as 0.8 before optional biases.

    Validation

    Evaluate temporal ranking and held-out new entities, tuning rank and regularization only on validation; compare popularity baselines.

    Common pitfalls

    Unobserved interactions are not uniformly true negatives. A low reconstruction error on known ratings does not establish full-catalog retrieval quality.