Coder Social home page Coder Social logo

paed's Introduction

PAED: Zero-Shot Persona Attribute Extraction in Dialogues

Python Versions PyTorch Versions

Overview

๐Ÿ”ฅ This is a repository for our paper (PAED: Zero-Shot Persona Attribute Extraction in Dialogues) accepted in ACL'23 (The 61st Annual Meeting of the Association for Computational Linguistics). (Author list: Luyao Zhu, Wei Li, Rui Mao, Vlad Pandelea and Erik Cambria.)

In this work, we develop a PAED dataset, PersonaExt, with 1,896 re-annotated triplets and 6,357 corrected utterance-triplet pairs. We present a generation-based framework for zero-shot PAED. A novel HNS strategy, Meta-VAE sampler with CSC, is presented to enhance the performance of our model. Our model achieves better results than strong baselines in zero-shot PAED and negative sampling.

Dataset

The dataset PersonaExt is publicly available, with 105 relation types.

Requirements and Installation

  • PyTorch >= 1.10.0
  • Python version >= 3.8
  • You may use the folowing instruction to intall the requirements.
pip install -r requirements.txt

Usage

To run this code, please use the following command (take split unseen_10_seed_0 as an example).

10 is the number of unseen labels; 0 is the random seed used for randomly selecting the 10 unseen labels.

python trainer_finetune.py

To change the number of test labels, you may find the variable num_test_labels in the 717th line in trainer_finetune.py and put any number from {5, 10, 15} into the list.

For example, to change the number of test labels into 5, you may set:

>>>num_test_labels=[5]

To change the random seeds for selecting the unseen labels, you may find the variable seeds in the 718th line in trainer_finetune.py and put any number from {0, 1, 2, 3, 4} into the list.

For example, to change the seed into 1, you may set:

>>>seeds=[1]

The default evaluation is tailored for the results of single triplet extraction. To get the evaluation for multiple triplet extraction for other dataset, e.g., fewrel, you may set the flag mode='multi' of the function run_eval. Additionally, you need to remember to place the target dataset under the directory of /outputs/data/splits/zero_rte/[YOURDATA]/unseen_[x]_seed_[x]/, which should conver train.json, dev.json and test.json.

Issues and Usage Q&A

To ask questions, report issues or request features ๐Ÿค”, please use the GitHub Issue Tracker. Before creating a new issue, please make sure to search for existing issues that may solve your problem.

Citation

Please cite as

@inproceedings{zhu-etal-2023-paed,
    title = {{PAED}: Zero-Shot Persona Attribute Extraction in Dialogues},
    author = {Zhu, Luyao  and
      Li, Wei  and
      Mao, Rui  and
      Pandelea, Vlad  and
      Cambria, Erik},
    booktitle = {Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
    month = {jul},
    year = {2023},
    address = {Toronto, Canada},
    publisher = {Association for Computational Linguistics},
    url = {https://aclanthology.org/2023.acl-long.544},
    pages = {9771--9787}
}

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.