Reproduction of the following paper:
Yangyang Xu, Zhuoer Zhao, Xiao Sun, and Xun Yang. "Prompt Learning With Multiperspective Cues for Emotional Support Conversation Systems." IEEE Transactions on Computational Social Systems, 2025. [paper]
@article{xu2025pmpc,
title={Prompt Learning With Multiperspective Cues for Emotional Support Conversation Systems},
author={Xu, Yangyang and Zhao, Zhuoer and Sun, Xiao and Yang, Xun},
journal={IEEE Transactions on Computational Social Systems},
year={2025},
doi={10.1109/TCSS.2025.3539915}
}PMPC extracts multiperspective cues from dialogue history and constructs soft prompts to guide a BlenderBot-small backbone for emotional support response generation.
Cues Catcher (Section III-A):
- Topic Cues (Ht): GloVe + PMI-based keyword extraction
- Prior Knowledge Cues (He): DPR retrieval from training responses
- Mental State Cues (Hc): COMET-ATOMIC 2020 (6 user + 3 listener relations)
- Other Cues: Post (Hp), Situation (Hs) from encoder hidden states
Prompt Builder (Section III-B):
- Semantic enhancement prompt (Pe) for encoder
- Semantic constraint prompt (Pd) for decoder, conditioned on strategy prediction
This implementation builds upon the ESConv codebase:
Siyang Liu*, Chujie Zheng*, et al. "Towards Emotional Support Dialog Systems." ACL 2021. [paper] [repo]
conda create -n pmpc python=3.9
conda activate pmpc
pip install torch transformers nltk numpy tqdmDownload and place under external_models/:
| Model | Source | Path |
|---|---|---|
| COMET-ATOMIC 2020 | HuggingFace | external_models/comet-atomic-2020/ |
| DPR Context Encoder | HuggingFace | external_models/dpr-ctx-encoder/ |
| DPR Question Encoder | HuggingFace | external_models/dpr-question-encoder/ |
| GloVe 6B 300d | Stanford NLP | external_models/glove.6B.300d.txt |
Also download BlenderBot-small-90M into Blenderbot_small-90M/.
cd _reformat && python process.py && cd ..
bash RUN/prepare_pmpc.shbash RUN/train_pmpc.shbash RUN/infer_pmpc.shSelect the best checkpoint from DATA/pmpc.pmpc/ based on validation PPL, and set --load_checkpoint accordingly in the inference script.