Channel Mixer: A Pretrainable Tokenizer for Scalable Multi-Channel Vision Transformers

Lukas Miklautz, Lucas Miranda, Nikola Bulat, Armin Lambacher, Dexiong Chen, Karsten BorgwardtNeurIPS 2026

TL;DR

Vision Transformers (ViTs) thrive on standard three-channel RGB images, but choke computationally when fed scientific images—like cell microscopy or satellite scans—that contain dozens of independent channels. ChannelMixer solves this by using a tiny, pretrainable transformer to distill all channels within an image patch into a single summary token before the main ViT ever sees it. The result? Standard RGB-level compute speeds on 29-channel images, while matching or beating expensive state-of-the-art models.

What Problem Does This Paper Address?

Imagine looking at a tree in grayscale; you still recognize it because red, green, and blue light in nature are heavily correlated. Standard ViTs exploit this by squashing RGB patches through a simple linear layer.

Now imagine looking at a cell under a fluorescence microscope. One channel stains the nucleus, another the membrane, another a specific protein. These signals are largely independent, and datasets vary wildly—from 3 channels to 30+. A simple linear squash loses intricate cross-channel relationships, and hardcoding the input layer breaks when channel counts change.

Current "channel-adaptive" ViTs fix this by rolling out channels: if an image has 100 patches and 29 channels, they feed $100 \times 29 = 2,900$ tokens into the ViT. Because self-attention scales quadratically with sequence length, compute and memory explode. How do we capture rich multi-channel interactions without blowing up our GPU budget?

Figure 1: ChannelMixer scales better than the rolled-out tokenizer to increas- ing number of channels. GFLOPs com- puted for ViT-Small backbone forward pass with different tokenizers: Standard, ChannelMixer, Rolled-Out.

Methods

Instead of letting the heavy ViT backbone drown in per-channel tokens, the authors introduce ChannelMixer (CM), a lightweight, patch-level tokenizer that sits at the front door.

