You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2025. It is now read-only.
To generate adversarial examples for one of the implemented models, run the corresponding run_morpheus_* script.
Custom tasks, datasets, or models
Morpheus can be easily implemented for a custom task, dataset, or model by following the structure of existing classes:
MorpheusBase implements the methods common to all Morpheus implementations; Morpheus<Task> implements methods common to a specific task/dataset, Morpheus<Model><Task> implements methods specific to a particular model (usually the init and morph methods).
Generating adversarial training data
Use random_inflect/random_inflect.py to generate adversarial training data. You will need to pass in a dictionary of inflection counts for it to work in the weighted sampling mode, otherwise a uniform distribution will be used. The dictionary should be in the form
@inproceedings{tan-etal-2020-morphin,
title = "It{'}s Morphin{'} Time! {C}ombating Linguistic Discrimination with Inflectional Perturbations",
author = "Tan, Samson and
Joty, Shafiq and
Kan, Min-Yen and
Socher, Richard",
booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
month = jul,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.acl-main.263",
pages = "2920--2935",
}
About
Code for ACL'20 paper "It's Morphin' Time! Combating Linguistic Discrimination with Inflectional Perturbations"