近期针对Transformer训练动态的分析揭示了一个有趣的特性:训练损失会在大量训练步中处于平台期,随后突然(且急剧)下降至接近最优的值。为深入理解这一现象,我们将低秩矩阵补全问题建模为掩码语言建模(MLM,Masked Language Modeling)任务,并证明可以训练BERT模型以低误差求解该任务。此外,尽管训练流程或超参数未发生任何变化,损失曲线在训练早期呈现平台期,随后突然下降至接近最优的值。为获得对这一骤降现象的可解释性见解,我们分析了转变前后模型的预测结果、注意力头和隐藏状态。具体而言,我们观察到:(a) 模型从简单复制掩码输入转变为准确预测掩码条目;(b) 注意力头转变为与任务相关的可解释模式;(c) 嵌入和隐藏状态编码了与问题相关的信息。我们还分析了单个模型组件的训练动态,以理解损失骤降的原因。
英文摘要:
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.
NEAT: Neighborhood-Guided, Efficient, Autoregressive Set Transformer for 3D Molecular Generation
Department of Pharmaceutical Sciences, University of Vienna(维也纳大学药学系);Christian Doppler Laboratory for Molecular Informatics in the Biosciences(生物医学分子信息学克里斯蒂安·多普勒实验室);Vienna Doctoral School of Pharmaceutical, Nutritional and Sport Sciences(维也纳药学、营养学和运动科学博士学院)
CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequences
Delft University of Technology(代尔夫特理工大学)
代码完成是IDE的一个基本功能,但当前的自动完成器仅限于基于语法或基于NLP的单个标记完成。这两种方法都有明显的缺点:基于语法的自动完成在动态类型语言环境中受到限制,而基于NLP的自动完成程序很难理解程序设计语言的语义和开发人员的代码上下文。在这项工作中,我们提出了CodeFill,一个语言模型自动完成,结合了学习的结构和命名信息。使用并行Transformer架构和多任务学习,CodeFill使用源代码标记名称序列及其等效的AST标记类型。独特的是,CodeFill针对单标记和多标记(语句)预测进行了训练,这使其能够学习语法和命名元素之间的长期依赖关系。我们在两个数据集上训练CodeFill,分别由29 M和425 M行代码组成。为了使评估更加真实,我们开发了一种方法来自动推断源代码中的完成点。我们将CodeFill与四个基线和两个最先进的模型GPT-C和TravTrans+进行了比较。CodeFill在单令牌预测方面超过了所有基线(MRR:70.9% vs. 66.2%和67.8%),并且在多令牌预测方面优于最先进的模型(ROUGE-L:63.7% vs. 52.4%和59.2%,n=4个令牌)。我们公开发布我们的源代码和数据集。
ShapeFormer: Transformer-based Shape Completion via Sparse Representation
Shenzhen University(深圳大学);University College London(伦敦大学学院);Adobe Research(奥多比研究院);Hebrew University of Jerusalem(耶路撒冷希伯来大学);Tel Aviv University(特拉维夫大学)
DAPoinTr: Domain Adaptive Point Transformer for Point Cloud Completion
Deakin University(迪肯大学);Shanghai Jiao Tong University(上海交通大学);East China Normal University(华东师范大学);Zhejiang University(浙江大学);The University of Western Australia(西澳大学)
High-Resolution Cranial Defect Reconstruction by Iterative, Low-Resolution, Point Cloud Completion Transformers
AGH University of Science and Technology(AGH科技大学);University of Applied Sciences Western Switzerland (HES-SO Valais)(瑞士西部应用科学大学(瓦莱州高等学院));Information Systems Institute(信息系统研究所)
Understanding the Staged Dynamics of Transformers in Learning Latent Structure
Department of Computing Science, University of Alberta, Edmonton, Canada(计算科学系,阿尔伯塔大学,爱德蒙顿,加拿大);Department of Psychology, University of Alberta, Edmonton, Canada(心理学系,阿尔伯塔大学,爱德蒙顿,加拿大)