NVIDIA-Merlin / NVIDIA-Merlin/Merlin

[Task] Improve negative sampling for retrieval

Open
#464 4 comments 0 reactions 2 assignees View on GitHub

@sararb is already working on this.

Since Jul 21, 2022.

roadmap
Dominant language
Python
Stars
907
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Problem:

There is a considerable amount of tech-debt in the code that’s responsible for negative sampling in retrieval. The biggest issue is that it relies heavily on the model-context, which we would like to remove in order to simplify things.

Goal:

  • Simplify the base-class PredictionTask
  • Remove the usage of model-context in the prediction-tasks
  • Generalize sampling-queues to allow for ranking

Constraints:

  • Keep user-facing API the same.

Starting Point:

  • Implement PredictionBlock, BinaryPrediction & RegressionPrediction: Done

  • Implement a new negative-sampler base class Done

  • Implement DotProduct Done

  • Implement ContrastivePredictionBlock + tests Done

  • Implement DotProductPrediction Done

  • Tests for two-tower/mf with BinaryPrediction & RegressionPrediction WIP

  • Implement CategoricalPrediction (without contrastive capabilities) Done

  • Make CategoricalPrediction allow for negative-sampling Done

  • Update retrieval models with new ConstrastiveOutput WIP

  • Impelement different types of samplers one by one

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.