TL;DR
When you prune unimportant image patches or video frames to speed up a State Space Model (like Mamba), physically removing those tokens shifts the sequence and creates brand-new local neighborhoods for the remaining tokens. Standard training tricks like zero-masking leave "ghost" gaps in the sequence, meaning you train a different network than the compacted one you actually deploy. ProbConv fixes this train–deploy mismatch by computing the exact expected convolution over shifting token neighborhoods in linear time, letting models learn which tokens to drop while preserving accuracy—especially under extreme compression.
What Problem Does This Paper Address?
Modern vision, audio, and multimodal models process inputs as long sequences of tokens (e.g., image patches or video frames). Much of this data is redundant—think of static sky in a video. Token compaction speeds up inference by using a lightweight selector to drop unhelpful tokens early on, passing a physically shorter sequence to later layers.
In State Space Models (SSMs) like Mamba, physically deleting a token changes two things:
- Local convolutions: Mamba uses short sliding-window convolutions before its recurrent scan. Deleting token $x_3$ pulls $x_2$ and $x_4$ directly next to each other, changing what the convolution filter reads.
- Recurrent state updates: A deleted token shouldn't update the recurrent hidden state at all.
Training a selector to make discrete keep/drop decisions requires gradients. A standard workaround is zero-masking: multiplying dropped tokens by zero during training. However, zero-masking leaves an empty slot in the convolution window rather than closing the gap, and can still trigger state decay in the recurrent scan. Reinforcement learning (REINFORCE) can train directly on physically compacted sequences, but suffers from noisy clip-level rewards. The authors ask: can we train a token selector via smooth differentiation, match the exact compacted network for binary masks, and keep the compute linear in sequence length?
Methods
The authors introduce two differentiable operations that bridge soft training probabilities and hard physical compaction:
- Probabilistic Convolution (ProbConv): Suppose a learned selector assigns each token $t$ an independent keep probability $p_t \in [0, 1]$. Instead of zeroing out tokens, ProbConv tracks what would fall into each slot of a $K$-tap causal convolution window as tokens are probabilistically kept or dropped. The authors show that the exact expected contents of the window follow a clean linear recurrence: keeping a token inserts it at the front and shifts older entries back; dropping it leaves the window unchanged. Averaging these two possibilities takes $O(LKD)$ time—linear in sequence length $L$—and can be fused into a fast CUDA kernel. Centered (non-causal) convolutions are handled simply by adding two causal passes (forward and reversed).
- Step Gating: In Mamba’s selective scan, the step size $\Delta_t$ controls how much the recurrent state decays and writes new input. Scaling $\Delta_t$ by $p_t$ smoothly relaxes state skipping: when $p_t = 0$, decay becomes $1$ and write becomes $0$, passing the hidden state through untouched.
- Budgeted Training: A differentiable top-$k$ operator (LapSum) converts selector scores into keep probabilities summing to a target budget $k$. Training uses either straight-through binary masks or annealed soft probabilities, while inference takes a hard top-$k$, physically gathers the surviving tokens, and runs standard Mamba blocks at faster speeds.
Datasets
No new datasets are introduced. The authors evaluate across existing benchmarks spanning multiple modalities (with supplementary tests on genomics and long-context text):
- Images: ImageNet-1k (using Vision Mamba / Vim-Tiny).
- Vision–Language: GQA, VQAv2, TextVQA, POPE, VSR, and VizWiz (using Cobra-3B).
- Video Recognition & Frame Selection: Kinetics-400, HMDB51 (VideoMamba-Ti), and ActivityNet-v1.3 (X3D-S video CNN).
- Speech: LibriSpeech
train-clean-100/test-clean(Mamba-based HuBERT).
Key Insights and Ideas
- Exact train–deploy equivalence at binary vertices: Whenever keep probabilities become binary ($0$ or $1$), ProbConv + step gating mathematically and numerically reproduces physical token compaction (within $\sim 10^{-6}$ relative error). Zero-masking never converges to the deployed network, even with binary masks.
- Zero-masking breeds pathological "clumping": In both video and speech tasks, selectors trained with zero-masking keep long, contiguous runs of neighboring tokens—likely trying to protect local convolution windows from artificial zero-gaps—and end up missing critical character emissions in speech or moving subjects in video.
- Different backbones rely on different gradient paths: Ablations reveal a fascinating split. In Vim-Tiny, step gating does the heavy lifting (removing it drops accuracy by $7.17$ points, while stopping the convolution gradient barely matters). In frozen Cobra-3B, the exact opposite happens: stopping the ProbConv gradient costs $5.8$ points, while step gating has minimal impact. Having both paths makes the method general across architectures.
Key Results
ProbConv’s advantage consistently widens as token budgets get tighter:
- ImageNet (Vim-Tiny): Keeping $30\%$ of patches per cut ($18$ of $196$ patches left), ProbConv hits 71.22% top-1 accuracy vs. 66.52% for zero-masking + step gating ($+4.69$ points).
- Vision–Language (Cobra-3B): At $10\%$ of language-model FLOPs, ProbConv achieves a 61.1% six-benchmark average, beating zero-masking + step gating (58.4%), training-free Layer-0 $\Delta$ (58.6%), DTP (57.5%), and FastV (56.2%)—maintaining its lead even when baselines get $1.4\text{--}1.8\times$ more updates to match wall-clock training time.
- Video & Speech: On Kinetics-400 ($\rho=0.5$), ProbConv reaches 75.35% top-1 (just $1.30$ points below dense, $+2.20$ over zero-masking). On ActivityNet frame selection (2 of 10 frames), ProbConv with sampled masks scores 69.89 mAP, slightly edging out REINFORCE (69.45) while zero-masking collapses below uniform sampling (60.53 vs. 61.78). In speech, ProbConv slashes zero-masking's Word Error Rate by $6\text{--}19$ points.
- Real Speedups: Physical compaction delivers 1.61× batched inference speedup on Vim, 2.04× on VideoMamba, and 2.84× prefill speedup on Cobra (H100).
Limitations and Future Work
- Independence assumption: ProbConv models keep decisions as independent Bernoulli draws, even though enforcing a strict budget $k$ inherently couples them. Modeling joint keep probabilities could yield sharper gradients in future work.
- No training-time speedup: Because ProbConv evaluates expectations over the full sequence during training, compute savings only materialize at inference time.
- Hardware and batch sensitivity: At batch size $1$, GPU kernel launch overheads largely eat up the sequence-length savings in Vim and VideoMamba; batched inference is required to realize the speedups. Additionally, in the speech experiments, a heavy convolutional front-end dominates runtime, preventing overall encoder speedups.
Summary updated