as someone who hasnt taken any math courses or have experience reading research papers, that part with the D^(-1/2) A D^(-1/2) was so confusing. but now i understand what it means. it is essentially dividing the adjacency matrix, A, by the geometric mean of each pair of nodes' degrees, but broken down into 2 parts. matrix multiplication of (D^(-1/2), A) divides A by each node's own sqrt(degree), and (A D^(-1/2)) divides A by each nodes' counterparty's sqrt(degree) which could also be itself in a self loop. it is the equivalent of if you looped through each cell of A, and divided A[i,j] by sqrt(node i degrees*node j degrees). just pointing this out incase someone else sees that and gets scared
@cristian-bull2 жыл бұрын
you are a life saver. All the related ideas are so well explained in a single video. I even had the company pay for a damn course on udemy, and these video series ended up being a far better resource.
@DeepFindr2 жыл бұрын
Happy that you found it helpful :)
@8dobbm7222 жыл бұрын
You touched on exactly what I’m looking for. Many thanks!
@ThePedroPimenta2 жыл бұрын
i say the same!
@lucaslau83793 жыл бұрын
Truly amazing, crystal clear and easily understood. Schools should use this to teach GNN. Thanks a lot for your effort.
@filippobargagna9 ай бұрын
The amount and clearness of the informtion presented here is astounding. Great work, you're saving my research
@ceevaaaaa3 жыл бұрын
Beautifully explained; simple and intuitive. AMAZING WORK.
@andresvicente39073 жыл бұрын
Love it!! thanks a lot for taking the time to help others to understand and implement these (not so simple) concepts.
@DeepFindr3 жыл бұрын
Thank you! I'm happy if you found it helpful :)
@davidlearnforus Жыл бұрын
your whole channel is just perfect and I will share it everywhere I can, because more ppl should know this! great, concise, systematic, feels like getting black belt right after entering the Karate club!
@DeepFindr Жыл бұрын
Thanks so much this really made me happy :)
@davidlearnforus Жыл бұрын
@@DeepFindr wish you lots of success! great work again
@daniamaya Жыл бұрын
This is a top-notch explanation. Thank you SO MUCH!
@hiramcoriarodriguez12523 жыл бұрын
This lecture is what i was looking for during a past Kaggle competition with graph data, at least now i learned something new.
@DeepFindr3 жыл бұрын
Cool, which competition was it?
@hiramcoriarodriguez12523 жыл бұрын
@@DeepFindr "OpenVaccine", where every RNA was graph.
@DeepFindr3 жыл бұрын
@@hiramcoriarodriguez1252 I see. Sounds interesting :)
@enginbilgi3 жыл бұрын
That is the information I was looking for. Thanks.
@itryforwhat Жыл бұрын
Thanks a lot for clear explanation, I have a small question is how we deal with case where the edge feature is missing, for example: given a social network where you have a connection between some people, each people have habits, skills then given another graph of people and their skill and habits and want to predict potential connection of these people
@mdtokitahmid29703 жыл бұрын
Please make a video seperately on this implementation of edge feature type problem in pytorch :'( As you did for the other parts. Would be very happy if you also include attention into this. It would be tooo much helpful for my research :(
@DeepFindr3 жыл бұрын
Check out this example, maybe this is already sufficient :) github.com/rusty1s/pytorch_geometric/blob/master/examples/rgcn.py
@mehmetaliozer24033 жыл бұрын
amazing level of explanation, thanks a lot.
@البداية-ذ1ذ3 жыл бұрын
Simply you are incredible, blessing to you 🙂
@DeepFindr3 жыл бұрын
Thanks for your kind words! :)
@jeongiitae63 жыл бұрын
Amazing lecture thanks to your really good source !
@zhencai68703 жыл бұрын
Very good lecture! Clear explanation of edge features. I have a very stupid question though. Is there any way that I could load the edge weights data to the graph dataset in pytorch? I'm new to Pytorch Geometric and I just couldn't find any info regarding this.
@DeepFindr3 жыл бұрын
Hi :) I can refer you to one of my videos of my current GNN series - "Custom dataset in pytorch geometric". There I also talk about how to create a dataset with edge info :) hope that helps
@SagarKhare233 жыл бұрын
wonderfully well explained! can you add links to the papers in the description? would be of great help. thank you so much for these videos - very clearly and thoughtfully explained/created!
@DeepFindr3 жыл бұрын
Thank you :) yes, I will add them tomorrow!
@DeepFindr3 жыл бұрын
Done :)
@SagarKhare233 жыл бұрын
@@DeepFindr thanks!
@anitasoroush11 ай бұрын
It was great! thank you! Is there any source that explains how we can deal with a hypergraph?
@ThePedroPimenta2 жыл бұрын
thank you very much!! this video helped me a lot!!! very interesting, didactic, and useful
@DeepFindr2 жыл бұрын
Happy that you liked it!
@pratikaher42892 жыл бұрын
Hey ! amazing videos !. Are you familiar with any MP-GNN type of architecture for heterogeneous graphs ?
@DeepFindr2 жыл бұрын
Hi! Thanks :) In theory, every homogenous model can be converted to a heterogenous model by simply treating the different edge types separately. In Pytorch Geometric there is also a function to_hetero(), which you can use to convert a model to the hetero setup. I plan to make a video on heterogenous graph learning some day in the future.
@MegaFly083 жыл бұрын
RNN is used as a form of aggregation to get good context vecor from last output fed in not used after aggregated
@zeyuanyin3 жыл бұрын
Amazing video! You give a wonderful presentation, can you share the slides?
@DeepFindr3 жыл бұрын
Sure, please send an email to deepfindr@gmail.com and I can share them with you :)
@ThePedroPimenta Жыл бұрын
Does anyone know if there is any implementation of a GNN layer that uses edge embeddings and updates them? I really need something like this for my project, but I can't seem to find it.
@chaupham11862 жыл бұрын
Great video with amazing references! Just one question on directed weighted graphs. How Graph Attention Networks (GATs) can be used in the case of 1-D edge features? In other words, any suggestions to combine 1-D edge features and edge attention weights?
@DeepFindr2 жыл бұрын
In the case of edge features, GAT can simply concatenate the source/target node features with the edge features. You can see this in detail in the GATConv layer of Pytorch geometric: pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.nn.conv.GATConv
@DeepFindr2 жыл бұрын
This is the most straight forward way to consider the edge features in the attention weights :)
@chaupham11862 жыл бұрын
@@DeepFindr Thanks for the quick reply! Keep up the good work. Looking forward to your new videos!
@kajij3 жыл бұрын
Very nice overview! Are there any sources that incorporate graph-level (global) features? I haven't found any paper besides the famous "Relational inductive biases, deep learning, and graph networks" by Peter W. Battaglia et al. But their deepmind graph-nets library lacks examples and probably requires a lot of tuning to the individual needs. btw are you to be found on a discord server for a chat? :) cheers and thanks again for your videos!
@DeepFindr3 жыл бұрын
Hi! Thanks! I haven't worked with global attributes so far. One trivial thing I could imagine is to connect all nodes with the global information. In my last video I talked a bit about creating global graph representations, but not incorporating them. I'm not too much on discord, but you can always send me a mail to deepfindr@gmail.com and we will figure something out :)
@duartesilva7907 Жыл бұрын
Hi, what a fantastic video!! You are a life savior ;)!
@DungPham-ai3 жыл бұрын
Great work ! Thank you for making this video!
@DeepFindr3 жыл бұрын
Sure! :)
@sftekin40408 ай бұрын
Thank you very much for this amazing video😊
@peixinwu46312 жыл бұрын
Hi, may I ask how to handle the string type edge feature ?
@DeepFindr2 жыл бұрын
Hi! You mean if you have text as edge features? If you only have a couple of edge types, you can one-hot encode them into a numeric representation. If you have lots of text, it's also possible to embed them into a vector using for example BERT. Hope this helps
@nouraboub48052 жыл бұрын
Thanks a lot for your explanation is the best 🌹
@egor_neo Жыл бұрын
That is really helpful! Thanks
@chunpeng8250 Жыл бұрын
You are my hero
@GPCImpulse2 жыл бұрын
Great video. Unless I missed you talking about this specifically, I assume the edge attr or edge weight tensor should be in the same order as the edge index? So if you had an edge index of ((0, 1), (1, 2)) and an edge weight of ((0.5), (.25)), then the edge from 0 to 1 would have a weight of 0.5 and the edge from 1 to 2 a weight of 0.25, correct?
@DeepFindr2 жыл бұрын
Yes exactly, the ordering is the same :)
@siddharthsharma40722 жыл бұрын
Just awesome
@zhema207 Жыл бұрын
Can the edge_attr attribute be used in all "PYG" generated graph structures? Without overriding the message function?
@7369392 жыл бұрын
7:43 Does it make sense to summarize retult over the relations? I think, it would be more intuitive to stack restuls according the relations, and not to sum them.
@DeepFindr2 жыл бұрын
You could also do that. This will however change the dimension (h x num_relations) unless you divide the size of h by the number of relations. However I have the feeling that the model automatically arranges the embeddings in such a way that it can handle sums. But of course you can easily adjust the layer as you proposed with only few changes :)
@arvin9117 Жыл бұрын
it's helpful, tks very much!
@codinghub33883 жыл бұрын
Amazing video ... thank you so very much . it's very helpful for beginners like me 🙂🙂
@DeepFindr3 жыл бұрын
Happy to hear! :)
@codinghub33883 жыл бұрын
@@DeepFindr please upload one video about mathematical formula with detail like Fourier transform etc.
@DeepFindr3 жыл бұрын
@@codinghub3388 in what context? For what do you need the Fourier stuff? The only deep learning related thing that comes to my mind is with audio data. I plan to make a video on that one day xD
@codinghub33883 жыл бұрын
@@DeepFindr I read a paper “A comprehensive Survey on Graph neural network “ you mentioned in video sir .. author mentioned Fourier transform in spectral based convGNNs.
@DeepFindr3 жыл бұрын
@@codinghub3388 Ahhh I see. Yeah sure I will note that down. So it will be a video about graph fourier transforms. But not sure when I can upload it as there are a couple of other things on my list :D
@lukeshchettri99453 жыл бұрын
For Relational GCN, you said that we need a different adjacency matrix for different relations. I am kinda confused about how to come up with such adjacency matrices. In your example: there are three different kinds of relations so we would have three different adjacency matrices, right? How are elements of the green adjacency matrix different from the value of the blue adjacency matrix?
@DeepFindr3 жыл бұрын
Hi, Yes regarding the example we would for instance have one adjacency matrix for friends that contains three "1"s and the rest is zero (per matrix triangular, so if it is symmetrical we have 6). That's because we have 3 bidirectional friends connections in the graph. For couple and colleague we have for each only one" 1" and the rest is zero (per triangular, so 2). For a code example check out this RGAT layer: github.com/microsoft/tf2-gnn/blob/master/tf2_gnn/layers/message_passing/rgat.py Hope it helps :)
@bassemsellami2 жыл бұрын
Hi! Thanks 🙏 for this video, that's so helpful! Please, I have a dataset with multiple edge features and I try to create a regression model to the prediction the value of one of the edge features. Please, can you help me with a code example ? I'm so thanks !
@DeepFindr2 жыл бұрын
Hi! You might want to have a look at this: kzbin.info/www/bejne/d4K4ZJSho8mopJY And maybe also this: kzbin.info/www/bejne/h32snIKqgLhnpdU :)
@bassemsellami2 жыл бұрын
@@DeepFindr Thank you a lot ! It's very helpful.
@钱诚-q3v3 жыл бұрын
Thank you for this video. I'm new to study trust network such as like or dislike. Does that apply to signed weighted directed network? For example, (Alice, Bob): -0.9 (Bob, Alice): +0.4.Thanks.
@DeepFindr3 жыл бұрын
Hi! Thx :) Sure you can model It like that :)
@lukeshchettri99453 жыл бұрын
Thanks for this very informative video. Is it a sensible to say that GATConv learns the edge features by itself and there isn't a way to add edge features in GATConv? Using the GNNs that you introduced in the video, we can include edge features and GNN can learn may be a better node embeddings with the help of the edge features?
@DeepFindr3 жыл бұрын
Hi! Thanks! No I would say adding edge features makes sense, especially if your edge features are multidimensional. Some libraries call the edge-type variant of GAT also Relational GAT (RGAT) - I have used it myself, it worked better in my case than the plain GAT. Edge features will add important information, so including them will certainly pretty much always improve the result :)
@DeepFindr3 жыл бұрын
Another way to include (multidimensional) edge features in GAT might be to input them into the attention mechanism. :)
@lukeshchettri99453 жыл бұрын
@@DeepFindr Thanks again! I couldn't find RGAT in PyG. Does it have some other name?
@DeepFindr3 жыл бұрын
I think it is not available in PyG :( I found it in this library: github.com/microsoft/tf2-gnn
@nastaranmarzban14192 жыл бұрын
Hi, hope you're doing well, I have a question, I'll be very thankfull if you answer me. Is there any graph neural network architecture that recieve multivariate dataset rather than graph-structured data as an input? If yes, how does the graph structure make from the multivariate dataset? I really need to know the answer of this question
@DeepFindr2 жыл бұрын
Hi! Have you seen my latest videos on how to convert a tabular dataset to a graph dataset? I think this is what you are looking for :)
@clayouyang21573 жыл бұрын
very nice video, thanks bro
@hunkim18803 жыл бұрын
First, thanks for the amazing videos about gnns. I'm trying to get similar datasets you've showed in 1:12, which have node features and edge features but not molecular datasets, but i couldn't find any. So can u suggest me some datasets with node features and edge features for node classification tasks? (If possible) Thanks!
@DeepFindr3 жыл бұрын
Hi! Thanks :) Have you checked pytorch-geometric.readthedocs.io/en/latest/modules/datasets.html? There is a description of a couple of datasets that are available in PyG. Other than that I can suggest to check different papers that use edge features, most of the time they use some public datasets. Finally you can also check out paperswithcode.com/datasets?mod=graphs&page=1 There are also many graph datasets. Hope this helps :)
@hunkim18803 жыл бұрын
@@DeepFindr Thanks for the quick reply! But i have seen thru those pages, but couldn't find that have 'multi dimensional edge features' except molecular datasets.. Am I missing something? I'm little new to gnns, so please excuse me
@DeepFindr3 жыл бұрын
Mhh, yes it's difficult to find them. I did some research and found this page: ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets There are a couple of datasets with multidim. Edges and several graphs. Other than that I don't know of any datasets with your specifications. Best regards :)
@hunkim18803 жыл бұрын
@@DeepFindr I just checked your comment and wow, you are an absolute lifesaver! Thanks for your gigantic effort!
@tianpuzhang88563 жыл бұрын
Great work! But i have a quick question about GCN. In this video, the first example, a adjacent matrix that you use to express the edge between two nodes is not symmetric. I mean that the weight of edge from A to B might be 5 ,but from B to A the weight of edge is 3. Does it matter for GCN that need the adjacent matrix must be a symmetric matrix ?
@DeepFindr3 жыл бұрын
Hi. No the adjacency matrix does not need to be symmetric. If it is symmetric you simply represent an undirected graph, that means your edges have no direction. If it is asymmetric however that means your the information can only flow along specific edges or a different amount can flow (if you have values other than 0 and 1)
@DeepFindr3 жыл бұрын
Regarding your example that would mean more information can flow from A to B then from B to A
@tianpuzhang88563 жыл бұрын
@@DeepFindr Thank you for your answer!
@khondokerhossain41532 жыл бұрын
Great explanations! I have one general query. I am implementing GCN for my research. But for my graphs, I have only edge weights/edge features not the node features. Is there any existing GCN implementation with only edge features in Pytorch Geometric or anywhere? Thanks
@DeepFindr2 жыл бұрын
Hi! Unfortunately I haven't seen any. A few ideas you might try: - Randomly initialize vectors on the nodes (as sort of dummies) and then use a GNN conv layer that includes edge features. This way the dummy node features are potentially updated through the edges. - If you only have edge weights you could also look into a method like Node2Vec, as it doesn't require node features - you could also put the edge features on the nodes by simply concatenating all outgoing edges for a node. As all node features need to have the same shape, you would need to pad the nodes with a lower degree (=number of connections)
@khondokermuradhossain88292 жыл бұрын
Thanks a lot for your detailed response. I am actually trying to do Graph Classification using GCN. My graphs are bipartile with only one type of nodes (actually they are the final 2 FC layers of CNNs). I tried to convert this to line graph as edge features become node features. But this method is not working well. I have to use another method for Graph Classification. I liked the first 2 ideas you mentioned. Please let me know if you have any other recommendations. Thanks
@CLABEATLE Жыл бұрын
Hello, I am trying to implement GCNs to have graphs representing a Whole-Slide Image, where every node corresponds to a patch of the image (its features), and I tried introducing the euclidean distance between 2 patches as the edge_feature. Should this distance be normalised, or can I just put the actual distance in pixels?
@DeepFindr Жыл бұрын
Hi, if you use edge weights I would normalize it between 0 and 1 (inverted), thus far away patches have 0 influence and close patches a big weight. If you use edge features however I think it's not that relevant as the model will transform them anyways. But you should definitely try out both, normalized and not :)
@pratikaher16632 жыл бұрын
@DeepFindr I am working on a project where I need to predict the strength of link between two any two nodes where the edge feature comes in dynamically during inference. Which approach would be best in predicting the strength of the link between two nodes after the graph has been trained on node-edge-node features ?
@pratikaher16632 жыл бұрын
Can we train the NN such that it optimizes for link strength ? I was hoping to get a value between 0-1 for link strength given two nodes.
@DeepFindr2 жыл бұрын
One thing that comes to my mind are attention coefficients. They indicate the importance between two nodes. It might be possible to use them as some sort of strength measurement. Besides that you can also define strenght based on the similarity of two node embeddings, for example by using cosine similarity as loss function. What do you mean by dynamic edge features?
@fhssoccerboy73 жыл бұрын
Thanks for the great video. I have a couple of questions. My understanding is that when the edge features are n-dimensional, the shape of edge_attr is (num_edge*n). In other words, when the shape of edge_attr is (num_edge*2), does it represent a weighted directed graph like the one mentioned in 5:30 ? Also, for a weighted undirected graph, does the shape of edge_attr become (num_edge*1)? I'm sorry my English is not good. I hope I can get an answer.
@DeepFindr3 жыл бұрын
Hello! No, the size of the edge features has nothing to do with if it is directed or not. Let's say you have a graph with num_edge=100. Internally for the GNN, each edge will be represented in both directions so (source, target) and (target, source). That's basically the full Adjacency matrix. So effectively you actually have 200 edges, each in both directions. The only difference between directed and undirected is that these two directions might be different, so for example (source, target) has edge features like [1,2,3,4] and (target, source) might have [5,6,7,8]. The edge feature dimension can then be 1, 2 or whatever your number of edge attributes is. Hope this answers the question
@fhssoccerboy73 жыл бұрын
@@DeepFindr Thanks so much for the reply! I see. So you're saying that the graph at 5:30 has 10 edges right? Also in this graph, do you mean that the shape of edge_attr is (10*1)?
@DeepFindr3 жыл бұрын
@@fhssoccerboy7 Hi! So generally it has 5 edges, but in the Dataset we would have 10, as we consider both directions. Yes correct, this graph has one-dirmensional edge features. As you say, the edge attribute matrix would be [10, 1]. For the example I give in the video it would be: (Alice, Bob): 0.9 (Bob, Alice): 0.4 ...
@fhssoccerboy73 жыл бұрын
@@DeepFindr I see, that makes perfect sense! Thank you so much for answering my rudimentary question!
@siddharthsharma40722 жыл бұрын
Thanks!
@gauravadlakha7793 жыл бұрын
great video!!!!! thanks
@kishorkukreja77332 жыл бұрын
Just wow
@estebansalami62743 жыл бұрын
awesome !!!!
@lucaslau83793 жыл бұрын
Can we use edge feature on GCNConv? Thanks.
@DeepFindr3 жыл бұрын
Hi! The plain GCNConv has an edge_weight attribute. That means you can use one-dimensional edge weights. Then there is also RGCN, which additionally allows to use one dimensional edge types. Besides these there is no option to use edge features in GCN for PyG.
@keeperofthelight96813 жыл бұрын
need code implementations please. theories are found everywhere but code implementations are nowhere to be found.
@DeepFindr3 жыл бұрын
Hi, have a look at: github.com/pyg-team/pytorch_geometric/tree/master/examples There are examples for everything you need. For example in the file rgcn.py is an implementation of one of the papers I mentioned. Also it's not very complicated, you just need to use the pytorch geometric layers and can use everything I talked about in the video.
@mdtokitahmid29703 жыл бұрын
Everything was nice and cute until the last minute 🥲 I was really thinking the guys your colleague 🙂
@DeepFindr3 жыл бұрын
Plot twist :D
@weichhsu5882 Жыл бұрын
@@DeepFindr No wonder I saw some of them when working with StyleGAN. That's a fantastic idea to use AI's work for your great videos!
@zyadh23993 жыл бұрын
How can this video have so little views...
@DeepFindr3 жыл бұрын
Haha appreciate it! Happy if the content is useful