paper-with-me

홈 › Papers

Traveling Words: A Geometric Interpretation of Transformers

2023-09-13 · Raul Molina

Transformers have significantly advanced the field of natural language processing, but comprehending their internal mechanisms remains a challenge. In this paper, we introduce a novel geometric perspective that elucidates the inner mechanisms of transformer operations. Our primary contribution is illustrating how layer normalization confines the latent features to a hyper-sphere, subsequently enabling attention to mold the semantic representation of words on this surface. This geometric viewpoint seamlessly connects established properties such as iterative refinement and contextual embeddings. We validate our insights by probing a pre-trained 124M parameter GPT-2 model. Our findings reveal clear query-key attention patterns in early layers and build upon prior observations regarding the subject-specific nature of attention heads at deeper layers. Harnessing these geometric insights, we present an intuitive understanding of transformers, depicting them as processes that model the trajectory of word particles along the hyper-sphere.

📄 PDF Abstract BibTeX arXiv:2309.07315

Code (1)

santiag0m/traveling-words 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Cosine Annealing Cosine Annealing is a type of learning rate schedule that has the effect of starting with a large learning rate that is relatively rapidly decreased to a minimum value before…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Discriminative Fine-Tuning Discriminative Fine-Tuning is a fine-tuning strategy that is used for ULMFiT type models. Instead of using the same learning rate…
Residual Connection 설명 없음
Adam 설명 없음

Similar Papers 제목 키워드 기반

Clustering in pure-attention hardmax transformers and its role in sentiment analysis

2024-06-26 · Albert Alcalde, Giovanni Fantuzzi, Enrique Zuazua

Transformers are extremely successful machine learning models whose mathematical properties remain poorly understood. Here, we rigorously characterize the behavior of transformers with hardmax self-attention and normaliz…

Sentiment Analysis

Transformers and Cortical Waves: Encoders for Pulling In Context Across Time

2024-01-25 · Lyle Muller, Patricia S. Churchland, Terrence J. Sejnowski

The capabilities of transformer networks such as ChatGPT and other Large Language Models (LLMs) have captured the world's attention. The crucial computational mechanism underlying their performance relies on transforming…

Sentence

Triplet Interaction Improves Graph Transformers: Accurate Molecular Graph Learning with Triplet Graph Transformers

2024-02-07 · Md Shamim Hussain, Mohammed J. Zaki, Dharmashankar Subramanian

Graph transformers typically lack third-order interactions, limiting their geometric understanding which is crucial for tasks like molecular geometry prediction. We propose the Triplet Graph Transformer (TGT) that enable…

Drug DiscoveryGraph LearningGraph Property PredictionGraph Regression+8

Words, Concepts, and the Geometry of Analogy

2016-08-04 · Stephen McGregor, Matthew Purver, Geraint Wiggins

This paper presents a geometric approach to the problem of modelling the relationship between words and concepts, focusing in particular on analogical phenomena in language and cognition. Grounded in recent theories rega…

Constrained belief updates explain geometric structures in transformer representations

2025-02-04 · Mateusz Piotrowski, Paul M. Riechers, Daniel Filan, Adam S. Shai

What computational structures emerge in transformers trained on next-token prediction? In this work, we provide evidence that transformers implement constrained Bayesian belief updating -- a parallelized version of parti…

Bayesian InferencePrediction