Qwen3-VL DeepStack
2026
Work
A five-phase study of the mechanism Qwen3-VL uses to fuse multi-level vision features into its decoder — ending in a workshop paper and a rejected hypothesis.
- 4.6×
- 85%
- ≤2%
The problem
Every image Qwen3-VL looks at becomes visual tokens, and DeepStack injects them into the language decoder at three different depths — roughly 2,752 tokens per depth. Those tokens are most of what the model spends its context and its compute on, yet nobody had published how much of that budget actually carries weight.
This is not a KV-cache trick or generic token trimming. The question is whether the three injection groups matter differently — whether a shallow injection tolerates aggressive pruning while a deep one cannot, so that a per-depth token budget should beat a uniform one. That hypothesis turned out to be wrong, and why it is wrong became the most useful thing the study found.

Approach
Probe the mechanism
First, establish what is actually there. Injection happens at the first three decoder layers, drawing from vision-encoder layers 5, 11 and 17. Every group carries the same number of tokens, but per-token strength (L2 norm) grows with depth — 14.6, then 17.0, then 23.6 — the first sign that the groups are not interchangeable. Measured against the overall median strength, 68% of the shallow group's tokens are low-value, 51% of the middle group's, and only 22% of the deep group's.
All of this is measured on one model — Qwen3-VL-2B-Instruct in fp16 on a Colab T4. Big enough to have real DeepStack behaviour, small enough to sweep; whether the pattern holds at 8B and beyond is untested.

Per-token L2 norm by injection group — 14.6, 17.0, 23.6, shallow to deep. Instrumentation run 20260603_080941. (opens in new tab) Instrument without touching the model
A non-invasive instrumentor captures feature distributions, latency and memory around the injection points, so every later measurement runs against a model whose behaviour has not been altered by the measurement. Coefficient of variation across per-token norms comes out at 0.61, 0.45 and 0.42 — the shallow group is the most prunable, the deep one the most fragile.
The model never runs locally; the machine has no CUDA. Code moves local to Colab through GitHub and results come back the same way, which forces every experiment to be a committed, re-runnable artifact rather than a notebook state.

The share of each group's tokens sitting below the overall median strength — 68%, 51%, 22%, shallow to deep. Instrumentation run 20260603_080941. (opens in new tab) Ablate group by group
Zeroing one injection group at a time across four tasks shows sensitivity is task-dependent rather than uniform. Single-group removal costs at most 1.3% on general VQA and counting, but the deep group is worth 4.0% on text recognition. And dropping the shallow group improves text recognition by 1.3% — on that task it was contributing noise.
Dropping a group means zeroing its refinement while the base token stays in the sequence — the model loses the information, not the length. That keeps the comparison clean, and it also means these numbers claim nothing about speed. Four benchmarks is a screen, not a survey.
Score tokens within a group
Five selection methods — random, spatial-uniform, activation magnitude, diversity, and a hybrid — evaluated at three keep-ratios. Activation magnitude wins overall and the hybrid is the most robust. Separately, attention-based selection loses to plain feature magnitude on every task and decays toward random as pruning gets aggressive, which is worth stating precisely because it is the method most people would reach for first.
That negative result is kept in the paper rather than dropped — a method that sounds principled and does not work is more useful to the next person than one more confirmation of the method that does. The ranking itself comes from n=100 sweeps: enough to order the scorers, not to split the close ones.

Scorer comparison at keep-ratio 0.25, per injection group, against the full-token baseline (dotted). Sweep run 20260604_232301. (opens in new tab) Budget across groups, and reject the hypothesis
A water-filling allocator distributes a fixed token budget across the three depths by measured sensitivity. Compared at equal retained-token count, it is equal to or worse than uniform allocation in every cell tested, and global cross-group selection merely ties uniform. The cause is that the depth groups are mutually redundant: single-group ablations look informative because importance is not additive across them, and an entire injection group turns out to be droppable for under 1% accuracy.
The practical recommendation the paper lands on is therefore the boring one, which is the point: uniform keep-ratios, feature-based scorers, no per-depth tuning, and the ratio chosen by task difficulty — roughly 15% for general VQA, 30% for text, 50% for documents. Two honest caveats ride along: at n=300 the validation confidence intervals all overlap, so the claim is flat, not better — and a per-group win may still exist on OCR-heavy text tasks, which this sweep cannot rule out.

Accuracy at equal retained-token budgets, general VQA, n=300 — within half a point of the 0.818 baseline from keep 100% down to 15%. Validation run 20260604_232301. (opens in new tab)
What I built
- Designed and ran the full five-phase study, on a 2B model in fp16 across four vision-language benchmarks.
- Built the non-invasive instrumentation, the five token-scoring methods, and the water-filling budget allocator.
- Established that attention-based token selection underperforms feature magnitude, and kept it in the paper as a negative result.
- Wrote the paper draft around the rejected hypothesis rather than around a result that would have been easier to sell.
Results
- Decoder vs vision-encoder time
- 4.6×
- Prunable below median strength
- 68 / 51 / 22%
- General VQA
- keep 15%
- Text recognition
- keep 30%
- Documents
- keep 50%
- Whole group droppable
- 1 of 3
- Per-group budgeting
- no gain
- Measured as
- feature zeroing
Stack
The whole study: instrumentation, five scoring methods, the allocator, and the paper draft.