This repository contains the source code for this paper Dialogue Summarization with Static-Dynamic Structure Fusion Graph.
Dialogue summarization, one of the most challenging and intriguing text summarization tasks, has attracted increasing attention in recent years.
Since dialogue possesses dynamic interaction nature and presumably inconsistent information flow scattered across multiple utterances by different interlocutors, many researchers address this task by modeling dialogue with pre-computed static graph structure using external linguistic toolkits.
However, such methods heavily depend on the reliability of external tools and the static graph construction is disjoint with the graph representation learning phase, which could not make the graph dynamically adapt to the downstream summarization task.
In this paper, we propose a Static-Dynamic graph-based Dialogue Summarization model (SDDS), which fuses prior knowledge from human expertise and implicit knowledge from a PLM, and adaptively adjusts the graph weight, and learns the graph structure in an end-to-end learning fashion from the supervision of summarization task.
Our code is mainly based on 🤗 Transformers.
## firstly install torch corresponding to the CUDA
pip install transformers==4.8.2 \
py-rouge nltk numpy datasets stanza dgl
For dataset we use, we prepare the SamSum
dataset in the data folder along with its annotation created by external linguistic tools.
For MediaSum dataset, we refer to here and for DialogSum here.
For linguistic tools for annotation:
- discouse_parsing: https://github.com/shizhouxing/DialogueDiscourseParsing
- keyword extraction: we use Stanza for pos tagging and select the NOUN and PROPN.
The dafault config is at config/graphbart_config.json
cd src && CUDA_VISIBLE_DEVICES=x python run_summarization.py