Out-of-distribution generalization (OODG) is a longstanding challenge for neural networks. This challenge is quite apparent in tasks with well-defined variables and rules, where explicit use of the rules could solve problems independently of the particular values of the variables, but networks tend to be tied to the range of values sampled in their training data. Large transformer-based language models have pushed the boundaries on how well neural networks can solve previously unseen problems, but their complexity and lack of clarity about the relevant content in their training data obfuscates how they achieve such robustness. As a step toward understanding how transformer-based systems generalize, we explore the question of OODG in small scale transformers trained with examples from a known distribution. Using a reasoning task based on the puzzle Sudoku, we show that OODG can occur on a complex problem if the training set includes examples sampled from the whole distribution of simpler component tasks. Successful generalization depends on carefully managing positional alignment when absolute position encoding is used, but we find that suppressing sensitivity to absolute positions overcomes this limitation. Taken together our results represent a small step toward understanding and promoting systematic generalization in transformers.
translated by 谷歌翻译
The recent advent of large language models - large neural networks trained on a simple predictive objective over a massive corpus of natural language - has reinvigorated debate over whether human cognitive capacities might emerge in such generic models given sufficient training data. Of particular interest is the ability of these models to reason about novel problems zero-shot, without any direct training on those problems. In human cognition, this capacity is closely tied to an ability to reason by analogy. Here, we performed a direct comparison between human reasoners and a large language model (GPT-3) on a range of analogical tasks, including a novel text-based matrix reasoning task closely modeled on Raven's Progressive Matrices. We found that GPT-3 displayed a surprisingly strong capacity for abstract pattern induction, matching or even surpassing human capabilities in most settings. Our results indicate that large language models such as GPT-3 have acquired an emergent ability to find zero-shot solutions to a broad range of analogy problems.
translated by 谷歌翻译
Large language models have recently shown promising progress in mathematical reasoning when fine-tuned with human-generated sequences walking through a sequence of solution steps. However, the solution sequences are not formally structured and the resulting model-generated sequences may not reflect the kind of systematic reasoning we might expect an expert human to produce. In this paper, we study how to build stronger reasoning capability in language models using the idea of relational abstractions. We introduce new types of sequences that more explicitly provide an abstract characterization of the transitions through intermediate solution steps to the goal state. We find that models that are supplied with such sequences as prompts can solve tasks with a significantly higher accuracy, and models that are trained to produce such sequences solve problems better than those that are trained with previously used human-generated sequences and other baselines. Our work thus takes several steps toward elucidating and improving how language models perform on tasks requiring multi-step mathematical reasoning.
translated by 谷歌翻译
数学推理是人类智力最令人印象深刻的成就之一,但对于人工智能系统仍然是一个巨大的挑战。在这项工作中,我们探讨了现代深度学习体系结构是否可以通过发现有效的算术程序来学会解决符号加成任务。尽管乍看之下这个问题似乎似乎很容易,但将算术知识推广到涉及较高术语的操作(可能由较长的数字序列组成)的操作已被证明对神经网络而言非常具有挑战性。在这里,我们表明,配备了局部注意力和自适应停止机制的通用变压器可以学会利用外部,网格样的内存来进行多位数。即使在需要在训练分布之外推外的问题测试时,提出的模型也达到了显着的准确性。最值得注意的是,它通过发现类似人类的计算策略(例如位置价值对齐)来做到这一点。
translated by 谷歌翻译
最近的工作表明,大型审慎的语言模型(LMS)不仅可以在一系列自然语言处理(NLP)任务上表现出色,而且还可以开始改进推理任务,例如算术诱导,象征性操纵,并随着规模的增加而进行常识性推理。模型。但是,目前尚不清楚这些LMS的潜在能力是什么。令人惊讶的是,我们发现这些模型对某些基本的符号操纵任务有局限性,例如复制,反向和加法。当符号总数或重复符号增加时,模型性能会迅速下降。我们研究了这种现象背后的潜在原因,并检查了一组可能的方法,包括明确的位置标记,细粒度的计算步骤以及具有可呼出程序的LMS。实验结果表明,这些技术都无法完全解决最简单的添加感应问题。最后,我们向导师介绍LMS,这展示了每一个教学的步骤。 LMS带有导师的LMS能够在OOD和重复符号的情况下提供100%的精度,从而在诱导中对大型LMS边界产生新的见解。
translated by 谷歌翻译
大型预先训练的语言模型可以在可以在一个可以“单通”中的任务上进行非常好,例如生成现实文本或合成计算机程序。但是,他们与需要无限的多步计算的任务斗争,例如添加整数或执行程序。令人惊讶的是,我们发现这些相同的模型能够执行复杂的多步计算 - 即使在少量射门中,当被要求执行操作“一步一步”时,表示中间计算的结果。特别是,我们通过询问它们将中间计算步骤发出到“ScratchPad”来执行变压器来执行多步计算。在一系列越来越复杂的任务范围内,从加入任意程序的执行范围,我们表明Scratchpads显着提高了语言模型执行多步计算的能力。
translated by 谷歌翻译
本文演示了通过对自动调整自选语言模型(GPT-NEO)进行适当的逐步演示,可以将其执行以前证明变换器的数学任务 - 龙手模数操作 - 具有相对较少的例子。具体而言,我们微调GPT-Neo从DeepMind数学数据集解决数字_Div_remainder任务;萨克斯顿等人。 (ARXIV:1904.01557)报告,这项任务的准确性低于40%,培训例子有200万。我们表明,在200次适当地结构化的练习型展示远期问题并报告剩余时间后,最小可用的GPT-Neo模型可实现80%以上。这是通过构建用于微调的适当数据集来实现,没有更改学习算法。这些结果表明,小型精心设计演示的微调自回归语言模型可能是一种有用的范例,可以在没有机器学习中培训的情况下使个人能够培训,以便在这些模型中执行某种复杂的多步任务。
translated by 谷歌翻译
我们提出了一项合成任务,乐高(学习平等和小组操作),该任务封装了遵循推理链的问题,我们研究了变压器体系结构如何学习这项任务。我们特别注意数据效应,例如预处理(看似无关的NLP任务)和数据集组成(例如,训练和测试时间时的链长度不同),以及体系结构变体,例如重量绑定层或添加卷积组件。我们研究了受过训练的模型最终如何在任务中取得成功,尤其是我们能够在某种程度上(一定程度地)理解一些注意力头以及网络中的信息如何流动。基于这些观察结果,我们提出了一个假设,即在这里进行预训练仅是因为是智能初始化而不是网络中存储的深层知识。我们还观察到,在某些数据制度中,受过训练的变压器发现“快捷方式”解决方案遵循推理链,这阻碍了该模型将其推广到主要任务的简单变体的能力,而且我们发现人们可以防止适当的快捷方式架构修改或仔细的数据准备。在我们的发现的激励下,我们开始探索学习执行C程序的任务,在此过程中,对变压器进行了卷积修改,即在密钥/查询/值图中添加卷积结构,显示出令人鼓舞的优势。
translated by 谷歌翻译
Transformer networks have seen great success in natural language processing and machine vision, where task objectives such as next word prediction and image classification benefit from nuanced context sensitivity across high-dimensional inputs. However, there is an ongoing debate about how and when transformers can acquire highly structured behavior and achieve systematic generalization. Here, we explore how well a causal transformer can perform a set of algorithmic tasks, including copying, sorting, and hierarchical compositions of these operations. We demonstrate strong generalization to sequences longer than those used in training by replacing the standard positional encoding typically used in transformers with labels arbitrarily paired with items in the sequence. We search for the layer and head configuration sufficient to solve these tasks, then probe for signs of systematic processing in latent representations and attention patterns. We show that two-layer transformers learn reliable solutions to multi-level problems, develop signs of task decomposition, and encode input items in a way that encourages the exploitation of shared computation across related tasks. These results provide key insights into how attention layers support structured computation both within a task and across multiple tasks.
translated by 谷歌翻译
从简短的问题实例推断出较长的实例的能力是推理任务中分布概括的一种重要形式,并且在较长的问题实例很少见的数据集中学习时至关重要。这些包括定理证明,解决定量数学问题以及阅读/总结小说。在本文中,我们进行了仔细的经验研究,以探讨基于变压器的语言模型的长度概括能力。我们首先确定长度泛化任务上的天真固定变压器显示出与模型量表无关的显着泛化缺陷。然后,我们表明,将预处理的大语言模型与SCRATCHPAD提示(要求模型在产生答案之前输出解决方案步骤)相结合,从而巨大的长度概括改进。我们对每种学习方式进行了仔细的失败分析,并确定了常见的错误来源,这些错误来源突出了将语言模型的机会与更长的问题概括的能力。
translated by 谷歌翻译
变压器对数学的大多数应用,从整合到定理证明,专注于象征性。在本文中,我们表明,可以培训变压器以高精度地执行数值计算。我们考虑线性代数的问题:矩阵转仓,加法,乘法,特征值和载体,奇异值分解和反转。在随机矩阵的数据集上训练小型变压器(最多六层),我们在所有问题上实现高精度(超过90%)。我们还表明,训练有素的模型可以通过从更多样化的数据集(特别是从具有非独立性和相同分布系数的矩阵训练)来概括他们的训练分配,并且可以大大提高域的域准确度。最后,我们表明,可以利用几枪学习来重新列车模型来解决更大的问题。
translated by 谷歌翻译
当前的深度学习方法显示出良好的分布概括性能,但在分布外的概括方面挣扎。正如我们在许多智能测试中所发现的那样,在涉及抽象关系(例如识别序列中的规则)的任务中尤其如此。最近的工作探索了如何强迫关系表示与感觉表示的区别,这在大脑中似乎是这种情况,可以帮助人工系统。在这项工作的基础上,我们进一步探索并正式化了关系和感官细节的“分区”表示所提供的优势,以及这种归纳偏见如何帮助在新遇到的环境中重新组建学习的关系结构。我们介绍了一个基于相似性分数的简单体系结构,我们将其命名为组成关系网络(Corelnet)。使用此模型,我们研究了一系列的归纳偏见,以确保从感觉数据中学习并明显地了解抽象关系,并探索它们对一系列关系心理物理学任务的分布概括的影响。我们发现,简单的体系结构选择可以超越现有的模型,而在分布式概括中。总之,这些结果表明,从其他信息流中分配关系表示形式可能是一种简单的方法,可以在执行分布外的关系计算时增强现有网络体系结构的鲁棒性。
translated by 谷歌翻译
我们介绍了Dessurt,这是一个相对简单的文档理解变压器,能够在各种文档任务上进行微调,而不是先前的方法。它接收文档映像和任务字符串作为输入,并作为输出以任意文本自动添加。由于Dessurt是端到端体系结构,除了文档理解外,还可以执行文本识别,因此它不需要像先前方法那样需要外部识别模型。Dessurt比先前的方法更灵活,并且能够处理各种文档域和任务。我们表明,该模型可在9种不同的数据集任务组合中有效。
translated by 谷歌翻译
Recent times have witnessed an increasing number of applications of deep neural networks towards solving tasks that require superior cognitive abilities, e.g., playing Go, generating art, question answering (such as ChatGPT), etc. Such a dramatic progress raises the question: how generalizable are neural networks in solving problems that demand broad skills? To answer this question, we propose SMART: a Simple Multimodal Algorithmic Reasoning Task and the associated SMART-101 dataset, for evaluating the abstraction, deduction, and generalization abilities of neural networks in solving visuo-linguistic puzzles designed specifically for children in the 6-8 age group. Our dataset consists of 101 unique puzzles; each puzzle comprises a picture and a question, and their solution needs a mix of several elementary skills, including arithmetic, algebra, and spatial reasoning, among others. To scale our dataset towards training deep neural networks, we programmatically generate entirely new instances for each puzzle while retaining their solution algorithm. To benchmark the performance on the SMART-101 dataset, we propose a vision and language meta-learning model using varied state-of-the-art backbone neural networks. Our experiments reveal that while powerful deep models offer reasonable performances on puzzles that they are trained on, they are not better than random accuracy when analyzed for generalization. We also evaluate the recent ChatGPT large language model on a subset of our dataset and find that while ChatGPT produces convincing reasoning abilities, the answers are often incorrect.
translated by 谷歌翻译
Language tasks involving character-level manipulations (e.g., spelling correction, many word games) are challenging for models based in subword tokenization. To address this, we adapt the interchange intervention training method of Geiger et al. (2021) to operate on type-level variables over characters. This allows us to encode robust, position-independent character-level information in the internal representations of subword-based models. We additionally introduce a suite of character-level tasks that systematically vary in their dependence on meaning and sequence-level context. While simple character-level tokenization approaches still perform best on purely form-based tasks like string reversal, our method is superior for more complex tasks that blend form, meaning, and context, such as spelling correction in context and word search games. Our approach also leads to subword-based models with human-intepretable internal representations of characters.
translated by 谷歌翻译
推理是人类认知和智力的关键支柱。在过去的十年中,我们目睹了自然语言处理的巨大收益和大型语言模型的前所未有的缩放。最近的工作表征了很少射击技术的能力,例如思想链,可以在大语言模型中模仿人类的推理。这个标志性的功能很少,连同不断扩展的语言模型相结合,打开了解决各种任务的可能性的远景,例如数学单词问题,代码完成和常识性推理。促使思想链(COT)通过提供中间步骤并敦促模型遵循相同的过程,从而进一步推动了模型的性能。尽管具有令人信服的性能,但在这些模型中推理能力的起源却很少探索。这项工作启动了对大语言模型中推理机制的更深入了解的初步步骤。我们的工作围绕查询模型,同时在提示中控制除一个组件以外的所有组件外:符号,模式和文本。然后,我们分析查询之间的性能差异。我们的结果表明,在提示中存在事实模式对于COT的成功并不是必需的。尽管如此,我们从经验上表明,仅依靠模式也不足以获得高质量的结果。我们认为文本具有常识性知识和意义。我们详尽的经验分析提供了定性的例子,说明了文本和模式之间的共生关系。这种对COT的系统理解使我们能够设计简洁的思想链,被称为CCOT,在其中修剪文本和模式只能保留其关键角色,同时以PAR或更高的求解任务率交付。
translated by 谷歌翻译
语言模型在需要自然语言理解的各种任务上取得了非凡的表现。然而,最先进的模型通常在需要定量推理的任务上挣扎,例如在大学一级解决数学,科学和工程问题。为了帮助缩小这一差距,我们介绍了Minerva,Minerva是一种在一般自然语言数据上鉴定的大型语言模型,并进一步培训了技术内容。该模型在不使用外部工具的情况下实现了技术基准测试的最新性能。我们还评估了我们在需要定量推理的物理学,生物学,化学,经济学和其他科学方面的200多个本科生问题上评估我们的模型,并发现该模型可以正确回答其中几乎三分之一。
translated by 谷歌翻译
Causal transformer language models (LMs), such as GPT-3, typically require some form of positional encoding, such as positional embeddings. However, we show that LMs without any explicit positional encoding are still competitive with standard models, and that this phenomenon is robust across different datasets, model sizes, and sequence lengths. Probing experiments reveal that such models acquire an implicit notion of absolute positions throughout the network, effectively compensating for the missing information. We conjecture that causal attention enables the model to infer the number of predecessors that each token can attend to, thereby approximating its absolute position. Our findings indicate that causal LMs might derive positional awareness not only from the explicit positioning mechanism, but also from the effects of the causal mask.
translated by 谷歌翻译
受到人类掌握算术和普遍不见问题的非凡能力的启发,我们提出了一个新的数据集,提示,以研究机器在三个层面上学习可推广概念的能力:感知,语法和语义。学习代理人是从图像(即感知)等原始信号中观察到的概念,如何在结构上组合多个概念来形成有效的表达(即语法),以及如何实现概念以提供各种推理任务(即语义学),都是以弱监督的方式。以系统的概括为重点,我们仔细设计了一个五倍的测试集,以评估插值和推断学概念W.R.T.这三个级别。我们进一步设计了一些学习的分割,以测试模型是否可以快速学习新概念并将其推广到更复杂的场景。为了了解现有模型的局限性,我们通过包括RNN,Transformers和GPT-3在内的各种顺序到序列模型(以及思想提示链)进行了广泛的实验。结果表明,当前的模型仍在推断出远程句法依赖性和语义方面仍在努力。当在几次设置中使用新概念测试时,模型显示出对人级概括的显着差距。此外,我们发现通过简单地扩大数据集和模型大小来解决提示是不可行的。该策略几乎没有帮助推断语法和语义。最后,在零拍的GPT-3实验中,思想链提示链显示出令人印象深刻的结果,并显着提高了测试准确性。我们认为,拟议的数据集以及实验发现在系统概括方面引起了极大的兴趣。
translated by 谷歌翻译
我们提出了一种新颖的计算模型“ Savir-T”,用于在Raven的渐进式矩阵(RPM)中体现的视觉推理问题。我们的模型考虑了拼图中每个图像中视觉元素的显式空间语义,编码为时空视标,并了解内部图像以及图像的依赖依赖性依赖性,与视觉推理任务高度相关。通过基于变压器的SAVIR-T体系结构建模的令牌关系,提取组(行或列)通过利用组规则相干性并将其用作电感偏置来提取前两行中的基本规则表示形式,从而引起了提取组(行或列)驱动的表示形式(或列)RPM中的每个令牌。我们使用此关系表示形式来找到正确的选择图像,该图像完成了RPM的最后一行或列。在两个合成RPM基准测试中进行了广泛的实验,包括Raven,I-Raven,Raven-Fair和PGM以及基于自然图像的“ V-Prom”,这表明Savir-T为视觉设定了新的最新时间推理,超过了先前模型的性能。
translated by 谷歌翻译