Enhancing Idiomatic Representation in Multiple Languages via an Adaptive Contrastive Triplet Loss (2024)

Abstract: Accurately modeling idiomatic or noncompositional language has been a longstanding challenge in Natural Language Processing (NLP). This is partly because these expressions do not derive their meanings solely from their constituent words, but also due to the scarcity of relevant data resources, and their impact on the performance of downstream tasks such as machine translation and simplification. In this paper we propose an approach to model idiomaticity effectively using a triplet loss that incorporates the asymmetric contribution of components words to an idiomatic meaning for training language models by using adaptive contrastive learning and resampling miners to build an idiomatic-aware learning objective. Our proposed method is evaluated on a SemEval challenge and outperforms previous alternatives significantly in many metrics. Our code is available at our project1.

heading: 1 Introduction
text: Among multiword expressions (MWEs), idiomatic expressions (IEs) are difficult to model as their meaning is often not straightforwardly related to the meaning of the component words (Sag et al., 2002). These expressions, which are also commonly referred to as non-compositional expressions, often take on figurative meanings. For example, eager beaver has a figurative meaning of an enthusiastic person who works very hard different from the literal meanings of its component words like impatient rodent (Sag et al., 2002; Villavicencio and Idiart, 2019). They are a common occurrence across various genres (Haagsma et al., 2020).
Accurately understanding idiomatic expressions has posed a significant challenge, as word and phrase representations may favor inherently compositional usages at the levels of both words and subwords to minimize their vocabulary (Gow-Smith
1https://github.com/risehnhew/Enhancing-IdiomaticRepresentation-in-Multiple-Languages
et al., 2022). Indeed recent models are mainly driven by compositionality, which is at the core of tokenization (Sennrich et al., 2016) and selfattention mechanism (Vaswani et al., 2017). Pretrained language models including static and contextualised embeddings do not seem to be wellequipped to capture the meanings of IEs, as IEs with similar meanings are not close in the embedding space (Garcia et al., 2021b). This reveals a need for models that can accurately capture idiomatic language. Ensuring precise representation of IEs is crucial for their precise handling in various downstream applications, such as sentiment analysis (Liu et al., 2017; Biddle et al., 2020), dialog models (Jhamtani et al., 2021) and text simplification (He et al., 2023).
To address this issue, previous methods often rely on new datasets with human annotations or on data augmentation (Liu et al., 2023a; Dankers and Lucas, 2023). However, the use of alternative training processes has also been effective, including regression objective functions with a siamese network (Tayyar Madabushi et al., 2021) or substitute objectives (Liu et al., 2022) to break the compositionality of idiomatic phrases, as finding an objective to stand for idiomatic representation is difficult.
Our work focuses on the development of idiomatic-aware language models, which are designed to better represent MWEs of various degrees of idiomaticity in natural language text. To achieve this, we adopt the definition of idiomaticaware models from SemEval 2022 task 2 (Tayyar Madabushi et al., 2022) that when using the model, the semantic similarity between an IE and its incorrect paraphrase equals the semantic similarity between a correct and an incorrect paraphrase. Our approach involves fine-tuning a pre-trained model using a bespoke triplet loss function that is specifically designed for capturing the asymmetry between the surface forms of the component
12473
words and their semantic contribution to the meaning of the expression. To build this idiomatic-aware language model, we use in-batch positive-anchornegative triplets (Balntas et al., 2016). Our model is trained on extracted triplets, where sentences with the idiomatic expressions and their synonyms correspond to positive and anchor respectively, and vice-versa, Figure 1. The aim of this training is to enable the model to learn the difference between the literal meanings of the component words of an MWE when used in isolation and their idiomatic meanings as part of the MWE. We use the "learnto-compare" paradigm of contrastive learning (CL), which has been successfully adopted for obtaining better text embeddings (Ni et al., 2022b,a; Wang et al., 2022) including for polysemous words (Liu et al., 2019a). This framework fits well with our objective of distinguishing between the figurative and literal meanings of MWEs.
To evaluate the approach, a set of models with varying sizes and pre-training strategies is trained using this novel training method that we proposed. The best models achieved new state-of-the-art results in the dataset containing expressions of varying levels of idiomaticity, and our best model demonstrated a substantial improvements in both idiom-only performance and overall performance compared to the previous best results. Our contributions are:
An efficient approach for creating language models that can represent MWEs of varying levels of idiomaticity. This is achieved through a specialized training process using a triplet loss function and in-batch positive-anchornegative triplets.
An idiomatic-aware loss function tailored to directly optimize the representation of idiomatic language and the potentially asymmetric and non-compositional contributions of the component words. This function plays a crucial role in training to discern the nuanced differences between idiomatic and literal meanings of MWEs.
New state-of-the-art performance models that enable the understanding of idiomatic language. This advancement represents a major leap forward opening up new possibilities for more nuanced and accurate language understanding.
The paper starts with an overview of previous work on idiomaticity representation in Section 2. It also introduces contrastive learning in NLP and IE evaluation methods. Section 3 presents our method using a triplet loss and data mining to do efficient training. Section 4 describes our experiments, and Section 5 analyzes the results.

