facebookresearch / facebookresearch/dlrm

Question regarding the pooling in QR trick

Open
#366 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.1k
Forks
859
PR merge metrics
No merged PRs in 30d

Description

When attempting to use the QR trick, I have noticed that the implementation differs from what is described in the original paper. In the paper, the embedding of a token is obtained by applying operations such as 'add', 'mult', or 'concat' to two separate embedding tables, after which sum or mean pooling is applied. However, the implementation https://github.com/facebookresearch/dlrm/blob/c848e837580cbcfe6b49149658e4c8a3c1576f48/tricks/qr_embedding_bag.py#L189 first applies pooling to the embeddings from the separate tables and then applies 'add', 'mult', or 'concat' to obtain the embedding feature. I am unsure whether this difference is by design or if the two methods are equivalent.

Contributor guide

Open the contributing guide

Research direction

Start at tricks/qr_embedding_bag.py around line 189 and compare its pooling and add/mult/concat order with the original QR trick paper. Determine whether the two formulations are equivalent or whether the implementation differs by design; done means resolving that question and documenting the rationale or identifying the needed correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.