Unified Representation for Non-compositional and Compositional Expressions

Ziheng Zeng, Suma Bhat · DOI

Abstract

Modern Natural Language Processing (NLP) systems are largely predicated on the principle of compositionality—the assumption that the meaning of a complex expression is determined by the meanings of its constituent parts. However, this principle fails when encountering non-compositional language, specifically idioms. This paper introduces PIER (Potentially Idiomatic Expression Representation generator), a framework designed to bridge the gap between compositional and non-compositional semantics. By integrating a general-purpose language model with a specialized idiomatic expert through a context-aware attention fusion mechanism, PIER successfully disambiguates literal and figurative meanings, significantly outperforming existing state-of-the-art models.

Introduction

In standard NLP architectures, a phrase like "spill the beans" is often processed based on the literal embeddings of its individual tokens. While effective for literal descriptions, this approach results in "semantic nonsense" when applied to idiomatic expressions. The challenge is twofold: first, the non-compositionality of idioms means their meanings are often entirely unrelated to their components; second, many expressions are "Potentially Idiomatic Expressions" (PIEs), where the correct interpretation (literal vs. figurative) depends entirely on context. For instance, "behind closed doors" could refer to a physical location or a clandestine meeting.

Previous attempts to solve this, such as the GIEA model, often over-corrected by assuming all potential idioms were always figurative. PIER addresses this by creating a unified representation that dynamically handles both literal and idiomatic uses.

The PIER Framework

PIER is built upon the BART architecture, enhanced with a "mixture of experts" approach. The framework introduces several key innovations to handle the nuances of idiomaticity:

Attention Fusion Layers

Rather than simply fine-tuning a base model, PIER incorporates "Attention Fusion" layers. These layers function as a routing mechanism between two internal experts: a standard BART layer (the compositional expert) and a GIEA adapter layer (the non-compositional expert). Based on the surrounding context of a sentence, the fusion layer determines the optimal weighting for each expert, allowing the model to shift fluidly between literal and figurative interpretations.

Similarity Learning and Dictionary Anchors

To ensure that idiomatic embeddings are semantically grounded, the authors utilize a similarity loss function. This pulls the model's idiomatic representations closer to high-quality dictionary definitions (encoded via MPNet) while pushing them away from literal interpretations. By using external knowledge from sources like Google Dictionary and Wiktionary, the model gains a "ground truth" for meanings that cannot be derived from individual words alone.

Prompt Infilling

During the training phase, PIER utilizes prompt infilling. The model is tasked with classifying the type of expression (literal vs. idiomatic) or generating a definition within a specific context. This process explicitly teaches the model to distinguish between the different senses of a PIE.

Experimental Results

The model was evaluated using the MAGPIE dataset, which contains over 32,000 labeled sentences from the British National Corpus. The results demonstrate that PIER provides a superior balance of specialized and general linguistic knowledge.

  • Improved Embedding Quality: In intrinsic evaluations, PIER achieved a 33% higher homogeneity score than standard BART, indicating that its idiomatic embeddings are more logically clustered by actual meaning.
  • Superior Disambiguation: PIER outperformed the previous state-of-the-art (GIEA) by 3.12% in sense classification and 3.29% in span detection (identifying the boundaries of an idiom within a sentence).
  • Significant Gains over Base Models: Compared to standard BART, PIER showed a 28.54% improvement in detecting idiom spans, highlighting the inadequacy of standard compositional models for this task.
  • Preservation of General Abilities: Crucially, PIER maintained robust performance on standard NLU benchmarks such as SST2 (sentiment analysis) and MRPC/PAWS (paraphrase identification), staying within +/- 1% accuracy of the original BART model.

Discussion and Limitations

PIER demonstrates that it is possible to specialize a model for complex linguistic features without sacrificing general-purpose utility. However, some challenges remain. The model currently struggles with "unseen" idioms—expressions not present in its training data—because idiomatic meanings are often conventionalized and cannot be guessed from context alone. Furthermore, the reliance on labeled datasets for literal vs. idiomatic senses presents a bottleneck for scaling to more diverse languages or dialects.

Conclusion

PIER represents a significant step forward in enabling language models to navigate the complexities of human language. By moving beyond simple compositionality and employing a context-dependent fusion of experts, the framework provides a more accurate and nuanced representation of both literal and figurative expressions. Future work may extend this architecture to other non-compositional phenomena, such as metaphors and similes, further closing the gap between machine and human language understanding.

Summary updated

BibTeX
@inproceedings{zeng2023unified,
  author = {Ziheng Zeng and Suma Bhat},
  title = {{Unified Representation for Non-compositional and Compositional Expressions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=HIPPG2SH3u},
}
Figure