Skip to content
AI360Xpert
Beta

gMLP Gates Tokens Without Attention

gMLP splits channels and gates one half by a spatial projection of the other, adding location sense to MLPs cheaply.

Channel split plus 196 by 196 spatial gate adds order for 38K weights
Channel split plus 196 by 196 spatial gate adds order for 38K weights

Why Does This Exist?

Mixer mixes all tokens equally with no order bias. Language and vision both need order without full attention.

gMLP gates instead. It follows mlp mixer baselines, aids image classification scaling, and keeps pretrained models simple.

Think of It Like This

A dimmer wired to a neighbor room

Two rooms share power. One room dial sets brightness in the other, so activity couples without a central controller.

Split halves are rooms, spatial projection is wiring. Where it stops: fixed wiring cannot adapt per input, just as static gates lack input dependence.

How It Actually Works

Split XX into U,VU,V halves of 256256 channels. Spatial gate S(V)=WVS(V) = W V with WW shape S×S=196×196S \times S = 196 \times 196. Output U⊙S(V)U \odot S(V), where ⊙\odot multiplies elementwise. Add channel MLPs around it.

Worked example

S=196S = 196. WW holds 1962=38,416196^2 = 38{,}416 weights. Gate for token 55 is ∑j=1196W5,jVj\sum_{j=1}^{196} W_{5,j} V_j. If row 55 peaks 0.60.6 on token 55 plus 0.20.2 on 66, output keeps local order. Cost 3838K versus attention QKQK per head per layer dynamic.

Watch Out For

Expecting input adaptive routing from static gates

WW is fixed after training, unlike attention. Symptom: poor handling of shuffled layouts. Fix: use attention or dynamic gates when order varies strongly per input.

The Quick Version

  • gMLP splits channels and gates half by spatial projection.
  • Gate matrix 196×196196 \times 196 holds 3838K static weights.
  • Order emerges without attention or positions.
  • Static gates cannot adapt per input like attention.
  • Pair with channel MLPs for full blocks.