Logical reasoning tasks over symbols, such as learning arithmetic operations and computer program evaluations, have become challenges to deep learning. In particular, even state-of-the-art neural networks fail to achieve \textit{out-of-distribution} (OOD) generalization of symbolic reasoning tasks, whereas humans can easily extend learned symbolic rules. To resolve this difficulty, we propose a neural sequence-to-grid (seq2grid) module, an input preprocessor that automatically segments and aligns an input sequence into a grid. As our module outputs a grid via a novel differentiable mapping, any neural network structure taking a grid input, such as ResNet or TextCNN, can be jointly trained with our module in an end-to-end fashion. Extensive experiments show that neural networks having our module as an input preprocessor achieve OOD generalization on various arithmetic and algorithmic problems including number sequence prediction problems, algebraic word problems, and computer program evaluation problems while other state-of-the-art sequence transduction models cannot. Moreover, we verify that our module enhances TextCNN to solve the bAbI QA tasks without external memory.
翻译:有关符号的逻辑推理任务,例如学习算术操作和计算机程序评价,已经成为深层次学习的挑战。特别是,甚至最先进的神经网络也无法实现象征性推理任务(OOOD)的典型化,而人类可以很容易地扩展所学的象征性规则。为了解决这一难题,我们提议了一个神经序列到电网(seq2grid)模块,一个输入预处理器,该模块自动将分段和输入序列连接到一个网格中。由于我们的模块通过新颖的不同绘图输出一个网格,任何使用网格输入的神经网络结构,如ResNet或TextCNN,都可以与我们的模块以端到端的方式联合培训。广泛的实验表明,以我们的模块作为输入预处理器的神经网络可以在各种算算和算法问题(包括数字序列预测问题、代数词问题和计算机程序评价问题)上实现OOOD总化,而其它状态序列转换模型则无法实现。此外,我们核查我们的模块能够加强TextCNN, 解决没有外部记忆的bI QA任务。