Regression-Free Model Updates for Spoken Language Understanding (2023)

Abstract: In real-world systems, an important requirement for model updates is to avoid regressions in user experience caused by flips of previously correct classifications to incorrect ones. Multiple techniques for that have been proposed in the recent literature. In this paper, we apply one such technique, focal distillation, to model updates in a goal-oriented dialog system and assess its usefulness in practice. In particular, we evaluate its effectiveness for key language understanding tasks, including sentence classification and sequence labeling tasks, we further assess its effect when applied to repeated model updates over time, and test its compatibility with mislabeled data. Our experiments on a public benchmark and data from a deployed dialog system demonstrate that focal distillation can substantially reduce regressions, at only minor drops in accuracy, and that it further outperforms naive supervised training in challenging mislabeled data and label expansion settings.

## introduction machine learning models that are deployed in realworld applications typically require regular updates to accommodate data distribution shifts or changes to the output label space. the retraining process, even if it leads to stable or improved overall accuracy, can result in different sample-level predictions due to its stochastic nature. in an application setting, that in turn can change (or even break) specific functionalities. a key requirement for model updates in real-world applications is therefore to minimize regressions in user experience. for classification models, @xcite formalized this requirement as minimizing the number of negative flips of a model, defined as the number of previously correct classifications that turn incorrect for a new model. previous work proposed several methods towards that goal @xcite @xcite ) that rely on knowledge distillation, model ensembling or bayesian learning. in this work, we focus on model update-caused regressions in goal-oriented dialog systems, and in particular on updates of spoken language understanding models. in real-world dialog systems, a negative flip would mean that a request that was previously correctly understood is now interpreted as a different intent (or with different slots) and therefore leads to a regression in user experience. while previous work explored the reduction of negative flips on various tasks, spoken language understanding remains unexplored (see section 2). we therefore apply focal distillation @xcite , the most applicable existing technique, to this use case. moreover, the use in a real-world goal-oriented dialog system raises additional questions that we address. specifically, we study the following: effectiveness for dc and ic: we test focal distillation on domain classification (dc) and intent classification (ic), two key tasks in spoken language understanding, using public data as well as internal datasets from a real-world dialog system. applicability to sl: we further test the effectiveness for slot labeling (sl), a sequence labeling task that requires an extension of focal distillation to handle tasks with token-level supervision. repeated model updates: we simulate multiple iterations of retraining with focal distillation to study its long-term effect, in particular, whether the coupling of new and old model via distillation restricts the model's ability to learn new features. noisy labels: finally, we also study the effect of mislabeled data. in the presence of annotation errors, focal distillation bears the risk that it enforces prediction consistency on samples that have supposedly correct classifications in the old model, but are actually mislabeled, preventing the new model to predict the true correct label. we run extensive experiments for dc, ic and sl tasks on slurp @xcite , a public benchmark, and internal datasets from our real-world goal-oriented dialog system. we find that focal distillation is effective for dc and ic and reduces negative flips by up to 30% relative at no or only marginal decreases in accuracy. for sl, a naive application as a token-level loss is effective as well and brings 8% relative reduction on average. when simulating repeated retraining over time, focal distillation can restrict the model's ability to learn new labels, but this can be remedied by warm-starting the model with the previous model's weights. finally, we also show that focal distillation is beneficial even under annotation errors, and can be made even more robust by adding noise-awareness to the loss. ## related work enabling regression-free model updates is a relatively recent line of research. shen et al. (2020) first studied it for computer vision problems with the goal of learning backwards-compatible image representations. yan et al. (2021) introduced the notion of negative flips for classification tasks and coined the minimization of them as positive-congruent training. they proposed focal knowledge distillation, a variant of traditional teacher-student distillation (hinton et al., 2015), and model ensembling as techniques to achieve positive-congruent training. zhao et al. (2022) continued this line of work by extending and combining the distillation and ensembling ideas into a single method called elodi. with a slightly different focus, namely accepting or rejecting the predictions of a new model rather than training it, träuble et al. (2021) proposed a bayesian approach to reduce negative flips. in our work, we focus on yan et al.'s @xcite focal distillation method as it is most applicable to our real-world use case where we cannot afford the use of model ensembles because of their computation, storage and latency overhead. @xcite first applied the methods to nlp tasks. they found that negative flips are also prevalent during model updates for nlp tasks and demonstrated mitigations with distillation and ensembling methods in line with the earlier work. concurrent to our work, @xcite extended positive-congruent training ideas to structured prediction tasks like parsing, which require extensions such as sequence distillation @xcite or reranking. also concurrent to our work, @xcite introduced an importanceweighted interpolation method that they find to outperform focal distillation on intent classification benchmarks. we plan to incorporate their findings in our future work. continual learning (also known as incremental learning, sequential learning or lifelong learning) is closely related to our work @xcite @xcite . while we focus specifically on avoiding negative flips, continual learning is more general and studies continuous training of models on evolving data and tasks, with a particular focus on avoiding catastrophic forgetting. the latter is a challenge if data for previously learned features is no longer available; it is however less relevant for our application scenario, a real-world goal-oriented dialog system, with ongoing user interactions covering all features. negative flips let @xmath0.g. an utterance), @xmath1.g. an intent label) and p(y|x) a model that can be used to predict ŷi = argmax y p(y|x i ). a negative flip occurs if a new model incorrectly predicts a sample that the previous model predicted correctly, i.e. if ŷnew i ̸ = y i and ŷold @xmath2. the negative flip rate (nfr) measures the fraction of samples where a correct prediction turns incorrect between two models in a dataset with size n . @xcite define it as focal distillation (fd) focal distillation, as introduced by @xcite and illustrated in figure 1 , aims to reduce negative flips by minimizing the loss in their work, @xcite experiment with two choices for d: kullback-leibler (kl) divergence between temperature-scaled p(y|x) and mean-squared error (mse) between pre-softmax logits. since the latter performed better in their experiments, we adopt it. hence, d is defined as fd for slot labeling in slot labeling, a sequence of labels has to be predicted instead of just a single label as in dc or ic. naturally, there are two options to apply distillation in that case: either apply the loss independently to each token or use the reference model's sequence-level decision for supervision. for the latter, @xcite proposed multiple techniques. in this work, we resort to the simpler token-level distillation for now and leave sequence-level distillation for future work. we compute the fd loss for each token j in the sequence i with length m as notice that this formulation works both if the models perform token-level decisions, and if they perform sequence-level decisions. in the latter case, when training the new model, the token-level fd loss is summed to the sequence-level loss. fd with noisy labels fd biases the new model towards the old model's predictions when those predictions are correct. to discern correct predictions we rely on accurate labels. however, real-world data is often noisy. therefore we investigate the combination of fd with label noise detection. we experiment with area under the margin (aum), a method suggested by @xcite . the method leverages the observation that mislabeled data hurts generalization, and thus monitors the training dynamics to define the margin of a sample. the margin m at epoch t of sample (x, y) mea-sures how much larger the assigned logit is than the largest other logit. let z t (x) ∈ r c be the logit vector of sample (x, y) at epoch t. then m at t is we then use this measure as an additional term in the fd objective to re-weight the fd loss contributions of mislabeled samples: ## experimental setup we run experiments on both public and internal data. for our experiments on public data, we use slurp @xcite , an english multi-domain dataset for nlu spanning across 18 domains, 60 intents and 55 slot types (ca. 16,000 utterances). in addition, we present results on our internal datasets for english and german. these datasets comprise live traffic utterances, deidentified and anonymized for privacy reasons, then annotated to enable supervised training. for the internal datasets, the number of slot types is domainspecific. in the experiments for sl we employ three domain-specifc internal datasets, referred to as int-g, int-m and int-s, that have 88, 101 and 35 slot types, respectively. results on public data are averaged across 5 seeds, while we only train once on for implementation details, we refer the reader to appendix c. across all experiments, we compare fd with the baseline approach of simply retraining the model on the whole training data, without any additional signal from the previous model. all models employ a bert-based @xcite architecture: a pre-trained encoder extracts contextualized semantic word embeddings, then fed either to a multi-layer perceptron (mlp) in case of dc and ic, or to a conditional random field (crf) @xcite in case of sl, to obtain either sequence-level or word-level predictions. we experiment also with the introduction of warm start for the new model, i.e. the model's weights are initialized with those of the previous model. see appendix a for more details. ## experimental results we present results for each of the research questions raised in the introduction. can fd be used for token-level sl? as mentioned above, we employ models with a crf layer for sl, able to make structured predictions. however, we experiment with token-level fd (see equation (5)) that takes as input the token logits directly, instead of the top-scoring label path from the crf. therefore, the crf layer of the student model is not affected by the additional distillation objective. does repeated fd restrict learning? figure 2 reports the comparison of the baseline approach with fd in the label introduction scenario (spanning 5 iterations). we can observe how fd does not seem to negatively influence the overall accuracy over time of the model; on the contrary, the additional loss term seems to be moderately beneficial in helping the model learn the task compared to the baseline. the approach also behaves well in reducing the overall nfr of the new model. interestingly, standard ce is slightly superior in absolute terms with respect to fd in learning the new label distribution. however, the gap remains fixed over time, therefore fd is not hindering the ability of the model to learn, but only introducing an initial delay. remarkably, fd is able to reduce regression on the newly introduced label already with a handful of samples, and consistently remains lower than the baseline on the nfr metric. interestingly but not surprisingly, warm start helps both approaches in both metrics, with respect to the non-warm start alternative. this suggests that, in general, warm start is a useful strategy for retaining model performance during an update. however, it is clear from the results how fd benefits more from warmstart than the baseline, in terms of both accuracy improvement and nfr reduction. further results for this setting (and the specular one of gradual removal of a label) are reported in appendix e. can fd cope with noisy labels? in order to verify the extent to which fd coupled with aum is capable of dealing with increasing level of noise we experiment both on the public slurp dataset as well as on the internal english dataset, and we also test the approach on specific versions of those datasets manipulated to artificially introduce varying levels of noise: 20%, 40%, 60%. the algorithm used to generate noise, together with a study of how aum is able to detect it, is reported in appendix d. results on the internal dataset and slurp are reported in tables 5 and 6, respectively. overall we observe that integrating aum into fd does not lead to significant improvement over vanilla fd. we be-lieve the reason behind the lack of improvement is twofold: first, there might be a more effective way to integrate the aum signal into the fd objective; secondly, the models trained with the baseline, especially on internal data, already exhibit low nfr, therefore there is little margin for improvement. on the other hand, fd with aum is not detrimental, neither on original nor the noisy datasets: when the level of label noise is significant, aum helps fd recovering its performance; when the label noise if less present (if at all), aum does not significantly decrease fd performance. ## conclusions in this paper, we presented an extensive set of experiments to evaluate the effectiveness of focal distillation to reduce negative flips in a real-world goal-oriented dialog system. we found the technique to be effective in dc, ic and sl with only minor accuracy drops. when used repeatedly over multiple updates, the effect remains while still allowing the model to learn new labels. in addition, the method is also robust to labeling errors in the training data. as future work, we plan to extend our experiments to alternative techniques for negative flip reduction, in particular those proposed concurrent to our work, and to experiment with potentially more powerful sequence-level distillation for slot labeling.