CLARiTy: A Vision Transformer for Multi-Label Classification and Weakly-Supervised Localization of Chest X-ray Pathologies
John M. Statheros, Hairong Wang, Richard Klein
TL;DR
CLARiTy presents a Vision Transformer framework with multiple class tokens and SegmentCAM to jointly perform multi-label chest X-ray pathology classification and weakly-supervised localization using only image-level labels and anatomical priors. It achieves competitive classification accuracy on NIH ChestX-ray14 and state-of-the-art localization, notably improving Macro IoU at higher IoU thresholds and excelling for small lesions; a low-resolution variant demonstrates efficiency suitable for resource-constrained settings. The approach is bolstered by distillation from a ConvNeXtV2 teacher and self-supervised pretraining (DINO), with ablations confirming the value of SegmentCAM, orthogonal class-token loss, and attention pooling. This work emphasizes interpretable heatmaps and bias-aware localization, addressing common shortcut-learning concerns in chest X-ray analysis. Overall, CLARiTy advances heatmap quality and class-specific localization while maintaining robust classification, offering practical benefits for automated CXR screening and potential extensions to other modalities.
Abstract
The interpretation of chest X-rays (CXRs) poses significant challenges, particularly in achieving accurate multi-label pathology classification and spatial localization. These tasks demand different levels of annotation granularity but are frequently constrained by the scarcity of region-level (dense) annotations. We introduce CLARiTy (Class Localizing and Attention Refining Image Transformer), a vision transformer-based model for joint multi-label classification and weakly-supervised localization of thoracic pathologies. CLARiTy employs multiple class-specific tokens to generate discriminative attention maps, and a SegmentCAM module for foreground segmentation and background suppression using explicit anatomical priors. Trained on image-level labels from the NIH ChestX-ray14 dataset, it leverages distillation from a ConvNeXtV2 teacher for efficiency. Evaluated on the official NIH split, the CLARiTy-S-16-512 (a configuration of CLARiTy), achieves competitive classification performance across 14 pathologies, and state-of-the-art weakly-supervised localization performance on 8 pathologies, outperforming prior methods by 50.7%. In particular, pronounced gains occur for small pathologies like nodules and masses. The lower-resolution variant of CLARiTy, CLARiTy-S-16-224, offers high efficiency while decisively surpassing baselines, thereby having the potential for use in low-resource settings. An ablation study confirms contributions of SegmentCAM, DINO pretraining, orthogonal class token loss, and attention pooling. CLARiTy advances beyond CNN-ViT hybrids by harnessing ViT self-attention for global context and class-specific localization, refined through convolutional background suppression for precise, noise-reduced heatmaps.