heading: 2 Related Work
text: Idiomaticity representation can be challenging even for large language models (King and Cook, 2018; Nandakumar et al., 2019; Cordeiro et al., 2019a; Hashempour and Villavicencio, 2020; Garcia et al., 2021b; Klubička et al., 2023). For instance, GPT3 (Brown et al., 2020) reaches only 50.7% accuracy in idiom comprehension (Zeng and Bhat, 2022a). This may be possibly due to idiomatic expressions being non-compositional and having figurative meanings that go beyond its individual words (Baldwin and Kim, 2010). Methods that have been used for representing idiomaticity include combining compositional components with adaptive weights (Hashimoto and Tsuruoka, 2016; Li et al., 2018a), representing MWEs with single tokens (Yin and Schütze, 2015; Li et al., 2018b; Cordeiro et al., 2019b; Phelps, 2022) and creating phrase embeddings that effectively capture both compositional and idiomatic expressions (Hashimoto and Tsuruoka, 2016). The latter involves an adaptive learning process that adjusts to the nature of the phrases to generate accurate representation. An adapter-based approach is proposed that augmenting the BART model with an "idiomatic adapter" trained on dedicated idiom datasets (Zeng and Bhat, 2022b). This adapter acts as a lightweight expert, enhancing BART’s ability to capture figurative meanings alongside literal interpretations.
PIER (Zeng and Bhat, 2023), a language model based on BART, specifically addresses the challenge of representing non-compositional expressions, such as idioms, in natural language. Traditional compositionality-based models often struggle with these expressions, as their meaning cannot be simply derived from the sum of their parts. PIER overcomes this by incorporating an "idiomatic adapter" which learns to represent figurative meanings alongside literal ones. Additionally, Liu et al. (2023b) proposed a novel approach to idiomatic machine translation through retrieval augmentation and loss weighting, which significantly improves the translation quality of idiomatic expressions by leveraging context retrieval mechanisms and adjusting loss functions to better handle idiomaticity.
Contrastive Learning Contrastive learning is a method in machine learning that trains a model to distinguish between similar and dissimilar pairs of data. In recent times, significant progress has been made in sentence embeddings through contrastive learning (Gao et al., 2021; Giorgi et al., 2021a; Kim et al., 2021; Wu et al., 2022; Zhang et al., 2022; Xu et al., 2023). It also has been widely applied in other NLP research fields, such as text classification (Fang et al., 2020), machine translation (Pan et al., 2021), information extraction (Qin et al., 2021), question answering (Karpukhin et al., 2020) and text retrieval (Xiong et al., 2020). Despite their shared goal of acquiring high-quality text representations (Reimers and Gurevych, 2019; Gao et al., 2021; Neelakantan et al., 2022; Giorgi et al., 2021b), the exploration of idiomatic representation and related research through contrastive learning is still yet to be fully explored. Contrastive learning with triplet loss involves training the model on triplets: an anchor sample, a positive sample (similar to the anchor), and a negative sample (dissimilar to the anchor). The goal is to minimize the distance between anchors and positive samples while maximizing the distance between anchors and negative samples. This approach has recently been applied to tasks such as idiom usage recognition and metaphor detection (Zhou et al., 2023).
Idiomaticity Representation Evaluation Assessing idiomatic representation in language models has included both extrinsic and intrinsic evaluations. Extrinsic methods evaluate how well the model’s idiomaticity representation impacts downstream tasks, such as machine translation (Dankers et al., 2022), sentence generation (Zhou et al., 2021)
or conversational systems (Adewumi et al., 2022). Intrinsic methods evaluate the model’s understanding of idiomaticity itself, using approaches like probing to investigate and understand the linguistic information encoded in the representation (Garcia et al., 2021a). Datasets like AStitchInLanguageModels (Tayyar Madabushi et al., 2021) and Noun Compound Type and Token Idiomaticity (NCTTI) dataset (Garcia et al., 2021a) offer labelled examples for intrinsically testing how much the similarities perceived by a model are compatible with human judgements about similarity. More broadly, SemEval-2022 task 2B (Tayyar Madabushi et al., 2022), evaluates idiomaticity representation in multilingual text while also requiring models to predict the semantic text similarity (STS) scores between sentence pairs, regardless of whether or not either sentence contains an idiomatic expression. The main objective of this task is to address the shortcomings of existing state-of-the-art models, which often struggle to handle idiomaticity. We use this dataset to evaluate our methods.

