DDMN
Code and data for the paper "Dual Dynamic Memory Network for End-to-End Multi-turn Task-oriented Dialog Systems".
Install / Use
/learn @siat-nlp/DDMNREADME
DDMN
This repository contains data and code for the COLING'2020 paper "Dual Dynamic Memory Network for End-to-End Multi-turn Task-oriented Dialog Systems".
In this paper, we propose a Dual Dynamic Memory Network (DDMN) for multi-turn dialog generation, which maintains two core components: dialog memory manager and KB memory manager. The dialog memory manager dynamically expands the dialog memory turn by turn and keeps track of dialog history with an updating mechanism, which encourages the model to filter irrelevant dialog history and memorize important newly coming information. The KB memory manager shares the structural KB triples throughout the whole conversation, and dynamically extracts KB information with a memory pointer at each turn.
Requirements
The implementation is based on Python 3.x. To install the dependencies used in this project, please run:
pip install -r requirements.txt
Quickstart
Step 1: Training
For different datasets, please first set up the following parameters in the script run_train.sh:
data_dir=[xxx] # directory of the specific dataset
save_dir=[xxx] # directory to store trained models
and then run:
sh run_train.sh
Note that more arguments for training can be found in the main.py.
For self-critical sequence training, please set up num_epochs larger than pre_epochs but no larger than 3 epochs, since self-critical sequence training for a long time might be unstable sometimes.
Step 2: Testing
For different datasets, please first set up the following parameters in the script run_test.sh:
data_dir=[xxx] # directory of the specific dataset
save_dir=[xxx] # directory of the rrtrained models
output_dir=[xxx] # directory to store generation results
and then run:
sh run_test.sh
Note that more arguments for testing can be found in the main.py.
Step 3: Evaluation
For different datasets, please first set up the following parameters in the script run_eval.sh:
data_name=[xxx] # ['kvr', 'camrest', 'multiwoz']
data_dir=[xxx] # directory of the specific dataset
eval_dir=[xxx] # directory of the generation output
and then run:
sh run_eval.sh
Citation
If you use our code in your work, please cite as:
@inproceedings{wang-etal-2020-dual,
title = "Dual Dynamic Memory Network for End-to-End Multi-turn Task-oriented Dialog Systems",
author = "Wang, Jian and
Liu, Junhao and
Bi, Wei and
Liu, Xiaojiang and
He, Kejing and
Xu, Ruifeng and
Yang, Min",
booktitle = "Proceedings of the 28th International Conference on Computational Linguistics",
year = "2020",
address = "Barcelona, Spain (Online)",
publisher = "International Committee on Computational Linguistics",
pages = "4100--4110"
}
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
