Metaphor Detection with Effective Context Denoising

Shun Wang, Yucheng Li, Chenghua Lin, Loïc Barrault, Frank Guerin · DOI

Introduction

Metaphor detection is a fundamental task in Natural Language Processing (NLP) that involves identifying whether a word is used in a literal or figurative sense. For example, in the sentence "This project is a headache," a model must recognize that "headache" refers to a source of frustration rather than a physical ailment. While large language models (LLMs) like RoBERTa have significantly advanced the field, they often struggle with "context noise." In long or complex sentences, irrelevant words can obscure the semantic relationship between a target word and its descriptors, leading to misclassification.

This paper introduces RoPPT (RoBERTa with Pruning on target-oriented Parse Tree), a novel approach designed to denoise context by focusing on the syntactic structure of a sentence rather than its linear sequence.

The RoPPT Framework

The core innovation of RoPPT is its ability to filter out irrelevant information by leveraging dependency parse trees. The authors argue that a word's metaphoricity is determined by its relationship with its syntactically related neighbors, which may not always be adjacent in a sentence.

Target-Oriented Reshaping and Pruning

Standard dependency trees typically root at the main verb. RoPPT transforms this structure by "re-rooting" the tree so that the target word—the word being evaluated for metaphoricity—becomes the center. Once the tree is reshaped, the model applies a pruning mechanism: it retains only the words within a specific "neighbor range" (syntactic distance) from the target word. This process effectively strips away grammatically distant sub-clauses and modifiers that do not contribute to the target word's figurative meaning.

Dual-Theory Architecture

RoPPT integrates two foundational linguistic theories to improve detection accuracy:

  1. Metaphor Identification Procedure (MIP): This component compares the target word's contextual embedding with its isolated, literal embedding to detect shifts in meaning.
  2. Selectional Preference Violation (SPV): This component compares the target word with its denoised context to identify semantic "clashes" (e.g., an inanimate object performing an action typically reserved for humans).

Experimental Evaluation

The model was evaluated against four major benchmarks: VUA-18, VUA-20, MOH-X, and TroFi. These datasets range from short, WordNet-sampled sentences to long, complex excerpts from the Wall Street Journal.

Key Results

RoPPT achieved state-of-the-art (SOTA) or highly competitive performance across all datasets:

  • VUA-18 & VUA-20: RoPPT achieved F1 scores of 79.1 and 72.8, respectively, surpassing the previous leading model, MelBERT.
  • MOH-X: The model reached an F1 of 80.1, representing a significant improvement over existing baselines.
  • Zero-Shot Generalization: When trained on VUA-20 and tested on other datasets without further fine-tuning, RoPPT demonstrated superior transferability, suggesting that its syntactic pruning captures universal patterns of metaphor usage.

Insights: The Power of Denoising

The most significant finding of the research is RoPPT’s robustness in the face of sentence length. In sentences exceeding 40 tokens, RoPPT outperformed MelBERT by 3.5 F1 points. This confirms that as sentences become more complex and "noisy," the value of syntactic pruning increases.

The authors also identified a "denoising sweet spot" at a neighbor range of four hops in the parse tree. This suggests that while metaphors are grounded in local syntactic relationships, those relationships often span further than a simple linear window of two or three words.

Conclusion and Future Work

RoPPT demonstrates that effective metaphor detection requires more than just powerful embeddings; it requires a structured understanding of which context words actually matter. By pruning irrelevant syntactic noise, RoPPT achieves higher accuracy and better generalization, particularly in complex text.

Future research may involve integrating external knowledge bases like ConceptNet to provide additional semantic grounding when the immediate context is sparse. Additionally, the authors aim to refine the pruning process by weighting different types of syntactic relations—such as subject-verb vs. adjective-noun—differently to further enhance the model's precision.

Summary updated

BibTeX
@inproceedings{wang2023metaphor,
  author = {Shun Wang and Yucheng Li and Chenghua Lin and Loïc Barrault and Frank Guerin},
  title = {{Metaphor Detection with Effective Context Denoising}},
  booktitle = {EACL},
  year = {2023},
  doi = {10.18653/v1/2023.eacl-main.102},
}
Figure