TL;DR
While State Space Models like Mamba excel at processing long sequences, existing vision autoregressive pretraining methods restrict models to short, single-image tasks. This paper introduces STAR (SeparaTors for AutoRegressive pretraining), a framework that uses image-agnostic separator tokens to safely chain multiple images into a single long sequence. By unlocking Vision Mamba's capacity for long-range dependencies, STAR-B achieves a highly competitive 83.5% top-1 accuracy on ImageNet-1k while significantly cutting down training time.
What Problem Does This Paper Address?
Autoregressive pretraining—the backbone of modern Large Language Models (LLMs)—works by predicting the next token in a sequence. Adapting this to computer vision is challenging because images are inherently 2D. Current vision methods (like iGPT or ARM) flatten a single image into a sequence of patches.
However, modern Vision Mamba architectures are specifically engineered to handle long sequences with linear computational complexity. Training them on single, isolated images creates a fundamental mismatch between the model's high-capacity architecture and a short-sequence task. Simply stitching multiple images together doesn't work either; without clear boundaries, the model suffers from cross-image interference. The authors set out to answer: How can we train Vision Mamba on long sequences of multiple images without losing individual image context?
Methods
The authors propose STAR (SeparaTors for AutoRegressive pretraining), which reformulates autoregressive vision pretraining into a true long-sequence task.
- Patch Clustering: Images are broken into non-overlapping pixel patches, which are then grouped into spatially adjacent "pixel clusters" (e.g., 4x4 patches per cluster) to preserve local 2D structure.
- The Separator Cluster ($c_{sp}$): To safely concatenate multiple images, the authors introduce a unique, image-agnostic separator cluster inserted at the beginning of each image sequence.
- Causal Attention Mapping: The combined long sequence (alternating separators and image clusters) is fed into a causal MambaMLP encoder. A lightweight transformer decoder then predicts the next cluster. Crucially, the decoder uses a customized attention map: attention is bidirectional within a cluster (so patches inside a cluster look at each other) but unidirectional between clusters to maintain the autoregressive flow.
The authors also experimented with the internal structure of the separator token, testing four designs: Zeros, Ones, Learned Embeddings, and an Identity Matrix configuration.
Finally, they modified the standard Vision Mamba setup by moving the classification (cls) token from the middle of the sequence to the very end (the "tail"), allowing it to aggregate the complete context developed during long-sequence pretraining.
Datasets
The model was pretrained and evaluated using the standard ImageNet-1k dataset, which contains approximately 1.28 million natural images across 1,000 classes. Data augmentations included random cropping and horizontal flipping, matching the recipe used in Masked Autoencoders (MAE).
Key Insights and Ideas
- Boundaries are Mandatory: Simply concatenating four images together without separators causes performance to crater, dropping Exponential Moving Average (EMA) accuracy from 82.15% to 78.63%.
- The Identity Matrix Wins: Among the separator types, the Identity separator (ones on the diagonal, zeros elsewhere) proved most effective over extended training runs (300+ epochs), providing a distinct boundary signal without injecting conflicting pixel information.
- The Sequence Length Sweet Spot: Performance peaks when concatenating 4 images (amounting to 640 tokens total). Pushing the sequence length further to 16 images (2,560 tokens) led to a performance decline, indicating that the model hits a length bottleneck inherent to the MambaMLP-B backbone.
- Tail Tokens Matter: Shifting the
clstoken to the tail end of the sequence yielded a 0.3% accuracy boost, proving that summarizing the sequence after the autoregressive context is established is superior for downstream classification tasks.
Key Results
- High Competitive Accuracy: After 1,600 epochs of pretraining, the STAR-B model (utilizing the tail class token) achieved a top-1 accuracy of 83.5%* on ImageNet-1k. This places it on par with established heavyweights like ViT-B trained via MAE (83.6%) and close to VMamba-B (83.9%).
- Superior Training Efficiency: STAR proved highly efficient compared to other self-supervised methods on the same Mamba architecture. It achieved its peak performance while being 6.6 times faster to train than contrastive learning and 1.4 times faster than Masked Image Modeling (MAE).
Limitations and Future Work
The primary limitation identified is the sequence length bottleneck: scaling beyond 4 images (640 tokens) to 16 images (2,560 tokens) degraded performance. This suggests that while Mamba handles long sequences better than Transformers, the standard MambaMLP backbone still struggles with extremely long multi-image contexts without further architectural tuning.
The authors suggest that future work should focus on optimizing the Mamba block structure to handle even longer sequences and applying the STAR framework to larger, more advanced visual Mamba variants.
Summary updated