tensorflow/neural-structured-learning

link prediction?

ggerogiokas opened this issue · 9 comments

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

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.

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

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

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
.

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

@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.

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

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