CRANE: Post-Hoc Counterfactual Retrieval for Multimodal Classifiers
Organizations: Dept. of Computer and Systems Sciences, Stockholm University, Stockholm, Sweden
Abstract
Counterfactual explanation methods have been introduced for unimodal settings, with dedicated frameworks for tabular, timeseries, text, and image data, yet no post-hoc method has been designed for classifiers that learn from multimodal inputs. Existing explainability methods for multimodal classifiers apply modality-specific attribution independently to each input, which fails to yield coherent explanations and does not transfer to arbitrary pre-trained multimodal architectures. To address these shortcomings, we present CRANE (Counterfactual Retrieval via Agnostic Nearest-neighbour Explanations), the first post-hoc, model-agnostic framework for nearest-neighbour multimodal counterfactual generation that retrieves real training examples from the target class as candidate explanations, ensuring plausibility by construction. Across four heterogeneous datasets and three fusion strategies, we show that Multimodal Consensus Retrieval (MC-R), which intersects per-modality neighbour sets to identify instances jointly close to the query in every modality, emerges as the strongest multimodal strategy, achieving the best or joint-best outcome on three of four datasets while grounding every explanation in the joint training distribution. Unimodal strategies remain competitive when a single modality dominates the decision boundary.
Figures & tables
| Dataset | Modalities | Task | Train | Test |
|---|---|---|---|---|
| Sepsis | TS + Tab | Binary | 2,085/fold | 521/fold |
| Long COVID Tweets | Text + Tab | 4-class | 20,121 | 5,031 |
| Hateful Memes | Text + Image | Binary | 7,632 | 1,908 |
| Real or Fake Jobs | Text + Tab | Binary | 14,304 | 3,576 |
| Dataset | Strategy | Model | Macro F1 | Acc | AUROC |
|---|---|---|---|---|---|
| Sepsis | Early | Spatiotemporal Attention + GRU | 0.691 | 0.920 | 0.800 |
| Intermediate | RF on 32-dim latents | 0.746 | 0.946 | 0.833 | |
| Late | GRU + MLP branches | 0.691 | 0.912 | 0.871 | |
| Long COVID Tweets | Early | MLP on frozen RoBERTa | 0.589 | 0.650 | 0.855 |
| Intermediate | Fine-tuned transformer + MLP | 0.717 | 0.759 | 0.921 | |
| Late | TF-IDF + LR / GBT branches | 0.604 | 0.658 | 0.844 |
| Dataset | Generator | Outcome | Proximity | Sparsity | Plausibility |
|---|---|---|---|---|---|
| Sepsis | TabularNN | 0.056 | 0.158 | 0.474 | 0.143 |
| TimeSeriesNN | 0.021 | 0.317 | 0.457 | 0.196 | |
| EF-NN | 0.055 | 0.131 | 0.465 | 0.143 | |
| IF-NN | 0.371 | 0.203 | 0.488 | 0.151 | |
| MC-R | 0.163 | 0.119 | 0.476 | 0.242 | |
| MPS | 0.124 | 0.093 | 0.450 | 0.129 |
Counterfactual Explanations
Counterfactual explanations show how changing an input could alter a model’s prediction, supporting model understanding, auditing, and actionable recourse.
See all 117 papers