heading: 3 Idiomaticity-aware Objective
text: Our strategy for improving IE representation in language models utilizes a contrastive triplet loss adapted to prioritize idiomaticity and employs a miner to generate positive-anchor-negative triplets for training the model.

heading: 3.1 Triplet Loss
text: Triplet loss is a powerful tool for training language models to learn representations of data that are useful for a variety of NLP tasks (Neculoiu et al., 2016). It has also been widely used in training models for tasks such as image retrieval, and face recognition (Schroff et al., 2015; Khosla et al., 2020).
Triplet loss is a distance-based loss function defined as
La,p,n = max(d(ai, pi)− d(ai, ni) +m, 0), (1)
where the triplets (ai, pi, ni), i = 1 · · ·N , correspond to anchor, positive and negative examples, where ai and pi are semantically identical and ni is semantically dissimilar from them. d(x, y) is a distance measure and in our method we use cosine similarity (denoted here by sim)
d(x, y) = sim(x, y). (2)
Finally, the margin m controls the minimum distance between anchor-positive pairs and anchornegative pairs.
Selecting the right margin is crucial for our method. If it is too small, the task becomes too easy, lacking meaningful distinctions. Conversely, if it is too large, it can slow down convergence or yield suboptimal solutions (Schroff et al., 2015). The margin is a hyperparameter and its tuning requires experimentation based on the specific dataset and application.
In this paper we use a miner to build triplets for learning idiomaticity more efficiently.

heading: 3.2 Modelling IEs with Adaptive Contrastive Tripet Loss
text: This section explains how to improve the language model’s ability to understand IEs in text without STS scores by adapting triplet loss to the IE-aware training strategy. We will describe the process stepby-step and discuss its benefits.

heading: 3.2.1 Task Definition
text: One widely used approach for measuring idiomaticity is by calculating the distance between a dedicated representation for the MWE as a single token and a compositional representation of its components using operations like sum or multiplication (Mitchell and Lapata, 2008; Cordeiro et al., 2019b). A good idiomatic expression representation, as framed by Madabushi et al. (2022), should have the following property:
sim(SMWE , S→c) = 1 sim(SMWE , S→i) = sim(S→c, S→i) (3)
where SMWE denotes a sentence containing the idiomatic expression and S→c and S→i represent sentences with the idiomatic expression replaced by its correct and incorrect paraphrases, respectively. Ensuring these properties hold for all MWEs during training using standard loss functions can be challenging.
Previous studies need annotated similarity scores of pairs as labels for building the training set (Tayyar Madabushi et al., 2021; Phelps, 2022). Their objective functions are as follows:
sim(SMWE , S→c) = 1
sim(SMWE , S→i) = score1 sim(S→c, S→i) = score2
(4)
where score1 and score2 are STS scores used to measure the similarity between two pieces of text,
with scores typically ranging from 0 (no similarity) to 1 (identical meaning). In previous methods, language models were trained to predict STS scores between text containing IEs and those without IEs, in order to improve their ability to understand IEs.
In our method, we will utilize a triplet loss in combination with a miner to extract triplets without STS scores, approximating the definition in equations (3). It is worth noting that without using STS scores, training data can be acquired more easily.

