pujari-rajkumar / rl-guided-multitask-learning

Reinforcement Learning guided Multi-task Learning Framework for Stereotype Detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo contains the annotated dataset and code to replicate experiments and ablation studies from ACL 2022 long paper Reinforcement Learning Guided Multi-Task Learning for Stereotype Detection by Rajkumar Pujari, Erik Oveson, Priyanka Kulkarni and Elnaz Nouri.

Dataset

Fine-grained steretype detection dataset that was decribed in the paper is in the annotated_data.csv file. Each data point was annotated by three MTurk annotaters with two labels: 1) whether the text contains explicit and intentional stereotype and 2) whether the text contains implicit stereotypical association. Majority vote from the three annotaters was assigned as the data label.

Code

The notebooks/ folder contains the following jupyter notebooks:

  1. bart_large-gpu1-policy_network_training.ipynb

  2. bert_base-gpu0-policy_network_training.ipynb

  3. bert_large-gpu0_1-policy_network_training.ipynb

  4. xlnet_large-gpu1_1-policy_network_training.ipynb

  5. rl_multitask_data_utils.ipynb

  6. ablation1-bert_base-gpu0.ipynb

  7. ablation2-bert-base-gpu0.ipynb

Data utils notbook contains code to run the pre-processing raw datasets into processed format required to run the experiments. You would need to change the name of the PLM tokenizer and model to generate embeddings for different PLMs. If you don't want to pre-process the data yourself, you may download the processed data files from here.

The policy training notebooks contain code for training all the experiments using the .pkl files provided here.

The ablations study notebooks contain code to replicate the MTL prior impact and neightbor task impact ablation studies as described in the paper.

About

Reinforcement Learning guided Multi-task Learning Framework for Stereotype Detection

License:MIT License


Languages

Language:Jupyter Notebook 100.0%