DynaMixer
The small DynaMixer, a vision MLP that builds its token-mixing matrices from the tokens being mixed.
Image classification · 1,287 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 26.3M
- Operations
- 1,287
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICML 2022
- Cited by
- 25 (as of 28 October 2026)
- Authors
- Ziyu Wang, Wenhao Jiang, Yiming Zhu and others
- Source
- GitHub: ziyuwwang/DynaMixer
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16229
- Graph hash
- 3cb2f2a55174e4b8a810834cd5ba51c2ed51ce6e679f8f9e62a4a384549dc65c
- Skeleton hash
- 418e6b316327a3cac4fd24629b813df6fd09127e70a08dcc9d29650019e22674
- Architecture hash
- 67c763d0b07a4c0c012f88fdc52e63e623a248b4796985f0bd801327e6f5714d
- Diagram SHA-256
- 86820db4a0f9f0643d293e7e8969e2450cdbdab0d539d36977dd5aa0ee9c67b6
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DynaMixer is a vision MLP architecture for image recognition. Earlier MLP-like models fuse tokens with fixed, static mixing matrices, which the paper argues may restrict adaptability to the contents being fused; DynaMixer instead generates its mixing matrices dynamically for each set of tokens to be mixed by considering their contents.
Mixing all the image tokens at once would take significant time, so tokens are mixed row-wise and column-wise, with the parameters of the mixing operation shared among all rows and among all columns. Before a mixing matrix is generated the feature dimensionality is reduced, and the feature channels are divided into multiple segments that are mixed separately. Each mixer layer pairs this DynaMixer block with a channel-MLP block, and the whole network consists of a patch embedding layer, several mixer layers, a global average pooling layer and a classifier head.
The paper defines three versions by model size: DynaMixer-S, DynaMixer-M and DynaMixer-L. This model is DynaMixer-S, for which the paper reports 82.7% top-1 accuracy on the ImageNet-1K dataset with 26M parameters and no extra training data. All versions take 224 × 224 input images with 7 × 7 input patches and have two stages, each starting with a patch embedding layer.
Key idea. DynaMixer generates its token-mixing matrices dynamically from the contents of the tokens being mixed, instead of using the static mixing matrices of earlier MLP-like vision models.
- DynaMixer
- DynaMixer-S
- dynamixer_s
- vision MLP
- MLP-like model
- dynamic mixing
- dynamic token mixing
- ImageNet classification
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wang2022dynamixervisionmlparchitecture,
title={DynaMixer: A Vision MLP Architecture with Dynamic Mixing},
author={Ziyu Wang and Wenhao Jiang and Yiming Zhu and Li Yuan and Yibing Song and Wei Liu},
year={2022},
eprint={2201.12083},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2201.12083},
}