Vision Transformers (ViTs) often operate as black boxes, making it difficult to understand the reasoning behind their predictions. This lack of transparency can limit their adoption in domains where trust and accountability are essential. In this work, we propose a framework to extract, analyze, and interpret concepts in a pretrained ViT. Using Sparse Autoencoders, we learn a set of sparse and interpretable features from the model's internal activations, each representing a distinct concept. We show that these concepts correspond to coherent visual patterns, including textures, shapes, and specific objects. To investigate how concepts interact across layers, we introduce a method for constructing a concept graph that captures the dependencies between concepts throughout the network. This graph offers a global view of how high-level concepts emerge from simpler ones, while also enabling local inspection of the concept relationships within individual images. Finally, we evaluate the reliability of the identified relationships through intervention experiments, using c-deletion and c-insertion metrics, which confirm that the inferred relationships are consistent with the model's behavior.
I Vision Transformer (ViT) operano spesso come scatole nere, rendendo difficile capire i ragionamenti dietro alle loro previsioni. Questa mancanza di trasparenza può limitare la loro adozione in domini dove la fiducia e la responsabilità sono essenziali. Proponiamo una serie di procedure per estrarre, analizzare e interpretare i concetti di un ViT pre-addestrato. Utilizzando gli Sparse Autoencoders, impariamo un insieme di caratteristiche sparse e interpretabili a partire dalle attivazioni interne del modello, ognuna delle quali rappresenta un concetto distinto. Mostriamo che questi concetti corrispondono a caratteristiche visive come trame, forme e oggetti specifici. Per indagare come i concetti interagiscono tra i diversi livelli, introduciamo un metodo per costruire un grafo di concetti che modella le dipendenze tra concetti in diverse parti della rete. Questa struttura fornisce sia una prospettiva globale di come concetti di alto livello emergono da quelli più semplici, sia una prospettiva locale delle connessioni tra concetti su immagini specifiche. Infine, valutiamo l'affidabilità delle relazioni trovate usando esperimenti di intervento causale, usando le metriche c-deletion e c-insertion, che confermano che le relazioni trovate sono coerenti con il comportamento del modello.
Discovering sparse concept graphs for mechanistic interpretability in vision transformers
Giordano, Tommaso
2024/2025
Abstract
Vision Transformers (ViTs) often operate as black boxes, making it difficult to understand the reasoning behind their predictions. This lack of transparency can limit their adoption in domains where trust and accountability are essential. In this work, we propose a framework to extract, analyze, and interpret concepts in a pretrained ViT. Using Sparse Autoencoders, we learn a set of sparse and interpretable features from the model's internal activations, each representing a distinct concept. We show that these concepts correspond to coherent visual patterns, including textures, shapes, and specific objects. To investigate how concepts interact across layers, we introduce a method for constructing a concept graph that captures the dependencies between concepts throughout the network. This graph offers a global view of how high-level concepts emerge from simpler ones, while also enabling local inspection of the concept relationships within individual images. Finally, we evaluate the reliability of the identified relationships through intervention experiments, using c-deletion and c-insertion metrics, which confirm that the inferred relationships are consistent with the model's behavior.| File | Dimensione | Formato | |
|---|---|---|---|
|
2025_12_Giordano.pdf
accessibile in internet per tutti
Descrizione: Testo della tesi
Dimensione
12.52 MB
Formato
Adobe PDF
|
12.52 MB | Adobe PDF | Visualizza/Apri |
|
2025_12_Giordano_Executive_Summary.pdf
accessibile in internet per tutti
Descrizione: Executive Summary
Dimensione
555.11 kB
Formato
Adobe PDF
|
555.11 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/246920