GALMET is a Genetic Algorithm using Language Models for Evolving Text. It is capable of evolving one text into another, guided by a BERT-based transformer model.
In our main example, we use a finetuned RoBERTa MLM model for mutating the text in the mutator operators of the genetic algorithm, and another finetuned RoBERTa model that guesses if the text is a real headline (0) or satire (1) or any value in between (for edited headlines with a funniness rating).
More information can be found in our paper "Survival of the Wittiest: Evolving Satire with Language Models", published on the Twelfth International Conference on Computational Creativity, ICCC’21.
GALMET requires a Python runtime environment. If you want to run the satire evolution example in notebooks/galmet-satire-example.ipynb, perform the following steps:
- Create a new virtual environment .
- Install requirements.txt using
pip install -r requirements.txt
. - Download
robeta-satire-mlm
androberta-satire-regression
from the releases page, and put them in amodels/
folder at the top-level of the repository. - Run
jupyter notebook
in command line in the repository folder. - Navigate to the
galmet-satire-example.ipynb
and run it.
If use this work in an academic context, please consider citing the following paper:
@inproceedings{winters2021survival,
title={Survival of the Wittiest: Evolving Satire with Language Models},
author={Winters, Thomas and Delobelle, Pieter},
booktitle={Proceedings of the Twelfth International Conference on Computational Creativity},
pages={82--86},
year={2021},
organization={Association for Computational Creativity (ACC)}
}