Saved in:
Bibliographic Details
Main Authors: Li, Chenglong, Altafini, Claudio
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2605.25619
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911715560521728
author Li, Chenglong
Altafini, Claudio
author_facet Li, Chenglong
Altafini, Claudio
contents In the paper we show that there is an analogy between the operations occurring in a layer of a transformer (projections and layer normalizations, disregarding the feedforward neural network) and a step in the power method. Coherently with this analogy, we show that passing through a layer the tokens tend to be tilted towards the principal eigenvector of a matrix which is the product of the output and value weight matrices of that layer. In the special case of a transformer with shared weights (i.e., in which all layers have identical weights) then the alignment with this principal eigenvector is particularly evident empirically, and can also be shown analytically. The analogy also suggests a method to steer the output of the transformer towards an arbitrary desired direction in token space.
format Preprint
id arxiv_https___arxiv_org_abs_2605_25619
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Analogies between Transformer Layers and Power Method
Li, Chenglong
Altafini, Claudio
Machine Learning
In the paper we show that there is an analogy between the operations occurring in a layer of a transformer (projections and layer normalizations, disregarding the feedforward neural network) and a step in the power method. Coherently with this analogy, we show that passing through a layer the tokens tend to be tilted towards the principal eigenvector of a matrix which is the product of the output and value weight matrices of that layer. In the special case of a transformer with shared weights (i.e., in which all layers have identical weights) then the alignment with this principal eigenvector is particularly evident empirically, and can also be shown analytically. The analogy also suggests a method to steer the output of the transformer towards an arbitrary desired direction in token space.
title Analogies between Transformer Layers and Power Method
topic Machine Learning
url https://arxiv.org/abs/2605.25619