Coder Social home page Coder Social logo

manoj98 / improving-question-answering-with-external-context-fusion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pchoudhary23/knowledge-graph-and-language-model-for-question-answering-system

1.0 0.0 0.0 1.51 MB

Question answering system based on QA-GNN architecture with utilization of external context. QA-GNN involves using language models(LMs) to encode QA context and retrieve a knowledge subgraph (KG) from the QA entities. The joint representation of QA context and KG sub graph is passed through graph neural network(GNN) module for reasoning.

Shell 1.16% Python 89.68% Jupyter Notebook 9.16%

improving-question-answering-with-external-context-fusion's Introduction

Question-Answering-using-QA-GNN-with-external-context-fusion

The project was completed as part of the CSE6240 course at Georgia Tech. It was completed while working with Palash Choudhary, Sanchita Porwal, and Shreyas Verma.

The final project report can be found here: Link

The final project presentation can be found here: Link

The result of the project is a question-answering system based on a QA-GNN architecture with the utilization of external context. QA-GNN involves using language models (LMs) to encode QA context and retrieve a knowledge subgraph (KG) from the QA entities. The joint representation of the QA context and the KG subgraph is passed through the graph neural network (GNN) module for reasoning. The final model incorporates language understanding through LMs, structured reasoning through KGs, and external context on LM entities through knowledge facts.

APPROACH 1 : LM-ONLY QA MODEL

lm_only

Fig 1: LM Architecture

This approach only utilizes LM models for question-answering problems.

  • Run LMQA_final.ipynb

APPROACH 2 : QAGNN [LM+KG QA MODEL]

lm_only

Fig 2: QA-GNN Architecture

This approach implements the QA-GNN model for question-answering problems.

Step 1 : COMPUTE USED

2 RTX-6000 GPUs [Cuda 11.7.0]

Step 2 : CREATE ENVIRONMENT**

conda create -n qagnn python=3.7 source activate qagnn pip install torch -f https://download.pytorch.org/whl/torch_stable.html pip install transformers==3.4.0 pip install nltk spacy==2.1.6 python -m spacy download en pip install torch-sparse torch-geometric torch-scatter -f https://pytorch-geometric.com/whl/torch-{torch.__version__}.html

Step 4 : DOWNLOAD RAW DATA

./ download_raw_data.sh

Step 3 : CREATE PREPROCESSED DATA

python preprocess.py

Step 4 : RUN BASH FILE

./ run_qagnn__obqa.sh

  • Check saved_model folder for epoch-wise predictions on test and metric csv
  • Check logs/ for training status.

Results

Below are few examples highlighting the impact of incorporating external context (knowledge facts) in question-answering task. The final model is a QA-GNN with additional external context.

lm_only

Fig 3: Sample Question 1 deep-dive

lm_only

Fig 4: Sample Question 2 deep-dive

improving-question-answering-with-external-context-fusion's People

Contributors

pchoudhary23 avatar manoj98 avatar

Stargazers

 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.