Evaluating the Practical Utility of Confidence-score based Techniques for Unsupervised Open-world Classification (2022)

Abstract: Open-world classification in dialog systems require models to detect open intents, while ensuring the quality of in-domain (ID) intent classification. In this work, we revisit methods that leverage distance-based statistics for unsupervised out-of-domain (OOD) detection. We show that despite their superior performance on threshold-independent metrics like AUROC on test-set, threshold values chosen based on the performance on a validation-set do not generalize well to the test-set, thus resulting in substantially lower performance on ID or OOD detection accuracy and F1-scores. Our analysis shows that this lack of generalizability can be successfully mitigated by setting aside a hold-out set from validation data for threshold selection (sometimes achieving relative gains as high as 100%). Extensive experiments on seven benchmark datasets show that this fix puts the performance of these methods at par with, or sometimes even better than, the current state-of-the-art OOD detection techniques.

## introduction open intent detection is of significant importance in practical dialog systems. prior art @xcite has shown that an intent classifier's performance degrades when it encounters examples of an unseen intent. open-world classification @xcite tries to mitigate this by not only correctly classifying data that appeared in training (id), but also detecting examples that are not a part of any existing class (ood). @xcite and @xcite use svms to find the decision boundary of each positive class (id). @xcite leverage deep neural networks to learn representations that capture high-level semantic concepts. to detect ood samples, @xcite use the softmax probability as the confidence score, where some negative samples are used for confidence threshold discovery. other works @xcite @xcite use the distance between a new sample and the id distributions to define their confidence scores. whereas, @xcite learn an adaptive decision boundary (adb) of each positive class by only using id data and thus removing the dependence on a confidencescore completely. threshold-based ood detection allows for more control, especially in scenarios where correctly predicting id intents takes priority over detecting negatives or vice-versa. this has motivated researchers to evaluate confidence-based methods on thresholdindependent metrics like area under roc curve (auroc) or area under pr curve (aupr) on test-sets for an unbiased comparison. this is especially true for works on distance-based (e.g. mahalanobis distance, cosine similarity) confidencescores @xcite @xcite , which seldom comment on the threshold selection criteria or the threshold-dependent performance of the underlying method and thus fail to reveal much about their practical utility. in this work, we evaluate state-of-the-art approaches that use distance-based statistics (dbs) to arrive at confidence-scores for open-world classification. unlike previous works, we specifically focus on their performance on threshold-dependent metrics. we show that threshold values (δ) chosen based on the performance on the validation-set, used to tune the classifier, do not generalize well on the test-set. this results in poor test-set id/ood accuracy and f1-scores as compared to confidencescore-independent techniques like adb on multiple benchmark datasets. we analyse this lack of generalizability and propose the use of a hold-out set of id samples from validation data for threshold selection. this fix improves the thresholddependent performance of dbs approaches putting their test accuracy and f1-scores on id/ood detection at par with, or sometimes even better, than previously proposed open-classification techniques. ## methodology we explore multiple state-of-the-art strategies for unsupervised open-world intent classification. the term unsupervised here refers to the absence of open-intent samples during training. we consider two approaches that leverage logit-based statistics (lbs) as their confidence-score (i.e. maximum softmax probability and energy), two dbs approaches (i.e. mahalanobis distance and cosine similarity), and adaptive decision boundary (adb) that does not rely on confidence-scores. ## results and analysis models trained using pipeline 1. in line with prior work @xcite , we find that maha and cosine perform better on the threshold-independent metrics (auroc and au p rout) across all datasets. this suggests that they are better at distinguishing id instances from those considered to be ood. 7 evaluation on threshold-dependent metrics (acc and f 1 scores) shows that the results obtained by msp and energy (lbs) on the test set do not differ much from the valid set, suggesting that the chosen δ generalizes well to unseen data. compare this to cosine and maha (dbs) whose performance sees a drastic drop on the test set, despite achieving better scores on the valid set. this suggests that thresholds selected using pipeline 1 for dbs might not transfer well to data in the wild, making them less useful in practice for ood detection. models trained using pipeline 2. on most datasets, the performance of these models on the test set mirrors that on the val-hold set. furthermore, we see a consistent improvement in test acc and f 1 scores of all confidence-score methods as compared to their pipeline 1 counterparts. cosine and maha see the highest gains, witnessing relative boosts as high as 100% on bank-75% and stack-7 threshold-independent metrics cannot be calculated for adb as it does not use a confidence-score for ood detection. overflow-75%. overall, thresholds chosen using pipeline 2 seem to hold up better on unseen samples across the board, with maha outperforming all other strategies on most datasets. the top two plots in figure 1 show the density plot of mahalanobis distance values over clinc id and ood data on val and test sets. we observe that although the distributions of test-ood and val-ood are quite similar, there are significant differences between the graphs for id data (val-id vs test-id). there seem to be no val-id samples with maha score below -3000, whereas for test-id, a substantial number of instances lie below -3000. this discrepancy might be a result of the slight overfitting of the trained id classifier on val-id samples as it leverages them for tuning. compare this to the bottom two curves (in figure 2 ) which plot test vs val-hold instances. the density plots for both id and ood samples are almost identical. 8 therefore, thresholds selected using val-hold are more likely to generalize to the unseen test set. comparison against adb. adb is the current state-of-the-art approach for unsupervised ood detection. in ## discussion and conclusion in this work, evaluate four confidence-score based unsupervised ood detection techniques on seven state-of-the-art datasets. most prior research @xcite on methods that leverage distance-based statistics like mahalanobis distance (maha) or cosine similarity (cosine) only reports results on threshold-independent metrics like auroc or aupr. however, we show that despite their superior performance on auroc, these techniques observe substantially lower scores on test id and ood detection accuracy and f1-scores, when the entire validation-set (used to tune the id classifier) is leveraged for threshold selection. this severely limits their practical utility. our analysis suggests that this discrepancy might be a result of the inadvertent overfitting of the trained classifier on val-id samples. we show that this issue can be mitigated by leveraging a different evaluation setup that sets aside a hold-out set (not used during id classifier tuning) from validation data for threshold selection. we observe that this new setup yields generalizable threshold values thus substantially improving the performance of maha and cosine on threshold-dependent metrics and making them more useful in real-world applications. going forward, based on these findings, we would like to implore other researchers to also report the performance of their open-world classification approaches on threshold-dependent evaluation metrics, if applicable.