heading: 3.3 Mining to Extract Triplets
text: The original dataset only has IEs, the sentences with IE and their correct and incorrect paraphrases. To extract triplets for our idiomatic-aware training we use a semantic meaning miner. We use batch negatives approach that leverages the other samples present in the same mini-batch for serving as negative instances. However, not all negatives in a batch are useful for our training. Thus, we introduce a special preprocessing step in our method.
Relabel Training Data For a triplet to be valid, it must meet certain requirements. We first categorize sentences into different groups. Each group contains a sentence with the IE (s), its correct (c) and incorrect (i) paraphrases, such as examples in Table 2. New labels will be assigned in each group based on IEs and their paraphrases. Our approach assigns identical labels to sentences with the same meaning (original sentence and correct paraphrases). Firstly, s and c must have the same label, which means they represent the same meaning. Secondly, each i must have different labels and differ from the label of s and c, which means they represent different meanings.
It also needs labels in different groups to be distinct to others. For example in Table 2, as sentences with index 4 and 5 are a pair of s and c, they are assigned with the same label en3. Other sentences in Group 2 are assigned different labels because they are incorrect paraphrases. The labels in Group 2 are distinct from labels in Group 1.
In this way, a triplet can be acquired easily since anchor, positive are sentences with the same labels, and a negative is a sentence with different labels.
Selected Multi-negatives Negative instances refer to sentences whose labels differ from the anchor and positive in a batch. In the case of Multi Negative Ranking Loss (Sun et al., 2020) with triplet formation, there are multiple negatives [n1, n2, ...nk]
for each anchor-positive pair, and the objective is to ensure that the anchor is closer to the positive than to any of the negatives by a margin.
Lmulti-negative(a, p, [n1, . . . , nk])
=
k∑
i=1
max(d(a, p)− d(a, ni) +m, 0) (5)
We take the SemEval 2022 task 2B training set as our source to build our training data. The dataset comprises approximately 8, 600 annotated examples in multiple languages, including English and Portuguese. It was divided into 4,840 training sentences, 739 development sentences, 483 evaluation sentences and 2,342 test sentences. The original training data already includes information on correct and incorrect paraphrases. The context sentences help disambiguate the IE’s meaning. This annotated data is crucial for training machine learning models to detect idiomatic expressions in varied linguistic contexts, facilitating multilingual natural language understanding and processing.
After relabeling, the training dataset will be a list of sentences with their corresponding label. We do not shuffle the training data to maintain its order, as sentences that belong to a triplet are adjacent in the training set. The batch size is set to 64, which is a balance between easy training and ensuring a sufficient number of sentences to build triplets.
However, not all negatives contribute equally to our learning. Some triplets may already satisfy the constraint (easy triplets), such as triplets with negatives that are sentences from other groups. They provide little to no information of IEs understanding for the model to learn from.
Mine Triplets In our methods, a semantic similarity miner calculates Euclidean distance between all possible pairs of embeddings in a batch and selects according to its similarity margin. The miner similarity margin is the difference between the anchor-positive distance and the anchor-negative distance. It is also a hyperparameter in our method. The miner select the triplets that violate the miner similarity margin to make the model learn nuanced differences between figurative and literal meanings of IEs. For instance, a triplet of sentences could include an idiomatic expression as the anchor, its paraphrases as the positive, and a sentence with a literal meaning as the negative.
Table 2 illustrates the newly build training data. In this case, SMWE and S→c can act as anchor and positive to each other, and S→i can only be treated as the negative in a triplet. It is worth noting that SMWE and S→c are interchangeable to form pairs (ai, pi), which can build more triplets for our training. For example, in Table 2, with the miner, it will only take sentences in the same group because the semantic meanings of different groups are not similar. In this way, sentences in Group 1 can build 2 triplets with index 1 and 2 being the anchor and positive interchangeably. Sentences in Group 2 can build 4 triplets.

