Reliable and Interpretable Drift Detection in Streams of Short Texts (2023)

Abstract: Data drift is the change in model input data that is one of the key factors leading to machine learning models performance degradation over time. Monitoring drift helps detecting these issues and preventing their harmful consequences. Meaningful drift interpretation is a fundamental step towards effective re-training of the model. In this study we propose an end-to-end framework for reliable model-agnostic change-point detection and interpretation in large task-oriented dialog systems, proven effective in multiple customer deployments. We evaluate our approach and demonstrate its benefits with a novel variant of intent classification training dataset, simulating customer requests to a dialog system. We make the data publicly available.

## introduction contemporary data centers rely heavily on machine learning services in their deployed systems. these systems are vulnerable to the data drift problem: the phenomenon where the statistical properties of the underlying independent variable change over time. as a concrete example, consider the case where the distribution of data arriving to a supervised classifier gradually diverges from that the model was trained on. such a phenomenon introduces one of the key challenges in maintaining large models, where drift typically results in performance degradation. manual inspection of the data is labor-intensive and error-prone, and actual drift might remain unnoticed. automatic monitoring and detection of divergences in incoming data streams facilitates early risk mitigation introduced by drift. goal-oriented dialog systems foot_0 have gained much attention in both the academic and industrial communities over the past decade. the core component of a task-oriented dialog system is the nlu module: the user utterance is either transformed into a modeled intent foot_1 with an appropriate flow of subsequent actions, or labeled as unrecognized and stored in the unhandled pool of out-of-scope requests. in practice, the nlu module makes use of a supervised text classifier, where data drift is triggered by "production" data (customer queries) that changes away from the distribution the classifier was trained on. here we address the scenario of data drift detection in the context of large deployments of task-oriented dialog systems, where emergence of novel topics or deviations in the way customer introduce queries is not uncommon. existing approaches to data drift detection are roughly categorized across two functional dimensions: (1) model-dependent vs. model-agnostic and (2) anomaly detection vs. change point detection. in the context of first dimension, 'model' refers specifically to a predictive model (e.g., classifier) receiving the text stream as inputs. a modeldependent method directly considers the underlying model performance to detect drift, e.g., by tracking the posterior probability estimates of a classifier. a model-agnostic method uses only the incoming data itself for change detection, e.g., by measuring changes in text representations, whether or not such changes ultimately would affect the performance of a classifier model trained on anchor data. another strength of the model-agnostic approach lies in its direct access to data: once detected, the drift can be explained and interpreted, thereby potentially leading to actionable recommendations. the second dimension distinguishes between anomaly detection that identifies outliers at the single chunk level, and change-point detection where a window of recent samples is examined to de-tect (with statistical guarantees) a point at time where the underlying data distribution undergoes a change; the latter models are robust to noise and transient changes. we propose a pipeline for modelagnostic change-point detection in task-oriented dialog systems. figure 1 illustrates the pipeline, which is further described in detail in section 4. user requests towards a dialog system-natural language utterances at the first point of interactionoften contain personal and sensitive information, and are subject to agreements that prevent providers from sharing this data publicly. extending a large, diverse and publicly-available intent classification dataset @xcite , we build a corpus that closely resembles a dialog system request stream, further using it for evaluation of the proposed drift detection approach. 3 the contribution of this work is, therefore, twofold. first, we propose and evaluate an end-to-end pipeline for model-agnostic change-point detection in task-oriented dialog systems, that has been proven effective in multiple large-scale customer deployments. second, we create and release a extension of an intent classification training dataset that closely imitates the nature of streaming requests towards a virtual assistant. ## related work the main approaches to drift detection in textual streams are model-dependent: they rely on the performance of the underlying classification model, where decreasing classifier confidence (or increasing error rate) are indicative of divergence in statistical properties of the data the classifier was trained on, and the newly arriving texts @xcite @xcite . model-agnostic (e.g., classifier-independent) approaches are commonly applied for novelty detection in textual streams that do not necessarily undergo classification, like news or a tweet feed. as an example, @xcite and @xcite use concept-based clusters to represent data distributions of temporal textual chunks, and then detect the hidden topic drifts in terms of the difference between concept-based clusters in two adjoining data chunks. a similar approach for novelty detection in textual data was also applied by @xcite and @xcite . both the model-aware and model-agnostic ap-proaches are commonly used to detect a point of change, regardless of the subsequent trend of the introduced novelty. as such, these methodologies are best associated with "anomaly" or "outlier" detection, while in the case of a task-oriented dialog system we are interested in detecting a systematic, consistent drift trend -a potential trigger for intent classifier retraining. the only study addressing change point detection in textual data that we are aware of is @xcite , who apply lda @xcite for detecting change points in document streams from twitter and news feed. while lda can be used effectively for modeling long documents, it is practically inapplicable for short (often 2-3 word) requests. ## dataset we study the phenomenon of data drift in the context of (natural-language) user requests to a taskoriented dialog system. novel topics, or deviations from existing topics can emerge as the result of new services introduced by a company, failures in existing service coverage, or external trends and factors. large or immature deployments face the need to constantly monitor requests poorly-covered by the existing service for identifying points where the distribution of the input data has changed, for effective and efficient model retraining. publicly-available datasets of real-word user requests in customer deployments are extremely scarce due to company agreements, confidentiality and privacy considerations. while the proposed pipeline has been evaluated on large customer deployments, here we create a novel, carefully curated dataset that reliably imitates the characteristics of user requests, and further conduct drift detection evaluation on the collected data. intent classifier training examples are inherently designed to reliably represent user requests a va. naturalistic user requests, however, typically have several characteristics in which they differ from training examples: (1) the same request semantics can be conveyed in many possible ways, while training examples of the respective intent typically cover the potential diversity only to a partial extent; (2) contrary to intent training examples that only contain unique phrases, actual user requests include many duplicates (multiple customers asking the same question); and (3) customer requests in real-world systems are typically shorter (often significantly so) than classifier training examples. using clinc150 @xcite , a large a diverse 150-intent classification dataset, we generate its extended version simulating the nature of customer requests-clinc150-sur (simulated user requests)-by addressing the mentioned distinctions, as detailed below. a typical large customer virtual assistant size varies between few dozens to hundreds of intents, often spanning multiple domains. clinc150 is multi-domain 150intent dataset, which makes it a suitable test-bed for our drift detection experiments. ## interpretable drift detection we propose and evaluate a multi-step approach for reliable and interpretable change point detection in textual streams. the end-to-end pipeline of drift detection and interpretation is illustrated in figure 1 ; below we describe each step in more detail. ## experimental results in this section we describe the experimental setup and results for two major evaluation phases: change-point detection and drift interpretation. ## conclusions we propose and evaluate a pipeline for modelagnostic change-point detection in the context of drift detection in task-oriented dialog systems nlu module. we demonstrate the benefits of the proposed approach on an expanded version of an intent classification training dataset, that closely imitates the nature of streaming requests towards a taskoriented dialog system -the dataset that we make available to the research community. we demonstrate that ae can be used for effective and efficient change-point detection, performing on par with state-of-the-art dataset similarity metrics, while operating at the instance level. our future directions include experimenting with the (baseline) metric of language model perplexity as well as variational autoencoders for the task of drift detection in streams of short texts. extending experimental setup to the multi-lingual setting is another direction we plan to pursue.