I can admit that this is the best explanation for GAT and GNN one can find. Fantastic explanation with very simple English. The quality of sound and video is great as well. Many thanks.
This was simply a fantastic explanation video, I really do hope this video gets more coverage than it already has. It would be fantastic if you were to explain the concept of multi-head attention in another video. You've earned yourself a subscriber +1.
A wonderful and succinct explanation with crisp visualisations about both the attention mechanism and the graph neural network. The way the learnable parameters are highlighted along with the intuition (such as a weighted adjacency matrix) and the corresponding matrix operations is very well done.
Explained in terms of basic Neural Network terminologies!! Great work 👍
Před 8 měsíci
Your work has been an absolute game-changer for me! The way you break down complex concepts into understandable and actionable insights is truly commendable. Your dedication to providing in-depth tutorials and explanations has tremendously helped me grasp the intricacies of GNNs. Keep up the phenomenal work!
Hi! Thanks! Multi-head attention simply means that several attention mechanisms are applied at the same time. It's like cloning the regular attention. What exactly is unclear here? :)
@@DeepFindr The math and code are hard to fully grasp. If you could break down the linear algebra with the matrix diagrams as you have done for single head attention, I think people would find that very helpful.
This is pretty amazing content. The way you explain the concept is pretty great and I especially like the visual style and very neat looking visuals and animations you make. Thank you!
Thank you very much! This was my introduction into GAT and helped me to immediately get a good grasp of the basic concept :) I like the graphical support you provide to the explanation, it's gerat!
Just for anyone confused, in accordance to the illustration in the summary the weight matrix should have 5 rows instead of 4 that are shown in the video. Great video and I admire the fact that your topics of choice are really into the latest hot staff of ML!
Your visual explanation is super great, help many people to learn some-hour stuff in minutes! Please make more videos on specialized topics of GNNs! Thanks in advance!
Muchas gracias por el video. Despues de haber visto muchos otros, puedo decir que el suyo es el mejor, el mas sencillo de entender. Estoy muy agradecido con usted. Saludos
Thank you so much for this beautiful video. Have been trying out too many videos on GNN and GAN but this video definitely tops. I finally understood the concept behind it. Keep up the good work :)
Thanks a lot! Haha I use active presenter (it's free for the basic version) but I guess there are better alternatives out there. Still experimenting :)
Good explanation to the key idea. One question, what is the difference between GAT and self attention constrained by a adjacency matrix(eg. Softmax(Attn*Adj) )? The memory used for GAT is D*N^2, which is D times of the intermediate ouput of SA. The node number of graph used in GAT thus cannot be too large because of memory size. But it seems that they both implement dynamic weighting of neighborhood information constrained by a adjacency matrix.
Hi, Did you have a look at the implementation iny PyG? pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/nn/conv/gat_conv.html#GATConv One of the key tricks in GNNs is usually to represent the adjacency matrix in COO format. Therefore you have adjacency lists and not a nxn matrix. Using functions like gather or index_select you can then do a masked selection of the local nodes. Hope this helps :)
Thank you for the great video. I have one question, what happens if weighted graphs are used with attention GNN? Do you think adding the attention-learned edge "weights" will improve the model compared to just having the input edge weights (e.g. training a GCNN with weighted graphs)?
Hi! Yes I think so. The fact that the attention weights are learnable makes them more powerful than just static weights. The model might still want to put more attention on a node, because there is valuable information in the node features, independent of the weight. A real world example of this might be the data traffic between two network nodes. If less data is sent between two nodes, you probably assign a smaller weight to the edge. Still it could be that the information coming from one nodes is very important and therefore the model pays more attention to it.
Awesome video! Quick question: do you have a video explaining Cluster-GCN? And if yes, do you know if similar clustering idea can be applied to other networks (like GAT) to be able to train the model on large graphs? Thanks!
Hi! The video in the description from this other channel explains the general attention mechanism used in transformers quite well :) or do you look for other attention mechanisms in GNNs?
OK :) In my next video (of the current GNN series) I will also Quickly talk about Graph Transformers. There the attention coefficients are calculated with a dot product of keys and queries. I hope to upload this video this or next week :)
I am following your playlist on GNN and this is the best content I get as of now. I have a CSV file and want to apply GNN on it but I don't understand how to find the edge features from the CSV file
Thanks for the great explanation! Just one thing that I do not really understand, may I ask how do you get the size of the learnable weight matrix [4,8]? I understood that there are 4 rows due to the number of features for each node. However, not sure where the 8 columns come from.
Good video, but you should have mentioned how in NLP, a sequence of words is used to build a fully connected adjacency graph. This is why attention can can be used in graph data; because even in NLP, it's already ON graph data!
hi.. Your explanations are really nice and easy to understand and seem rooted in fundamentals. Thank you for that. I am new to reading research papers, and i find it difficult to understand them sometimes and end up wasting a lot of time on not-so-important things. But this is what I think my problem is, but it can be something else too...idk... like sometimes i don't have the pre req or have gap in my knowledge... Could you please make a video about it or help in the comments, or recommend some other resource to get better at reading papers and understanding from the bottom up? thank you very much 🙏🙏
Yes, they are the same thing :) passing messages is in the end nothing else but multiplying with the adjacency matrix. It's just a common term to better illustrate how the information is shared :)
2:55 Looks like it should be sum(H * W) not sum(W * H). 5x4 * 4x8 works.Suggest you provide errata at the top of the description. Someone else has noticed an error later in the video.
I have come to understand attention as key, query, value multiplication/addition. Do you know why this wasn't used and if it's appropriate to call it attention?
Hi, Query / Key / Value are just a design choice of the transformer model. Attention is another technique of the architecture. There is also a GNN Transformer (look for Graphormer) that follows the query/key/value pattern. The attention mechanism is detached from this concept and is simply a way to learn importance between embeddings.
Love your work and thick accent, thank you! These attention coefficients look very similar to weighted edges for me, so I want to ask a question: If my graph is unweighted attributed graph, would GATConv produce different output compared with GCNConv by Kipf and Welling?
hahah, thanks! I'm not sure if I understood the question correctly. If you have an unweighted graph, GAT will anyways learn the attention coefficients (which can be seen as edge weights) based on the embeddings. It can be seen as "learnable" edge weights. So I'm pretty sure that GATConv and GCNConv will produce different outputs. From my experience, using the attention mechanism, the output embeddings are better than using plain GCN.
Thanks for the video! There's a question: at 13:03, I think the 'adjacency matrix' consists of {e_ij} could be symmetric, but after the softmax operation, the 'adjacency matrix' consists of {α_ij} should not be symmetric any more. Is that right?
It's because the output dimension (neurons) of the neural network is different then the input dimension. You could also have less or the same number of features.
This simply comes from dense (fully connected layers). There are lots of resources, for example here: analyticsindiamag.com/a-complete-understanding-of-dense-layers-in-neural-networks/#:~:text=The%20dense%20layer's%20neuron%20in,vector%20of%20the%20dense%20layer.
Thanks a lot. Your videos are really helpful. I have a few questions regarding the case of weighted graphs. Would attention still be useful if the edges are weighted? If so, how to pass edge wights to the attention network? Can you suggest a paper doing that?
The GAT layer of PyG supports edge features but no edge weights. Therefore I would simply treat the weights as one dimensional edge features. The attention then additionally considered these weights. Probably the learned attention weights and the edge weights are sort of correlated, but I think it won't harm to include them for the attention calculation. Maybe the attention mechanism can learn even better scores for the aggregation :) I would just give it a try and see what happens. For example compare RGCN + edge weights with GAT + edge features.
Very helpful video! Thank you for your great work! Two questions, 1. Could you please explain the Laplacian Matrix in GCN, the GNN explained in this video is spatial-based, and I hope I can get a better understanding of those spectral-based ones. 2. How to draw those beautiful pictures? Could you share the source files? Thanks again!
Hi! The Laplacian is simply the degree matrix of a graph subtracted by the adjacency matrix. Is there anything in particular you are interested in? :) My presentations are typically a mix of PowerPoint and active presenter, so I can send you the slides. For that please send an email to deepfindr@gmail.com :)
Thank you for the great video! I wanted to ask - how is training of this network performed when the instances (input graphs) have varying number of nodes and/or adjacency matrix? It seems that W would not depend on the number of nodes (as its shape is 4 node features x 8 node embeddings) but shape of attention weight matrix Wa would (as its shape is proportional to the number of edges connecting node 1 with its neighbors.)
Hi! The attention weight matrix has always the same shape. The input shape is twice the node embedding size because it always takes two neighbor - combinations and predicts the attention coefficient for them. Of course if you have more connected nodes, you will have more of these combinations, but you can think of it like the batch dimension increases, but not the input dimension. For instance you have node embeddings of size 3. Then the input for the fully connected network is for instance [0.5, 1, 1, 0.6, 2, 1], so the concatenated node embeddings of two neighbors (size=3+3). It doesn't matter how many of these you input into the attention weight matrix. If you have 3 neighbors for a node it would look like this: [0.5, 1, 1, 0.6, 2, 1] [0.5, 1, 1, 0.7, 3, 2] [0.5, 1, 1, 0.8, 4, 3] The output are then 3 attention coefficients for each of the neighbors. Hope this makes sense :)
Před 3 lety
@@DeepFindr If graph sizes are already different, I mean if one have graph_1 that has 2200 nodes(that results in 2200,2200 adj. matrix, and graph_2 has 3000 nodes (3000,3000 adj matrix), you can zero pad graph_1 to 3000. This way you'll have fixed size of input for graph_1 and graph_2. Zero padding will create dummy nodes with no connection. So the sum with the neighboring nodes will be 0. And having dummy features for dummy nodes, you'll end up with fixed size graphs.
Hi, yes that's true! But for the attention mechanism used here no fixed graph size is required. It also works for a different number of nodes. But yes padding is a good idea to get the same shapes :)
That's a good point. I think the TransformerConv is the layer that uses dot product attention. I'm also not aware of any reason why it was implemented like that. Maybe it's because this considers the direction of information (so source and target nodes) better. Dot product is cummutative, so i*j is the same as j*i, so it can't distinguish between the direction of information flow. Just an idea :)
Hi! There is soft vs hard attention, you can search for it on Google. For self attention there are great tutorials, such as this one peltarion.com/blog/data-science/self-attention-video
I can admit that this is the best explanation for GAT and GNN one can find. Fantastic explanation with very simple English. The quality of sound and video is great as well. Many thanks.
Thank you for your kind words
This was simply a fantastic explanation video, I really do hope this video gets more coverage than it already has. It would be fantastic if you were to explain the concept of multi-head attention in another video. You've earned yourself a subscriber +1.
Thank you, I appreciate the feedback!
Sure, I note it down :)
This might be the best and simple explanation of GAT one can ever find! Thanks man
it was the best explanation that gave me hope for the understanding these mechanisms. Everything was so good explained and depicted, thank you!
This is the best and most in detail explanation on Graph CNN attention I've found. Great job!
A wonderful and succinct explanation with crisp visualisations about both the attention mechanism and the graph neural network. The way the learnable parameters are highlighted along with the intuition (such as a weighted adjacency matrix) and the corresponding matrix operations is very well done.
I especially love your background pics.
Explained in terms of basic Neural Network terminologies!! Great work 👍
Your work has been an absolute game-changer for me! The way you break down complex concepts into understandable and actionable insights is truly commendable. Your dedication to providing in-depth tutorials and explanations has tremendously helped me grasp the intricacies of GNNs. Keep up the phenomenal work!
amazing!!! author well done!!!
I'd love it if you could explain multi-head attention as well. You really have such a good grasp of this very complex subject.
Hi! Thanks!
Multi-head attention simply means that several attention mechanisms are applied at the same time. It's like cloning the regular attention.
What exactly is unclear here? :)
@@DeepFindr The math and code are hard to fully grasp. If you could break down the linear algebra with the matrix diagrams as you have done for single head attention, I think people would find that very helpful.
This is pretty amazing content. The way you explain the concept is pretty great and I especially like the visual style and very neat looking visuals and animations you make. Thank you!
Thank you for your kind words :)
Clear explanation and visualization on attention mechanism. Really helpful in studying GNN.
Thank you very much! This was my introduction into GAT and helped me to immediately get a good grasp of the basic concept :) I like the graphical support you provide to the explanation, it's gerat!
Very well explained. Thank you very much!
Just for anyone confused, in accordance to the illustration in the summary the weight matrix should have 5 rows instead of 4 that are shown in the video.
Great video and I admire the fact that your topics of choice are really into the latest hot staff of ML!
Extremely helpful. Very well explained in concrete and abstract terms.
Amazingly easy to understand. Thank you.
very good explanation! clear and crisp, even I, a beginner, feeling satisfied after watching this. Should get more recognition!
Thanks
Your visual explanation is super great, help many people to learn some-hour stuff in minutes!
Please make more videos on specialized topics of GNNs!
Thanks in advance!
I will soon upload more GNN content :)
very well explained, provides a very intuitive picture of the concept. Thanks a ton for this awesome lecture series!
I need more Graph Neural Network related video!!
There will be some more in the future. Anything in particular you are interested in? :)
This is the MOST BEST video of GCN and GAT, very great, thank you!
very helpful tutorial, clearly explained!
Great walkthrough.
such an easy-to-grasp explanation! such a visually nice video! amazing job!
Thanks, I appreciate it :)
Great! Thank you for explaining the math and the linear algebra with the simple tables.
Great video! your explanation was amazing. Thank you!!
Thanks :)
This is a very great explanation covering basic GNN and the GAT. Thank you so much
easy and best explanation
nice work
Fantastic explaination.
Great explination, really appretiated.
If you Please could u make a videa explain the loss calculation and backpropagation in gnn?
Thanks for the best explanation.
clearly clear explanation, super best video lecture about GNN ever seen.
Muchas gracias por el video. Despues de haber visto muchos otros, puedo decir que el suyo es el mejor, el mas sencillo de entender. Estoy muy agradecido con usted. Saludos
Thank you! :)
Very nice video. Thanks for your work~
Thx for the awesome explanation!
A video with attention in CNN e.g. UNet would be great :)
I slightly capture that in my video on diffusion models. I've noted it down for the future though.
Thank you so much for this beautiful video. Have been trying out too many videos on GNN and GAN but this video definitely tops. I finally understood the concept behind it. Keep up the good work :)
Thank you for sharing this clear and well-designed explanation.
I really salute you for this detailed video! that's very intriguing and clear! thank you again!
simple and informative! Thank you!
Very clear and helpful. Thank you so much!
Thank you bro. Confused head now gets the idea about GNN.
Hehe
A Great explanation
Very clear explanation. Thank you!
Hi, Can you tell which tool you're using to make those amazing visualizations? All of your videos on GNNs are great btw :)
Thanks a lot! Haha I use active presenter (it's free for the basic version) but I guess there are better alternatives out there. Still experimenting :)
best video for learning GNN thank you so much!
Great video! Thank you
most understandable explanation so far!
Good explanation to the key idea. One question, what is the difference between GAT and self attention constrained by a adjacency matrix(eg. Softmax(Attn*Adj) )? The memory used for GAT is D*N^2, which is D times of the intermediate ouput of SA. The node number of graph used in GAT thus cannot be too large because of memory size. But it seems that they both implement dynamic weighting of neighborhood information constrained by a adjacency matrix.
Hi,
Did you have a look at the implementation iny PyG? pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/nn/conv/gat_conv.html#GATConv
One of the key tricks in GNNs is usually to represent the adjacency matrix in COO format. Therefore you have adjacency lists and not a nxn matrix.
Using functions like gather or index_select you can then do a masked selection of the local nodes.
Hope this helps :)
Very Helpful Explanation! Thank you!
Simply exceptional!
This is very helpful!
Thanks for sharing the knowledge!
You're welcome :)
Wonderful explination! thanks
AMAZING!
Thank you so much for this great video.
great video, thanks
I learned so much from this video! Thanks a lot
That's great :)
Great quality thank you !
Awesome.....
A great explanation, many thanks
Very nice, thanks for effort!
Thank you for the great video. I have one question, what happens if weighted graphs are used with attention GNN? Do you think adding the attention-learned edge "weights" will improve the model compared to just having the input edge weights (e.g. training a GCNN with weighted graphs)?
Hi! Yes I think so. The fact that the attention weights are learnable makes them more powerful than just static weights.
The model might still want to put more attention on a node, because there is valuable information in the node features, independent of the weight.
A real world example of this might be the data traffic between two network nodes. If less data is sent between two nodes, you probably assign a smaller weight to the edge. Still it could be that the information coming from one nodes is very important and therefore the model pays more attention to it.
please use brackets and multiplication signs between matrices so i can map the mathematical formula to the visualization
well explained.
Outstanding explanation
Excellent explanation 👌 👏🏾
Excellent job, mate 👍👍
Thx :)
Thank you for wonderful content
Supper explaination
Awesome video! Quick question: do you have a video explaining Cluster-GCN? And if yes, do you know if similar clustering idea can be applied to other networks (like GAT) to be able to train the model on large graphs? Thanks!
Great Explanation! As you pointed out this is one way of attention mechanism. Can you also provide references to other attention mechanisms.
Hi! The video in the description from this other channel explains the general attention mechanism used in transformers quite well :) or do you look for other attention mechanisms in GNNs?
@@DeepFindr yes thanks for sharing that too in the video. I was curious about the attention mechanisms on gnn
OK :)
In my next video (of the current GNN series) I will also Quickly talk about Graph Transformers. There the attention coefficients are calculated with a dot product of keys and queries.
I hope to upload this video this or next week :)
I am following your playlist on GNN and this is the best content I get as of now.
I have a CSV file and want to apply GNN on it but I don't understand how to find the edge features from the CSV file
Thanks! Did you see my latest 2 videos? They show how to convert a CSV file to a graph dataset. Maybe it helps you to get started :)
@@DeepFindr thanks, hope i will get my answer :-)
Thanks for the great explanation! Just one thing that I do not really understand, may I ask how do you get the size of the learnable weight matrix [4,8]? I understood that there are 4 rows due to the number of features for each node. However, not sure where the 8 columns come from.
I think 8 is the arbitrarily chosen dimensionality of the embedding space.
4:00 do you multiply "feature node matrix" with "adjacency matrix" before multiplying it with "learnable weight matrix" ?
Good video, but you should have mentioned how in NLP, a sequence of words is used to build a fully connected adjacency graph. This is why attention can can be used in graph data; because even in NLP, it's already ON graph data!
Brilliant video 👍👍👍
Very understandable! Thank you.
Can you share your presentation?
Sure! Can you send me an email to deepfindr@gmail.com and I'll attach it :) thx
@@DeepFindr Hey I have also sent you an email, could you please attach the presentation?
Amazing thank you 🤩
very helpful video, but I still confuse in some part. Maybe I should watch this for few times. thanks
Hi! What is unclear to you?
:)
hi.. Your explanations are really nice and easy to understand and seem rooted in fundamentals. Thank you for that. I am new to reading research papers, and i find it difficult to understand them sometimes and end up wasting a lot of time on not-so-important things. But this is what I think my problem is, but it can be something else too...idk... like sometimes i don't have the pre req or have gap in my knowledge... Could you please make a video about it or help in the comments, or recommend some other resource to get better at reading papers and understanding from the bottom up? thank you very much 🙏🙏
Thanks
THANK YOU!
Great Video!
thank you. what if you also wanted to have edge features?
Hi, I have a video on how to use edge features in GNNs :)
Hi! Are what you explain in the "Basics" and the message-passing concept the same things?
Yes, they are the same thing :) passing messages is in the end nothing else but multiplying with the adjacency matrix. It's just a common term to better illustrate how the information is shared :)
2:55 Looks like it should be sum(H * W) not sum(W * H). 5x4 * 4x8 works.Suggest you provide errata at the top of the description. Someone else has noticed an error later in the video.
I have come to understand attention as key, query, value multiplication/addition. Do you know why this wasn't used and if it's appropriate to call it attention?
Hi,
Query / Key / Value are just a design choice of the transformer model. Attention is another technique of the architecture.
There is also a GNN Transformer (look for Graphormer) that follows the query/key/value pattern. The attention mechanism is detached from this concept and is simply a way to learn importance between embeddings.
Love your work and thick accent, thank you! These attention coefficients look very similar to weighted edges for me, so I want to ask a question: If my graph is unweighted attributed graph, would GATConv produce different output compared with GCNConv by Kipf and Welling?
hahah, thanks!
I'm not sure if I understood the question correctly. If you have an unweighted graph, GAT will anyways learn the attention coefficients (which can be seen as edge weights) based on the embeddings. It can be seen as "learnable" edge weights.
So I'm pretty sure that GATConv and GCNConv will produce different outputs.
From my experience, using the attention mechanism, the output embeddings are better than using plain GCN.
شكرا لك
Thanks for the video! There's a question: at 13:03, I think the 'adjacency matrix' consists of {e_ij} could be symmetric, but after the softmax operation, the 'adjacency matrix' consists of {α_ij} should not be symmetric any more. Is that right?
Yes usually the attention weights do not have to be symmetric. Is that what you mean? :)
@@DeepFindr Yes. Thanks for your reply!
Why does the new state calculated have more features than the original state? I dont understand
It's because the output dimension (neurons) of the neural network is different then the input dimension.
You could also have less or the same number of features.
how is learnable weight matrix is formed ? have some material to understand it better?
This simply comes from dense (fully connected layers). There are lots of resources, for example here: analyticsindiamag.com/a-complete-understanding-of-dense-layers-in-neural-networks/#:~:text=The%20dense%20layer's%20neuron%20in,vector%20of%20the%20dense%20layer.
Thanks a lot. Your videos are really helpful. I have a few questions regarding the case of weighted graphs. Would attention still be useful if the edges are weighted? If so, how to pass edge wights to the attention network? Can you suggest a paper doing that?
The GAT layer of PyG supports edge features but no edge weights. Therefore I would simply treat the weights as one dimensional edge features.
The attention then additionally considered these weights.
Probably the learned attention weights and the edge weights are sort of correlated, but I think it won't harm to include them for the attention calculation. Maybe the attention mechanism can learn even better scores for the aggregation :) I would just give it a try and see what happens. For example compare RGCN + edge weights with GAT + edge features.
@@DeepFindr thanks a lot for the reply.
Very helpful video! Thank you for your great work! Two questions, 1. Could you please explain the Laplacian Matrix in GCN, the GNN explained in this video is spatial-based, and I hope I can get a better understanding of those spectral-based ones. 2. How to draw those beautiful pictures? Could you share the source files? Thanks again!
Hi!
The Laplacian is simply the degree matrix of a graph subtracted by the adjacency matrix. Is there anything in particular you are interested in? :)
My presentations are typically a mix of PowerPoint and active presenter, so I can send you the slides. For that please send an email to deepfindr@gmail.com :)
Ist almost as if its just a normal neural network but projected onto a graph
Thank you for the great video! I wanted to ask - how is training of this network performed when the instances (input graphs) have varying number of nodes and/or adjacency matrix? It seems that W would not depend on the number of nodes (as its shape is 4 node features x 8 node embeddings) but shape of attention weight matrix Wa would (as its shape is proportional to the number of edges connecting node 1 with its neighbors.)
Hi! The attention weight matrix has always the same shape. The input shape is twice the node embedding size because it always takes two neighbor - combinations and predicts the attention coefficient for them. Of course if you have more connected nodes, you will have more of these combinations, but you can think of it like the batch dimension increases, but not the input dimension.
For instance you have node embeddings of size 3. Then the input for the fully connected network is for instance [0.5, 1, 1, 0.6, 2, 1], so the concatenated node embeddings of two neighbors (size=3+3). It doesn't matter how many of these you input into the attention weight matrix.
If you have 3 neighbors for a node it would look like this:
[0.5, 1, 1, 0.6, 2, 1]
[0.5, 1, 1, 0.7, 3, 2]
[0.5, 1, 1, 0.8, 4, 3]
The output are then 3 attention coefficients for each of the neighbors.
Hope this makes sense :)
@@DeepFindr If graph sizes are already different, I mean if one have graph_1 that has 2200 nodes(that results in 2200,2200 adj. matrix, and graph_2 has 3000 nodes (3000,3000 adj matrix), you can zero pad graph_1 to 3000. This way you'll have fixed size of input for graph_1 and graph_2. Zero padding will create dummy nodes with no connection. So the sum with the neighboring nodes will be 0. And having dummy features for dummy nodes, you'll end up with fixed size graphs.
Hi, yes that's true! But for the attention mechanism used here no fixed graph size is required. It also works for a different number of nodes.
But yes padding is a good idea to get the same shapes :)
why replacing dot product attn with concat proj + leaky relu?
That's a good point. I think the TransformerConv is the layer that uses dot product attention. I'm also not aware of any reason why it was implemented like that. Maybe it's because this considers the direction of information (so source and target nodes) better. Dot product is cummutative, so i*j is the same as j*i, so it can't distinguish between the direction of information flow. Just an idea :)
Hi, sorry to bother you
I have a question
What's the difference between soft-attention and self-attention?
Hi! There is soft vs hard attention, you can search for it on Google.
For self attention there are great tutorials, such as this one peltarion.com/blog/data-science/self-attention-video