Code for "Graph-Evolving Meta-Learning for Low-Resource Medical Dialogue Generation". [AAAI 2021]

Overview

Graph Evolving Meta-Learning for Low-resource Medical Dialogue Generation

Code to be further cleaned...

This repo contains the code of the following paper:

Graph Evolving Meta-Learning for Low-resource Medical Dialogue Generation

Shuai Lin, Pan Zhou, Xiaodan Liang, Jianheng Tang, Ruihui Zhao, Ziliang Chen, Liang Lin.
AAAI 2021

Prerequisites

  1. Allennlp (0.9.1-unreleased)

  2. pytorch == 1.4.0

  3. Others should be found in ./allennlp/requirements.txt

[Note]: You need to install allennlp with the editable mode, i.e.,

cd ./allennlp
pip install --editable .
cd ..

since we have modified this toolkit (including added the metatrainer.py in the directory ./allennlp/training and so on).

Datasets

Please download both datasets from the google drive as follows:

wget https://drive.google.com/file/d/1KZ0CrIVZhSLxlZ-V5pnksvgH1xlyd54F/view?usp=sharing
tar zxvf cy.tar.gz
wget https://drive.google.com/file/d/1sZzb3Nzm_Z37lNCfgusJscFuiyhUON5j/view?usp=sharing
tar zxvf fd.tar.gz
  1. CMDD: The directory fd/dis_pk_dir, which includes raw_data, meta_train and meta_test. (The number of the file name represents the ID of a disease.) You can also obtain it at the link

  2. MDG-Chunyu: The directory cy/dis_pk_dir, which also includes the raw_data, meta_train and meta_test. The ID of diseases and symptoms are recorded in the user_dict.txt. The disease IDs are as follows:

{
  '胃炎': 2,
  '普通感冒': 13,
  '肺炎': 73,
  '便秘': 6,
  '胃肠功能紊乱': 42,
  '肠炎': 9,
  '肠易激综合征': 40,
  '食管炎': 27,
  '胃溃疡': 30,
  '阑尾炎': 35,
  '胆囊炎': 33,
  '胰腺炎': 48,
  '肠梗阻': 52,
  '痔疮': 18,
  '肝硬化': 46,
}

Quick Start

Most of the running commands are written in the script run.sh, which follows the offical train/fine-tune/evaluate way of the allennlp. Take the following one as an example:

[1]. Training:

CUDA_VISIBLE_DEVICES=1 allennlp train -s $save_directory$ \
  $config_file(.json)$ \
  --include-package $model_file$

[2]. Fine-tuning:

CUDA_VISIBLE_DEVICES=1 allennlp fine-tune -m $old save_directory$ \
  -c $config_file(.json)$ \
  --include-package $model_file$
  -s $new save_directory$

[3]. Testing:

CUDA_VISIBLE_DEVICES=3 allennlp evaluate  $new save_directory$ \
  $test_data$ \
  --include-package $model_file$ \
  --output-file $output_directory$
Owner
Shuai Lin
Master student @sysu, mainly focus on ML/NLP.
Shuai Lin
FedCV: A Federated Learning Framework for Diverse Computer Vision Tasks

FedCV: A Federated Learning Framework for Diverse Computer Vision Tasks Image Classification Dataset: Google Landmark, COCO, ImageNet Model: Efficient

FedML-AI 62 Dec 10, 2022
This Deep Learning Model Predicts that from which disease you are suffering.

Deep-Learning-Project This Deep Learning Model Predicts that from which disease you are suffering. This Project Covers the Topics of Deep Learning Int

Jai Viral Doshi 0 Jan 20, 2022
Official repository of IMPROVING DEEP IMAGE MATTING VIA LOCAL SMOOTHNESS ASSUMPTION.

IMPROVING DEEP IMAGE MATTING VIA LOCAL SMOOTHNESS ASSUMPTION This is the official repository of IMPROVING DEEP IMAGE MATTING VIA LOCAL SMOOTHNESS ASSU

电线杆 14 Dec 15, 2022
Spatially-Adaptive Pixelwise Networks for Fast Image Translation, CVPR 2021

Image Translation with ASAPNets Spatially-Adaptive Pixelwise Networks for Fast Image Translation, CVPR 2021 Webpage | Paper | Video Installation insta

Tamar Rott Shaham 100 Dec 28, 2022
Message Passing on Cell Complexes

