Metaphor Detection and Selectional Preference in AI
This article explores how computational linguistics leverages selectional preference violations to achieve accurate metaphor detection, enabling artificial intelligence to distinguish between literal and figurative language. By analyzing the semantic expectations of words—particularly how verbs and adjectives typically pair with specific nouns—AI systems can identify when a linguistic rule is intentionally broken to create a metaphorical meaning. Below, we examine the mechanics of selectional preferences, how violations signal figurative speech, and the computational models used to process these linguistic anomalies.
Understanding Selectional Preferences
In linguistics, selectional preference refers to the semantic restrictions or expectations that a word imposes on the other words it combines with in a sentence. Simply put, words have "preferences" for the types of words they pair with based on real-world logic.
For example, the verb "drink" prefers an animate subject (like a human or animal) and a liquid object (like water or coffee). When an AI encounters the sentence, "The girl drank the water," the selectional preferences of the verb are fully satisfied. This harmony signals to the system that the statement is literal.
How Violations Signal Metaphors
Selectional preference violation occurs when a word is paired with another word that does not fit its expected semantic category. In computational linguistics, this violation is the primary trigger for detecting a metaphor.
Consider the sentence, "The car drank the gasoline," or "The silence was deafening."
- In the first example, a "car" is an inanimate machine, violating the preference of the verb "drink" for an animate subject.
- In the second example, "silence" is the absence of sound, which violates the expectation of the adjective "deafening" to describe a loud noise.
Instead of dismissing these sentences as grammatical errors or nonsense, metaphor detection algorithms recognize these specific clashes in meaning as intentional. The violation bridges two different conceptual domains—mapping the behavior of a living creature onto a machine, for instance—which is the foundational mechanism of figurative language.
Computational Implementation in AI
To automate the detection of these violations, artificial intelligence relies on several natural language processing (NLP) techniques:
- Lexical Databases and Ontologies: Early and hybrid AI systems use structured databases like WordNet, which group words into hierarchies of concepts (e.g., classifying a "car" as an "artifact" and a "human" as a "living thing"). If a verb requires a "living thing" and receives an "artifact," the system flags a violation and classifies the phrase as metaphorical.
- Distributional Semantics: Modern AI analyzes massive datasets of text to learn selectional preferences statistically. By calculating how frequently words appear together in literal contexts, the AI establishes a baseline of "normal" word pairings. Low-probability pairings that still maintain correct grammar are flagged as potential metaphors.
- Vector Space Models and Word Embeddings: AI converts words into numerical representations called vectors. Words with similar meanings exist close together in a digital "vector space." When a verb and a noun are too far apart in this semantic space—meaning their concepts rarely overlap in the literal world—the model measures this distance as a selectional preference violation.
Overcoming Ambiguity in Detection
While selectional preference violation is a powerful tool, AI must also differentiate metaphors from other linguistic phenomena that break semantic rules, such as typos, nonsense, or other forms of figurative speech like metonymy.
Advanced neural networks, such as Transformers, address this by looking at the broader context of the sentence. Once a selectional preference violation is detected, the AI checks if the properties of the unexpected word can logically map onto the target concept. In "The car drank the gasoline," the AI recognizes that both "drinking" and "consuming fuel" involve taking a liquid into a system to generate energy. Because this conceptual mapping is valid, the AI successfully confirms the violation as a metaphor rather than an error.