探索语言模型中的内部算术能力:以ALBERT为例
Exploring Internal Numeracy in Language Models: A Case Study on ALBERT
AI总结:
本文提出基于PCA分析ALBERT模型数值嵌入的方法,发现模型能自发学习数值排序等基础数学概念,为结合定量推理的NLP应用开辟了新途径。
摘要:
研究发现,基于Transformer的语言模型具备执行基础定量推理的能力。在本文中,我们提出了一种研究这些模型如何在内部表示数值数据的方法,并使用该提议分析了ALBERT系列语言模型。具体而言,我们提取了这些模型用于表示对应数字和序数词的标记的已学习嵌入,并对这些嵌入进行主成分分析(PCA)。PCA结果显示,不同规模、分别训练和初始化的ALBERT模型,都始终如一地学会使用最大变异轴来表示各种数值概念的近似排序。数字及其文本对应词被表示在独立的簇中,但在2D空间中沿着相同方向增加。我们的发现表明,纯粹为建模文本而训练的语言模型能够直观理解基础数学概念,为与定量推理交叉的NLP应用开辟了途径。
英文摘要:
It has been found that Transformer-based language models have the ability to perform basic quantitative reasoning. In this paper, we propose a method for studying how these models internally represent numerical data, and use our proposal to analyze the ALBERT family of language models. Specifically, we extract the learned embeddings these models use to represent tokens that correspond to numbers and ordinals, and subject these embeddings to Principal Component Analysis (PCA). PCA results reveal that ALBERT models of different sizes, trained and initialized separately, consistently learn to use the axes of greatest variation to represent the approximate ordering of various numerical concepts. Numerals and their textual counterparts are represented in separate clusters, but increase along the same direction in 2D space. Our findings illustrate that language models, trained purely to model text, can intuit basic mathematical concepts, opening avenues for NLP applications that intersect with quantitative reasoning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。