Live data from Hacker News

A Gentle Introduction to Graph Neural Networks (2021)

distill.pub

31–36 of 36 posts

Re: A Gentle Introduction to Graph Neural Networks (2021)

#31

There are a lot of papers using GNNs for physics simulations (e.g. computational fluid dynamics) because the unstructured meshes used to discretize the problem domain for such applications map very neatly to a graph structure. In practice, every such mesh/graph is used once to solve a particular problem. Hence it makes little sense to train a GNN for a specific graph. However, that's exactly what most papers did beca…

Naive question: Words in sentences kinda forms graphs, referencing other words or are leafs being referenced, both inside sentences and between sentences. Given the success of the attention mechanism in modern LLMs, how well would they do if you trained a LLM to process an actual graph? I guess you'd need some alternate tokenizer for optimal performance.

That's the kind of thing that I could imagine could dramatically speed up certain tasks, but not enable particularly new abilities. A ton of the challenge is converting a sequence into a graph. So if you need a huge clever model to turn a sequence into a graph, then your potential gain downstream is either a) in making certain computationally hard queries easier, or b) answering tons and tons of followup queries dramatically faster (enough to make the initial graphification overhead okay).

For (a), any imperfections in the graphification make the problem super hard and researchy.

Re: A Gentle Introduction to Graph Neural Networks (2021)

#32
I feel very dumb. There is an example on that page with 4 nodes (a,b,c,d) and it shows a total of 24 possible combinations.

What is the generalised formula for calculating this, given the number of nodes but also edges need to be considered.

It doesn't appear to be explained in the article. I think it may be a factorial?

Re: A Gentle Introduction to Graph Neural Networks (2021)

#34
post #32

I feel very dumb. There is an example on that page with 4 nodes (a,b,c,d) and it shows a total of 24 possible combinations. What is the generalised formula for calculating this, given the number of nodes but also edges need to be considered. It doesn't appear to be explained in the article. I think it may be a factorial?

i think one could use a binomial coefficient to do this or nested binomials

like (n choose 4)

maybe multiply the binomial by 2 because each edge can be present or absence in vertices

Re: A Gentle Introduction to Graph Neural Networks (2021)

#36
post #32

I feel very dumb. There is an example on that page with 4 nodes (a,b,c,d) and it shows a total of 24 possible combinations. What is the generalised formula for calculating this, given the number of nodes but also edges need to be considered. It doesn't appear to be explained in the article. I think it may be a factorial?

Combinatorial can be quickly calculated primarily using factorials. 4 possible options, each where you're picking all 4 exactly once is 4!. The reasoning is pretty intuitive, when you start selecting there are four options, when you go to pick the next one there are 3 left in the pool, then 2, and finally 1. This turns into 4 * 3 * 2 * 1 = 24.

This site seems to have a pretty good overview of them if you'd like to become more familiar: https://www.geeksforgeeks.org/mathematics-combinatorics-basi...

Post reply on HN