Active Token Mixer

Guoqiang Wei, Zhizheng Zhang, Cuiling Lan, Yan Lu, Zhibo Chen

Abstract

The Active Token Mixer (ATM) is a novel vision backbone operator designed to overcome the limitations of traditional token mixing strategies. By actively learning to predict spatial offsets for every channel independently, ATM combines the global, content-adaptive reach of Transformers with the computational efficiency of MLPs. This approach allows the model to capture diverse semantic traits across different feature channels. Evaluated on ImageNet-1K, COCO, and ADE20K, ATMNet consistently outperforms state-of-the-art models like Swin Transformer and ConvNeXt while maintaining a linear computational complexity relative to image size.

Introduction

Token mixing—the process of aggregating information across spatial locations—is a fundamental component of modern computer vision backbones. Existing methods typically fall into three categories: CNNs, which are efficient but local; Transformers, which are global and adaptive but computationally expensive; and MLPs, which are fast but lack content-adaptivity.

The authors of "Active Token Mixer" identify a critical gap: the need for a mechanism that is simultaneously global, content-adaptive, and efficient. Furthermore, they argue that different channels in a feature map represent distinct semantic features (e.g., texture vs. shape) and should therefore be allowed to "look" at different spatial locations.

The Active Token Mixer (ATM)

The core innovation is the ATM block, which treats token mixing as an active search process. Unlike standard attention mechanisms that compute a full affinity matrix, ATM predicts specific spatial offsets for each token.

The ATM mechanism: (a) illustrates the per-channel active offset prediction for the width dimension, while (b) shows the full ATM block architecture including directional decomposition and fusion.

The process involves three key steps:

  1. Active Offset Prediction: For a given query token, a small fully connected (FC) layer predicts unique spatial offsets for every single channel.
  2. Directional Decomposition: To optimize the search and reduce complexity, the task is split into horizontal ($ATM^W$) and vertical ($ATM^H$) branches.
  3. Recomposition and Fusion: The model samples values from the predicted locations and fuses them with the original identity token using a learned channel-wise weighting mechanism.

This design ensures that the computational complexity remains linear ($O(N)$) with respect to the number of pixels, making it highly scalable for high-resolution tasks.

Experimental Results

ATMNet was evaluated across a range of standard benchmarks, demonstrating superior performance-to-efficiency ratios compared to established state-of-the-art (SOTA) models.

Comparison of ATMNet variants against other vision backbones on the ImageNet-1K classification benchmark.

As shown in the table above, ATMNet-B achieves 83.5% top-1 accuracy on ImageNet-1K with 10.1G FLOPs, outperforming models like Swin-S and CycleMLP-B4. The Large variant (ATMNet-L) reaches 84.8% accuracy when scaled to a $384^2$ input size, surpassing Swin-B while utilizing significantly fewer FLOPs (36.4G vs 47.1G).

Beyond classification, ATMNet showed strong results in dense prediction tasks:

  • Object Detection (COCO): ATMNet-L achieved 52.0 AP, a 1.5-point improvement over Twins-L with 20% fewer parameters.
  • Semantic Segmentation (ADE20K): ATMNet-L reached 51.1 mIoU, outperforming Swin-B by 1.4 points.

Discussion and Key Insights

A primary insight of this work is the value of channel-wise intelligence. By allowing each channel to learn its own spatial offset, the model can capture more complex and varied contextual relationships than models that share offsets across channels.

Visualizations of the learned offsets reveal an evolution of receptive fields: earlier layers tend to focus on local features, while deeper layers automatically learn to aggregate information from across the entire image. This hierarchical behavior mimics the natural structure of human visual processing.

Despite its advantages, the authors note that predicting offsets is a non-linear operation that can be sensitive to hyperparameters. Additionally, while theoretically efficient, custom operators like grid sampling may require specialized hardware optimization (e.g., custom CUDA kernels) to achieve maximum throughput on modern GPUs.

Conclusion

The Active Token Mixer introduces a powerful and efficient alternative to standard self-attention and fixed-weight mixing. By enabling per-channel active searching with linear complexity, ATMNet sets a new standard for versatile vision backbones capable of handling both global context and fine-grained semantic details. Future work may extend this approach to video tasks or even larger-scale model regimes.

Summary updated

BibTeX
@inproceedings{wei2023active,
  author = {Guoqiang Wei and Zhizheng Zhang and Cuiling Lan and Yan Lu and Zhibo Chen},
  title = {{Active Token Mixer}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i3.25376},
}
Figure