202307071744-evaluation_with_data_slicing
Common metrics such as the micro F1 score over a whole data set compute an overall performance. But for example when classifying animals, it may be the case that the score for classifying elephants is close to the overall performance, the score for giraffes is significantly lower. We may test this using data slicing: we take a slice of the data with only elephants and another slice with only giraffes and compare the performance for these subgroups. This can be used to for example investigate forms of bias. You could call this "vertical" slicing in the sense that you make a subgroup basic on some features, whereas typical model validation is "horizontal" slicing over the whole broadness of the data.
If you want to track performance on data slices post-deployment, this is a bit tricker because you often won't have a ground truth for new incoming data. In this case you need to rely on descriptive statistics such as averages and standard deviation, and focus on whether the production data differs significantly from the slices of the training data.
You could train and validate using overall metrics and then do ad hoc tests on data slices afterwards. But a more systematic way would be to write unit tests that automate data slice checking and can be easily reused both before and after deployment. Basically you want to make assertions on the minimal performance expectations of data slices to prevent poor performance for subgroups.
Key words for further searching on this topic: