All Projects → shehzaadzd → Minerva

shehzaadzd / Minerva

Licence: apache-2.0
Meandering In Networks of Entities to Reach Verisimilar Answers

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Minerva

Demos
Some JavaScript works published as demos, mostly ML or DS
Stars: ✭ 55 (-73.17%)
Mutual labels:  natural-language-processing, reinforcement-learning
Deep Learning Drizzle
Drench yourself in Deep Learning, Reinforcement Learning, Machine Learning, Computer Vision, and NLP by learning from these exciting lectures!!
Stars: ✭ 9,717 (+4640%)
Mutual labels:  natural-language-processing, reinforcement-learning
Nlg Rl
Accelerated Reinforcement Learning for Sentence Generation by Vocabulary Prediction
Stars: ✭ 59 (-71.22%)
Mutual labels:  natural-language-processing, reinforcement-learning
Conversational Ai
Conversational AI Reading Materials
Stars: ✭ 34 (-83.41%)
Mutual labels:  natural-language-processing, reinforcement-learning
Nlp4rec Papers
Paper list of NLP for recommender systems
Stars: ✭ 162 (-20.98%)
Mutual labels:  knowledge-graph, natural-language-processing
Blocks
Blocks World -- Simulator, Code, and Models (Misra et al. EMNLP 2017)
Stars: ✭ 39 (-80.98%)
Mutual labels:  natural-language-processing, reinforcement-learning
Applied Ml
📚 Papers & tech blogs by companies sharing their work on data science & machine learning in production.
Stars: ✭ 17,824 (+8594.63%)
Mutual labels:  natural-language-processing, reinforcement-learning
Coursera
Quiz & Assignment of Coursera
Stars: ✭ 774 (+277.56%)
Mutual labels:  natural-language-processing, reinforcement-learning
Pytextrank
Python implementation of TextRank for phrase extraction and summarization of text documents
Stars: ✭ 1,675 (+717.07%)
Mutual labels:  knowledge-graph, natural-language-processing
Tensorflow Nlp
NLP and Text Generation Experiments in TensorFlow 2.x / 1.x
Stars: ✭ 1,487 (+625.37%)
Mutual labels:  knowledge-graph, natural-language-processing
Knowledge Graphs
A collection of research on knowledge graphs
Stars: ✭ 845 (+312.2%)
Mutual labels:  knowledge-graph, natural-language-processing
Kbgan
Code for "KBGAN: Adversarial Learning for Knowledge Graph Embeddings" https://arxiv.org/abs/1711.04071
Stars: ✭ 186 (-9.27%)
Mutual labels:  knowledge-graph, reinforcement-learning
Ciff
Cornell Instruction Following Framework
Stars: ✭ 23 (-88.78%)
Mutual labels:  natural-language-processing, reinforcement-learning
Notes
The notes for Math, Machine Learning, Deep Learning and Research papers.
Stars: ✭ 53 (-74.15%)
Mutual labels:  natural-language-processing, reinforcement-learning
Chatbot cn
基于金融-司法领域(兼有闲聊性质)的聊天机器人,其中的主要模块有信息抽取、NLU、NLG、知识图谱等,并且利用Django整合了前端展示,目前已经封装了nlp和kg的restful接口
Stars: ✭ 791 (+285.85%)
Mutual labels:  knowledge-graph, reinforcement-learning
Kgpolicy
Reinforced Negative Sampling over Knowledge Graph for Recommendation, WWW2020
Stars: ✭ 83 (-59.51%)
Mutual labels:  knowledge-graph, reinforcement-learning
Dl Nlp Readings
My Reading Lists of Deep Learning and Natural Language Processing
Stars: ✭ 656 (+220%)
Mutual labels:  natural-language-processing, reinforcement-learning
Machine learning examples
A collection of machine learning examples and tutorials.
Stars: ✭ 6,466 (+3054.15%)
Mutual labels:  natural-language-processing, reinforcement-learning
Open Semantic Entity Search Api
Open Source REST API for named entity extraction, named entity linking, named entity disambiguation, recommendation & reconciliation of entities like persons, organizations and places for (semi)automatic semantic tagging & analysis of documents by linked data knowledge graph like SKOS thesaurus, RDF ontology, database(s) or list(s) of names
Stars: ✭ 98 (-52.2%)
Mutual labels:  knowledge-graph, natural-language-processing
Data Science Toolkit
Collection of stats, modeling, and data science tools in Python and R.
Stars: ✭ 169 (-17.56%)
Mutual labels:  natural-language-processing, reinforcement-learning

MINERVA

Meandering In Networks of Entities to Reach Verisimilar Answers

Code and models for the paper Go for a Walk and Arrive at the Answer - Reasoning over Paths in Knowledge Bases using Reinforcement Learning

MINERVA is a RL agent which answers queries in a knowledge graph of entities and relations. Starting from an entity node, MINERVA learns to navigate the graph conditioned on the input query till it reaches the answer entity. For example, give the query, (Colin Kaepernick, PLAYERHOMESTADIUM, ?), MINERVA takes the path in the knowledge graph below as highlighted. Note: Only the solid edges are observed in the graph, the dashed edges are unobsrved. gif gif courtesy of Bhuvi Gupta

Requirements

To install the various python dependencies (including tensorflow)

pip install -r requirements.txt

Training

Training MINERVA is easy!. The hyperparam configs for each experiments are in the configs directory. To start a particular experiment, just do

sh run.sh configs/${dataset}.sh

where the ${dataset}.sh is the name of the config file. For example,

sh run.sh configs/countries_s3.sh

Testing

We are also releasing pre-trained models so that you can directly use MINERVA for query answering. They are located in the saved_models directory. To load the model, set the load_model to 1 in the config file (default value 0) and model_load_dir to point to the saved_model. For example in configs/countries_s2.sh, make

load_model=1
model_load_dir="saved_models/countries_s2/model.ckpt"

Output

The code outputs the evaluation of MINERVA on the datasets provided. The metrics used for evaluation are [email protected]{1,3,5,10,20} and MRR (which in the case of Countries is AUC-PR). Along with this, the code also outputs the answers MINERVA reached in a file.

Code Structure

The structure of the code is as follows

Code
├── Model
│    ├── Trainer
│    ├── Agent
│    ├── Environment
│    └── Baseline
├── Data
│    ├── Grapher
│    ├── Batcher
│    └── Data Preprocessing scripts
│            ├── create_vocab
│            ├── create_graph
│            ├── Trainer
│            └── Baseline

Data Format

To run MINERVA on a custom graph based dataset, you would need the graph and the queries as triples in the form of (e1,r, e2). Where e1, and e2 are nodes connected by the edge r. The vocab can of the dataset can be created using the create_vocab.py file found in data/data preprocessing scripts. The vocab needs to be stores in the json format {'entity/relation': ID}. The following shows the directory structure of the Kinship dataset.

kinship
    ├── graph.txt
    ├── train.txt
    ├── dev.txt
    ├── test.txt
    └── Vocab
            ├── entity_vocab.json
            └── relation_vocab.json

Citation

If you use this code, please cite our paper

@inproceedings{minerva,
  title = {Go for a Walk and Arrive at the Answer: Reasoning Over Paths in Knowledge Bases using Reinforcement Learning},
  author = {Das, Rajarshi and Dhuliawala, Shehzaad and Zaheer, Manzil and Vilnis, Luke and Durugkar, Ishan and Krishnamurthy, Akshay and Smola, Alex and McCallum, Andrew},
  booktitle = {ICLR},
  year = 2018
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].