Fig. 4: Counterfactual visualizations for model explainability.
From: Deep generative classification of blood cell morphology

a, An example of generating a counterfactual explanation. Left: original image of an eosinophil. Centre right: counterfactual heat map (Hneutrophil), which highlights areas that would need to change for the model to classify the image as a neutrophil. Far right: an overlay of the thresholded heat map on the original image, localizing the most critical features. b, Matrix of counterfactual heat maps for various cell-type transitions. The diagonal displays original images of each cell type, which serve as the source image for their respective columns. Each off-diagonal element in the same column represents a counterfactual heat map (Hc) showing the transition from the diagonal element (source) to the cell type of that row (target). Areas in the heat map with colours that deviate most from the background indicate regions in which there are large errors in the latent space between the two classes.