CW Networks This repository contains the code used for the papers Weisfeiler and Lehman Go Cellular: CW Networks (Under review) and Weisfeiler and Leh

Twitter Research 108 Jan 05, 2023
Soomvaar is the repo which 🏩 contains different collection of 👨‍💻🚀code in Python and 💫✨Machine 👬🏼 learning algorithms📗📕 that is made during 📃 my practice and learning of ML and Python✨💥

Soomvaar 📌 Introduction Soomvaar is the collection of various codes implement in machine learning and machine learning algorithms with python on coll

Felix-Ayush 42 Dec 30, 2022
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations

ALBERT ***************New March 28, 2020 *************** Add a colab tutorial to run fine-tuning for GLUE datasets. ***************New January 7, 2020

Google Research 3k Jan 01, 2023
[ACL 20] Probing Linguistic Features of Sentence-level Representations in Neural Relation Extraction

REval Table of Contents Introduction Overview Requirements Installation Probing Usage Citation License 🎓 Introduction REval is a simple framework for

13 Jan 06, 2023
Numba-accelerated Pythonic implementation of MPDATA with examples in Python, Julia and Matlab

PyMPDATA PyMPDATA is a high-performance Numba-accelerated Pythonic implementation of the MPDATA algorithm of Smolarkiewicz et al. used in geophysical

Atmospheric Cloud Simulation Group @ Jagiellonian University 15 Nov 23, 2022
Continual reinforcement learning baselines: experiment specifications, implementation of existing methods, and common metrics. Easily extensible to new methods.

Continual Reinforcement Learning This repository provides a simple way to run continual reinforcement learning experiments in PyTorch, including evalu

55 Dec 24, 2022
Fast Differentiable Matrix Sqrt Root

Official Pytorch implementation of ICLR 22 paper Fast Differentiable Matrix Square Root

YueSong 42 Dec 30, 2022
A pytorch implementation of faster RCNN detection framework (Use detectron2, it's a masterpiece)

Notice(2019.11.2) This repo was built back two years ago when there were no pytorch detection implementation that can achieve reasonable performance.

Ruotian(RT) Luo 1.8k Jan 01, 2023
The code release of paper 'Domain Generalization for Medical Imaging Classification with Linear-Dependency Regularization' NIPS 2020.

Domain Generalization for Medical Imaging Classification with Linear Dependency Regularization The code release of paper 'Domain Generalization for Me

Yufei Wang 56 Dec 28, 2022
HDMapNet: A Local Semantic Map Learning and Evaluation Framework

HDMapNet_devkit Devkit for HDMapNet. HDMapNet: A Local Semantic Map Learning and Evaluation Framework Qi Li, Yue Wang, Yilun Wang, Hang Zhao [Paper] [

Tsinghua MARS Lab 421 Jan 04, 2023
Real-Time Multi-Contact Model Predictive Control via ADMM

Here, you can find the code for the paper 'Real-Time Multi-Contact Model Predictive Control via ADMM'. Code is currently being cleared up and optimize

17 Dec 28, 2022
This project provides an unsupervised framework for mining and tagging quality phrases on text corpora with pretrained language models (KDD'21).

UCPhrase: Unsupervised Context-aware Quality Phrase Tagging To appear on KDD'21...[pdf] This project provides an unsupervised framework for mining and

Xiaotao Gu 146 Dec 22, 2022
The official implementation for ACL 2021 "Challenges in Information Seeking QA: Unanswerable Questions and Paragraph Retrieval".

Code for "Challenges in Information Seeking QA: Unanswerable Questions and Paragraph Retrieval" (ACL 2021, Long) This is the repository for baseline m

Akari Asai 25 Oct 30, 2022
Codes for “A Deeply Supervised Attention Metric-Based Network and an Open Aerial Image Dataset for Remote Sensing Change Detection”

DSAMNet The pytorch implementation for "A Deeply-supervised Attention Metric-based Network and an Open Aerial Image Dataset for Remote Sensing Change

Mengxi Liu 41 Dec 14, 2022
This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras)

Yogi-Optimizer_Keras This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras) The NeurIPS-Paper can be found here: http://papers.nips.c

14 Sep 13, 2022
A hyperparameter optimization framework

Optuna: A hyperparameter optimization framework Website | Docs | Install Guide | Tutorial Optuna is an automatic hyperparameter optimization software

7.4k Jan 04, 2023