Saved in:
Bibliographic Details
Main Authors: Gopalani, Pulkit, Lubana, Ekdeep Singh, Hu, Wei
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2410.22244
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917821835902976
author Gopalani, Pulkit
Lubana, Ekdeep Singh
Hu, Wei
author_facet Gopalani, Pulkit
Lubana, Ekdeep Singh
Hu, Wei
contents Recent analysis on the training dynamics of Transformers has unveiled an interesting characteristic: the training loss plateaus for a significant number of training steps, and then suddenly (and sharply) drops to near--optimal values. To understand this phenomenon in depth, we formulate the low-rank matrix completion problem as a masked language modeling (MLM) task, and show that it is possible to train a BERT model to solve this task to low error. Furthermore, the loss curve shows a plateau early in training followed by a sudden drop to near-optimal values, despite no changes in the training procedure or hyper-parameters. To gain interpretability insights into this sudden drop, we examine the model's predictions, attention heads, and hidden states before and after this transition. Concretely, we observe that (a) the model transitions from simply copying the masked input to accurately predicting the masked entries; (b) the attention heads transition to interpretable patterns relevant to the task; and (c) the embeddings and hidden states encode information relevant to the problem. We also analyze the training dynamics of individual model components to understand the sudden drop in loss.
format Preprint
id arxiv_https___arxiv_org_abs_2410_22244
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Abrupt Learning in Transformers: A Case Study on Matrix Completion
Gopalani, Pulkit
Lubana, Ekdeep Singh
Hu, Wei
Machine Learning
Recent analysis on the training dynamics of Transformers has unveiled an interesting characteristic: the training loss plateaus for a significant number of training steps, and then suddenly (and sharply) drops to near--optimal values. To understand this phenomenon in depth, we formulate the low-rank matrix completion problem as a masked language modeling (MLM) task, and show that it is possible to train a BERT model to solve this task to low error. Furthermore, the loss curve shows a plateau early in training followed by a sudden drop to near-optimal values, despite no changes in the training procedure or hyper-parameters. To gain interpretability insights into this sudden drop, we examine the model's predictions, attention heads, and hidden states before and after this transition. Concretely, we observe that (a) the model transitions from simply copying the masked input to accurately predicting the masked entries; (b) the attention heads transition to interpretable patterns relevant to the task; and (c) the embeddings and hidden states encode information relevant to the problem. We also analyze the training dynamics of individual model components to understand the sudden drop in loss.
title Abrupt Learning in Transformers: A Case Study on Matrix Completion
topic Machine Learning
url https://arxiv.org/abs/2410.22244