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

About the self-attention of DETR decoder #9

Open
jiugexuan opened this issue Oct 1, 2024 · 3 comments
Open

About the self-attention of DETR decoder #9

jiugexuan opened this issue Oct 1, 2024 · 3 comments

Comments

@jiugexuan
Copy link

In paper:
We propose a novel lightweight relation extractor, EGTR, which exploits the self-attention of DETR decoder, as depicted in Fig. 3. Since the self-attention weights in Eq. (1) contain N × N bidirectional relationships among the N object queries, our relation extractor aims to extract the predicate information from the self-attention weights in the entire L layers, by considering the attention queries and keys as subjects and objects, respectively.
Is the self-attention of DETR decoder the mask multi-attention layer in transformer decoder?

@jinbae
Copy link
Collaborator

jinbae commented Oct 2, 2024

Please refer to the DETR paper.
The self-attention of DETR decoder (not masked) is different from that of the original Transformer decoder (masked).

The difference with the original transformer is that our model decodes the N objects in parallel at each decoder layer,
while Vaswani et al. [47] use an autoregressive model that predicts the output sequence one element at a time.

@jiugexuan
Copy link
Author

so the q,k used for relation from the first attn_layer transformer decoder ?
7a0d83b0292df9825d819c1ab3f3f995
from here?

@jinbae
Copy link
Collaborator

jinbae commented Oct 17, 2024

Yes, that's right.

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