TL;DR
When Vision Transformers are trained to classify multiple objects per image with only a few labeled examples, their "class tokens"—each meant to look at a different object—secretly collapse and all stare at the exact same patches. BELAY fixes this by using a free, off-the-shelf segmentation model to tell each token roughly where its class lives during training, then throwing the helper away at test time. This simple spatial nudge boosts accuracy across four aerial and natural-scene datasets by 1.8 to 11.2 AUPRC points, at zero extra inference cost.
What Problem Does This Paper Address?
Real-world images rarely contain just one thing. An aerial photo might show buildings, cars, and trees—all of which also belong to broader categories like man-made or vegetation. Predicting all of these labels at once while respecting their family tree is called hierarchical multi-label classification (HMC). Because labeling every level of a hierarchy is expensive, practitioners usually work in a semi-supervised setting: only a small fraction of images (say, 10%) have labels, while the rest are unlabeled.
To handle this, modern Vision Transformers (ViTs) assign each class its own learnable class token (or a label query in decoder-based models). In theory, the car token should attend to cars, and the tree token should attend to trees.
The authors show that in practice, this doesn't happen. When labels are scarce, the last-block attention maps of different class tokens collapse onto a single, nearly identical map (with a pairwise cosine similarity of 0.96–1.00). They barely prefer their own class's region over the rest of the image. Even more surprisingly, the authors rule out the usual suspects: this collapse isn't caused by the classifier head, "attention sinks" (high-norm background patches), or how the tokens are initialized.
Methods
Named after the climbing technique that holds a climber in place and comes off once they're safe, BELAY grounds each class token's attention during training and leaves inference untouched:
- Free Spatial Priors (Offline): Before training begins, the authors run a training-free open-vocabulary segmenter (SegEarth-OV3 for aerial images; CLIP-based SegEarth-OV for natural scenes) on every training image—labeled or not. Prompted with the leaf class names, the segmenter assigns each pixel to its highest-scoring class.
- Hierarchical Targets: These pixel maps are pooled onto the ViT's $14 \times 14$ patch grid. For any parent class in the hierarchy, its target map is simply the union (sum) of its descendants' patch coverages, normalized to form a probability distribution $t_n$.
- Grounding Loss: During training, a KL-divergence loss pulls each supervised token's last-block attention $a_n$ toward its target $t_n$. This runs alongside a standard supervised loss on labeled images and a self-supervised BYOL loss on all images.
- Consistent Predictions: A max-constraint layer guarantees that a child class's predicted probability never exceeds its parent's ($\hat{p}_{\text{child}} \le \hat{p}_{\text{parent}}$), eliminating hierarchy violations.
At test time, the segmenter and grounding loss are discarded—the model is just a plain class-token ViT. The authors also show that the exact same grounding principle works for label-query decoders like Query2Label by supervising their last cross-attention layer.
Datasets
All experiments use a ViT-B/16 backbone with 10% of training images labeled across four multi-label datasets that include pixel masks (allowing comparison against an "oracle" grounded on true masks):
- UC Merced (UCM): 2,100 aerial images, 17 classes in a 30-node hierarchy.
- Potsdam: 3,800 high-res orthophoto patches, 6 classes in an 8-node hierarchy.
- FLAIR #1: 77,412 aerial patches, 18 land-cover classes in a 24-node hierarchy.
- COCO-Stuff: 118k+ everyday scene images, 171 thing/stuff classes under 27 supercategories (198 nodes total).
Key Insights and Ideas
- Location matters more than classification: The free segmenters are actually poor classifiers on their own (presence AUPRC of 0.51–0.69 on three of the four datasets). Using them as pseudo-labels or for late fusion performs much worse than BELAY. Yet their spatial maps still drive big gains.
- Sharpness beats accuracy: By systematically degrading true masks on UCM, the authors found that blurring or shifting boundaries destroys the gain, while randomly dropping or adding wrong classes (at a 30% rate) still keeps 83% of the oracle's gain. Hard pixel assignments beat soft probability scores for the same reason: they point sharply at where things are.
- Unlabeled images do the heavy lifting: Grounding on true masks for only the 10% labeled images recovers just 38–73% of the oracle gain. The rest comes from grounding on the unlabeled images.
Key Results
- Consistent Accuracy Gains: With 10% labels, BELAY improves macro AUPRC over ungrounded class tokens by +2.15 (UCM), +1.81 (Potsdam), +2.57 (FLAIR #1), and +11.17 (COCO-Stuff) points, recovering 67–93% of the oracle gain from true masks.
- Beats All Baselines: BELAY outperforms HELM-style hierarchy tokens, Query2Label, ML-Decoder, CAP, and C-HMCNN on every dataset.
- Generalizes to Query Decoders: Grounding Query2Label improves it by +1.98 to +6.66 points, matching BELAY's accuracy—though BELAY does it with roughly a third of the parameters (85.9M vs. 238.6M) and 60–76% of the FLOPs.
- Zero Hierarchy Violations: The constraint layer reduces image-level hierarchy violations from up to 15.15% down to 0.00%.
Limitations and Future Work
BELAY is only as good as the prior's sense of place. On FLAIR #1, which includes abstract, hard-to-prompt classes like pervious surface and ligneous, the segmenter's mIoU drops to 0.19 and BELAY recovers two-thirds of the oracle gain. Prompts were also fixed upfront and not tuned. Finally, the main experiments use a single $224 \times 224$ ViT-B/16 backbone, so the COCO-Stuff results aren't directly comparable to standard high-resolution COCO benchmarks.
Summary updated