Channel Mixer: A Pretrainable Tokenizer for Scalable Multi-Channel Vision Transformers
Lukas Miklautz ⋅ Lucas Miranda ⋅ Nikola Bulat ⋅ Armin Lambacher ⋅ Dexiong Chen ⋅ Karsten Borgwardt
Abstract
Vision Transformers (ViTs) achieve state-of-the-art performance across a wide range of natural-image tasks, but their standard tokenizer assumes a small, fixed set of channels such as RGB. This assumption breaks down in domains like cell microscopy and satellite imaging, where images contain many weakly correlated channels whose number varies across datasets. Current channel-adaptive ViTs address this by rolling out each channel as a set of patch tokens. While powerful, this design struggles with scale: the token sequence length grows linearly with the number of channels and self-attention cost grows quadratically. We introduce ChannelMixer, a multi-channel tokenizer that aggregates all channels within each spatial patch into a single channel mixing token via self-attention, decoupling the backbone token sequence length from channel count. ChannelMixer can be pretrained once with a lightweight autoencoder in a channel-agnostic manner and the resulting tokenizer integrates easily with ViTs trained under both supervised and self-supervised objectives. On multi-channel imaging benchmarks spanning 3 to 29 channels, ChannelMixer matches or outperforms channel-adaptive state-of-the-art methods while using approximately $20\times$ fewer FLOPs and $29\times$ fewer tokens than rolled-out tokenizers, measured on 29-channel images with a ViT-S/16. Code at https://github.com/BorgwardtLab/ChannelMixer.
Successful Page Load