Giter Site home page Giter Site logo

Comments (5)

johnnyjana730 avatar johnnyjana730 commented on June 4, 2024 1

I am also interested to that question. Have you tried to randomly assign self.A_in and then try to call _create_xxx_embed() again to generate ua_embeddings, ea_embeddings?

from knowledge_graph_attention_network.

ljch2018 avatar ljch2018 commented on June 4, 2024 1

I think @chengaojie0011 is right. Because self.A_in is not a placeholder in graph, the assignment will not work, and never affect the network.

self.A_in = sp.coo_matrix((new_A_values, (rows, cols)), shape=(self.n_users + self.n_entities,
self.n_users + self.n_entities))

if you set this exactly self.A_in to zero or one, the performance of the model will stay unchanged.

from knowledge_graph_attention_network.

xiangwang1223 avatar xiangwang1223 commented on June 4, 2024

Sorry for the late reply after the busy weeks.

  • Please distinguish the self.A_values, which is set as a placeholder, and self.A_in, which is used to feed the values of self.A_values.
  • I have tested the code and show the value in self.A_in (the first 20 values for limited space) in the following picture. As the figure shows, the self.A_in is updated as the epoch increases.
    image

Hope this is helpful for you @chengaojie0011 @johnnyjana730 .

from knowledge_graph_attention_network.

chengaojie0011 avatar chengaojie0011 commented on June 4, 2024

Sorry for the late reply after the busy weeks.

  • Please distinguish the self.A_values, which is set as a placeholder, and self.A_in, which is used to feed the values of self.A_values.
  • I have tested the code and show the value in self.A_in (the first 20 values for limited space) in the following picture. As the figure shows, the self.A_in is updated as the epoch increases.
    image

Hope this is helpful for you @chengaojie0011 @johnnyjana730 .

Many thanks for your kind reply. The value of self.A_in has updated in class KGAT(object), but it doesn't update in the model because Tensorflow builds a static graph before a model can run.
I'm not sure If I've explained this problem clearly. If you try to replace self.A_in with any value, you may find the model will still work, and the results of the model also not change.

from knowledge_graph_attention_network.

xiangwang1223 avatar xiangwang1223 commented on June 4, 2024

I have tested three variants, setting self.A_in's values as all zeros, all ones, and random values. The training performance is shown as follows:

  • all-ones
    image

  • all-zeros
    image

  • randoms
    image

Some observations:

  1. The results of three variants w.r.t. four evaluation metrics are different. It thus verifies that the model.update_attentive_A works.
  2. However, the differences are not that significant. We attribute this to some possible reasons: (1) the attention values are iteratively updated, rather than jointly updated with the other parameters. (2) simply applying the attention networks is insufficient to model the relational information. We have an ongoing work towards solving these issues and will later release the code when the work is finished.

Hope this is helpful. Thanks for your insightful comments.

from knowledge_graph_attention_network.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.