gnn icon indicating copy to clipboard operation
gnn copied to clipboard

Link Detection

Open TimSchmeier opened this issue 2 years ago • 6 comments

Hi,

Sorry if I've missed it but I'm looking for examples or docs around building a gnn for link detection. The docs that I've found center around node / context classification. Is link classification supported? Are there examples available for this sort of task using tf-gnn yet?

Thanks, Tim

TimSchmeier avatar Sep 15 '22 20:09 TimSchmeier

Hi @TimSchmeier , thanks for reaching out!

TF-GNN does support building GNNs suitable for link prediction/detection/classification. For a demonstration of an advanced model on a toy dataset, please see our shortest-path colab. TF-GNN's modeling guide talks about using edge states in addition to just node states.

That said, the end-to-end examples shipped with TF-GNN initially focus on node classification, and the graph sampler tool caters to that.

Let's keep this open as a feature request for a link prediction demo on a serious dataset. (No promises of timeline.)

arnoegw avatar Sep 16 '22 06:09 arnoegw

Sounds good, I'll take a look. If I can figure it out I'll open a PR for a notebook.

TimSchmeier avatar Sep 16 '22 13:09 TimSchmeier

@arnoegw Is this enchancemnet still open? Would be willing to contribute.

mach-12 avatar Dec 12 '23 03:12 mach-12

Hi @mach-12

We have limited support for link prediction in 1.0 as

  • experimental sampling: experimental/sampler/link_samplers.py to create sampling model and in tfgnn_sampler tool, see tensorflow_gnn/sampler/sampling_spec.proto:SymmetricLinkSeedOp. Documentation is coming in 1.1.

  • runner: tensorflow_gnn/runner/tasks/link_prediction.py

aferludin avatar Dec 21 '23 10:12 aferludin

hi @mach-12 ,

I just wanted to mention that we love to see contributions of different model types that use TF-GNN. But we hesitate in incorporating them to the main repo, because of maintenance concerns.

If you are interested in doing a link prediction (detection) GNN model, I was going to suggest to create your own repository, and we'll add in our home (README.md file) a section on contributed models and link to it, with a description line.

Contributed models that become very popular / asked for, we could move to the main repo, attributing clearly proper credit to the author(s).

cheers

janpfeifer avatar Dec 21 '23 11:12 janpfeifer

Thank you. Going to go along with that.

mach-12 avatar Dec 21 '23 11:12 mach-12