heading: 3.4 Objective Transformation
text: In our approach, both SMWE and S→c can serve as anchors. However, since we assign different labels to various incorrect paraphrases, no positive sentence in a group can be associated with any S→i as the anchor. As a result, there are only two possible scenarios in our approach.
If SMWE is the anchor,
sim(SMWE , S→c)− sim(SMWE , S→i) ≤ ma (6)
if S→c is the anchor,
sim(S→c, SMWE)− sim(S→c, S→i) ≤ mb (7)
The margin m is a predefined fixing value. If we set ma = mb, then combining Eq. (6) and Eq. (7), the objective function can be transformed to:
sim(SMWE , S→c)− sim(SMWE , S→i) ≈ sim(S→c, SMWE)− sim(S→c, S→i) (8)
The similarity measure is symmetric, therefore sim(SMWE , S→c) = sim(S→c, SMWE). In this way, our objective function equivalent to:
sim(SMWE , S→i) ≈ sim(S→c, S→i) (9)
Equation (9) approximates the definition of the good idiomatic aware model in Equation (3). In this way, by using our specific triplet loss, we can train a model to be idiomatically aware more directly without STS scores.

heading: 4 Experiment
text: This section presents the comprehensive methodology employed to our model training. We begin by detailing the experiment implementation, including the hyperparameter setting, models used, evaluation method, and the overall setup.

heading: 4.1 Implementation Details
text: The method is implemented by using the Transformers (Wolf et al., 2020) and PyTorch Metric Learning (Musgrave et al., 2020) libraries. Some of the pre-trained models are fetched from Sentence-transformer library2 and HuggingFace Model repositories3.
We calculate sentence similarity using the cosine similarity of the mean pooling of the last two hidden layers. Empirically, we set the similarity margin for the miner to 0.4, and the training loss margin to 0.3. Given the limited availability of idiomatic text data, relying solely on the training signal from our contrastive objective is insufficient for learning general semantic representations. Therefore, we initialize our model with other pre-trained semantic-aware models (Reimers and Gurevych,
2https://www.sbert.net/docs/pretrained_models.html 3https://huggingface.co/models
2019). Our best model uses a pre-trained multilingual model, ‘paraphrase-multilingual-mpnet-basev2’4, and fine-tunes it with our method to fit the task. It is pre-trained with millions of paraphrases, so it can represent sentence semantic meanings well (Reimers and Gurevych, 2019).

heading: 4.2 Evaluation
text: We perform intrinsic evaluation (Reimers et al., 2016) using the SemEval-2022 task 2 Subtask B5 (Sem2B). We use Spearman’s rank correlation (ρ) between model-generated scores and human judgment scores to see how well models understand idioms in sentences. Instead of comparing exact scores, this method focuses on how the sentence pairs are ranked based on predicted similarity compared to human judgments. A higher correlation means the model is better at understanding relationships, including those involving idioms, even if the exact predicted scores themselves aren’t always perfect matches.

