This repository contains the models from the paper "Self-supervised Text Style Transfer using Cycle-Consistent Adversarial Networks" (ACM TIST 2024).
The work introduces a novel approach to Text Style Transfer using CycleGANs with sequence-level supervision and Transformer architectures.
The models achieve state-of-the-art results on both formality and sentiment transfer tasks.
Both generators and style classifiers can be used with the Hugging Face 🤗 transformers library:
1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
3model = AutoModelForSeq2SeqLM.from_pretrained("[GENERATOR_MODEL]")
4tokenizer = AutoTokenizer.from_pretrained("[GENERATOR_MODEL]")
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2
3classifier = AutoModelForSequenceClassification.from_pretrained("[CLASSIFIER_MODEL]")
4tokenizer = AutoTokenizer.from_pretrained("[CLASSIFIER_MODEL]")
For more details, you can refer to the
paper.
1@article{10.1145/3678179,
2author = {La Quatra, Moreno and Gallipoli, Giuseppe and Cagliero, Luca},
3title = {Self-supervised Text Style Transfer Using Cycle-Consistent Adversarial Networks},
4year = {2024},
5issue_date = {October 2024},
6publisher = {Association for Computing Machinery},
7address = {New York, NY, USA},
8volume = {15},
9number = {5},
10issn = {2157-6904},
11url = {https://doi.org/10.1145/3678179},
12doi = {10.1145/3678179},
13journal = {ACM Trans. Intell. Syst. Technol.},
14month = nov,
15articleno = {110},
16numpages = {38},
17keywords = {Text Style Transfer, Sentiment transfer, Formality transfer, Cycle-consistent Generative Adversarial Networks, Transformers}
18}