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
Unified unsupervised and semi-supervised domain adaptation network for cross-scenario face anti-spoofing, Pattern Recognition

USDAN The implementation of Unified unsupervised and semi-supervised domain adaptation network for cross-scenario face anti-spoofing, which is accepte

11 Nov 03, 2022
Machine Unlearning with SISA

Machine Unlearning with SISA Lucas Bourtoule, Varun Chandrasekaran, Christopher Choquette-Choo, Hengrui Jia, Adelin Travers, Baiwu Zhang, David Lie, N

CleverHans Lab 70 Jan 01, 2023
Invasive Plant Species Identification

Invasive_Plant_Species_Identification Used LiDAR Odometry and Mapping (LOAM) to create a 3D point cloud map which can be used to identify invasive pla

2 May 12, 2022
OOD Generalization and Detection (ACL 2020)

Pretrained Transformers Improve Out-of-Distribution Robustness How does pretraining affect out-of-distribution robustness? We create an OOD benchmark

littleRound 57 Jan 09, 2023
A TensorFlow implementation of DeepMind's WaveNet paper

A TensorFlow implementation of DeepMind's WaveNet paper This is a TensorFlow implementation of the WaveNet generative neural network architecture for

Igor Babuschkin 5.3k Dec 28, 2022
Embracing Single Stride 3D Object Detector with Sparse Transformer

SST: Single-stride Sparse Transformer This is the official implementation of paper: Embracing Single Stride 3D Object Detector with Sparse Transformer

TuSimple 385 Dec 28, 2022
External Attention Network

Beyond Self-attention: External Attention using Two Linear Layers for Visual Tasks paper : https://arxiv.org/abs/2105.02358 EAMLP will come soon Jitto

MenghaoGuo 357 Dec 11, 2022
Adversarial Learning for Modeling Human Motion

Adversarial Learning for Modeling Human Motion This repository contains the open source code which reproduces the results for the paper: Adversarial l

wangqi 6 Jun 15, 2021
Code and real data for the paper "Counterfactual Temporal Point Processes", available at arXiv.

counterfactual-tpp This is a repository containing code and real data for the paper Counterfactual Temporal Point Processes. Pre-requisites This code

Networks Learning 11 Dec 09, 2022
SegNet-Basic with Keras

SegNet-Basic: What is Segnet? Deep Convolutional Encoder-Decoder Architecture for Semantic Pixel-wise Image Segmentation Segnet = (Encoder + Decoder)

Yad Konrad 81 Jun 30, 2022
Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation. Intel iHD GPU (iGPU) support. NVIDIA GPU (dGPU) support.

mtomo Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation.

Katsuya Hyodo 24 Mar 02, 2022
Implementation for the IJCAI2021 work "Beyond the Spectrum: Detecting Deepfakes via Re-synthesis"

Beyond the Spectrum Implementation for the IJCAI2021 work "Beyond the Spectrum: Detecting Deepfakes via Re-synthesis" by Yang He, Ning Yu, Margret Keu

Yang He 27 Jan 07, 2023
A Python framework for conversational search

Chatty Goose Multi-stage Conversational Passage Retrieval: An Approach to Fusing Term Importance Estimation and Neural Query Rewriting Installation Ma

Castorini 36 Oct 23, 2022
DenseNet Implementation in Keras with ImageNet Pretrained Models

DenseNet-Keras with ImageNet Pretrained Models This is an Keras implementation of DenseNet with ImageNet pretrained weights. The weights are converted

Felix Yu 568 Oct 31, 2022
Deep learning model for EEG artifact removal

DeepSeparator Introduction Electroencephalogram (EEG) recordings are often contaminated with artifacts. Various methods have been developed to elimina

23 Dec 21, 2022
Unofficial Implementation of MLP-Mixer, gMLP, resMLP, Vision Permutator, S2MLPv2, RaftMLP, ConvMLP, ConvMixer in Jittor and PyTorch.

Unofficial Implementation of MLP-Mixer, gMLP, resMLP, Vision Permutator, S2MLPv2, RaftMLP, ConvMLP, ConvMixer in Jittor and PyTorch! Now, Rearrange and Reduce in einops.layers.jittor are support!!

130 Jan 08, 2023
An implementation of "Learning human behaviors from motion capture by adversarial imitation"

Merel-MoCap-GAIL An implementation of Merel et al.'s paper on generative adversarial imitation learning (GAIL) using motion capture (MoCap) data: Lear

Yu-Wei Chao 34 Nov 12, 2022
code for our BMVC 2021 paper "HCV: Hierarchy-Consistency Verification for Incremental Implicitly-Refined Classification"

HCV_IIRC code for our BMVC 2021 paper HCV: Hierarchy-Consistency Verification for Incremental Implicitly-Refined Classification by Kai Wang, Xialei Li

kai wang 13 Oct 03, 2022
Tandem Mass Spectrum Prediction with Graph Transformers

MassFormer This is the original implementation of MassFormer, a graph transformer for small molecule MS/MS prediction. Check out the preprint on arxiv

Röst Lab 13 Oct 27, 2022
Convert game ISO and archives to CD CHD for emulation on Linux.

tochd Convert game ISO and archives to CD CHD for emulation. Author: Tuncay D. Source: https://github.com/thingsiplay/tochd Releases: https://github.c

Tuncay 20 Jan 02, 2023