Abstract
Accurate processing of non-compositional language relies on generating good representations for such expressions. In this work, we study the representation of language non-compositionality by proposing a language model, PIER+, that builds on BART and can create semantically meaningful and contextually appropriate representations for English potentially idiomatic expressions (PIEs). PIEs are characterized by their non-compositionality and contextual ambiguity in their literal and idiomatic interpretations. Via intrinsic evaluation on embedding quality and extrinsic evaluation on PIE processing and NLU tasks, we show that representations generated by PIER+ result in 33% higher homogeneity score for embedding clustering than BART, whereas 3.12% and 3.29% gains in accuracy and sequence accuracy for PIE sense classification and span detection compared to the state-of-the-art IE representation model, GIEA. These gains are achieved without sacrificing PIER+'s performance on NLU tasks (+/- 1% accuracy) compared to BART.
Introduction
Most modern Natural Language Processing (NLP) systems are built on the principle of compositionality: the idea that the meaning of a sentence is the sum of its parts. This works effectively for literal language like "The cat sat on the mat," but fails for non-compositional idioms like "behind closed doors" or "spill the beans," where individual words do not reveal the true meaning.
The challenge is compounded by Potentially Idiomatic Expressions (PIEs), which can be literal or idiomatic depending on context. Current state-of-the-art models often suffer from "semantic blurring," where idiomatic and literal embeddings are mathematically indistinguishable. This paper introduces PIER, a model designed to generate unified representations that respect both compositional and non-compositional nuances.
Methodology: Attention Fusion and Multi-Objective Training
PIER (Potentially Idiomatic Expression Representation generator) integrates two expert components: BART, which excels at compositional language, and GIEA, a specialized model designed for idiomatic meanings.
The core innovation is the Attention Fusion Layer. This mechanism acts as a router at every network layer, evaluating the sentence context to determine the optimal balance of literal and idiomatic information. Training is guided by three objectives:
- Copy Objective: Standard input reconstruction.
- Similarity Learning: Aligning internal representations with dictionary definitions using MPNet embeddings.
- Prompt Infilling: Using masked prompts (e.g., "The phrase 'see red' is used in its [MASK] sense") to force explicit categorization of usage.
A variant, PIER+, utilizes multi-prompting—employing five different ways to query the model about an idiom—to further enhance performance.
Experimental Results
We evaluated PIER+ against several baselines, including BART and GIEA, using the MAGPIE dataset and standard NLU benchmarks (SST2, MRPC, PAWS).
Extrinsic Evaluation
As shown in the results table, PIER+ significantly outperforms the previous state-of-the-art (GIEA) in Sense Classification (SenseCLF), achieving a 3.12% gain in accuracy. In Span Detection (SpanDET), PIER+ demonstrated a substantial 28.54% gain in sequence accuracy over standard BART. Importantly, PIER+ maintains competitive performance on general NLU tasks (SentCLF and ParaID), matching BART's accuracy within a 1% margin, proving that specialization does not come at the cost of general ability.
Intrinsic Evaluation
Intrinsic tests revealed that PIER+ achieved a 33% higher homogeneity score than BART, indicating superior internal organization of idiom meanings. Furthermore, it increased the "distance" between literal and idiomatic embeddings of the same phrase by +0.49 cosine distance compared to GIEA, effectively mitigating the semantic blurring problem.
Conclusion
PIER+ demonstrates that a unified representation model can effectively handle the complexities of non-compositional language without sacrificing general linguistic capabilities. By leveraging dictionary guidance and attention fusion, the model successfully navigates the contextual ambiguity of potentially idiomatic expressions. Future work will focus on improving generalization to unseen idioms and reducing the reliance on labeled supervision.
Summary updated