MERMAID : Metaphor Generation with Symbolism and Discriminative Decoding (2021)

Abstract: Generating metaphors is a challenging task as it requires a proper understanding of abstract concepts, making connections between unrelated concepts, and deviating from the literal meaning. In this paper, we aim to generate a metaphoric sentence given a literal expression by replacing relevant verbs. Based on a theoretically-grounded connection between metaphors and symbols, we propose a method to automatically construct a parallel corpus by transforming a large number of metaphorical sentences from the Gutenberg Poetry corpus (CITATION) to their literal counterpart using recent advances in masked language modeling coupled with commonsense inference. For the generation task, we incorporate a metaphor discriminator to guide the decoding of a sequence to sequence model fine-tuned on our parallel data to generate high-quality metaphors. Human evaluation on an independent test set of literal statements shows that our best model generates metaphors better than three well-crafted baselines 66% of the time on average. A task-based evaluation shows that human-written poems enhanced with metaphors proposed by our model are preferred 68% of the time compared to poems without metaphors.

## introduction czech novelist milan kundera in his book "the unbearable lightness of being" said "metaphors are not to be trifled with. a single metaphor can give birth to love." metaphors allow us to communicate not just information, but also feelings and complex attitudes @xcite . while most computational work has focused on metaphor detection @xcite @xcite @xcite , research on metaphor generation is ## dataset creation with symbolism datasets for metaphors are scarce. to our knowledge, there is no large scale parallel corpora containing literal and metaphoric paraphrases. the closest and most useful work is that of @xcite . however the size of this data-set is small: 171 instances, which is not sufficient to train deep learning models. recently, @xcite rely on available metaphor detection datasets to generate metaphors by a metaphor-masking framework, where they replace metaphoric words in the input texts with metaphor masks (a unique "metaphor" token), hiding the lexical item. this creates artificial parallel training data: the input is the masked text, with the hidden metaphorical word, and the output is the original text (e.g., the war [mask] many @xmath0. the major issue with such masking strategy is that it ignores the semantic mapping between the literal verb and the metaphorical verb. moreover, there are only 11,593 such parallel instances, still too small to train a neural model. the lack of semantic mapping between the artificial parallel training data samples, coupled with limited size thus affects the lexical diversity and meaning preservation of generated metaphors at test time. in light of these challenges, we propose to compose a large-scale parallel corpora with literal and metaphorical sentence pairs to learn the semantic mappings. we start with collecting a large-scale corpora of metaphorical sentences (section 2.1) and leverage masked language model and symbolism-relevant common sense knowledge to create literal version for each metaphorical sentence (section 2.2). ## metaphor generation our goal of generating metaphors can be broken down into two primary tasks: 1) generating the appropriate substitutions for the literal verb while being pertinent to the context; 2) ensuring that the generated utterances are actually metaphorical. ## experimental setup to compare the quality of the generated metaphors, we benchmark our mermaid model against human performance (i.e., the two creative writing experts human1 (a novelist) & human2 (a poet) who are not the authors of the paper) (section 4.2) and three baseline systems described below. ## results based on the semantic similarity metric shown in column 1 of the wildfire spread through the forest at an amazing speed human1 the wildfire ravaged through the forest at an amazing speed 4.7 4.3 4.0 3.0 human2 the wildfire leapt through the forest at an amazing speed 3.7 3.0 5.0 3.7 lexrep the wildfire saw through the forest at an amazing speed 1.3 1.0 2.7 3.3 meta_m the wildfire grows through the forest at an amazing speed 3.7 2.7 2.7 4.0 bart the wildfire swept through the forest at an amazing speed 4.0 3.7 4.7 4.0 mermaid the wildfire danced through the forest at an amazing speed 3.0 4.0 4.0 3.7 after a glass of wine, he relaxed up a bit human1 after a glass of wine, he loosened up a bit 4.7 5.0 5.0 4.0 human2 after a glass of wine, he unfurled up a bit 2.0 5.0 2.0 3.7 lexrep after a glass of wine, he followed up a bit 3.7 1.0 2.7 1.7 meta_m after a glass of he touched up a bit 1.3 1.0 1.7 2.0 bart after a glass of wine, he dried up a bit 2.7 1.0 2.3 2.0 mermaid after a glass of wine, he loosened up a bit 4.3 5.0 5.0 3.7 ## task based evaluation metaphors are frequently used by creative writing practitioners, in particular poets, to embellish their work. we posit that mermaid can be used to edit literal sentences in poems to further enhance creativity. to test this hypothesis, we first crawl origi we then select a sentence containing a literal verb from each quatrain and use mer-maid to re-write it so that the resulting output is metaphorical. we ignore common verbs like is,was,are,were,have,had. if there are more than one sentence in quatrain with literal verbs, we choose the sentence with a literal verb that has the highest probability for being literal. for sentences with multiple literal verbs, we choose the verb with highest literal probability. our goal is to see if re-written poems are qualitatively better than the original forms. to do this, we hire turkers from amazon mechanical turk and present them with hits where the task is to choose the better version between the original quatrain and the re-written version. 15 turkers were recruited for the task. each quatrain was evaluated by 3 distinct turkers. ## related work most researchers focused on identification and interpretation of metaphor, while metaphor generation is relatively under-studied. ## conclusion we show how to transform literal sentences to metaphorical ones. we propose a novel way of creating parallel corpora and an approach for generating metaphors that benefits from transfer learning and discriminative decoding. human and automatic evaluations show that our best model is successful at generating metaphors. we further show that leveraging symbolic meanings helps us learn better abstract representations and better preservation of the denotative meaning of the input. future directions include learning diverse conceptual metaphoric mapping using our parallel data and constraining our metaphoric generations based on particular mapping.