Abstract
Large vision and language models learned directly through image-text associations often lack detailed visual substantiation, whereas image segmentation tasks are treated separately from recognition, supervisedly learned without interconnections. Our key observation is that, while an image can be recognized in multiple ways, each has a consistent part-and-whole visual organization. Segmentation thus should be treated not as an end task to be mastered through supervised learning, but as an internal process that evolves with and supports the ultimate goal of recognition. We propose to integrate a hierarchical segmenter into the recognition process, train and adapt the entire model solely on image-level recognition objectives. We learn hierarchical segmentation for free alongside recognition, automatically uncovering part-to-whole relationships that not only underpin but also enhance recognition. Enhancing the Vision Transformer (ViT) with adaptive segment tokens and graph pooling, our model surpasses ViT in unsupervised part-whole discovery, semantic segmentation, image classification, and efficiency. Notably, our model (trained on unlabeled 1M ImageNet images) outperforms SAM (trained on 11M images and 1 billion masks) by absolute 8% in mIoU on PartImageNet object segmentation.
Introduction
In modern computer vision, recognition (identifying what is in an image) and segmentation (determining where object boundaries lie) are typically treated as distinct tasks. While large-scale models like CLIP excel at recognition, they often lack "visual substantiation"—the ability to precisely localize the constituent parts that justify a classification.
Standard Vision Transformers (ViT) exacerbate this by processing images as a grid of fixed square patches. This rigid structure is computationally convenient but ignores the natural contours of the physical world. Furthermore, state-of-the-art segmentation models like SAM require massive human-annotated datasets (e.g., 1 billion masks). CAST (Concurrent Recognition and Segmentation with Adaptive Segment Tokens) proposes a different philosophy: segmentation is not an end goal, but an internal process that should evolve to support recognition.
Methodology: The CAST Framework
CAST innovates on the Transformer architecture by replacing rigid patches with flexible, object-centric units and introducing a hierarchical merging process.
Adaptive Segment Tokens
Instead of arbitrary square patches, CAST utilizes superpixels as its basic visual tokens. By using the SEEDS algorithm to generate initial partitions, the model's tokens naturally adhere to the actual boundaries and contours of objects from the very first layer.
Hierarchical Graph Pooling
The model alternates between standard Transformer blocks for feature extraction and novel Graph Pooling modules. These modules dynamically merge fine-grained segments into coarser ones based on feature similarity. This creates a "parsing continuum," allowing the model to represent an image as a hierarchy of parts, components, and eventually, the whole object.
Recognition-Driven Learning
Crucially, the entire hierarchy is trained using only image-level objectives, such as classification or self-supervised instance discrimination. CAST is never shown a manual segmentation mask during training; it learns to segment "for free" because organizing pixels into meaningful parts improves its recognition accuracy.
Key Results
The researchers evaluated CAST across benchmarks including PartImageNet, DensePose, and ADE20K, yielding several significant insights:
- Unsupervised Part Discovery: Despite receiving zero mask supervision, CAST outperformed the Segment Anything Model (SAM)—which was trained on 11 million images and 1 billion masks—by an absolute 8% in mIoU on PartImageNet object segmentation.
- Computational Efficiency: By reducing the number of tokens as the network deepens (e.g., from 196 down to 8), CAST-S achieves higher accuracy than a standard ViT-S on ImageNet while requiring approximately 30% fewer GFLOPS.
- Visual Fidelity: Qualitatively, CAST excels at capturing thin or complex structures, such as the legs of a dog or the neck of a bird, which are often blurred or lost in traditional patch-based architectures.
Discussion and Future Work
A current limitation of CAST is its dependency on off-the-shelf superpixel algorithms like SEEDS. While effective for object-centric data, these can struggle with highly cluttered scenes or extremely fine structures like thin pipes.
Future research aims to develop a fully end-to-end system where the initial image partitioning is also learnable. Additionally, the authors plan to explore the integration of this hierarchical parsing into large-scale multi-modal (vision-language) models to provide better visual grounding for AI-generated text.
Summary updated