ChatPaper.aiChatPaper

트랜스포머의 탄생: 메모리 관점에서의 해석

Birth of a Transformer: A Memory Viewpoint

June 1, 2023
저자: Alberto Bietti, Vivien Cabannes, Diane Bouchacourt, Herve Jegou, Leon Bottou
cs.AI

초록

트랜스포머 기반의 대규모 언어 모델은 실질적으로 큰 성공을 거두었습니다. 그러나 이러한 모델이 더 널리 배포됨에 따라, 이를 더 신뢰할 수 있도록 내부 메커니즘을 더 잘 이해할 필요성이 커지고 있습니다. 이러한 모델은 훈련 데이터로부터 방대한 양의 지식을 저장하고, 주어진 컨텍스트나 프롬프트에서 새로운 정보에 빠르게 적응하는 것으로 보입니다. 우리는 토큰이 전역적 또는 컨텍스트 특정 바이그램 분포에서 생성되는 합성 설정을 고려하여 트랜스포머가 이러한 두 가지 유형의 지식을 어떻게 균형 있게 처리하는지 연구합니다. 단순화된 2층 트랜스포머의 훈련 과정을 신중하게 실증적으로 분석함으로써, 전역 바이그램의 빠른 학습과 컨텍스트 내 바이그램을 위한 "귀납 헤드" 메커니즘의 느린 발전을 설명합니다. 우리는 가중치 행렬이 연관 메모리로서의 역할을 강조하고, 훈련 중에 그래디언트가 이를 어떻게 학습 가능하게 하는지에 대한 이론적 통찰을 제공하며, 데이터 분포적 특성의 역할을 연구합니다.
English
Large language models based on transformers have achieved great empirical successes. However, as they are deployed more widely, there is a growing need to better understand their internal mechanisms in order to make them more reliable. These models appear to store vast amounts of knowledge from their training data, and to adapt quickly to new information provided in their context or prompt. We study how transformers balance these two types of knowledge by considering a synthetic setup where tokens are generated from either global or context-specific bigram distributions. By a careful empirical analysis of the training process on a simplified two-layer transformer, we illustrate the fast learning of global bigrams and the slower development of an "induction head" mechanism for the in-context bigrams. We highlight the role of weight matrices as associative memories, provide theoretical insights on how gradients enable their learning during training, and study the role of data-distributional properties.
PDF20December 15, 2024