Can Your Model Tell a Negation from an Implicature? Unravelling Challenges With Intent Encoders (2024)

Abstract: Conversational systems often rely on embedding models for intent classification and intent clustering tasks. The advent of Large Language Models (LLMs), which enable instructional embeddings allowing one to adjust semantics over the embedding space using prompts, are being viewed as a panacea for these downstream conversational tasks. However, traditional evaluation benchmarks rely solely on task metrics that don’t particularly measure gaps related to semantic understanding. Thus, we propose an intent semantic toolkit that gives a more holistic view of intent embedding models by considering three tasks– (1) intent classification, (2) intent clustering, and (3) a novel triplet task. The triplet task gauges the model’s understanding of two semantic concepts paramount in real-world conversational systems– negation and implicature. We observe that current embedding models fare poorly in semantic understanding of these concepts. To address this, we propose a pre-training approach to improve the embedding model by leveraging augmentation with data generated by an auto-regressive model and a contrastive loss term. Our approach improves the semantic understanding of the intent embedding model on the aforementioned linguistic dimensions while slightly effecting their performance on downstream task metrics.

## introduction conversational systems use intent embedding models to encode input utterances into vectors that are used to understand intent semantics for few-shot intent classification and/or intent discovery @xcite @xcite . the intent classification task leverages a predefined distance metric to find the nearest intent class/instances to the test utterance in the embedding space (vinyals et al., 2016; snell et al., 2017; * work conducted as in an intern/employee of amazon. @xcite , while intent discovery considers a clustering algorithm on top of multiple utterance embeddings to detects novel intent clusters. while these applications have been studied separately, a common underlying assumption is the embedding space encodes semantics (and a distance metric) between utterances and intents. to achieve this, various approaches have been proposed such as supervised pre-training on labeled utterance data belonging to a wide range of intents @xcite or by combining pseudo intent names @xcite . however, the evaluation of these embedding models only consider existing conversational benchmarks (and task metrics) that lack dedicated test data necessary to evaluate gaps in semantic understanding. in this paper, we consider a complementary evaluation approach that tries to understand how well these embedding models capture the semantics of two common linguistic phenomenon seen in real-world conversational systems: negation -negation semantics alongside an explicitly mentioned intent utterance (e.g. no, i don't want you to play music!) and implicatureutterances indirectly hinting at an intent that might require some reasoning steps (e.g. i feel like @xmath0. for this purpose, we propose an intent semantics toolkit that includes challenging test splits for existing classification & clustering tasks and a novel triplet task. the triplet task consider an utterance triplet ⟨original, implicature, negation⟩ and evaluates if the implicature utterance is closer to the original utterance in the embedding space as compared to negation. the implicature and negation utterances for the test data are generated using two novel prompt designs for chatgpt followed by human-in-the-loop quality control mechanisms. the recent popularity of embeddings derived from large language models and the possibility @xcite to synthesize training data for improved semantic concepts understanding. for benchmarking data, we prompt the llm to generate negation and implicature from original utterances, which are validated by both automatic and manual quality control. for training data, we first extract intents from unlabeled utterances, then, we generate hard examples using the llm, which will be combined with retrieved utterances for fine-tuning. to improve an embedding model's semantic understanding on the aforementioned linguistic phenomena, we consider a fine-tuning approach that leverages llm-generated positive (related to an intent) and negative (unrelated to an intent) utterances for augmentation alongside a contrastive loss objective. our ablations highlight the need for both kinds of utterances for augmentation and our best model consistently outperforms the original embedding models on the triplet task. observing different magnitudes of improvement on the different tasks, we dive deep to understand correlation between the various tasks and highlight some negative interactions. this highlights that approaches to improve embedding models on semantic understanding and downstream task might need to consider trade-offs; this is in line with several previous works @xcite @xcite . to summarize, our contributions are three-fold: (1) we iden-tify two linguistic challenges that are commonly observed in real-world intent detection systems, but are overlooked in the literature: negation and implicature. 1 (2) we devise intent semantics toolkit that includes a novel triplet task and exposes the shortcomings of intent embedding models on semantic understanding of negation and implicature. we propose prompting strategies to generate evaluation data with chatgpt and consider humanin-the-loop quality control. (3) we explore finetuning approaches with automatically generated utterances for data augmentation and interpret the semantic dimensions of implicature and negation as positive and negative examples in the contrastive learning loss. the results show that generated utterances can help improve the performance on the triplet task. the code to reproduce intent semantic toolkit and the finetuned models will be available at https://github.com/amazon-science/ intent-semantics-toolkit . ## preliminary a model (f ) for embedding encodes input sentences (u i ) onto a continuous vector space (f (u i )). for a good embedding model, a distance metric d over embeddings (say f (u i ) and f (u j )) should be able to capture some notion of semantic similarity that in turn empowers downstream applications such as clustering and classification. in this paper, we will consider d to be the widely popular cosine distance, i.e. d(f while these embedding models are common in several applications, we will concentrate on intent embedding models, where input sentences are user utterances (e.g. i would like to order food) and intents (e.g. order food, cancel order, etc.) comprise of semantic clusters represented by a set of similar user utterances. in such contexts, embedding models have been used to perform few/zero-shot classification of test-time utterances to a set-of predefined intents @xcite @xcite or to discover novel intent classes given a set of unlabelled user utterances @xcite . despite its success, we observe that these intent embedding models often fail to capture nuanced language semantics that are common in realworld conversational agents. while previous work has shown such failures are common in the context of real-world noise @xcite , we focus on two semantic aspects-(1) negation: utterances that explicitly express no interest towards a particular intent (e.g. i don't want to order a drink.), and (2) implicature: utterances that do not explicitly convey an intent but imply it (e.g. i am @xmath1. figure 2 shows that intent embedding models embed negations (that clearly disregards an intent) closer to intent utterances than implicatures (that implies an intent). in the real-world, we observe negation often occurs when a system incorrectly directs a customer towards an intent (and the customer has to explicitly mention they didn't intend it), while implicature is common due to a customer's incomplete knowledge about the potential functionality supported by a chatbot. ## intent semantics toolkit in this section, we first introduce the four evaluation tasks in our toolkit that analyze the semantic understanding capabilities of intent embedding models ( §4.1). then, we consider the challenge of obtaining data related to negation and implicature ( §3) and quality assurance procedures to ensure a high-quality test set ( §4.3). eventually, we show evaluation of sota models on our dataset ( §4.4). ## model improvement we seek to improve the semantic understanding of embeddings models to negation and implicature. to answer this, we first introduce a data curation procedure where new utterances are generated based on an unlabeled dialogue corpus ( §5.1) and then investigate continued fine-tuning approaches with a contrastive learning loss objective adapted for the triplet task ( §5.2). the lower part of figure 1 given a diagrammatic overview. ## experimental results in this section, we first evaluate our fine-tuned models in §5 on our proposed intent semantics toolkit. we then select the best prompt combination for training models on the validation set, and then evaluate on the test set. finally, we shed lights on the ## conclusion and future works in this paper, we propose a new evaluation toolkit for intent embedding models that measure their semantic understanding on two lingusitic phenomenon commonly observed in conversational systems-negation and implicature. for this we propose intent semantic toolkit that combines a novel triplet task, a binary classification task and the test splits that evaluate the model's semantic understanding on downstream intent recognition (classification and clustering) tasks. our study shows that current intent embedding models do not have sufficient understanding of these two real world phenomenon, i.e. negation and implicature. we then propose to integrate hard positives and negatives generated from an llm with a "zoo" of prompts to fine-tune the model. the fine-tuning is conducted on a set of unlabeled utterances from general domain and is evaluated on our proposed toolkit. our best model demonstrates improvements across most tasks over baseline models. we further combine llm-generated data with intent-aware-encoder training and show performance improvements across all original test datasets and most newly introduced evaluation datasets in the intent semantic toolkit. finally, the correlation analysis between pairs of tasks indicates that a better balance between negation-related tasks and regular benchmark tasks need to be achieved. our work also inspires future works to develop and evaluate an instruction-following embedding model that can improve performance via prompting without the need for further fine-tuning of the model. the negation utterances discussed in this paper have significant relevance with out-of-scope utterances -utterances that can not be covered by existing intents/services. on the other hand, negation utterances should also be rejected by current intent classifiers. however, negation utterances may be harder to be distinguished due to the high vocabulary overlap with positive utterances. moreover, customers may demand the conversational agents to respond differently for negation and out-of-scope utterances. thus it is necessary to study them separately.