Skip to content

jacksonchen1998/Knowledge-Infused-Topic-Model-for-Empathetic-Dialogue-Response

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge-Infused Topic Model for Empathetic Dialogue Response

KITM

This repository contains the implementation of the Knowledge-Infused Topic Model (KITM) for generating empathetic dialogue responses using topic modeling enhanced with commonsense knowledge.

📄 Accepted to APSIPA ASC 2025 (Proceedings Paper)


🔧 Installation

Install all required packages via:

conda install --yes --file requirements.txt

🛠️ Pre-processing

  1. Download GloVe embeddings Download the GloVe.6B embeddings and place them in:

    /vectors
    
  2. Dataset preprocessing

    • A preprocessed dataset (dataset_preproc.p) is already included under:

      /data/ED/dataset_preproc.p
      
    • If you would like to regenerate the dataset or modify knowledge types from COMET:

      1. Delete dataset_preproc.p

      2. Download the COMET-ATOMIC-2020 checkpoint

      3. Place it under:

        /data/ED/Comet
        
    • The dataset will be automatically reprocessed during training.

    • Note: We use BART-COMET because the GPT-2 COMET checkpoint is incompatible with this workflow.


📚 Datasets

This work uses two dialogue datasets, with the default configuration set to EmpatheticDialogues.

🔗 Data Resources (Download)


📁 Directory Structure

data
|--- ED
|    |--- Comet/          # COMET model for commonsense inference
|    |--- emp.pkl         # Topic appearance probabilities
|    |--- train.csv
|    |--- valid.csv
|    |--- test.csv
|
|--- DD
     |--- Comet/
     |--- dd.pkl          # Topic appearance probabilities
     |--- train.csv
     |--- valid.csv
     |--- test.csv

Directory Descriptions

data/ED/

Files and COMET knowledge used for EmpatheticDialogues.

data/DD/

Files and COMET knowledge used for DailyDialog.


🚀 Training

Run training with:

python main.py --cuda --save_path save/your_dir

🧪 Testing

python main.py --cuda --test \
    --save_path save/your_dir \
    --model_path save/dir_save/KITM_XXXX.XXX

📬 Contact

If you have questions or are interested in collaboration, feel free to contact:

present90308.ee11@nycu.edu.tw

Just let me know!

About

Knowledge-Infused Topic Model (KITM) for empathetic dialogue generation, integrating topic modeling with commonsense reasoning from COMET. Official implementation of our APSIPA ASC 2025 paper.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages