arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.14994cs.CLcs.AIcs.CCcs.FLcs.LG
收藏

Transformer可以表示$n$-gram语言模型

Transformers Can Represent $n$-gram Language Models

Anej Svete, Ryan Cotterell

AI总结:

该研究针对现有Transformer架构表征能力分析多聚焦语言接受、不适合语言模型概率分布特性的问题,证明了带硬/稀疏注意力的Transformer语言模型可精确表示任意$n$-gram语言模型,给出其概率表征能力的具体下界,为相关机制研究奠定基础。

摘要:

现有研究已通过形式计算模型分析了Transformer架构的表征能力,但目前的研究重点集中在从语言\textbf{接受}角度分析该架构。我们认为,这一问题并不适合用于研究语言模型(LM)——根据定义,语言模型是字符串上的\textbf{概率分布}。本文聚焦于Transformer语言模型与$n$-gram语言模型(一类简单且具有历史意义的语言模型)之间的关系。我们证明,采用硬注意力或稀疏注意力机制的Transformer语言模型可以精确表示任意$n$-gram语言模型,从而给出了其概率表征能力的一个具体下界。这为理解Transformer语言模型表示字符串上概率分布的机制迈出了第一步。

英文摘要:

Existing work has analyzed the representational capacity of the transformer architecture by means of formal models of computation. However, the focus so far has been on analyzing the architecture in terms of language \emph{acceptance}. We contend that this is an ill-suited problem in the study of \emph{language models} (LMs), which are definitionally \emph{probability distributions} over strings. In this paper, we focus on the relationship between transformer LMs and $n$-gram LMs, a simple and historically relevant class of language models. We show that transformer LMs using the hard or sparse attention mechanisms can exactly represent any $n$-gram LM, giving us a concrete lower bound on their probabilistic representational capacity. This provides a first step towards understanding the mechanisms that transformer LMs can use to represent probability distributions over strings.

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

↑