Giter Site home page Giter Site logo

soledad921 / atise Goto Github PK

View Code? Open in Web Editor NEW
59.0 59.0 10.0 11.96 MB

The source code of ISWC2020 paper "Temporal Knowledge Graph completion based on time series Gaussian embedding " and COLING2020 paper "TeRo: A Time-aware Knowledge Graph Embedding via Temporal Rotation "

License: MIT License

Python 100.00%

atise's People

Contributors

soledad921 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atise's Issues

Loss is nan

I run the following,the loss of training is nan. Could you tell me why?
python Main.py --model ATISE --dataset icews14 --dim 500 --lr 0.00003 --gamma 120 --loss logloss --timedisc 0 --cuda True --gran 3 --cmin 0.003

What is this formula

    out1 = torch.sum((h_var+t_var)/r_var, 1)+torch.sum(((r_mean-h_mean+t_mean)**2)/r_var, 1)-self.embedding_dim
    out2 = torch.sum(r_var/(h_var+t_var), 1)+torch.sum(((h_mean-t_mean-r_mean)**2)/(h_var+t_var), 1)-self.embedding_dim
    out = (out1+out2)/4

About negative samples

In your paper TeRo, you have said "In this paper, we use the same loss function as the negative sampling loss proposed in (Sun et al.,2019) for optimizing our model."

But in your code (shared), I can only find a simple random negative sampling method # ( Line 80-140 in Train.py)

How do you think about the adversarial negative sampling method used in RotatE (Sun et al.,2019)?

About year_list

Dear soledad921:
Thank you very much for sharing. I have a question, when you are processing the YAGO dataset, I noticed that in Dataset_YG.py, you commented out the two lines of code:
104 # for i in range(start,end):
105 # year_list.append(i)
I also think that the years between the start time and the end time should be counted in the year_list, but this will greatly increase the year_list, and it will also lead to a sharp increase in the effective facts in each year. What I want to know is, what made you add those two lines of code and then comment them out?

About inverse relation and Testing in both directions

Thank you very much for sharing. I have some questions.

  1. I find that you use the inverse relationship and you corrupted head entity and tail entity to generate negative samples. Theoretically, you can use inverse relationship and only corrupted tail entity of each sample. For example, one sample is (Bob, is father of ,John), and it sample with inverse relationship is (John, {is father of }^{-1}, Bob). The effect of corrupt the tails of (Bob, is father of ,John) and (John, {is father of }^{-1}, Bob) is same as corrupt head entity and tail entity of (Bob, is father of ,John) .
  2. I find you only use inverse relationship in training set. Why not use it in test set and verification set?

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.