Probabilistic Error Calibration
In a typical classification problem we predict a class label. But realistically speaking, the information encoded in a feature is often incomplete so that it cannot fully specify a single label. We can capture this uncertainty by instead computing a predictive distribution over class labels for each data point.
We care about failing in a predictable way, i.e. when the network makes mistakes we also want our posteriors to express this uncertainty. So we do not only care about accuracy, but about the error calibration measure:
- Look at all misclassified points
- Look at log probability of misclassified points
- Notice that this is still the attributed probability to the correct target $y_n$
- The higher this measure, the better the error calibration
- When p(y_n|x_n) is small (closer to 0) -> the log is a large negative number
- When p(y_n|x_n) is big (closer to 1) -> the log is smaller negative number
$$\frac{1}{N_{mis}} \sum_{mis} log p(y_n | x_n)$$
Rationale:
- So if the network predicts the wrong label, but was very certain about the wrong label, this is bad!
- Generally this means a lower probability was attributed to the correct class label
- If instead we predicted the wrong label, but our predictive posterior distribution expressed much uncertainty about this decision, then we have a better error calibration.
- "Expresses more uncertainty" means that generally speaking the correct label will also have a higher probability because the posterior is flatter.
What's actually measured in the error calibration formula is the probability assigned to the correct class, for misclassified data points. The reasoning for the two cases is almost identical, again:
- When the probability for the correct class is higher, then the difference between the likelihood of the correct and incorrect prediction is smaller, i.e. more uncertainty in the prediction.
- So a higher probability assigned to the true label (for a misclassified data point) leads to a higher error calibration
- So a higher error calibration is better
- When the probability for the correct class is lower, then the difference between the likelihood of the correct and incorrect class label is larger, i.e. the classifier was apparently relatively certain in the misclassified data point (and wrongly so!)
- So a lower probability for the correct label give a lower contribution to the error calibration
- So a lower error calibration is bad.
Now, because we are working with log probabilities, what does "higher" mean? The logarithm is monotonic, so the interpretation does not change. But because probabilities are in [0 .. 1], we have negative log probabilities with the exception of 0.
log(1)=0. log(0.1)=-1 log(0.01)=-10
So a higher (i.e. better error calibration) in terms of log probabilities means: a less negative number, approaching 0.
The error calibration also does not depend on the accuracy, since accuracy only considers correctly classified data points, whereas error calibration only considers misclassified data points.