Official repository of the AAAI'2022 paper "Contrast and Generation Make BART a Good Dialogue Emotion Recognizer"

Overview

CoG-BART

Contrast and Generation Make BART a Good Dialogue Emotion Recognizer

Quick Start:


To run the model on test sets of four datasets,

  1. Download the pre-trained models:

  2. Execute the following command in terminal:

    • For MELD: bash eval.sh MELD save/MELD/best_model_939239

    • For EmoryNLP: bash eval.sh EmoryNLP save/EmoryNLP/best_model_552848

    • For IEMOCAP: bash eval.sh IEMOCAP save/IEMOCAP/best_model_625968

    • For DailyDialog: bash eval.sh DailyDialog save/DailyDialog/best_model_269130

Required Packages:


  • torch==1.7.1
  • transformers==4.11.0
  • numpy
  • pickle
  • tqdm
  • sklearn
  • fitlog

Run on GPU:


Model runs on one GPU by default, and we didn't try it on CPU.

We recommend using GPU with memory more than 24G , otherwise you may need to adjust the hyperparameters and the results may vary significantly.

Training:


For MELD: bash train.sh MELD

For EmoryNLP: bash train.sh EmoryNLP

For IEMOCAP: bash train.sh IEMOCAP

For DailyDialog: bash train.sh DailyDialog

It should be noticed that performance is greatly affected by random seed. So we recommended some seeds in the script for reproduction.

Evaluation and Prediction:

For MELD: bash eval.sh MELD save/MELD/best_model_939239

For EmoryNLP: bash eval.sh EmoryNLP save/EmoryNLP/best_model_552848

For IEMOCAP: bash eval.sh IEMOCAP save/IEMOCAP/best_model_625968

For DailyDialog: bash eval.sh DailyDialog save/DailyDialog/best_model_269130

Citation

If you find this work useful, please cite our work:

@misc{li2021contrast,
    title={Contrast and Generation Make BART a Good Dialogue Emotion Recognizer}, 
    author={Shimin Li and Hang Yan and Xipeng Qiu},
    year={2021},
    eprint={2112.11202},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

Acknowledgement

Some code of this project are referenced from TodKat and DialogXL. We thank their open source materials for contribution to this task.

You might also like...
Official repository for the paper, MidiBERT-Piano: Large-scale Pre-training for Symbolic Music Understanding.
Official repository for the paper, MidiBERT-Piano: Large-scale Pre-training for Symbolic Music Understanding.

MidiBERT-Piano Authors: Yi-Hui (Sophia) Chou, I-Chun (Bronwin) Chen Introduction This is the official repository for the paper, MidiBERT-Piano: Large-

Official repository of the paper 'Essentials for Class Incremental Learning'

Essentials for Class Incremental Learning Official repository of the paper 'Essentials for Class Incremental Learning' This Pytorch repository contain

This repository is an official implementation of the paper MOTR: End-to-End Multiple-Object Tracking with TRansformer.
This repository is an official implementation of the paper MOTR: End-to-End Multiple-Object Tracking with TRansformer.

MOTR: End-to-End Multiple-Object Tracking with TRansformer This repository is an official implementation of the paper MOTR: End-to-End Multiple-Object

Official Repository for the ICCV 2021 paper
Official Repository for the ICCV 2021 paper "PixelSynth: Generating a 3D-Consistent Experience from a Single Image"

PixelSynth: Generating a 3D-Consistent Experience from a Single Image (ICCV 2021) Chris Rockwell, David F. Fouhey, and Justin Johnson [Project Website

Official repository with code and data accompanying the NAACL 2021 paper "Hurdles to Progress in Long-form Question Answering" (https://arxiv.org/abs/2103.06332).

Hurdles to Progress in Long-form Question Answering This repository contains the official scripts and datasets accompanying our NAACL 2021 paper, "Hur

This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Information Maximization for Multimodal Sentiment Analysis, accepted at EMNLP 2021.
This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Information Maximization for Multimodal Sentiment Analysis, accepted at EMNLP 2021.

MultiModal-InfoMax This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Informa

Official repository for CVPR21 paper "Deep Stable Learning for Out-Of-Distribution Generalization".

StableNet StableNet is a deep stable learning method for out-of-distribution generalization. This is the official repo for CVPR21 paper "Deep Stable L

CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.
CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.

TUCH This repo is part of our project: On Self-Contact and Human Pose. [Project Page] [Paper] [MPI Project Page] License Software Copyright License fo

Comments
  • Wrong Weighted-Avg F1 in All Experiments

    Wrong Weighted-Avg F1 in All Experiments

    Thanks your nice work for ERC, a bug from TODKAT was not fixed in your code, see https://github.com/something678/TodKat/issues/10. You may need fix it and report the new results.

    Best regards.

    opened by fpcsong 2
Owner
null
Official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Recognition" in AAAI2022.

AimCLR This is an official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Reco

Gty 44 Dec 17, 2022
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes (AAAI2022)

CMUA-Watermark The official code for CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes (AAAI2022) arxiv. It is bas

null 50 Nov 26, 2022
Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology

Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology Sharon Zhou, Eric Zelikman

Stanford Machine Learning Group 34 Nov 16, 2022
The repository offers the official implementation of our paper in PyTorch.

Cloth Interactive Transformer (CIT) Cloth Interactive Transformer for Virtual Try-On Bin Ren1, Hao Tang1, Fanyang Meng2, Runwei Ding3, Ling Shao4, Phi

Bingoren 49 Dec 1, 2022
Official code repository of the paper Learning Associative Inference Using Fast Weight Memory by Schlag et al.

Learning Associative Inference Using Fast Weight Memory This repository contains the offical code for the paper Learning Associative Inference Using F

Imanol Schlag 18 Oct 12, 2022
CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.

selfcontact This repo is part of our project: On Self-Contact and Human Pose. [Project Page] [Paper] [MPI Project Page] It includes the main function

Lea Müller 68 Dec 6, 2022
CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.

SMPLify-XMC This repo is part of our project: On Self-Contact and Human Pose. [Project Page] [Paper] [MPI Project Page] License Software Copyright Lic

Lea Müller 83 Dec 14, 2022
Official repository for the paper "Going Beyond Linear Transformers with Recurrent Fast Weight Programmers"

Recurrent Fast Weight Programmers This is the official repository containing the code we used to produce the experimental results reported in the pape

IDSIA 36 Nov 15, 2022
Official repository for the paper "Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networks"

Easy-To-Hard The official repository for the paper "Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networks". Gett

Avi Schwarzschild 52 Sep 8, 2022
Official repository for the CVPR 2021 paper "Learning Feature Aggregation for Deep 3D Morphable Models"

Deep3DMM Official repository for the CVPR 2021 paper Learning Feature Aggregation for Deep 3D Morphable Models. Requirements This code is tested on Py

null 38 Dec 27, 2022