{"id":{"repo_id":"chalmers","oai_identifier":"oai:odr.chalmers.se:20.500.12380/310470"},"canonical_url":"https://search.ndltd.org/etd/chalmers/oai:odr.chalmers.se:20.500.12380/310470","repository":{"repo_id":"chalmers","name":"Chalmers University of Technology","base_url":"https://odr.chalmers.se/oai/request"},"display":{"title":"On the Role of Attention Maps in Visual Transformers - A Clustering Perspective","abstract":"This thesis delves into a novel area of research, exploring whether attention maps from a single-layer Vision Transformer model exhibit a clustering structure. The discover of such a structure would imply that tokens with similar semantic information tend to cluster together. We extract an attention map from a one-layer Vision Transformer model, which uses image patches as input data. Values below a set threshold are pruned from the attention map, and a graph is created from the remaining data. Various community detection algorithms are then applied to this graph and evaluated based on modularity. We visualize the patches belonging to each cluster and compare classification performance when removing salient and non-salient clusters. The method reveals a significant clustering structure, which was discovered by the Louvain algorithm. The tokens cluster to other objects with similar semantic information, effectively separating parts of the image. The classification logit values for specific images are improved when tokens belonging to unimportant clusters are removed while removing tokens from important clusters negatively impacts performance. This work suggests that a Vision Transformer’s attention layer clusters tokens based on their semantic information, but further research is needed to confirm the generality of this result.","abstract_html":"This thesis delves into a novel area of research, exploring whether attention maps from a single-layer Vision Transformer model exhibit a clustering structure. The discover of such a structure would imply that tokens with similar semantic information tend to cluster together. We extract an attention map from a one-layer Vision Transformer model, which uses image patches as input data. Values below a set threshold are pruned from the attention map, and a graph is created from the remaining data. Various community detection algorithms are then applied to this graph and evaluated based on modularity. We visualize the patches belonging to each cluster and compare classification performance when removing salient and non-salient clusters. The method reveals a significant clustering structure, which was discovered by the Louvain algorithm. The tokens cluster to other objects with similar semantic information, effectively separating parts of the image. The classification logit values for specific images are improved when tokens belonging to unimportant clusters are removed while removing tokens from important clusters negatively impacts performance. This work suggests that a Vision Transformer’s attention layer clusters tokens based on their semantic information, but further research is needed to confirm the generality of this result.","abstract_has_math":false,"creators":["Anttila Ryderup, Erik","Hsu, Yu-Ping"],"institution":null,"degree_name":null,"degree_level":"H","degree_discipline":null,"degree_department":"Chalmers tekniska högskola / Institutionen för data och informationsteknik","school":null,"contributors":[],"advisors":["Panahi, Ashkan"],"committee_chairs":[],"committee_members":["Mercado Oropeza, Rocío"],"year":2024,"date_issued":"2024","date_published":"2024","updated_at":"2026-11-19T03:03:28Z","subjects":["Vision Transformer","attention layer","attention map","clustering","interpretability","Louvain","visualization"],"languages":["eng"],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.coursecode","label":"Dc Identifier Coursecode","values":["DATX05"],"render_values":[{"text":"DATX05","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/20.500.12380/310470","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/20.500.12380/310470","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Achalmers%3Aoai%3Aodr.chalmers.se%3A20.500.12380%2F310470","prefix":"oai_dc"},"source_record":{"url":"https://odr.chalmers.se/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aodr.chalmers.se%3A20.500.12380%2F310470","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Mercado Oropeza, Rocío"]},{"key":"dc:contributor.department","label":"Department","values":["Chalmers tekniska högskola / Institutionen för data och informationsteknik","Chalmers University of Technology / Department of Computer Science and Engineering"]},{"key":"dc:contributor.supervisor","label":"Supervisor","values":["Panahi, Ashkan"]},{"key":"dc:creator","label":"Author","values":["Anttila Ryderup, Erik","Hsu, Yu-Ping"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-09-11T12:18:09Z"]},{"key":"dc:date.issued","label":"Date","values":["2024"]},{"key":"dc:publisher.program","label":"Dc Publisher Program","values":["Data science and AI (MPDSC), MSc"]},{"key":"dc:type.degree","label":"Dc Type Degree","values":["Examensarbete för masterexamen","Master's Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["H"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Vision Transformer","attention layer","attention map","clustering","interpretability","Louvain","visualization"]},{"key":"dc:subject.uppsok","label":"Dc Subject Uppsok","values":["Technology"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.coursecode","label":"Dc Identifier Coursecode","values":["DATX05"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/20.500.12380/310470"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["This thesis delves into a novel area of research, exploring whether attention maps from a single-layer Vision Transformer model exhibit a clustering structure. The discover of such a structure would imply that tokens with similar semantic information tend to cluster together. We extract an attention map from a one-layer Vision Transformer model, which uses image patches as input data. Values below a set threshold are pruned from the attention map, and a graph is created from the remaining data. Various community detection algorithms are then applied to this graph and evaluated based on modularity. We visualize the patches belonging to each cluster and compare classification performance when removing salient and non-salient clusters. The method reveals a significant clustering structure, which was discovered by the Louvain algorithm. The tokens cluster to other objects with similar semantic information, effectively separating parts of the image. The classification logit values for specific images are improved when tokens belonging to unimportant clusters are removed while removing tokens from important clusters negatively impacts performance. This work suggests that a Vision Transformer’s attention layer clusters tokens based on their semantic information, but further research is needed to confirm the generality of this result."]},{"key":"dc:title","label":"Title","values":["On the Role of Attention Maps in Visual Transformers - A Clustering Perspective"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.committeemember":["Mercado Oropeza, Rocío"],"dc:contributor.department":["Chalmers tekniska högskola / Institutionen för data och informationsteknik","Chalmers University of Technology / Department of Computer Science and Engineering"],"dc:contributor.supervisor":["Panahi, Ashkan"],"dc:creator":["Anttila Ryderup, Erik","Hsu, Yu-Ping"],"dc:date.accessioned":["2025-09-11T12:18:09Z"],"dc:date.issued":["2024"],"dc:description.abstract":["This thesis delves into a novel area of research, exploring whether attention maps from a single-layer Vision Transformer model exhibit a clustering structure. The discover of such a structure would imply that tokens with similar semantic information tend to cluster together. We extract an attention map from a one-layer Vision Transformer model, which uses image patches as input data. Values below a set threshold are pruned from the attention map, and a graph is created from the remaining data. Various community detection algorithms are then applied to this graph and evaluated based on modularity. We visualize the patches belonging to each cluster and compare classification performance when removing salient and non-salient clusters. The method reveals a significant clustering structure, which was discovered by the Louvain algorithm. The tokens cluster to other objects with similar semantic information, effectively separating parts of the image. The classification logit values for specific images are improved when tokens belonging to unimportant clusters are removed while removing tokens from important clusters negatively impacts performance. This work suggests that a Vision Transformer’s attention layer clusters tokens based on their semantic information, but further research is needed to confirm the generality of this result."],"dc:identifier.coursecode":["DATX05"],"dc:identifier.uri":["https://hdl.handle.net/20.500.12380/310470"],"dc:language.iso":["eng"],"dc:publisher.program":["Data science and AI (MPDSC), MSc"],"dc:subject":["Vision Transformer","attention layer","attention map","clustering","interpretability","Louvain","visualization"],"dc:subject.uppsok":["Technology"],"dc:title":["On the Role of Attention Maps in Visual Transformers - A Clustering Perspective"],"dc:type.degree":["Examensarbete för masterexamen","Master's Thesis"],"others:access_status":["open.access"],"thesis:degree_level":["H"]},"updated_at":"2026-11-19T03:03:28Z"}