Teacher-generated spatial-attention labels boost robustness and accuracy of contrastive models

Yushi Yao, Chang Ye, Ju He, Gamaleldin F. Elsayed
2/14/2026

No confident code implementation found for this paper.

Abstract

Human spatial attention conveys information about the regions of visual scenes that are important for performing visual tasks. Prior work has shown that the information about human attention can be leveraged to benefit various supervised vision tasks. Might providing this weak form of supervision be useful for self-supervised representation learning? Addressing this question requires collecting large datasets with human attention labels. Yet, collecting such large scale data is very expensive. To address this challenge, we construct an auxiliary teacher model to predict human attention, trained on a relatively small labeled dataset. This teacher model allows us to generate image (pseudo) attention labels for ImageNet. We then train a model with a primary contrastive objective; to this standard configuration, we add a simple output head trained to predict the attention map for each image, guided by the pseudo labels from teacher model. We measure the quality of learned representations by evaluating classification performance from the frozen learned embeddings as well as performance on image retrieval tasks (see supplementary material). We find that the spatial-attention maps predicted from the contrastive model trained with teacher guidance aligns better with human attention compared to vanilla contrastive models. Moreover, we find that our approach improves classification accuracy and robustness of the contrastive models on ImageNet and ImageNet-C. Further, we find that model representations become more useful for image retrieval task as measured by precision-recall performance on ImageNet, ImageNet-C, CIFAR10, and CIFAR10-C datasets.

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yao2026teachergenerated,
  title  = {Teacher-generated spatial-attention labels boost robustness and accuracy of contrastive models},
  author = {Yushi Yao and Chang Ye and Ju He and Gamaleldin F. Elsayed},
  year   = {2026},
  doi    = {10.1109/CVPR52729.2023.02230},
  url    = {https://doi.org/10.1109/CVPR52729.2023.02230},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/416fe1d9bf699ebe358377c05b82d259a5c7489c.svg)](https://codeofpaper.com/paper/416fe1d9bf699ebe358377c05b82d259a5c7489c)

Discussion