Hierarchical classification goes beyond predicting a single label; it involves predicting a path through a taxonomy—for instance, moving from a coarse-level Bird to a mid-level Hummingbird, and finally to a fine-level Green Hermit. While this multi-level approach offers flexible recognition under varying visual conditions, standard hierarchical image classifiers often suffer from a critical flaw: visual inconsistency.
This paper introduces H-CAST (Hierarchical-CAST), a novel method that enforces internal visual consistency. By aligning taxonomic levels with hierarchical image segments, H-CAST ensures that fine-grained details (like a bird's beak) are spatially nested within coarse regions (like the entire bird), leading to more accurate and logically coherent predictions.
The Problem: Visual Inconsistency in Hierarchical Models
Current models often fail to maintain logical coherence across taxonomic levels because they treat each level as an independent task relying on different visual cues. For example, distinguishing a Bird from a Plant might rely on global features like feathers or leaves, while separating specific species requires local details like head coloration.
In many state-of-the-art models, this disconnect leads to nonsensical hierarchies. A "coarse" classifier might focus on a bicycle in the background to predict Vehicle, while the "fine" classifier focuses on a person's scarf in the foreground to predict Feather Boa. Because these predictions are not grounded in the same visual region, the resulting classification path is invalid.
Prior work attempted to fix this using "external semantic supervision"—essentially statistical label alignment. However, this statistical approach fails to guarantee that the model is actually looking at the correct, consistent pixels at test time.
The H-CAST Solution
To address this, the authors propose moving the consistency requirement from the label space into the visual space. H-CAST achieves this through three core mechanisms:
- Visually Consistent Segmentation: Building on the CAST architecture, the model uses graph pooling to progressively merge small "superpixels" into larger regions. This enforces a "part-to-whole" spatial relationship. The segments used to predict fine-grained labels are literal subsets of the larger segments used for coarse labels.
- Fine-to-Coarse (F→C) Learning: Unlike traditional top-down approaches that start broad and narrow down, H-CAST learns fine-grained details in early layers and integrates them into broader, coarser features in later layers.
- Tree-Path KL Divergence Loss: To ensure semantic coherence, the authors introduce a novel loss function that penalizes prediction paths violating the taxonomy. Instead of treating each taxonomic level as an independent task, this loss treats the entire hierarchical path as a single distribution to be optimized.
Key Insights
- Spatial Granularity = Taxonomic Granularity: The core philosophy of H-CAST is that the physical hierarchy of an image (parts making up a whole) should naturally map to the semantic hierarchy of labels. If a model's internal segmentation is fractured, its classification will likely be fractured as well.
- The CLIP Paradox: The authors demonstrate that even powerful vision-language foundation models like CLIP struggle with this consistency. CLIP might correctly identify a specific species but fail to grasp its broader category (or vice versa) because it lacks structured visual grounding.
- Mutual Benefit: Enforcing hierarchical classification doesn't just improve accuracy; it also enhances the quality of the model's unsupervised image segmentation. The taxonomy effectively acts as a guide for how pixels should be grouped, without requiring pixel-level annotations.
Experimental Results
The model was rigorously evaluated on several benchmarks, including BREEDS (four specialized ImageNet subsets), CUB-200-2011, FGVC-Aircraft, and iNaturalist 2021-Mini. The primary metric was Full-Path Accuracy (FPA), which requires every level of the hierarchy to be predicted correctly.
- Superior Accuracy: H-CAST outperformed state-of-the-art baselines (such as HRN and TransHP) by 4.3% to 10% in FPA across the BREEDS datasets.
- Consistency Gains: It significantly reduced the Tree-based InConsistency Error (TICE), often achieving error scores 2 to 3 times lower than competing methods.
- Efficiency: H-CAST achieved these superior results with significantly fewer parameters than high-performing baselines (e.g., 26.2M parameters compared to HRN's 70.8M).
- Foundation Model Comparison: H-CAST consistently outperformed zero-shot CLIP, particularly in its ability to maintain a coherent logical path from coarse to fine predictions.
Limitations and Future Directions
While H-CAST excels at single-object consistency, both H-CAST and models like CLIP still struggle in highly complex scenes with multiple overlapping objects or heavily cluttered backgrounds. Additionally, on very small-scale datasets (like FGVC-Aircraft), traditional ResNet-based architectures sometimes exhibited better raw accuracy than the ViT-based H-CAST, likely due to the helpful inductive biases of CNNs when training data is scarce.
Future work will explore extending this visually consistent approach to open-vocabulary hierarchical segmentation and investigating how these robust features could improve downstream tasks like object detection or robotic manipulation.
Summary updated