ResiDual Transformer Alignment with Spectral Decomposition

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Basile, Lorenzo, Maiorca, Valentino, Bortolussi, Luca, Rodolà, Emanuele, Locatello, Francesco
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915239244595200
author Basile, Lorenzo
Maiorca, Valentino
Bortolussi, Luca
Rodolà, Emanuele
Locatello, Francesco
author_facet Basile, Lorenzo
Maiorca, Valentino
Bortolussi, Luca
Rodolà, Emanuele
Locatello, Francesco
contents When examined through the lens of their residual streams, a puzzling property emerges in transformer networks: residual contributions (e.g., attention heads) sometimes specialize in specific tasks or input attributes. In this paper, we analyze this phenomenon in vision transformers, focusing on the spectral geometry of residuals, and explore its implications for modality alignment in vision-language models. First, we link it to the intrinsically low-dimensional structure of visual head representations, zooming into their principal components and showing that they encode specialized roles across a wide variety of input data distributions. Then, we analyze the effect of head specialization in multimodal models, focusing on how improved alignment between text and specialized heads impacts zero-shot classification performance. This specialization-performance link consistently holds across diverse pre-training data, network sizes, and objectives, demonstrating a powerful new mechanism for boosting zero-shot classification through targeted alignment. Ultimately, we translate these insights into actionable terms by introducing ResiDual, a technique for spectral alignment of the residual stream. Much like panning for gold, it lets the noise from irrelevant unit principal components (i.e., attributes) wash away to amplify task-relevant ones. Remarkably, this dual perspective on modality alignment yields fine-tuning level performance on different data distributions while modelling an extremely interpretable and parameter-efficient transformation, as we extensively show on 70 pre-trained network-dataset combinations (7 models, 10 datasets).
format Preprint
id arxiv_https___arxiv_org_abs_2411_00246
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ResiDual Transformer Alignment with Spectral Decomposition
Basile, Lorenzo
Maiorca, Valentino
Bortolussi, Luca
Rodolà, Emanuele
Locatello, Francesco
Computer Vision and Pattern Recognition
Machine Learning
When examined through the lens of their residual streams, a puzzling property emerges in transformer networks: residual contributions (e.g., attention heads) sometimes specialize in specific tasks or input attributes. In this paper, we analyze this phenomenon in vision transformers, focusing on the spectral geometry of residuals, and explore its implications for modality alignment in vision-language models. First, we link it to the intrinsically low-dimensional structure of visual head representations, zooming into their principal components and showing that they encode specialized roles across a wide variety of input data distributions. Then, we analyze the effect of head specialization in multimodal models, focusing on how improved alignment between text and specialized heads impacts zero-shot classification performance. This specialization-performance link consistently holds across diverse pre-training data, network sizes, and objectives, demonstrating a powerful new mechanism for boosting zero-shot classification through targeted alignment. Ultimately, we translate these insights into actionable terms by introducing ResiDual, a technique for spectral alignment of the residual stream. Much like panning for gold, it lets the noise from irrelevant unit principal components (i.e., attributes) wash away to amplify task-relevant ones. Remarkably, this dual perspective on modality alignment yields fine-tuning level performance on different data distributions while modelling an extremely interpretable and parameter-efficient transformation, as we extensively show on 70 pre-trained network-dataset combinations (7 models, 10 datasets).
title ResiDual Transformer Alignment with Spectral Decomposition
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2411.00246