SpiralMLP: A Lightweight Vision MLP Architecture

Haojie Mu, Burhan Ul Tayyab, Nicholas ChuaWACV 2025

TL;DR

This paper introduces SpiralMLP, a novel vision architecture that replaces the conventional token mixing layer in MLPs with a "Spiral FC" layer. This new layer uses spiral-like offsets to capture richer spatial information more efficiently, achieving state-of-the-art performance on various vision tasks with linear computational complexity.

What Problem Does This Paper Address?

Modern computer vision models often rely on Convolutional Neural Networks (CNNs) or Transformers. While Transformers excel with large datasets, they are computationally expensive. Meanwhile, MLP-based architectures offer a lighter alternative but often struggle to capture comprehensive spatial information efficiently. Existing MLP token mixing methods typically focus on axis-aligned interactions, limiting their ability to integrate features across different spatial dimensions. This paper aims to bridge this gap by proposing a more effective and efficient spatial interaction mechanism for MLPs.

Methods

The core innovation is the Spiral FC (Fully-Connected) layer, which replaces the standard token mixing in MLP architectures. Unlike traditional methods that might use criss-cross connections or axis-aligned offsets, Spiral FC uses a deformable convolution-like approach with spiral-like offsets. These offsets are generated using sinusoidal functions, allowing for a more dynamic and comprehensive exploration of spatial relationships.

The Spiral FC layer is further enhanced by introducing two variants:

  • Self-Spiral FC: Captures local information within the feature map.
  • Cross-Spiral FC: Incorporates spatial information from a defined receptive field, controlled by an amplitude parameter.

These two variants are combined in a Spiral Mixing module, which then feeds into a standard Channel Mixing layer to form a Spiral Block. The overall architecture, SpiralMLP, is presented in a PVT-style (Pyramid Vision Transformer) and can be scaled to different sizes (B1 to B5). The authors emphasize that their approach maintains linear computational complexity, making it efficient for various input resolutions.

Datasets

The paper evaluates SpiralMLP on the following datasets:

  • CIFAR-10 and CIFAR-100: For initial benchmarking and ablation studies.
  • ImageNet-1k: For image classification.
  • COCO: For object detection and instance segmentation.
  • ADE20K: For semantic segmentation.

Key Insights and Ideas

  • Spiral offsets are more effective than axis-aligned ones: The paper demonstrates that a spiral-like exploration of spatial features can capture richer contextual information than simple criss-cross or axis-aligned interactions.
  • Targeting the full receptive field isn't always necessary: The authors found that a refined approach to spatial feature extraction, rather than covering the entire receptive field, can lead to better performance.
  • Linear complexity is achievable with rich spatial features: SpiralMLP achieves competitive results without resorting to quadratic complexity, making it a practical choice for resource-constrained environments.
  • Flexibility in offset functions: The spiral offset functions are designed to be adaptable, allowing for fine-tuning of feature extraction based on task requirements.

Key Results

  • State-of-the-art performance: SpiralMLP achieves competitive, and in some cases superior, performance compared to Transformers, CNNs, and other MLP-based models on ImageNet-1k, COCO, and ADE20K.
  • Efficiency: SpiralMLP maintains linear computational complexity (O(HW)) and demonstrates faster inference times compared to models of similar size. For instance, on ImageNet-1k, SpiralMLP-B5 achieves 84.0% Top-1 accuracy with 68M parameters and 11.0G FLOPs, outperforming many comparable models.
  • Object Detection/Segmentation: On COCO, SpiralMLP-B5 achieved the highest AP with fewer parameters than PVTv2-B5. In semantic segmentation on ADE20K, SpiralMLP-B also emerged as the top-performing model.
  • Ablation studies: Experiments showed that the optimal number of partitions (k) for the spiral offset function is around 2, and the maximum amplitude (Amax) around 3, for achieving peak performance on ImageNet-1k.

Limitations and Future Work

  • Hyperparameter Optimization: While the paper provides insights into optimal hyperparameters (k and Amax), the authors acknowledge that the discrete experimental design doesn't guarantee the absolute optimal configuration. Further research into optimizing these hyperparameters could lead to even more efficient information capture.
  • Generalizability of Spiral FC: The paper focuses on the effectiveness of Spiral FC within the SpiralMLP architecture. Future work could explore integrating Spiral FC into other vision architectures or tasks.
  • Further exploration of offset functions: The paper introduces a multi-partition pattern for offset functions. Further research could explore more complex or adaptive offset generation mechanisms.

Summary updated

BibTeX
@inproceedings{mu2025spiralmlp,
  author = {Haojie Mu and Burhan Ul Tayyab and Nicholas Chua},
  title = {{SpiralMLP: A Lightweight Vision MLP Architecture}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
}
Figure