Giter VIP home page Giter VIP logo

sccl's Introduction

SCCL

This repo contains our pytorch code for IEEE TAC accepted paper: "Cluster-Level Contrastive Learning for Emotion Recognition in Conversations". The architecture for our model is as follows:

Image text

Preparation:

  1. Set up the Python 3.7 environment, and build the dependencies with the following code: pip install -r requirements.txt

  2. Download the data from https://drive.google.com/file/d/1b_ihQYKTAsO67I5LULMbMFBrDgat8bQN/view?usp=sharing.

  3. Download the released pre-trained adapter model from the K-Adapter paper(https://arxiv.org/abs/2002.01808): https://github.com/microsoft/k-adapter and put the directory "fac-adapter" and "lin-adapter" under the directory ./SCCL/pretrained_models/.

Training:

You can train the model with the following codes:

Run on IEMOCAP with RoBERTa-Large: python main.py --DATASET IEMOCAP --CUDA True --model_checkpoint roberta-large --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4

Run on IEMOCAP with FacAdapter: python main.py --DATASET IEMOCAP --CUDA True --model_checkpoint roberta-facadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4

Run on IEMOCAP with LinAdapter: python main.py --DATASET IEMOCAP --CUDA True --model_checkpoint roberta-linadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4


Run on MELD with LinAdapter: python main.py --DATASET MELD --CUDA True --model_checkpoint roberta-linadapter --alpha 1.0 --NUM_TRAIN_EPOCHS 3 --BATCH_SIZE 4

Run on MELD with FacAdapter: python main.py --DATASET MELD --CUDA True --model_checkpoint roberta-facadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 3 --BATCH_SIZE 4

Run on MELD with RoBERTa-Large: python main.py --DATASET MELD --CUDA True --model_checkpoint roberta-large --alpha 1.0 --NUM_TRAIN_EPOCHS 3 --BATCH_SIZE 4


Run on EmoryNLP with RoBERTa-Large: python main.py --DATASET EmoryNLP --CUDA True --model_checkpoint roberta-large --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4

Run on EmoryNLP with FacAdapter: python main.py --DATASET EmoryNLP --CUDA True --model_checkpoint roberta-facadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4

Run on EmoryNLP with LinAdapter: python main.py --DATASET EmoryNLP --CUDA True --model_checkpoint roberta-linadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4


Run on DailyDialog with RoBERTa-Large: python main.py --DATASET DailyDialog --CUDA True --model_checkpoint roberta-large --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 16

Run on DailyDialog with FacAdapter: python main.py --DATASET DailyDialog --CUDA True --model_checkpoint roberta-facadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 16

Run on DailyDialog with LinAdapter: python main.py --DATASET DailyDialog --CUDA True --model_checkpoint roberta-linadapter --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 16

Citation:

Please cite our paper as follows:

@ARTICLE{10040720, author={Yang, Kailai and Zhang, Tianlin and Alhuzali, Hassan and Ananiadou, Sophia}, journal={IEEE Transactions on Affective Computing}, title={Cluster-Level Contrastive Learning for Emotion Recognition in Conversations}, year={2023}, volume={}, number={}, pages={1-12}, doi={10.1109/TAFFC.2023.3243463}}

sccl's People

Contributors

stevekgyang avatar

Stargazers

dongkai avatar Tiansheng Deng avatar iaamlele avatar WenjieZheng avatar zzzzd avatar Xiao Liang avatar Yuqing Li avatar James Kahn avatar Car avatar lewington avatar Elliot avatar  avatar Ting Zhang avatar Arthur Wu avatar Hassan Alhuzali avatar Wendong Gan avatar RuiLiu avatar Siyan Li (Sylvia) avatar

Watchers

Kostas Georgiou avatar  avatar

sccl's Issues

about the data

Hello! Will your research data be open source? I don't see any data stored in the data folder.

cannot run this code

Hello!
Could you please help me to solve the issue with running on googlecollab

I tried on Colab to run your code with the command
python main.py --DATASET IEMOCAP --CUDA True --model_checkpoint roberta-large --alpha 0.8 --NUM_TRAIN_EPOCHS 5 --BATCH_SIZE 4 via Colab terminal.
To do this, I specifically translated Colab to Python 3.7 Unfortunately, the code starts and crashes with the error No CUDA GPUs are available, although I have CUDA okay (look at the first command)
photo
Please, if you have some time, could you be so kind and help to run the code on Colab or help build the assembly for the new version of Python 3.10
photo_2023-05-17_03-08-48

I've already read an article and code in https://github.com/microsoft/K-Adapter, but last commit in there was a long time ago and I found that you also did the job

Ideally I'm trying to implement K-adapter method on arxiv dataset with some pretrained bert model, to solve Topic Modeling problem and predict categories of scientific articles based on their abstract, title, etc

If you have any suggestions, I will be very thankful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.