
swiftformer (image classification)
Image classification295 ops3M params
5 models, image classification. Fewest parameters first.
SwiftFormer is a series of image classification models built for real-time use on mobile devices. The paper starts from the cost of self-attention, whose quadratic computational complexity with respect to image resolution limits its use in real-time applications on resource-constrained mobile devices.
Its answer is efficient additive attention, which replaces the quadratic matrix multiplication operations with linear element-wise multiplications. The design drops the explicit key-value interaction and uses a linear layer in its place. Because this attention is linear in the token length, it is used in every stage of the network, where convolutional encoder blocks are followed by a SwiftFormer Encoder.
The architecture is based on EfficientFormer, and the paper notes that the SwiftFormer models are built without any neural architecture search. The paper reports 78.5% top-1 ImageNet-1K accuracy with 0.8 ms latency on iPhone 14 for its small variant. For SwiftFormer-L3 it reports 83.0% top-1 accuracy at 1.9 ms.
AI-written summary; not reviewed by a person. Corrections welcome.
Paper: SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications