paper-with-me

홈 › Papers

Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions

2024-02-23 · Clement Neo, Shay B. Cohen, Fazl Barez

Understanding the inner workings of large language models (LLMs) is crucial for advancing their theoretical foundations and real-world applications. While the attention mechanism and multi-layer perceptrons (MLPs) have been studied independently, their interactions remain largely unexplored. This study investigates how attention heads and next-token neurons interact in LLMs to predict new words. We propose a methodology to identify next-token neurons, find prompts that highly activate them, and determine the upstream attention heads responsible. We then generate and evaluate explanations for the activity of these attention heads in an automated manner. Our findings reveal that some attention heads recognize specific contexts relevant to predicting a token and activate a downstream token-predicting neuron accordingly. This mechanism provides a deeper understanding of how attention heads work with MLP neurons to perform next-token prediction. Our approach offers a foundation for further research into the intricate workings of LLMs and their impact on text generation and understanding.

📄 PDF Abstract BibTeX arXiv:2402.15055

Code (0)

등록된 구현이 없습니다.

Tasks

Text Generation

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Adam 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers

2021-03-29 · ICCV 2021 10 · Hila Chefer, Shir Gur, Lior Wolf

Transformers are increasingly dominating multi-modal reasoning tasks, such as visual question answering, achieving state-of-the-art results thanks to their ability to contextualize information using the self-attention an…

DecoderImage Segmentationobject-detectionObject Detection+4

InterpreT: An Interactive Visualization Tool for Interpreting Transformers

2021-04-01 · EACL 2021 2 · Vasudev Lal, Arden Ma, Estelle Aflalo, Phillip Howard 외

With the increasingly widespread use of Transformer-based models for NLU/NLP tasks, there is growing interest in understanding the inner workings of these models, why they are so effective at a wide range of tasks, and h…

Aspect-Based Sentiment AnalysisAspect-Based Sentiment Analysis (ABSA)Sentiment Analysis

Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps

2023-02-01 · Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro Inui

Transformers are ubiquitous in wide tasks. Interpreting their internals is a pivotal goal. Nevertheless, their particular components, feed-forward (FF) blocks, have typically been less analyzed despite their substantial …

Investigating Neuron Ablation in Attention Heads: The Case for Peak Activation Centering

2024-08-30 · Nicholas Pochinkov, Ben Pasero, Skylar Shibayama

The use of transformer-based models is growing rapidly throughout society. With this growth, it is important to understand how they work, and in particular, how the attention mechanisms represent concepts. Though there a…

Attention-likelihood relationship in transformers

2023-03-15 · Valeria Ruscio, Valentino Maiorca, Fabrizio Silvestri

We analyze how large language models (LLMs) represent out-of-context words, investigating their reliance on the given context to capture their semantics. Our likelihood-guided text perturbations reveal a correlation betw…