PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
May 19, 20240 citationsOpen Access

Your Transformer is Secretly Linear

View Full Paper
ARAnton RazzhigaevMMMatvey MikhalchukEGElizaveta Goncharova

Key Points

Key points are not available for this paper at this time.

Abstract

This paper reveals a novel linear characteristic exclusive to transformer decoders, including models such as GPT, LLaMA, OPT, BLOOM and others. We analyze embedding transformations between sequential layers, uncovering a near-perfect linear relationship (Procrustes similarity score of 0.99). However, linearity decreases when the residual component is removed due to a consistently low output norm of the transformer layer. Our experiments show that removing or linearly approximating some of the most linear blocks of transformers does not affect significantly the loss or model performance. Moreover, in our pretraining experiments on smaller models we introduce a cosine-similarity-based regularization, aimed at reducing layer linearity. This regularization improves performance metrics on benchmarks like Tiny Stories and SuperGLUE and as well successfully decreases the linearity of the models. This study challenges the existing understanding of transformer architectures, suggesting that their operation may be more linear than previously assumed.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Razzhigaev et al. (2024) studied this question.

synapsesocial.com/papers/68e69709b6db64358761d733https://doi.org/10.48550/arxiv.2405.12250
Ask AI
Helpful
Bookmark
Share
View Full Paper