NeurIPS 2026 Workshop · On-Device Intelligence: Foundation Models under Real-World Constraints

Which Transformer Blocks Should You Keep?

An exhaustive map of layer-subset selection in a pretrained ViT

University of Mannheim · Max Planck Institute for Informatics, Saarland Informatics Campus

Pick the blocks. See what you get.

DINOv3 ViT-S/16 · ImageNet-1k · 3-epoch finetune
input ← block 1block 12 → classifier
Try k =
Your subset
—

All subsets with the same number of blocks
yours best observed truncation deletion scores mean
4,095block subsets, each finetuned and evaluated separately
28.6 ppaccuracy spread among 6-block models of identical size
0 of 11pruned depths where truncation beats the subset mean
0.18 ppgap left by local search after 50 evaluations
Abstract

Removing whole blocks reduces the parameter count and FLOPs of a pretrained transformer without requiring sparse kernels. We exhaustively evaluate all 212−1 = 4095 nonempty block subsets of a 12-block vision foundation model (DINOv3 ViT-S/16) after three-epoch end-to-end finetuning on ImageNet-1k. Under this protocol, top-1 accuracy varies by as much as 28.6 percentage points among subsets of the same block budget.

A common baseline, prefix truncation, simply retains the first k blocks. Its accuracy falls below the mean of all subsets at every pruned depth k ∈ {1,…,11}, so a uniformly selected subset has higher expected accuracy. The value of a block is also budget-dependent: early and late blocks exchange importance as the budget increases, while the final block remains beneficial throughout. Modest local search on the complete landscape approaches the best observed subsets and outperforms random search. We release the complete measured landscape as a benchmark for budget-conditional structured on-device compression.

Result 1

Subset choice matters at a fixed parameter count

Every subset with k blocks has the same deployed size, 0.68M + 1.77M·k parameters, and the same block-level FLOPs. Yet the spread between the best and worst k-block model grows from 7.3 points at k=2 to 28.6 at k=6 before shrinking to 2.4 at k=11. The best 4-block network (52.09%, 7.8M parameters) beats the worst 7-block network (50.36%, 13.1M) with 41% fewer parameters.

The complete three-epoch landscape
Filter by block (click to cycle any → must keep → must drop):
one finetuned subset best observed subset mean truncation [1…k]

Hover a point to see its blocks; click to load it into the picker above. Points are spread horizontally within each k for legibility only.

Result 2

Truncation is a poor default

Keeping the first k blocks is the obvious static rule, and early-exit methods implicitly use it. In this model it ranks below the subset mean at every pruned depth. At least 94% of subsets beat it for k ∈ {7,8,9}, and every other subset beats it at k ∈ {10,11}.

Share of same-size subsets that truncation beats

Percentage of the C(12,k) subsets scoring strictly below truncation. The dashed line is the median: below it, truncation is worse than a coin flip over subsets.

Statistics over all measured subsets (top-1 %)
Result 3

The best subsets mix early and late blocks, and they are not nested

For every k from 3 to 11 the best observed subset keeps blocks 3, 4 and 12 and drops block 1. At intermediate depths it adds a run of later blocks (7–8 at k=5, 7–11 at k=8). In 4 of the 11 steps from k to k+1, the best subset swaps a block out, so no procedure that only adds or only removes blocks recovers the best subset at every budget.

Best observed subset vs. truncation
both keep best only truncation only neither

Right column: gain of the best subset over truncation (pp). Click a row to load it.

Marginal value of each block, by budget

Cell = mean accuracy of k-block subsets that contain the block minus the mean of those that omit it (pp). Red is positive, blue negative. Only block 12 stays positive at every budget.

Block importance is budget-dependent, not intrinsic

mi(k) = mean|S|=k, i∈S a(S) − mean|S|=k, i∉S a(S)

