Metaphors are fundamental to how humans express complex, abstract ideas by anchoring them to familiar, concrete experiences. However, teaching natural language processing (NLP) systems to recognize them automatically is a significant challenge. Unlike similes, which explicitly signal a comparison using markers such as "like" or "as" (Qianyu He et al.; Tony Veale et al.), metaphors embed their analogical logic implicitly within the sentence structure.
To build an automated system capable of detecting metaphors, researchers have evolved from hand-crafted rule systems to deep neural networks that detect semantic incongruity between a word and its surrounding context.
The Intuition of Semantic Incongruity
At its core, a metaphor introduces a domain shift: a word with a physical, tangible root is mapped onto an intangible, abstract concept (for example, "we need to digest this information"). Computational metaphor detection works by identifying the tension caused by this shift.
One powerful way to capture this computationally is by measuring the gap between a word's inherent literal meaning and its contextual usage. Rowan Hall Maudslay et al. operationalized this intuition in Metaphor Detection using Context and Concreteness by explicitly combining static word embeddings with contextualized representations and human-annotated concreteness ratings. Static embeddings tend to capture a word's baseline, literal meaning, while contextualized models capture its situational meaning. When a word with a highly concrete baseline rating appears in a highly abstract context, the model flags a potential metaphor.
From Rule-Based Reasoning to Sequence Labeling
Early computational frameworks treated metaphor interpretation as a downstream reasoning problem. For instance, the ATT-Meta system proposed by John A. Barnden et al. operated on hand-constructed logical forms, assuming that the metaphorical language had already been identified by an external component (Reasoning in Metaphor Understanding: The ATT-Meta Approach and System).
To scale to unrestricted, naturally occurring text, the field shifted toward framing metaphor detection as a sequence labeling task. Because individual words change meaning based on their neighbors, models needed to generalize across word classes rather than treating every token as an isolated entity. Beata Beigman Klebanov et al. demonstrated that grouping verbs into broader semantic categories using WordNet or data-driven clusters significantly improves a system's ability to detect metaphorical verbs in continuous text (Semantic classifications for detection of verb metaphors). This moved the field away from relying on small, curated datasets where metaphors were isolated and obvious.
Capturing Contextual Shifts with Deep Learning
The advent of deep learning allowed models to capture these semantic shifts dynamically without relying entirely on manual feature engineering. Recurrent architectures, particularly Bidirectional LSTMs (BiLSTMs) paired with Conditional Random Fields (CRFs), became highly effective at token-level prediction.
Andrés Torres Rivera et al. showed that combining residual BiLSTM-CRF architectures with contextualized ELMo embeddings and basic linguistic features yields robust performance on standard corpora (Neural Metaphor Detection with a Residual biLSTM-CRF Model). Similarly, Jennifer Brooks et al. utilized ensembles of attention-driven bidirectional RNNs to handle the ubiquitous and subtle nature of everyday metaphorical language (Metaphor Detection using Ensembles of Bidirectional Recurrent Neural Networks).
The core reason these deep learning models succeed is their ability to represent context. As Jerry Weihong Liu et al. demonstrated, contextualized word embeddings from Transformers like BERT and XLNet inherently capture the subtle semantic displacements that occur when a word is used figuratively (Metaphor Detection Using Contextual Word Embeddings From Transformers). The transformer's attention mechanism naturally weighs the relationships between the target word and its surrounding context, making it highly sensitive to the semantic clashes that signal metaphorical usage.
The Limits of Prompting Large Language Models
With the rise of Large Language Models (LLMs), researchers have questioned whether explicit training is still necessary, or if models can simply be instructed to identify metaphors using established human linguistic guidelines (such as the Metaphor Identification Procedure Vrije Universiteit, or MIPVU).
Sebastian Reimann et al. tested this by translating MIPVU steps directly into LLM prompts (Using Large Language Models to Perform MIPVU-Inspired Automatic Metaphor Detection). They found that while LLMs can mimic the multi-step manual procedure, they still underperform compared to specialized, supervised neural models. The primary failure mode is a high rate of false positives. LLMs struggle with the highly nuanced judgment required to determine whether two distinct meanings share a valid analogical relationship, frequently failing to cleanly separate literal usage from conventionalized or "dead" metaphors that have become standard in daily speech.
Key Foundational Work
Metonymy and Metaphor: What’s the Difference? (1988) — contributed 1 concept elements to this direction.
Metaphor Interpretation as Selective Inferencing (1981) — contributed 1 concept elements to this direction.