heading: 4.3 Comparative Analysis
text: We compare our method with well-performed Semantic Textual Similarity models and recent large language models (LLMs). Some training-based methods are from SemEval-2022 task 2 Fine Tune solutions (Madabushi et al., 2022). Here are brief descriptions:
YNU-HPCC (Liu et al., 2022) is the previous best method, which uses contrastive learning approaches in sentence representation. However, it treats negatives in a batch equally.
drsphelps (Phelps, 2022) introduces a method for improving idiom representation in language models by incorporating idiom-specific embeddings using BERTRAM into a BERT sentence transformer.
baseline is the SemEval task’s baseline results. It is fine-tuned using multilingual BERT (Devlin et al., 2019) and adding single tokens for each MWE in the data.
GTE large 6 is a powerful text embedding model trained with multi-stage contrastive learning, delivers impressive performance across NLP
4https://huggingface.co/sentencetransformers/paraphrase-multilingual-mpnet-base-v2
5https://codalab.lisn.upsaclay.fr/competitions/8121 6https://huggingface.co/thenlper/gte-large
and code tasks despite its modest size (Li et al., 2023).
E5 large 7 uses weakly-supervised contrastive pretraining for text embeddings that achieves excellent for general-purpose text representation (Wang et al., 2022).
LLama2 (Touvron et al., 2023) achieved excellent performance in a series of NLP tasks. We select the LLama2-13B for comparison.

heading: 5 Results and Analysis
text: In this section, we report results and analyze them in different settings.

heading: 5.1 Overall Results
text: Table 3 demonstrates that our method outperforms all other models both overall and in the Idiom Only subset. The "STS only" score refers to the performance of systems on Semantic Text Similarity data that does not necessarily contain idioms. In contrast, the "Idiom only" score pertains to the performance on idiom STS data. "All" represents the overall performance of a model across the entire dataset. In the Idiom Only subset, our method achieves a score of 0.548, which is higher than the score of the next best model, YNU-HPCC (0.428). In the overall performance, it achieves a score of 0.690, exceeding the score of the next best model, YNU-HPCC (0.665). In the STS subset, drsphelps achieves the highest score of 0.819. These results suggest that our method is a powerful and effective idiom-aware text embedding model that can be used for a variety of idiomatic expressions related NLP tasks.
GTE large and E5 large both show a similar pattern of lower performance in the Idiom task (0.236 and 0.252, respectively) but strong results in the STS task (0.806 and 0.807, respectively).
7https://huggingface.co/intfloat/e5-large
Their overall scores (0.465 and 0.514, respectively) suggest that while they are proficient in semantic textual similarity, their capacity to handle idiomatic expressions is not as developed. LLama2 has the lowest scores across all three categories, with a particularly low score for Idiom (0.171). It reveals a surprising lack of ability to represent idiomatic expressions for such recent general large language model.

heading: 5.2 Performance on Different Languages
text: The results in Table 4 show that our best model performed well on Sem2B and in all three languages. The best results were achieved, with overall ρ values of 0.757 for English, 0.707 for Portuguese, and 0.515 for Galician. The best overall results on Sem2B were achieved for English, and the best Idiom Only score was achieved for Portuguese. There is no STS-only score for Galician in the test set. The models performed best on English,
followed by Portuguese and Galician. This is due to the fact that there is more training data available for English than for Portuguese or Galician. The results also show that the models were able to generalize well, even when the amount of training data was limited. For example, the models achieved ρ values of 0.707 and 0.515 for Portuguese and Galician, even though the training data for these two languages was smaller than the training data for English. Compared to other methods in Table 5, our model excels particularly in handling idiomatic expressions, outperforming other models in the Idiom Only subset. Additionally, while drsphelps and E5 large show strong results in the STS subset, our model maintains a balanced performance across all datasets, demonstrating its robustness.

