Multi-Figurative Language Generation

Huiyuan Lai, Malvina Nissim

Abstract

While Natural Language Processing (NLP) has achieved significant success in literal language tasks, the generation of figurative language remains a complex challenge due to data scarcity and the siloed nature of existing models. This paper presents mFLAG (Multi-Figurative Language Generation), a unified transformer-based framework designed to generate five distinct types of figurative language: metaphor, simile, sarcasm, idiom, and hyperbole. By employing multi-task pre-training and a novel information injection mechanism, mFLAG demonstrates the ability to perform cross-figurative transfers—such as converting hyperbole to sarcasm—without requiring parallel training data for those specific pairs. Our results indicate that multi-task learning facilitates knowledge transfer across figurative domains, outperforming single-task baselines in both form strength and context preservation.

1. Introduction

Human communication is inherently non-literal, frequently employing metaphors to explain concepts, sarcasm to critique, and hyperboles to emphasize points. Despite this, NLP research has historically focused on literal tasks like translation and summarization. Previous attempts at figurative generation have been fragmented, with researchers building specialized models for individual figures of speech. This approach suffers from two primary limitations: the extreme difficulty of acquiring parallel datasets for every possible figurative pair and the failure to exploit the shared underlying mechanics of non-literal expression.

To address these gaps, we introduce mFLAG, a model that treats figurative generation as a unified multi-task problem. We hypothesize that different figures of speech share a common "non-literal DNA," and that a model trained on multiple styles can leverage cross-figurative knowledge to improve performance across all categories.

2. Methodology

2.1 Architecture and Pre-training

mFLAG is built upon the BART architecture. The training process consists of two primary stages:

  1. Multi-Figurative Pre-training: The model is first pre-trained on a massive paraphrase dataset (PARABANK 2). To ensure the model learns the nuances of creative rewriting, we utilize binary classifiers to filter the data, selecting pairs where one sentence is literal and the other exhibits figurative characteristics.
  2. Information Injection Mechanism: To guide the model toward a specific figurative style, we implement a cross-attention mechanism that "injects" target figurative information directly into the encoder’s word embeddings. This allows the encoder to re-interpret the source sentence through the lens of the desired output style (e.g., an idiom) before the decoder generates the final text.

2.2 Generation Strategies

We evaluated two versions of the model: mFLAG-DR (Direct), which performs a direct transformation from one figurative form to another, and mFLAG-BT (Back-Translation), which utilizes a literal sentence as an intermediate pivot to facilitate the transfer.

3. Experimental Setup

3.1 Datasets

The study utilizes five distinct datasets to cover a broad spectrum of figurative English:

  • Hyperbole: The HYPO corpus, augmented with additional silver-standard pairs.
  • Idiom: The MAGPIE corpus, focusing on idiomatic versus literal pairs.
  • Sarcasm: A collection of sarcastic tweets paired with literal interpretations.
  • Metaphor: A literal-metaphor dataset derived from the Gutenberg Poetry corpus.
  • Simile: A collection of self-labelled similes (identified by "like a" patterns) and their literal counterparts.

4. Results and Discussion

4.1 Multi-Task Synergy

Experimental results confirm that the multi-task model consistently outperforms single-task models. This suggests that learning the mechanics of one figurative form (e.g., sarcasm) enhances the model's ability to generate others (e.g., metaphors). Principal Component Analysis (PCA) of word representations revealed that mFLAG effectively clusters literal words with their figurative counterparts more successfully than standard models, indicating a deeper semantic understanding of non-literal relationships.

4.2 Performance Metrics

mFLAG achieved high accuracy in "Literal to Figurative" tasks, particularly in similes (0.95) and hyperboles (0.84). Similes proved to be the most accessible task due to their predictable syntactic structure. Conversely, sarcasm and metaphors remain the most challenging, as they require sophisticated context and world knowledge. Notably, mFLAG excelled in figurative-to-figurative translation; even without parallel training data for pairs like "Hyperbole to Sarcasm," the injection mechanism allowed for successful style swapping while maintaining high BLEU and COMET scores for context preservation.

5. Conclusion and Limitations

mFLAG represents a significant step toward unified creative AI. However, several challenges remain. The current study is limited to the English language, and because figurative language is deeply rooted in culture, multi-lingual generation remains a major hurdle. Furthermore, automatic metrics like BLEU often fail to capture the essence of "creativity," highlighting the need for more robust, human-centric benchmarks. Future work will focus on expanding the framework to include additional figures of speech, such as personification and oxymorons, and exploring cross-cultural figurative transfers.

Summary updated

BibTeX
@inproceedings{lai2022multi,
  author = {Huiyuan Lai and Malvina Nissim},
  title = {{Multi-Figurative Language Generation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
}
Figure