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

深度对Transformer语言模型中组合泛化能力的影响

The Impact of Depth on Compositional Generalization in Transformer Language Models

New York University(纽约大学);Google Research(谷歌研究院);Google DeepMind(谷歌DeepMind)

Jackson Petty, Sjoerd van Steenkiste, Ishita Dasgupta, Fei Sha, Dan Garrette, Tal Linzen

AI总结:

本研究通过控制总参数量构建不同深度的Transformer模型,验证深度对组合泛化的影响,发现更深模型泛化能力更强但收益递减,且该增益不完全来自语言建模性能提升,建议给定参数预算下可采用更浅架构。

摘要:

为处理新句子,语言模型(LM)必须具备组合泛化能力——即以新方式组合熟悉的元素。模型结构的哪些方面会促进组合泛化?本研究聚焦Transformer架构,验证由理论与实证工作启发的假设:更深的Transformer具备更强的组合泛化能力。单纯增加层数会提升总参数量;为厘清深度与模型规模的混淆变量,我们构建三类模型,在深度与宽度间做权衡以保持总参数量恒定(分别为41M、134M和374M参数)。我们将所有模型作为语言模型进行预训练,并在测试组合泛化能力的任务上对其微调。研究得出三项主要结论:(1)微调后,更深的模型比较浅的模型具备更强的组合泛化能力,但额外增加层数的收益会迅速递减;(2)在每个模型家族内,更深的模型表现出更优的语言建模性能,但收益同样呈递减趋势;(3)深度对组合泛化的增益不能完全归因于语言建模性能的提升。由于模型延迟与层数大致呈线性关系,这些结果表明,在给定总参数预算的情况下,Transformer可以采用比常规更浅的架构,且不会牺牲性能。

英文摘要:

To process novel sentences, language models (LMs) must generalize compositionally -- combine familiar elements in new ways. What aspects of a model's structure promote compositional generalization? Focusing on transformers, we test the hypothesis, motivated by theoretical and empirical work, that deeper transformers generalize more compositionally. Simply adding layers increases the total number of parameters; to address this confound between depth and size, we construct three classes of models which trade off depth for width such that the total number of parameters is kept constant (41M, 134M and 374M parameters). We pretrain all models as LMs and fine-tune them on tasks that test for compositional generalization. We report three main conclusions: (1) after fine-tuning, deeper models generalize more compositionally than shallower models do, but the benefit of additional layers diminishes rapidly; (2) within each family, deeper models show better language modeling performance, but returns are similarly diminishing; (3) the benefits of depth for compositional generalization cannot be attributed solely to better performance on language modeling. Because model latency is approximately linear in the number of layers, these results lead us to the recommendation that, with a given total parameter budget, transformers can be made shallower than is typical without sacrificing performance.

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

↑