At k=4, subsets containing block 3 average 45.96% against 42.52% for those without it, so m3(4) = +3.45. At k=8 the same contrast is −0.61. A ranking computed at one budget need not transfer to another, which is a problem for methods that score blocks once on the full model and reuse that ranking. Keeping block 12 alone is not enough either: the first k−1 blocks plus block 12 beat truncation at every budget but still sit below the subset mean for every k ≥ 5.

Result 4

Deletion costs interact, so additive scoring fails

Deleting a single block and finetuning the remaining 11 costs between 0.66 points (block 1) and 3.10 points (block 12). The cost generally grows with depth, the opposite of LLM pruning practice, which tends to drop deeper blocks. If those costs added up, deleting blocks i and j would cost di+dj. Instead every one of the 66 pairs costs more than the sum, and the resulting additive predictor ranks subsets backwards at tight budgets.

(a) Single-block deletions

Top-1 after deleting one block and finetuning the other 11. The line marks the full model (80.96%).

(b) Two-block deletions: predicted vs. observed

Each dot is a deleted pair. x: sum of the two single-deletion changes; y: measured change. Every dot sits below the identity line (super-additive).

(c) Additive scoring vs. measured ranking

Spearman ρ between Â(S) = A − Σi∉S di and measured accuracy within each k. Negative means the predictor tends to rank better subsets lower.

(d) Search quality per candidate evaluation
local searchrandom search

Best accuracy found minus best observed, averaged over k ∈ {3,…,9} and 300 trials. Bands: 10th–90th percentile across trials. Recomputed in your browser from the released landscape.

Compute

What the map cost, and what a search costs

The 4,095 three-epoch runs took 4,034 GPU-hours on NVIDIA RTX 8000s, one GPU per candidate. A search with B=50 at k = 3, 6 or 9 would cost roughly 30, 48 or 66 GPU-hours. Random-search candidates train independently; local search can run restarts or neighbour evaluations in parallel.

Median and interquartile runtime per candidate; search cost = B × median runtime at that depth.

Sanity checks

Is three epochs enough? Does the backbone need finetuning?

For 160 subsets the authors also finetuned for 30 epochs. Their 3-epoch and 30-epoch accuracies agree closely in rank (Spearman ρ = 0.99), which supports the short protocol for screening. Freezing the backbone is not an option: removing a single block with a frozen backbone costs between 7.6 and 74.9 points more than finetuning the same subset.

3-epoch vs. 30-epoch finetuning (160 subsets)

Color: number of retained blocks, light (few) to dark (many). Dashed: least-squares fit.

Frozen backbone vs. full finetuning, single-block deletions
frozen backbonefull finetuning
Protocol
Modelfacebook/dinov3-vits16-pretrain-lvd1689m · 12 blocks, width 384, patch 16. Kept blocks are copied into a compact encoder in their original order; patch embedding, special tokens, RoPE and final norm are retained.
HeadFreshly initialised linear classifier (1,000 classes) on the normalised CLS token.
TrainingAdamW, lr 1e-3 head / 1e-4 backbone, weight decay 0.05, batch 256, 3 epochs, seed 42; random resized crop 224 + flip.
MetricBest ImageNet-1k validation top-1 over the three epochs (resize 256, center crop 224).
Workshop poster: Which Transformer Blocks Should You Keep? Teaser histogram of all 495 four-block subsets, setup, truncation results, block-structure heatmaps, and single-block deletion and search results.
Workshop poster

The paper on one page

The poster presented at the NeurIPS 2026 Workshop on On-Device Intelligence. It condenses the setup, the truncation result, the structure of the best subsets, and why single-block scores mislead while a small local search works.

61 × 85 cm · 1 page · 0.9 MB

Citation

@inproceedings{jung2026blocks,
  title     = {Which Transformer Blocks Should You Keep? An Exhaustive Map of
               Layer-Subset Selection in a Pretrained ViT},
  author    = {Jung, Steffen and Keuper, Margret},
  booktitle = {NeurIPS 2026 Workshop on On-Device Intelligence: Foundation
               Models under Real-World Constraints},
  year      = {2026},
  url       = {https://openreview.net/forum?id=YOQiEN1fCo}
}