Analyzing Vision Transformers for Image Classification in Class Embedding Space

Despite the growing use of transformer models in computer vision, a mechanistic understanding of these networks is still needed. This work introduces a method to reverse-engineer Vision Transformers trained to solve image classification tasks. Inspired by previous research in NLP, we demonstrate how...

Full description

Saved in:
Bibliographic Details
Published inarXiv.org
Main Authors Vilas, Martina G, Schaumlöffel, Timothy, Roig, Gemma
Format Paper
LanguageEnglish
Published Ithaca Cornell University Library, arXiv.org 29.10.2023
Subjects
Online AccessGet full text

Cover

Loading…
Abstract Despite the growing use of transformer models in computer vision, a mechanistic understanding of these networks is still needed. This work introduces a method to reverse-engineer Vision Transformers trained to solve image classification tasks. Inspired by previous research in NLP, we demonstrate how the inner representations at any level of the hierarchy can be projected onto the learned class embedding space to uncover how these networks build categorical representations for their predictions. We use our framework to show how image tokens develop class-specific representations that depend on attention mechanisms and contextual information, and give insights on how self-attention and MLP layers differentially contribute to this categorical composition. We additionally demonstrate that this method (1) can be used to determine the parts of an image that would be important for detecting the class of interest, and (2) exhibits significant advantages over traditional linear probing approaches. Taken together, our results position our proposed framework as a powerful tool for mechanistic interpretability and explainability research.
AbstractList Despite the growing use of transformer models in computer vision, a mechanistic understanding of these networks is still needed. This work introduces a method to reverse-engineer Vision Transformers trained to solve image classification tasks. Inspired by previous research in NLP, we demonstrate how the inner representations at any level of the hierarchy can be projected onto the learned class embedding space to uncover how these networks build categorical representations for their predictions. We use our framework to show how image tokens develop class-specific representations that depend on attention mechanisms and contextual information, and give insights on how self-attention and MLP layers differentially contribute to this categorical composition. We additionally demonstrate that this method (1) can be used to determine the parts of an image that would be important for detecting the class of interest, and (2) exhibits significant advantages over traditional linear probing approaches. Taken together, our results position our proposed framework as a powerful tool for mechanistic interpretability and explainability research.
Author Vilas, Martina G
Schaumlöffel, Timothy
Roig, Gemma
Author_xml – sequence: 1
  givenname: Martina
  surname: Vilas
  middlename: G
  fullname: Vilas, Martina G
– sequence: 2
  givenname: Timothy
  surname: Schaumlöffel
  fullname: Schaumlöffel, Timothy
– sequence: 3
  givenname: Gemma
  surname: Roig
  fullname: Roig, Gemma
BookMark eNqNjUELgjAYhkcUZOV_GHQW1jZz1xCjTh0Sr7J0ykQ326eH-vUp9QM6PfDyPLwbtDTWqAXyKGOHQHBK18gHaAgh9BjRMGQeup2MbF9vbWqcadDW4NRJA5V1nXKAJ-JrJ2uF41YC6EoXcpgtbb4LTrqHKsu5v_eyUDu0qmQLyv9xi_bnJI0vQe_sc1Qw5I0d3fQJORWC84hEgrP_rA-JKEBT
ContentType Paper
Copyright 2023. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Copyright_xml – notice: 2023. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
DBID 8FE
8FG
ABJCF
ABUWG
AFKRA
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
HCIFZ
L6V
M7S
PIMPY
PQEST
PQQKQ
PQUKI
PRINS
PTHSS
DatabaseName ProQuest SciTech Collection
ProQuest Technology Collection
Materials Science & Engineering Collection
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
ProQuest Central Essentials
AUTh Library subscriptions: ProQuest Central
Technology Collection
ProQuest One Community College
ProQuest Central
SciTech Premium Collection (Proquest) (PQ_SDU_P3)
ProQuest Engineering Collection
ProQuest Engineering Database
Publicly Available Content Database
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Academic
ProQuest One Academic UKI Edition
ProQuest Central China
Engineering Collection
DatabaseTitle Publicly Available Content Database
Engineering Database
Technology Collection
ProQuest Central Essentials
ProQuest One Academic Eastern Edition
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Technology Collection
ProQuest SciTech Collection
ProQuest Central China
ProQuest Central
ProQuest Engineering Collection
ProQuest One Academic UKI Edition
ProQuest Central Korea
Materials Science & Engineering Collection
ProQuest One Academic
Engineering Collection
DatabaseTitleList Publicly Available Content Database
Database_xml – sequence: 1
  dbid: 8FG
  name: ProQuest Technology Collection
  url: https://search.proquest.com/technologycollection1
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Physics
EISSN 2331-8422
Genre Working Paper/Pre-Print
GroupedDBID 8FE
8FG
ABJCF
ABUWG
AFKRA
ALMA_UNASSIGNED_HOLDINGS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
FRJ
HCIFZ
L6V
M7S
M~E
PIMPY
PQEST
PQQKQ
PQUKI
PRINS
PTHSS
ID FETCH-proquest_journals_28844707843
IEDL.DBID 8FG
IngestDate Wed Oct 16 12:54:03 EDT 2024
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-proquest_journals_28844707843
OpenAccessLink https://www.proquest.com/docview/2884470784?pq-origsite=%requestingapplication%
PQID 2884470784
PQPubID 2050157
ParticipantIDs proquest_journals_2884470784
PublicationCentury 2000
PublicationDate 20231029
PublicationDateYYYYMMDD 2023-10-29
PublicationDate_xml – month: 10
  year: 2023
  text: 20231029
  day: 29