Figure 2: ChannelMixer: The cell image on the left consists of three fluorescence stainings where the i-th spatial patch is encoded into a channel mixing token (CMT) ti, aggregating information across channels via self-attention. The resulting compact sequence of CMTs can then be passed to a ViT.
  1. Local Channel Mixing: For a single spatial patch, CM projects each channel independently using a shared linear layer, prepends a learnable Channel Mixing Token (CMT) (much like a ViT's CLS token), and runs self-attention across the channels via a shallow 3-layer transformer. Only the single resulting CMT is handed off to the standard ViT backbone. Whether an image has 3 channels or 100, the ViT sequence length stays fixed at the number of spatial patches $N$, dropping attention complexity from $\mathcal{O}((KN)^2)$ to $\mathcal{O}(NK^2 + N^2)$ for $K$ channels.
  2. Channel-Agnostic Pretraining: Unlike prior methods that entangle channel handling with the full ViT, CM can be pretrained standalone across diverse datasets. Using an asymmetric autoencoder (3-block encoder, 1-block decoder) with random channel dropout, the encoder compresses channels into a CMT without knowing which channel is which. The decoder then copies that CMT, adds learnable Channel Positional Embeddings (CPEs), and reconstructs every original channel. Afterwards, the decoder is tossed.
Figure 3: A single forward pass for the autoencoder pretraining of ChannelMixer. (A) Apply shared patch embedding independently to each channel. (B) Add Channel Mixing Token (CMT) to the token sequence and pass through ChannelMixer. (C) Copy Channel Mixing Token. (D) Add per Channel Positional Embedding for the decoder. (E) Reconstruct each channel with a shallow ViT decoder.
  1. Downstream Conditioning: When plugging the pretrained CM into a ViT for a specific task, it helps to reintroduce channel identity. Rather than adding CPEs directly to tokens, the authors route CPEs through Adaptive Layer Normalization (AdaLN)—modulating the scale and shift of CM's normalization layers, carefully initialized from the pretrained LayerNorm weights.

Datasets

No new datasets are introduced; the authors evaluate across six established multi-channel benchmarks (spanning 3 to 29 channels):

  • CHAMMI Benchmark (Cell Microscopy): Combines three sub-datasets—WTC (3 channels), HPA (4 channels), and Cell Painting / CP (5 channels)—featuring both in-distribution (IID) and out-of-distribution (OOD) tasks like unseen cell lines.
  • PBMC: 5-channel single-cell microscopy for immune cell classification.
  • BSCCM: 29-channel white blood cell microscopy (23 LED-array patterns + 6 fluorescence channels), with ~400k unlabeled images for self-supervised learning and labeled subsets for 3- and 10-class tasks.
  • So2Sat: 18-channel satellite imagery (8 radar + 10 optical) for classifying 17 climate zones.

Key Insights and Ideas

  • One token per patch is enough: You might worry that cramming 29 uncorrelated channels into a single vector creates an information bottleneck. When the authors tested two CMTs per patch on the 29-channel BSCCM task, F1 performance actually dipped slightly ($51.88\%$ vs. $48.31\%$). One nonlinearly mixed token captures plenty of signal for classification.
  • Unlocking self-supervised learning at scale: Multi-crop self-supervised recipes like DINOv2 need large batch sizes to stay stable. On 29-channel BSCCM, rolled-out tokenizers eat so much VRAM that batch size drops to 16 per GPU, causing DINOv2 to diverge completely. ChannelMixer comfortably fits batches of 96 and trains smoothly.
  • Graceful degradation under missing channels: Because CM is pretrained with random channel dropout, it doesn't over-rely on any fixed channel subset. Drop 25 out of 29 channels on BSCCM at test time, and CM still retains $37.7\%$ of its original F1 score, whereas a standard ViT collapses to $3.6\%$.

Key Results

  • Massive Efficiency Gains: On 29-channel images (ViT-S/16), CM uses ~$20\times$ fewer FLOPs and $29\times$ fewer backbone tokens than rolled-out tokenizers. Extrapolated to 100 channels, it requires $67\times$ fewer FLOPs ($58.9$ vs. $3965.6$ GFLOPs) with drastically lower runtime and VRAM.
Runtime and VRAM scaling
  • State-of-the-Art Accuracy: Across 7 in-distribution tasks, CM-ViT ranks 1st on four and 2nd on three, shining brightest at high channel counts—beating the runner-up ChA-MAEViT by $+4.6$ macro-F1 points on BSCCM 10-class ($53.38\%$) and $+2.7$ points on So2Sat ($58.52\%$).
  • Stronger OOD Generalization: On CHAMMI's OOD tasks, CM achieves the highest average macro-F1 ($58.29\%$), beating runner-up DiChaViT by $2.5$ points and jumping $+5.9$ points ahead on unseen HPA protein localization tasks.
  • Pretraining Pays Off: Cross-dataset autoencoder pretraining boosts downstream F1 by $+4.6$ points (CHAMMI IID) and $+5.2$ points (So2Sat) compared to training from scratch—and even keeping the pretrained tokenizer frozen recovers most of those gains.

Limitations and Future Work

Collapsing all $K$ channels into a single token inside each patch prevents direct, global channel-to-channel attention across distant parts of an image. While no performance drop showed up in classification up to 29 channels, tasks requiring fine-grained spatial-channel interplay might feel the squeeze. Moving forward, the authors plan to scale channel-agnostic pretraining to larger, more diverse corpora, extend the paradigm to non-image multimodal data, and explore dense prediction tasks (like segmentation), which will likely require moving beyond a single CMT per patch.

Summary updated

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.
BibTeX
@inproceedings{miklautz2026channel,
  author = {Lukas Miklautz and Lucas Miranda and Nikola Bulat and Armin Lambacher and Dexiong Chen and Karsten Borgwardt},
  title = {{Channel Mixer: A Pretrainable Tokenizer for Scalable Multi-Channel Vision Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Wrq9Wj3xln},
}
Figure