arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.15138cs.LGcond-mat.dis-nncond-mat.stat-mechcs.CL
收藏

Transformer 如何学习结构化数据:来自层次化过滤的洞见

How transformers learn structured data: insights from hierarchical filtering

Department of Computing Sciences, Università Bocconi, Milan, Italy(计算科学系,博科尼大学,米兰,意大利);Department of Finance, Università Bocconi, Milan, Italy(金融系,博科尼大学,米兰,意大利)

Jerome Garnier-Brun, Marc Mézard, Emanuele Moscato, Luca Saglietti

AI总结:

该研究提出树上序列数据的层次化过滤方法,通过受控相关性实验揭示仅编码器 Transformer 如何逐层重建多尺度相关性并实现精确推理。

摘要:

理解 Transformer 中的学习过程及其内嵌计算,正成为可解释 AI 发展的核心目标。在本研究中,我们针对树上的序列数据模型引入了一种层次化过滤过程,使我们能够手动调节数据中位置相关性的范围。利用这一受控设置,我们提供证据表明,普通的仅编码器 Transformer 在根分类和掩码语言建模任务上训练时,可以逼近精确推理算法,并研究这种计算是如何被发现和实现的。我们发现,对应于层次结构中不断增加的层级、距离更大的相关性,会在训练过程中被网络依次纳入。通过比较在不同过滤程度下训练的模型的注意力图,并探测不同的编码器层级,我们发现了明确证据,表明网络在对应于层次结构各级别的连续长度尺度上重建了相关性;我们将此与同一架构内精确推理算法的一种合理实现联系起来。

英文摘要:

Understanding the learning process and the embedded computation in transformers is becoming a central goal for the development of interpretable AI. In the present study, we introduce a hierarchical filtering procedure for data models of sequences on trees, allowing us to hand-tune the range of positional correlations in the data. Leveraging this controlled setting, we provide evidence that vanilla encoder-only transformers can approximate the exact inference algorithm when trained on root classification and masked language modeling tasks, and study how this computation is discovered and implemented. We find that correlations at larger distances, corresponding to increasing layers of the hierarchy, are sequentially included by the network during training. By comparing attention maps from models trained with varying degrees of filtering and by probing the different encoder levels, we find clear evidence of a reconstruction of correlations on successive length scales corresponding to the various levels of the hierarchy, which we relate to a plausible implementation of the exact inference algorithm within the same architecture.

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

↑