feat: add semantic TIGER recommendation module#311
Open
succSeeded wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new
rectools.semanticmodule that introduces semantic and generative recommendation tooling to RecTools.rectools.semantic.data_handlingprovides dataset preparation utilities for TIGER workflows, including sequence building, padding, iterative k-core filtering, and leave-one-out splitting.rectools.semantic.tokenizerprovides semantic ID tokenization based on item embeddings, including tokenizer training, embedding datasets, quantizer abstractions, and RK-Means and RQ-VAE implementations.rectools.semantic.modulesprovides reusable neural network building blocks used by the semantic stack, including transformer layers, relative position bias, normalization layers, and MLP components.rectools.semantic.metricsprovides ranking and recommendation diversity metrics used for semantic model evaluation.rectools.semantic.tigerprovides the TIGER recommender itself, including the core network, training wrapper, loss computation, and high-level model interface.rectools.semantic.config_optionsdefines typed configuration options for optimizers, quantizers, and learning-rate schedules used across the module.Motivation
The module was implemented to bring semantic, neural recommendation workflows into RecTools in a reusable way. Rather than adding a standalone model only, this change introduces the surrounding infrastructure needed to prepare data, train the model, evaluate its outputs, and experiment with the approach inside the existing library.
Along with the TIGER implementation itself, the module includes shared semantic components, tokenization utilities, metrics, and example materials so the new functionality is easier to understand, test, and extend.
Type of change
How Has This Been Tested?
New tests were added to cover the introduced semantic module and its core components. The added coverage includes data handling utilities, tokenizer functionality, semantic metrics, reusable neural modules, and TIGER-specific logic to help verify that the new module integrates correctly with the existing codebase.