Skip to content

AaronTengDeChuan/PRO-HAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pro-HAN

This repository contains the official PyTorch implementation of the paper:

Pro-HAN: A Heterogeneous Graph Attention Network for Profile-Based Spoken Language Understanding.

Dechuan Teng, Chunlin Lu, Xiao Xu, Wanxiang Che, Libo Qin.

ICASSP 2024. [Paper(Arxiv)]

In the following, we will guide you how to use this repository step by step.

Dataset

Below is the statistics of ProSLU dataset and an example of the data.

dataset_statistics          example

Model Architecture

framework

Results

result

Preparation

Our code is based on the following packages:

  • python==3.11.3
  • orjson==3.9.10
  • numpy==1.25.0
  • fitlog==0.9.15
  • pytorch==2.0.1
  • transformers=4.29.2
  • dgl==1.1.1+cu118

We highly suggest you using Anaconda to manage your python environment.

How to Run it

Data Preparation

You first need to convert original data into the format that our model can use. We provide the script enrich_ProSLU_data.py to do this. You can run the following command to convert the data.

python utils/enrich_ProSLU_data.py

After running the command, you will get the processed files [train/dev/test]_rebuild.json in the folder data/ProSLU.

Training

The script main.py acts as a main function to the project, you can train the model from scratch by running the following command:

DGLBACKEND=pytorch python main.py -g -fs -es -uf -ui -bs 16 -wd 1e-6 -lr 0.001 -dr 0.2 -lsf 0.5 -lsp 5 -nehd 128 -nahd 128 -kgntr 'encode_bow' -spntr 'embed_bow' -uppgn -kgirge -upirpe -cairse -kgup -kgca -upca -uttpf 'leaf' -has 'sample_weight' -iuw 'node_aggregation'

Due to some stochastic factors(e.g., GPU and environment), it maybe need to tune the hyper-parameters to reproduce the results reported in our paper. Here are the suggested hyper-parameter settings:

  • random_seed
  • word_embedding_dim: [64, 128]
  • encoder_hidden_dim: [128, 256, 768]
  • attention_hidden_dim: [128, 256, 1024]
  • node_encoder_hidden_dim: [128, 256, 768]
  • node_attention_hidden_dim: [128, 256, 1024]
  • ......

And we also provide the best model saved. Download and unzip it into the save folder.

Evaluation

You can evaluate the trained model by running the following command:

load_dir="save/SLU+HEG/True_LSTM_wlp=False_16_lrs=0.5-5_U=0.2-0.001-1e-05-64_G=0.2-128-128_2023-08-14 112531/model"
DGLBACKEND=pytorch python main.py -de -ld "${load_dir}" -g -uf -has 'sample_weight'

Issues/PRs/Questions

If you have any question, please issue the project or email me, and we will reply you soon.

Acknowledgements

  • Our codes are partially inspired by Stack-Propagation, ProSLU, and KoK-HAN!

    A Stack-Propagation Framework with Token-Level Intent Detection for Spoken Language Understanding. Libo Qin,Wanxiang Che, Yangming Li, Haoyang Wen and Ting Liu. (EMNLP 2019). Long paper. [pdf] [code]

    Text is no more Enough! A Benchmark for Profile-based Spoken Language Understanding. (AAAI 2022). Long paper. [pdf] [code]

    Towards Complex Scenarios: Building End-to-end Task-oriented Dialogue System across Multiple Knowledge Bases. (AAAI 2023). Long paper. [pdf] [code]

  • We also thank for the open-source GNN Library DGL.

Citation

If you use the source codes in this repository, please cite our paper.

The bibtex is listed below:

@article{DBLP:journals/corr/abs-2402-03900,
  author       = {Dechuan Teng and
                  Chunlin Lu and
                  Xiao Xu and
                  Wanxiang Che and
                  Libo Qin},
  title        = {Pro-HAN: {A} Heterogeneous Graph Attention Network for Profile-Based Spoken Language Understanding},
  journal      = {CoRR},
  volume       = {abs/2402.03900},
  year         = {2024},
  url          = {https://doi.org/10.48550/arXiv.2402.03900},
  doi          = {10.48550/ARXIV.2402.03900},
  eprinttype    = {arXiv},
  eprint       = {2402.03900},
  timestamp    = {Mon, 12 Feb 2024 13:36:38 +0100},
  biburl       = {https://dblp.org/rec/journals/corr/abs-2402-03900.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages