The transformer is a neural network component that can be used to learn useful representations of sequences or sets of datapoints. The transformer has driven recent advances in natural language processing, computer vision, and spatio-temporal modelling. There are many introductions to transformers, but most do not contain precise mathematical descriptions of the architecture and the intuitions behind the design choices are often also missing. Moreover, as research takes a winding path, the explanations for the components of the transformer can be idiosyncratic. In this note we aim for a mathematically precise, intuitive, and clean description of the transformer architecture.
翻译:Transformer是一种神经网络组件,可以用于学习序列或数据点集合的有用表示。Transformer在自然语言处理、计算机视觉和时空建模方面推动了最近的进展。存在许多关于Transformer的介绍,但大多数都没有包含关于架构的精确数学描述,并且设计选择背后的直觉描述也经常丢失。此外,由于研究道路曲折,Transformer的组件解释可能具有特殊性。在这个笔记中,我们旨在以数学准确、直观、干净的方式描述Transformer架构。