heading: 5.3 Impact of Our Training
text: Table 6 presents comparative performance results of three language models, roberta-base (Liu et al., 2019b), xlm-roberta-large (Conneau et al., 2020) (x-r-large) and paraphrase-multilingualmpnet-base-v2 (p-v2), across three different subsets of data: Idiom Only, STS Only, and All. The first two models are widely used language models with general and multilingual properties, respectively. The third model is the base model we used in our best model. The results are split into two categories: ‘Original’, which indicates the performance before additional training, and ‘After Training’, showing the performance post-training.
For the Idiom Only subset, the original scores were 0.184 for roberta-base, 0.138 for x-r-large, and 0.225 for p-v2. After training, these scores improved significantly to 0.454 for roberta-base, 0.484 for x-r-large and 0.548 for p-v2. When
looking at the overall performance, the x-r-large model’s performance originally was 0.444 and increased to 0.639 after training. Similarly, the p-v2 model’s performance was initially 0.532 and rose to 0.690 after training. In the STS Only subset, there have been declines at p-v2 from 0.838 to 0.716. It is because our training only focuses on improving idiom representation, and it may slightly sacrifice the performance of specific fully-trained models.
The size of our model’s parameters is slightly larger than most, but it significantly outperforms others, demonstrating the effectiveness of our proposed method beyond just using a larger model. As shown in Table 4, our method achieves superior results in idiomatic representation even when compared with implementations using the same model sizes.
The results in Table 7 showcase that as the number of epochs increases, the overall performance as well as the performance on the "Idiom Only" subset generally improves. This suggests that the model is learning and improving its IE understanding ability during our training. The performance on the "Idiom Only" subset starts very low at epoch 0, with an accuracy of 0.225, which is expected since the model has not learned much IE representation yet. There is a significant improvement between epoch 0 and epoch 8, with the score nearly doubling to 0.499. The improvement in performance starts to plateau after epoch 10, with only minor increases observed at epochs 15 and 25. The "STS Only" subset starts with a high performance even at epoch 0, with an accuracy of 0.838. This is because the model has already been pre-trained with STS tasks. Unlike the "Idiom Only" subset, the performance on the "STS Only" subset decreases as the number of epochs increases, dropping to 0.716 by epoch 25. This could indicate that the model is becoming more specialized in the idiom task at the expense of the STS task. In summary, while the model is improving in its ability to understand idioms with more training, this comes at the cost of its performance on STS tasks. This trade-off can be addressed by adjusting the training process.
In summary, our models were able to generalize well to different settings, even when the amount of training data was limited. This suggests that the models are learning to capture the underlying properties of idiomatic expressions, rather than simply memorizing a list of idiomatic expressions.

heading: 6 Discussion
text: The proposed model for training requires the identification of idiomatic expressions (IEs) in each sentence beforehand. This step is crucial for reducing the difficulty of the training process. Without identifying the IEs beforehand, the model may not perform optimally, and its accuracy may be compromised. Therefore, it is essential to ensure that the text has IEs identified to achieve the best results.

heading: 7 Conclusion
text: Idiom representations have always been a challenge due to the non-compositional nature of idiomatic expressions. The performance of downstream tasks, such as translation and simplification, is dependent on the quality of the representations. This paper proposes a new method to train language models using adaptive contrastive learning with triplets and resampling miners. In this way, our method can build a better optimization objective, which makes the training very efficient.
The proposed method, evaluated on the idiomatic semantic text similarity tasks, significantly outperforms previous methods. With limited idiomatic text data, the sole training signal of the contrastive objective is not sufficient to learn general semantic representations. Therefore, the model is initialized with other pre-trained semantic-aware models. A series of base models in different sizes and pre-training strategies are trained in the proposed training loss. The best models achieve new state-of-the-art results with a significant improvement in overall over the previous best in the evaluation task.

heading: 8 Future Work
text: In the future, we plan to use the idiomatic-aware model in other NLP tasks that require sensitivity
to idiomatic expressions, such as machine translation. Additionally, we aim to improve the model’s training by adding more supervision, which will help it focus on contextual information. This will allow the model to better understand multiword expressions based on different contexts.

heading: 9 Limitations
text: In order to train our model, we require triplets that consist of three distinct parts: a sentence that contains IEs, a correct paraphrase of those IEs, and an incorrect paraphrase of those IEs. The quality of triplets is crucial to the development of our model and requires intensive human expert involvement to ensure accuracy.

heading: 10 Acknowledgments
text: The work was partly supported by EPSRC grant EP/T02450X/1, by NAF/R2/202209 grant and by Brazilian CNPq Grant 311497/2021-7.

heading: Future Work
text: In the future, we plan to use the idiomatic-aware model in other NLP tasks that require sensitivity
to idiomatic expressions, such as machine translation. Additionally, we aim to improve the model’s training by adding more supervision, which will help it focus on contextual information. This will allow the model to better understand multiword expressions based on different contexts