Distance Loss for Ordinal Classification: Typical classification problems deal with classes which are mutually exclusive and independent such as sentiment prediction or whether an image is a cat or a dog. In such a setting, classification accuracy is the most important metric and there is no relation or relative ordering between the classes. However, e-WER in a classification setting is an ordinal classification problem [1]}. Previous approaches which propose WER estimation as classification tasks ignore this idea [2]}, [3]}, [4]}. While the classification accuracy is important, it is more important that given a sample is misclassified, the predicted label is close to the true label. For instance, if the true label corresponds to the WER class of 0.1, a prediction of 0.2 and a prediction of 0.7 are treated the same in the current classification scenario. Since we want the prediction to be as close as possible, if not exactly the same, we introduce a “distance" loss which is \(L_{custom}(s) = L_{\theta }(s) + \alpha * \gamma \)  and \(\gamma \)  is as follows

*ypred(s) WERfixed - ytrue(s) WERfixed

where \(s\)  is a sample, \(\alpha \)  is a hyperparameterRefer to Section A.1 of the appendix for tuning of the Distance Loss hyperparameter \(\alpha \) (we have used \(\alpha = 50\)  in our experiments), \(L_{\theta }(s)\)  is the cross entropy loss, \(y_{true}(s)\)  is a one hot vector representing the true WER class of \(s\)  and \(y_{pred}\)  is the estimated probability distribution of \(s\)  over all the classes output by the softmax of the classification model.
