Match a job Paths Subjects Questions Quizzes Pricing
Advanced Open Pro

Explain the Log-Q Correction to a Teammate Who Wants to Remove It

A video platform trains a two-tower retriever with an in-batch softmax. Batches are formed by sampling logged (user, video) positives, so a video appears in a batch with probability proportional to its popularity Q(i). After launch, the team sees that head videos are under-retrieved relative to their watch share and the model seems to "like" niche videos too much. A teammate reads the training code, sees logits - log(item_prob), and wants to delete it as "a hack".

Consider three videos with true conditional probabilities for one user P(i \mid u) = (0.5, 0.3, 0.2) and batch-sampling probabilities Q = (0.7, 0.2, 0.1).

  1. Derive what the optimal logit is for an in-batch softmax without the correction when positives come from the joint distribution and negatives are drawn from Q. Evaluate it for the three videos and compare the ranking with the true ranking.
  2. Derive what the correction does and what the corrected model's raw score then estimates. Which score is used at serving?
  3. Describe how Q(i) is estimated in a streaming setting and two numerical pitfalls.
  4. Give two reasons a team might still deliberately omit or soften the correction and how you would decide.

Share this question

← Back to Embeddings & Representation Learning practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.