Merlin icon indicating copy to clipboard operation
Merlin copied to clipboard

[Task] First support of session-based recommendation with RNNs block

Open sararb opened this issue 3 years ago • 0 comments

Problem:

The integration of session-based support in Merlin Models requires the implementation/refractory of different blocks. (Ticket #433 summarizes the motivation and an overview of all the requirements).

Goal:

  • Implement the first low-level support of a session-based model using RNNs.
  • This work will include different blocks needed for session-based but won't link them together.

Constraints:

Starting Point:

  • [ ] First implementation of Masking as an augmentation technique, and the creation of related unit tests. https://github.com/NVIDIA-Merlin/models/issues/509 https://github.com/NVIDIA-Merlin/models/issues/540 Notes:
  • We will include the three approaches: Last, Random, and sliding window (CLM)
  • Use the UniformNegativeSampling code as a starting point
  • This is a standalone class that transforms the inputs and returns a PredictionOutput object with (inputs, targets, and mask)
  • [ ] Support of SequenceAggregator operations (to-2d transformation) using ragged tensors: Ignore masking, Average, Weighted-average, Attention-based average. And the creation of related unit tests. Notes: We should keep the ragged representation in the input blocks and transform it to a dense representation only when forwarding the sequence to the RNN block. https://github.com/NVIDIA-Merlin/models/pull/593

  • [ ] Support of an RNN block built on top of tf.keras layers: rnn, gru and lstm. And the creation of related unit tests. Notes: The block should return either a 2-D representation of the whole sequence or a 3-D representation with all positions.

  • [ ] Example of RNN session-based recommendation training and deployment

sararb avatar Jul 14 '22 16:07 sararb