r/MachineLearning • u/Cy74 • 20h ago
Research Let every Transformer layer reach states at all depths (WhiteMatter) [R]
In a standard Transformer, each layer only reads the KV cache from its own depth. A shallow layer cannot use what deeper layers already computed for earlier tokens. When deep layers need to reach shallow ones, that information also has to pass through the residual stream, which has limited bandwidth.
Our recent work, WhiteMatter: All-to-All Cross-Layer Connections via KV Source Mixing, lets every layer read from every depth. Each layer's keys and values are a learned mix of hidden states from all layers. In addition, we can share KV among reader layers to reduce the KV cache size.
Main results:
- WhiteMatter matches a standard Transformer with 50% more layers (4%-8% lower perplexity vs same depth).
- With half the KV cache (or even less), it still beats matched standard Transformers.
The catch: a token's shallow layers now depend on the deep layers of earlier tokens, so training and prefill cannot process all tokens at once. Unless...
We proposed cyclic iteration, which matches token-by-token quality in 4 parallel passes, compared to 53 for the Jacobi method used in prior works (12.5x faster at matched quality). It's still slower than vanilla prefill, which is the main thing we are working on next. However, decoding has the same speed as standard transformer, or can even be faster because of the reduced GPU memory requirement.
Paper: https://arxiv.org/abs/2608.18486
Video: https://www.youtube.com/watch?v=NCjJzBGdgTU
Code: https://github.com/Cy-47/White-Matter
Strongly recommend watching our video. It should feel much easier to follow than text!
5
u/H0lzm1ch3l 10h ago
So you are embracing the recurrence and just iteratively solving through all of it?
2
u/MolassesLate4676 11h ago
I’m so confused in how this would train
You’re mixing kv made from qkv of other layers?
3
u/InterstitialLove 12h ago
Why not try all deeper layers, excluding shallower ones? That maintains parallel training, which is clearly the biggest cost of this method
2
u/Cy74 9h ago
How did you feel about the bold fonts? I added them by hand but worried that they might look AI generated, since other people don't seem to use bold font much.
1
u/jojothecircus_boy 13h ago
the title makes it sound like the stack stops being a stack, what changes during inference and what is the matched baseline