tensorflow / neural-structured-learning

Training neural models with structured signals.
https://www.tensorflow.org/neural_structured_learning
Apache License 2.0
980 stars 189 forks source link

link prediction? #33

Closed ggerogiokas closed 3 years ago

ggerogiokas commented 4 years ago

Hi,

I have been thinking about using NSL in the context of link prediction. It can definitely be reframed as a classification problem I believe. The only thing I am wondering about is if anyone has thought of an elegant way to add the neighbours (I guess in this case of both nodes which form the link ). Has anyone been working on this?

I guess a decent way of going about it would be changing the parse_example function:

def parse_example(example_proto):
  """Extracts relevant fields from the `example_proto`.

  Args:
    example_proto: An instance of `tf.train.Example`.

  Returns:
    A pair whose first value is a dictionary containing relevant features
    and whose second value contains the ground truth labels.
  """

so, that it can take a pair of examples which are part of a link.

Thanks, George

DualityGap commented 4 years ago

Hi George,

Yes, modifying 'parse_example' (or design other functions) to return a pair of examples sounds feasible. Happy to discuss further if you have any thought/suggestion.

Cheers, Da-Cheng.

ggerogiokas commented 4 years ago

Hi Da-Cheng,

Cool, I think I will go with modifying the function, parse_example, to get another function, parse_link, and try to design some other function to grab associated neighbours of the link.

I can contribute the code once it's functional if that is of interest?

Cheers, George

DualityGap commented 4 years ago

Sounds great : ) Meanwhile, feel free to share your idea or implementation (even at early stage), happy to discuss.

ppham27 commented 4 years ago

Another approach we could take is to generalize preprocessing/parsing tools to generate random walks instead of just neighbors.

This would enable us to do combine NSL with graph likelihood defined here Learning Edge Representations via Low-Rank Asymmetric Projections .

ggerogiokas commented 4 years ago

@ppham27 yea, that definitely could be another option but will focus on the other approach first.

arjung commented 4 years ago

@ggerogiokas, thanks for your interest in NSL! I am assigning this issue to you for now since you are prototyping the proposed approach(es). Feel free to pass it back to us once you have something or want to discuss more.

sdabhi23 commented 4 years ago

@ggerogiokas I am also interested in this aspect of NSL. Did you make any progress on this idea??

ggerogiokas commented 4 years ago

Hi,

Yea unfortunately, I have this low on my priority list. Haven't had time to do this! Though one simple thing you can do is just treat edge embeddings as node embeddings and then you have to redefine the network.

George

On Sun, 26 Apr 2020, 10:56 Shrey, notifications@github.com wrote:

@ggerogiokas https://github.com/ggerogiokas I am also interested in this aspect of NSL. Did you make any progress on this idea??

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/neural-structured-learning/issues/33#issuecomment-619520801, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAOA5QZDCV3ZAMDSGGDCVDROQALFANCNFSM4JJAJEYA .

csferng commented 3 years ago

Closing this issue for now due to inactivity. Feel free to reopen if you have any progress or updates on the link prediction idea.