Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about addition between x and context_x #27

Open
AlfredTino opened this issue Nov 12, 2024 · 1 comment
Open

Question about addition between x and context_x #27

AlfredTino opened this issue Nov 12, 2024 · 1 comment

Comments

@AlfredTino
Copy link

Hi, I have been stuck by the addition between x and context_x, i.e. the addition of Fig2 in your paper.
As demonstrated, x is in the embedding space of original features, while context_x, which is the output of Retrieval module, is the weighted sum of values, that is in label embedding space. Why can the embeddings from different spaces (i.e. feature and label) be added directly?

@Yura52
Copy link
Contributor

Yura52 commented Dec 7, 2024

Hi! I am sorry for the slow reply. Has the issue been resolved?

For TabR, as well as for any deep learning architecture, it is totally valid to sum any two representations if their shapes are compatible. Whether it will lead to good performance depends on the optimization problem induced by the architecture. In the case of TabR, the optimization process will try to configure the TabR's weights in such a way that the two embedding spaces are "compatible" in a sense that the sum of x and context_x will result in a reasonable representation. More generally, it depends on the architecture if adding two representations is a reasonable operation.

That said, I should add that the "embedding space" term is rather an intuitive term, at least in the context of this issue. It may be an intuitive way to think about architectures, but neither PyTorch nor the optimization algorithm are aware of "embedding spaces", they are aware only of the representation shapes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants