arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.08084cs.LGcs.NEcs.PLstat.ML
收藏

神经执行引擎:学习执行子程序

Neural Execution Engines: Learning to Execute Subroutines

The University of Michigan(密歇根大学);Google Research(谷歌研究院)

Yujun Yan, Kevin Swersky, Danai Koutra, Parthasarathy Ranganathan, Milad Hashemi

摘要:

已经做出了显著的努力来训练复制算法推理的神经网络,但是它们经常无法学习这些算法底层的抽象概念。这一点可以通过它们无法推广到其受限训练集之外的数据分布来证明,即更大的输入和看不见的数据。我们研究这些泛化问题的数值子程序,包括常见的算法,如排序,最短路径,最小生成树的水平。首先,我们观察到基于transformer的序列到序列模型可以学习子例程,例如对数字列表进行排序,但随着列表长度超过训练集中的长度,它们的性能会迅速下降。我们证明,这是由于注意力的权重,失去保真度与较长的序列,特别是当输入的数字是数字相似。为了解决这个问题,我们提出了一种学习的条件掩蔽机制,它使模型能够在各种算法上以近乎完美的准确度在其训练范围之外进行强有力的泛化。其次,为了推广到看不见的数据,我们证明了用二进制表示编码数字会导致在加法或乘法等下游任务上训练后具有丰富结构的嵌入。这允许嵌入通过忠实地插入训练期间未看到的数字来处理丢失的数据。

英文摘要:

A significant effort has been made to train neural networks that replicate algorithmic reasoning, but they often fail to learn the abstract concepts underlying these algorithms. This is evidenced by their inability to generalize to data distributions that are outside of their restricted training sets, namely larger inputs and unseen data. We study these generalization issues at the level of numerical subroutines that comprise common algorithms like sorting, shortest paths, and minimum spanning trees. First, we observe that transformer-based sequence-to-sequence models can learn subroutines like sorting a list of numbers, but their performance rapidly degrades as the length of lists grows beyond those found in the training set. We demonstrate that this is due to attention weights that lose fidelity with longer sequences, particularly when the input numbers are numerically similar. To address the issue, we propose a learned conditional masking mechanism, which enables the model to strongly generalize far outside of its training range with near-perfect accuracy on a variety of algorithms. Second, to generalize to unseen data, we show that encoding numbers with a binary representation leads to embeddings with rich structure once trained on downstream tasks like addition or multiplication. This allows the embedding to handle missing data by faithfully interpolating numbers not seen during training.

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

↑