arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.16763cs.LG
收藏

通过神经网络学习精确执行加法、乘法和算法指令

Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks

University of Waterloo(滑铁卢大学)

Artur Back de Luca, George Giapitzakis, Kimon Fountoulakis

AI总结:

本文提出通过神经网络精确执行二进制指令,利用NTK框架和位级规则结构化训练数据,实现高效算法执行。

摘要:

神经网络以其近似光滑函数的能力而闻名,但当在离散操作上训练时,它们在面对未见过的输入时无法完美泛化。这些操作是算法任务如算术的核心,常被用作神经网络中算法执行的测试平台。在本工作中,我们提出了一个问题:神经网络能否学习精确执行二进制编码的算法指令?我们使用神经切线核(NTK)框架研究了在无限宽度极限下两层全连接网络的训练动态,并展示了如何通过足够大的模型集合训练,以高概率执行四个基本任务:二进制排列、二进制加法、二进制乘法以及减法并如果负则分支(SBN)指令。由于SBN是图灵完备的,我们的框架可以扩展到可计算函数。我们展示了如何仅使用对数数量的训练数据高效实现这一点。我们的方法依赖于两个技术:结构化训练数据以隔离位级规则,以及在NTK范围内控制相关性以使模型预测与目标算法执行对齐。

英文摘要:

Neural networks are known for their ability to approximate smooth functions, yet they fail to generalize perfectly to unseen inputs when trained on discrete operations. Such operations lie at the heart of algorithmic tasks such as arithmetic, which is often used as a test bed for algorithmic execution in neural networks. In this work, we ask: can neural networks learn to execute binary-encoded algorithmic instructions exactly? We use the Neural Tangent Kernel (NTK) framework to study the training dynamics of two-layer fully connected networks in the infinite-width limit and show how a sufficiently large ensemble of such models can be trained to execute exactly, with high probability, four fundamental tasks: binary permutations, binary addition, binary multiplication, and Subtract and Branch if Negative (SBN) instructions. Since SBN is Turing-complete, our framework extends to computable functions. We show how this can be efficiently achieved using only logarithmically many training data. Our approach relies on two techniques: structuring the training data to isolate bit-level rules, and controlling correlations in the NTK regime to align model predictions with the target algorithmic executions.

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

↑