Skip to content
프로젝트

xwhan/One-shot-Relational-Learning

GitHub에서 보기

소개

Code for One-shot Relational Learning for Knowledge Graphs (EMNLP18)

데이터 및 분석

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

One-Shot-Knowledge-Graph-Reasoning

PyTorch implementation of the One-Shot relational learning model described in our EMNLP 2018 paper One-Shot Relational Learning for Knowledge Graphs. In this work, we attempt to automatically infer new facts about a particular relation given only one training example. For instance, given the fact the "the Arlanda Airport is located in city Stochholm", the algorithm proposed in this papers tries to automatically infer that "the Haneda Airport is located in Tokyo" by utilizing the knowledge graph information about the involved entities (i.e. the Arlanda Airport, Stochholm, the Haneda Airport and Tokyo).

Method illustration

The main idea of this model is a matching network that encodes the one-hop neighbors of the involved entities, as defined in matcher.py.

Steps to run the experiments

Requirements

  • Python 3.6.5
  • PyTorch 0.4.1
  • tensorboardX
  • tqdm

Datasets

Pre-trained embeddings

Training

  • With random initialized embeddings: CUDA_VISIBLE_DEVICES=0 python trainer.py --max_neighbor 50 --fine_tune
  • With pretrained embeddings: CUDA_VISIBLE_DEVICES=0 python trainer.py --max_neighbor 50 --fine_tune --embed_model ComplEx

Visualization

tensorboard --logdir logs

Reference

@inproceedings{Xiong_Oneshot,
  author    = {Wenhan Xiong and
               Mo Yu and
               Shiyu Chang and
               Xiaoxiao Guo and
               William Yang Wang},
  title     = {One-Shot Relational Learning for Knowledge Graphs},
  booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural
               Language Processing, Brussels, Belgium, October 31 - November 4, 2018},
  pages     = {1980--1990},
  publisher = {Association for Computational Linguistics},
  year      = {2018},
  url       = {https://aclanthology.info/papers/D18-1223/d18-1223},
  timestamp = {Sat, 27 Oct 2018 20:04:50 +0200},
}

관련 프로젝트 살펴보기

불러오는 중…