Giter Club home page Giter Club logo

kgpool's Introduction

KGPool: Dynamic Knowledge Graph Context Selection for Relation Extraction

This is an implementation of the paper KGPool: Dynamic Knowledge Graph Context Selection for Relation Extraction, ACL Findings 2021.

@inproceedings{nadgeri-etal-2021-kgpool,
    title = "{KGP}ool: Dynamic Knowledge Graph Context Selection for Relation Extraction",
    author = "Nadgeri, Abhishek  and
      Bastos, Anson  and
      Singh, Kuldeep  and
      Mulang{'}, Isaiah Onando  and
      Hoffart, Johannes  and
      Shekarpour, Saeedeh  and
      Saraswat, Vijay",
    booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
    month = aug,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.findings-acl.48",
    doi = "10.18653/v1/2021.findings-acl.48",
    pages = "535--548",
}

alt tag

Acknowledgment

The Code base is built upon the following work -

Requirements

  • Python 3
  • torch>=1.8
  • torch-geometric>=1.8

Data

We use the same dataset and the entity attributes as used by the previous baseline RECON

Usage

First, download the datasets.

Train and evaluate the model:
(make sure Glove embeddings are ready before training)

wget http://nlp.stanford.edu/data/glove.6B.zip
unzip glove.6B.zip

Train

python Context-Aggregator/train.py

Testing

python Context-Aggregator/test.py

Directory structure

Context-Aggregator/: The same folder strucutre as that of GPGNN

KGPool/data_loader.py: Data pre-processing and gathering step.

KGPool/networks.py: Set the graph architecture.

KGPool/layers.py: Perform dynamic pooling on nodes.

Hyper Parameters

  • For Context-Aggregator we use the same hyper-parameters used by the baseline.
  • For KGPool we use the defualt params in Context-Aggregator/train.py.
  • No systematic hyper-parameter tunning was performed.

kgpool's People

Contributors

nadgeri14 avatar

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.