arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2311.00863cs.LGcs.AIcs.CL
收藏

语言模型中上下文 N-gram 的训练动态

Training Dynamics of Contextual N-Grams in Language Models

MIT(麻省理工学院)

Lucia Quirke, Lovis Heindrich, Wes Gurnee, Neel Nanda

AI总结:

本文追踪语言模型中德语上下文 n-gram 回路的训练过程,证明其由早期独立形成的 n-gram 与德语检测回路后期组合为二阶回路,并揭示其渐进形成及训练异常现象。

摘要:

先前研究表明语言模型中存在上下文神经元,包括一个在德语文本上激活的神经元。我们展示该神经元存在于一个更广泛的上下文 n-gram 回路中:我们发现,末层神经元会识别并续写德语文本中常见的 n-gram,但它们只有在德语神经元处于激活状态时才会激活。我们研究了该回路在整个训练过程中的形成,并发现它是我们所称的二阶回路的一个例子。具体而言,组成性的 n-gram 回路与最终形成德语神经元的德语检测回路,在训练早期都以独立功能形成——德语检测回路部分通过建模德语 unigram 统计量形成,而 n-gram 则通过增强适当的续写形成。只有在两个回路都已经形成之后,它们才组合成一个二阶回路。与先前研究提出的假设相反,我们发现上下文 n-gram 回路是逐渐形成的,而非通过突然的相变形成。我们还进一步呈现了一系列异常观察,例如许多任务中的同步相变与学习率预热同时发生,以及许多上下文神经元在训练早期同时形成但随后被反学习的证据。

英文摘要:

Prior work has shown the existence of contextual neurons in language models, including a neuron that activates on German text. We show that this neuron exists within a broader contextual n-gram circuit: we find late layer neurons which recognize and continue n-grams common in German text, but which only activate if the German neuron is active. We investigate the formation of this circuit throughout training and find that it is an example of what we call a second-order circuit. In particular, both the constituent n-gram circuits and the German detection circuit which culminates in the German neuron form with independent functions early in training - the German detection circuit partially through modeling German unigram statistics, and the n-grams by boosting appropriate completions. Only after both circuits have already formed do they fit together into a second-order circuit. Contrary to the hypotheses presented in prior work, we find that the contextual n-gram circuit forms gradually rather than in a sudden phase transition. We further present a range of anomalous observations such as a simultaneous phase transition in many tasks coinciding with the learning rate warm-up, and evidence that many context neurons form simultaneously early in training but are later unlearned.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