Multi-Figurative Language Generation (2022)

Abstract: Figurative language generation is the task of reformulating a given text in the desired figure of speech while still being faithful to the original context. We take the first step towards multi-figurative language modelling by providing a benchmark for the automatic generation of five common figurative forms in English. We train mFLAG employing a scheme for multi-figurative language pre-training on top of BART, and a mechanism for injecting the target figurative information into the encoder; this enables the generation of text with the target figurative form from another figurative form without parallel figurative-figurative sentence pairs. Our approach outperforms all strong baselines. We also offer some qualitative analysis and reflections on the relationship between the different figures of speech.

## introduction figurative language is commonly used in speaking and writing to accomplish a constellation of communicative goals @xcite . figures of speech, such as metaphors, or idiomatic expressions, can make an expression stand out by making it more interesting and captivating, and can evoke stronger emotions than more factual, literal phrases thereby making the text more engaging. automatic figurative language generation has received growing attention with the progress of neural networks, especially the emergence of large pre-trained models @xcite . we see there are two core values for this task: (i) computational approaches can be employed to provide a better understanding of linguistic phenomena and more specifically in this case different figures of speech; (ii) we can explore how much models can handle creativity and devise ways to employ them in the support of creative writing, so as to yield more varied and human-like generated text, including in the context of machine translation @xcite . ## background transforming text involving a figure of speech, either in source or in target or both, is closely related to three other nlp tasks, namely paraphrasing, text style transfer, and figurative language detection. we discuss relevant background on such tasks, and why and how they play a role in our work. paraphrasing paraphrasing is the task of generating a text semantically (almost) identical to a given input, but with variations in wording or syntax @xcite . the large amount of parallel paraphrase data available can be used to teach models a general rewriting task in the context of various downstream nlp tasks, such as semantic parsing @xcite , machine translation @xcite , question answering @xcite , and text style transfer @xcite . as figurative generation can be viewed as a special paraphrasing task, where texts are expected to include specific figurative forms, we also leverage paraphrase data for figurative generation modelling. ## task and dataset we define the task of figurative language generation as the transformation of a text written in (or with) a given form (literal or figurative) to a text in (or containing) another form, while preserving the original general context. we use five existing datasets for the figures of speech we consider in this paper; bart encoder bart @xmath0. <@xmath1. <@xmath2. <@xmath3. ## multi-figurative language modelling we propose an approach to model multi-figurative language on top of the large pre-trained sequenceto-sequence model bart @xcite ), bart is a seq2seq model trained as a denoising autoencoder, and to reconstruct the original text t given g(t ) where g is a noising function that is used to corrupt text: ## experiments all experiments are implemented atop transformers @xcite using bart-large @xcite . we train models with batch size 32, accumulating gradients over 8 update steps, using the adam optimiser (kingma and ba, 2015) with learning rate 1e-5. we use early stopping (patience 5) if validation performance does not improve. ## analysis and discussion case study hyperbole input i am not happy that he urged me to finish all the hardest tasks in the world. idiom bart-single i am not happy that he urged me to finish all the hard tasks in the world. bart-multi i am so glad that he urged me to finish all the hardest tasks in the world. pt-to-ft i am not happy that he urged me to complete all the difficult tasks. mflag-dr i am not happy that he urged me to tick off all the hardest tasks in the world. mflag-bt i am not happy that he urged me to get cracking on all the difficult tasks. sarcasm bart-single i'm so glad my dad encouraged me to finish all the hard tasks in the world. bart-multi thank you for encouraging me to finish all the hardest tasks in the world. pt-to-ft i am happy that he urged me to finish all the hardest tasks in the world. mflag-dr glad he urged me to finish all the hardest tasks in the world. mflag-bt glad he urged me to finish all the difficult tasks. metaphor bart-single i am not happy that he urged me to bear all the difficult tasks. bart-multi i am so glad that he urged me to finish all the hardest tasks in the world. pt-to-ft i am not happy that he urged me to complete all the difficult tasks in the world. mflag-dr i am not happy that he urged me to bear all the hardest tasks in the world. mflag-bt i am not happy that he pressed me to finish all the difficult tasks. simile bart-single i am not happy that he urged me to finish all the difficult tasks. bart-multi i am so glad that he urged me to finish all the hardest tasks in the world. pt-to-ft i am not happy that he urged me to complete all the difficult tasks in the world. mflag-dr i am not happy that he urged me to finish all the like a million things. mflag-bt i am not happy that he urged me to finish all the difficult tasks. ## conclusion and outlook we have proposed a novel task of multi-figurative language generation, and shown that our models do benefit from cross-figurative knowledge transfer. paraphrasing data can be leveraged in further pretraining to enhance both form strength and context preservation in figurative language generation. we have also proposed a mechanism for injecting the target figurative information into the encoder, so that we can achieve generation between different figures of speech even without parallel figurativefigurative pairs. while we innovatively explore multi-figurative language generation across literal and five figurative forms, and our model achieves the best performances compared to baselines, there is still substantial room for improvement and further extensions. the current lack of human references for automating the evaluation of figurative-to-figurative generation is surely a limitation in terms of better understanding of the models' behaviour and potential improvements. more in general, figurative language generation is a relatively new task, which still lacks standardised evaluation methods, both in terms of automatic metrics and human-based evaluation. also, we introduce for the first time generation across literal expressions and five figurative forms, but there are many more forms of creative writing that could be modelled. moreover, we only limited our attention to english, due to data availability, but are convinced that datasets in other languages would greatly benefit research in this area. indeed, multilingual modelling would make it possible to make connections across different languages, thus shedding more light on cross-lingual regularities in figurative language use, and thus also open up potential avenues to tackle this task better.