Git Product home page Git Product logo

ukgebert's Introduction

UKGE based on BERT

Uncertain Knowledge Graphs Embedding is implemented by means of BERT pretrained natural language model. Exploring approximate inference on the embedding space. Considering the commonsense reasoning based on these works.

Environment require

Uncertain Knowledge Graphs datasets for benchmark

In data directory, train.tsv is the training data, test.tsv the testing data and val.tsv the validation data.

dataset entities relations facts average of confidence standard deviation ratio of facts/relations
CN15k 15,000 36 234,675 0.627 0.234 15.6
PPI5k 4,999 7 271,666 0.415 0.213 54.3

Comparison

The unit of all values on MSE and MAE is 10$^{-2}$. "-" means the corresponding data did not report in literatures.

dataset CN15k PPI5k
metricsMSEMAEepochsMSEMAEepochs
URGE10.3222.72-1.446.00-
UKGE$_{rect}$8.6119.90>1000.953.79>100
UKGE$_{logi}$9.8620.74>1000.964.07>100
UKG$_s$E7.7121.34190.985.9880
UKGE$_{bert}$6.6119.320.855.3875

Run

python.exe ./prediction.py
Using Theano backend.
Model: "bert_fine_tuning_UKGE"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lstm_1 (LSTM)                (None, 768)               4721664   
_________________________________________________________________
dense_1 (Dense)              (None, 1)                 769       
=================================================================
Total params: 4,722,433
Trainable params: 4,722,433
Non-trainable params: 0
_________________________________________________________________
...

Prediction for (HEAD, ?relation?, TAIL) RANKING:
Head = ' car '
Tail = ' people '
  
      relation candidate 1 = ('hasa', 0.8294004)
      relation candidate 2 = ('usedfor', 0.760266) *
      relation candidate 3 = ('createdby', 0.65154946)
      relation candidate 4 = ('definedas', 0.63723207)
      relation candidate 5 = ('atlocation', 0.6002464)

Under working

The project is under working. We are very sorry for any trouble to you. You are welcome to put forward your valuable opinions by comments.

ukgebert's People

Contributors

shihanyang avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

yingzhang-x

ukgebert's Issues

#请求文件

您好,src文件夹下的nDCG文件可以请您公布一下吗?

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.