Certified, Not Explained: Exact Token Erasure in Gated Vision State Space Models
Organizations: Department of Computer Science, COMSATS University Islamabad, Pakistan
Abstract
Vision models built on Mamba are often explained through their selective step size Delta, on the assumption that a token the scan does not admit cannot influence the prediction. We test that in a concept bottleneck model for lung-nodule malignancy built on a single gated, bidirectional selective state-space block. The answer becomes an interpretability framework: a guarantee, a procedure that checks it, and a pre-registered audit of what it explains. For a fixed gate pattern, masking the input of the causal convolution of the block and giving closed tokens zero weight at readout makes the concept and task logits exactly invariant to the closed tokens. Gating Delta is neither necessary nor sufficient. On LIDC-IDRI, a path-by-path knockout over 15 cross-validated models agrees with this in every run: the largest logit change is exactly 0 whenever the conditions hold and between 4.1 and 6.7 when they do not. The gated model reaches a pooled out-of-fold AUROC of 0.8425 +/- 0.0085, level with an ungated Mamba bottleneck (0.8428). The guarantee belongs to the masked model, not to the gate as an explanation. Post-hoc rankers, which inherit the guarantee on this model, order tokens better than the gate. Gate maps from a model trained on permuted labels are as close to the real maps as two real-label seeds are to each other. Under retraining, the tokens of the gate carry more task information than random tokens and, on shifted crops, more than central ones, but no more than the tokens chosen by hidden attention. We therefore read the gate as a certified support set produced by mask supervision. Splitting the Oracle Impurity Score into own-concept and cross-concept parts reveals differences the aggregate score misses. Partitioning the readout reduced leakage slightly under an earlier recipe, and the final model sits at, rather than below, the level implied by correlations among the true concepts.
Figures & tables
| configuration | exact runs | guarantee | AUROC (eval. time) | ||
| all paths gated | 0 | 0 | 15/15 | exact | |
| gate removed | 0 | 0 | 15/15 | exact | |
| -skip gate removed | 0 | 0 | 15/15 | exact | |
| gate removed | 0 | 0 | 15/15 | exact | |
| residual gate removed | 0 | 0 | 15/15 | exact | |
| conv input only | 0 | 0 | 15/15 | exact |
| model | seed 0 | seed 1 | seed 2 | mean SD | concept Spearman |
| CNN, unconstrained | 0.9077 | 0.9148 | 0.9014 | – | |
| ViT, unconstrained | 0.8598 | 0.8764 | 0.8918 | – | |
| Mamba, unconstrained | 0.8740 | 0.8635 | 0.8701 | – | |
| CNN CBM | 0.8440 | 0.8486 | 0.8437 | ||
| ViT CBM | 0.8880 | 0.8633 | 0.8662 | ||
| Mamba CBM, no gates | 0.8529 | 0.8271 | 0.8484 |
| model | ranking | deletion max | random | sufficiency (method / random) |
|---|---|---|---|---|
| CNN CBM | Grad-CAM | – | ||
| CNN CBM | gradient input | / | ||
| ViT CBM | gradient input | / | ||
| CG-Mamba | gate logit | 0 (guarantee) | ||
| CG-Mamba | MambaLRP | – | ||
| CG-Mamba | gradient input | – |
| tokens removed | centred crops | shifted crops (24 px) | nodule coverage (shifted) |
|---|---|---|---|
| none | 0.8740 | 0.8516 | – |
| random | 0.8265 | 0.8226 | 0.25 |
| gate | 0.7206 | 0.6655 | 0.69 |
| hidden attention | 0.7017 | 0.6426 | 0.69 |
| centre | 0.6466 | 0.8859 | 0.10 |
| pre-declared | R1, R2 pass ; R3 fail | S1, S2 pass |
| model | partition | gates | dim | OIS | diagonal | EXCESS | NEX |
|---|---|---|---|---|---|---|---|
| partitioned, gated | yes | yes | 64 | ||||
| unpartitioned, gated | no | yes | 384 | ||||
| unpartitioned, gated, PCA-64 | no | yes | 64 | ||||
| partitioned, no gates | yes | no | 64 | ||||
| final model | yes | yes | 64 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| item | value |
|---|---|
| input | central axial slice of a cube at mm, HU clipped to , scaled to |
| tokens | patches, 64 tokens, embedding dimension 192 |
| block | one bidirectional gated S6 block; inner width 384, state 16, -rank 12, causal conv width 4; mixers initialised from Vim-Tiny layer 0 |
| concept groups | 6 contiguous groups of 64 channels |
| gates | hard concrete, , , ; evaluation rule of Eq. 1 ; gate-logit bias initialised to 1 |
| Stage A | 150 epochs; concept BCE ramp ; recall on masked images only; linear ramp over 20 epochs |
| test | criterion, written before the run | result | section |
|---|---|---|---|
| K1 | full, no- and conv-only gating exact in every run | pass | 6.1 |
| K2 | no conv mask, and conv-only with -only pooling, broken | pass | 6.1 |
| H3 | bottleneck cost 1–2 points and below other backbones | partly | 6.2 |
| Z1 | depth two, untrained blocks: conv-input, and residual gating exact without the and gates (5 initialisations) | pass | 6.1 |
| Z2 | depth two: dropping either the or the residual gate leaks when block 2 re-opens tokens | pass | 6.1 |
| D2 | two blocks: (a) pooled task , (b) concept AUROC | (a) fail , (b) pass | 6.2 |
| tokens removed | fold 0 | fold 1 | fold 2 | fold 3 | fold 4 | pooled OOF |
|---|---|---|---|---|---|---|
| none | 0.8525 | 0.9122 | 0.9076 | 0.8789 | 0.8407 | 0.8740 |
| random | 0.8609 | 0.8440 | 0.8681 | 0.7957 | 0.7957 | 0.8265 |
| gate | 0.7416 | 0.7253 | 0.7271 | 0.6946 | 0.7085 | 0.7206 |
| hidden attention | 0.7173 | 0.7101 | 0.6859 | 0.6693 | 0.7223 | 0.7017 |
| centre | 0.6309 | 0.6347 | 0.6336 | 0.6733 | 0.6532 | 0.6466 |
| tokens removed | fold 0 | fold 1 | fold 2 | fold 3 | fold 4 | pooled OOF |
|---|---|---|---|---|---|---|
| none | 0.8407 | 0.8712 | 0.8577 | 0.8587 | 0.8426 | 0.8516 |
| random | 0.8502 | 0.8545 | 0.8337 | 0.7845 | 0.8188 | 0.8226 |
| gate | 0.6211 | 0.6387 | 0.6822 | 0.6621 | 0.7059 | 0.6655 |
| hidden attention | 0.6354 | 0.6530 | 0.6648 | 0.5793 | 0.6749 | 0.6426 |
| centre | 0.8550 | 0.9055 | 0.8815 | 0.9161 | 0.8966 | 0.8859 |
| configuration | (noise, SD 50) | guarantee | AUROC |
|---|---|---|---|
| all paths gated | 0 | exact | 0.8423 |
| conv-input mask removed | 4.25 | broken | 0.7467 |
| gate removed | 0 | exact | 0.7990 |
| -skip gate removed | 0 | exact | 0.8422 |
| gate removed | 0 | exact | 0.8680 |
| residual gate removed | 0 | exact | 0.8423 |
Visual SSMs
Visual state-space models use recurrent sequence dynamics to process images and video while aiming for efficient, long-range context modeling.
See all 84 papers