PublicationDecade 2020
PublicationPlace Ithaca
PublicationPlace_xml – name: Ithaca
PublicationTitle arXiv.org
PublicationYear 2023
Publisher Cornell University Library, arXiv.org
Publisher_xml – name: Cornell University Library, arXiv.org
SSID ssj0002672553
Score 3.5023818
SecondaryResourceType preprint
Snippet Despite the growing use of transformer models in computer vision, a mechanistic understanding of these networks is still needed. This work introduces a method...
SourceID proquest
SourceType Aggregation Database
SubjectTerms Computer vision
Embedding
Image classification
Representations
Title Analyzing Vision Transformers for Image Classification in Class Embedding Space
URI https://www.proquest.com/docview/2884470784
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwfV1LSwMxEB60i-CtvlBbS0CvwX3EbHISlF2r0Fq0Sm9lNxnBQ2vt1osHf7uTuKsHoaeQBEIyZL55ZDIDcGZDpUMkBpTSvnAhy4QXWhpeCpdAn8ZCHzw-GMr-k7ibXExqh1tVh1U2mOiB2r4Z5yM_j5USwqWmEZeLd-6qRrnX1bqExiYEUZymzvhS-c2vjyWWKWnMyT-Y9bIjb0MwKha43IENnO_Clg-5NNUe3Pt8IJ8kOtiz_-DNxo0SSSoZo5bdzojbma9b6SJ6PBHZ6_xnhGWzEq0TPeyRDF_ch9M8G1_3ebOLaX1PqunfqZIDaJHBj4fArNYYGqUwsSgsRloVRkQFQVOK2ib2CLrrVjpeP92BbVcy3eFvrLvQWi0_8IQE66rseer1ILjKhqMH6g2-sm9oSIP0
link.rule.ids 783,787,12777,21400,33385,33756,43612,43817
linkProvider ProQuest
linkToHtml http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwfV1LT8MwDLZgE4IbT_EYEAmuFV0TsuTEAa10sA0kCtqtahMj7bAx1u3Cr58TWjgg7RTJkaIkSr7Pdhwb4NqGSodIF1BK-xEIWfAg19IEhXAJ9EkW-uDxwVAmb-JxdDuqHG5lFVZZY6IHavtpnI_8JlJKCJeaRtzNvgJXNcq9rlYlNDahKThxtfspHj_8-lgi2SGNmf-DWc8d8S40X_IZzvdgA6f7sOVDLk15AM8-H8g3UQd79x-8WVorkaSSMWpZb0K3nfm6lS6ix28iG09_JKw7KdA66mGvZPjiIVzF3fQ-CepZZNU5KbO_VfEjaJDBj8fArNYYGqWQWxQW21rlRrRzgqYOasvtCbTWjXS6vvsStpN00M_6veHTGey48ukOiyPdgsZivsRzItlFceF3cgVrXIQL
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Analyzing+Vision+Transformers+for+Image+Classification+in+Class+Embedding+Space&rft.jtitle=arXiv.org&rft.au=Vilas%2C+Martina+G&rft.au=Schauml%C3%B6ffel%2C+Timothy&rft.au=Roig%2C+Gemma&rft.date=2023-10-29&rft.pub=Cornell+University+Library%2C+arXiv.org&rft.eissn=2331-8422