Skip to content
AI360Xpert
Beta

MobileViT Folds Transformers Into Mobiles

MobileViT unfolds maps to tokens for light transformers then folds back, giving global range inside mobile conv blocks.

Unfold to 49 groups plus fold back lifts 73 to 78 percent at 1.2 GFLOPs
Unfold to 49 groups plus fold back lifts 73 to 78 percent at 1.2 GFLOPs

Why Does This Exist?

MobileNet lacks range and ViT lacks lightness. Phones need both in 66M weights.

MobileViT nests transformers in convs. It extends mobilenet inverted blocks, fits efficient architectures, and lifts image classification mobiles.

Think of It Like This

Folding laundry to check all pockets at once

You unfold stacked shirts into a row to check pockets globally, then refold to stacks. Local folds keep shape while the row check adds context.

Unfold is the row, transformers are checks. Where it stops: huge piles overwhelm rows, just as large maps strain mobile attention.

How It Actually Works

Conv 3×33 \times 3 then 1×11 \times 1 to dd. Unfold H×WH \times W into P=hwP = hw patches per group with NN groups. Run 22-layer transformers per group, fold back, fuse with input via 1×11 \times 1 plus 3×33 \times 3.

Worked example

56×5656 \times 56 with 2×22 \times 2 patches gives 28×28=78428 \times 28 = 784 groups? MobileViT-S uses P=4P = 4 (2×22 \times 2) and N=784N = 784. Attention per group 42=164^2 = 16 pairs times 784=12,544784 = 12{,}544 versus full 31362=9.83136^2 = 9.8M, about 784784 times cheaper. Accuracy 7373 to 7878 percent at 1.21.2 GFLOPs.

Watch Out For

Unfolding too large maps on phones

112112 maps explode groups and memory. Symptom: phone OOM despite low FLOPs. Fix: apply MobileViT blocks at 2828 and below as in the paper.

The Quick Version

  • MobileViT unfolds to tokens, transformers lightly, then folds back.
  • Per-group attention keeps global sense at mobile cost.
  • Fixture 1212K pairs replace 9.89.8M, 784 times cheaper.
  • Gains 7373 to 7878 percent at 1.21.2 GFLOPs.
  • Place blocks at 28 maps and below on phones.