Deep neural networks have demonstrated prominent capacities for image\nclassification tasks in a closed set setting, where the test data come from the\nsame distribution as the training data. However, in a more realistic open set\nscenario, traditional classifiers with incomplete knowledge cannot tackle test\ndata that are not from the training classes. Open set recognition (OSR) aims to\naddress this problem by both identifying unknown classes and distinguishing\nknown classes simultaneously. In this paper, we propose a novel approach to OSR\nthat is based on the vision transformer (ViT) technique. Specifically, our\napproach employs two separate training stages. First, a ViT model is trained to\nperform closed set classification. Then, an additional detection head is\nattached to the embedded features extracted by the ViT, trained to force the\nrepresentations of known data to class-specific clusters compactly. Test\nexamples are identified as known or unknown based on their distance to the\ncluster centers. To the best of our knowledge, this is the first time to\nleverage ViT for the purpose of OSR, and our extensive evaluation against\nseveral OSR benchmark datasets reveals that our approach significantly\noutperforms other baseline methods and obtains new state-of-the-art\nperformance.\n