让Transformer通过复制任务学习类比推理,提升泛化能力。
Transformer See, Transformer Do: Copying as an Intermediate Step in Learning Analogical Reasoning
- 引入复制任务引导模型关注关键信息元素。
- 在新字母表上泛化性能随数据多样性提升。
- 可解释性强,注意力权重可控制推理路径。
类比推理是人类智能的标志,能将知识从一种情境迁移到另一种情境以解决新问题。然而,构建具备稳健类比推理能力的人工智能系统仍具挑战。本文使用元学习组合性(MLC)训练Transformer模型完成字母串类比任务,并评估其泛化能力。研究发现,当在训练数据中加入复制任务以引导模型关注最具信息量的问题元素时,字母串类比变得可学习;当使用更异质的数据集训练时,模型对新字母表的泛化能力显著提升。最佳训练结果下,3层编码器-解码器模型在字母串类比数据集上的表现与前沿模型相当。MLC方法还使模型能部分泛化到已训练变换的组合,但无法处理完全新颖的变换。我们识别出一种近似模型计算的算法,并通过可解释性分析验证:头级注意力权重对模型输出具有因果影响,可实现不同类比任务间的可控切换。讨论了这些发现对大模型泛化能力及与人类类比推理相似性的启示。
原文摘要 · Abstract (English)
Analogical reasoning is a hallmark of human intelligence, enabling us to solve new problems by transferring knowledge from one situation to another. Yet, developing artificial intelligence systems capable of robust human-like analogical reasoning has proven difficult. In this work, we train transformers using Meta-Learning for Compositionality (MLC) on an analogical reasoning task (letter-string analogies) and assess their generalization capabilities. We find that letter-string analogies become learnable when guiding the models to attend to the most informative problem elements, induced by including copy tasks in the training data. Furthermore, generalization to new alphabets improves when models are trained with more heterogeneous datasets. For the best training run, our 3-layer encoder-decoder model performs on par with frontier models on our letter-string analogy datasets. The MLC approach also enables some generalization to compositions of trained transformations, but not to completely novel transformations. To understand how the model solves the analogies, we identify an algorithm for one analogy task that approximates the model's computations. We verify this using interpretability analyses and show that head-level attention weights causally affect model output, allowing steering between different analogy tasks. We discuss the implications of our findings for generalization capabilities of larger models and the parallels to human analogical reasoning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。