tensorflow / tensorflow/recommenders

[Question] Swapping `query` and `candidate` towers

Open
#536 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

Hi @maciejkula - its been a while hope you are well :)

I am back with another question!


In my application I can easily swap query and candidate towers, because I just need the final vectors for both, my system will not be hosted like a traditional query -> candidate model.

I was wondering what effect should occur when one swaps the two around? Does it affect any of the internal of how loss is calculated etc?

I am finding it hard in my case to just test and see, because in my case I have a very high imbalance where I have millions of items on one side and hundreds on the other. So this means if I run the experiment and just swap the towers, my metrics no longer correlate as the task becomes either much harder, or much simpler.

Would love your view on this! Or any of the other fine people who hang about in this repo!

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.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the query and candidate tower behavior and the loss calculation, then document whether swapping them changes training or only the interpretation of the resulting metrics.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.