Transformer论文分析

Transformer是一种由Google提出的基于Encoder-Decoder架构的模型,主要用于神经语言建模和机器翻译。它创新性地采用了全注意力机制,解决了RNNs和CNNs在序列处理中的速度限制问题。文章讨论了自注意力的概念,以及Residualconnections在模型中的应用,强调了Transformer如何通过消除循环和卷积来提高效率。
摘要由CSDN通过智能技术生成

背景

Transformer是google研究人员提出的一种模型,基于Encoder-Decoder架构。
原文为:Arxiv:Attention Is All You Need
代码库为:Github:tensorflow/tensor2tensor

任务定义

In neural language modelling, a neural network estimates a distribution over sequences of words or characters that belong to a given language (Bengio et al., 2003). In neural machine translation, the network estimates a distribution over sequences in the target language conditioned on a given sequence in the source language.
参考文献:ByteNet:Arxiv:Neural Machine Translation in Linear Time(ByteNet)
语言建模(language model)就是估计一个序列所对应的概率分布。翻译模型(machine translation)就是估计在给定序列的基础上目标语言的序列对应的概率分布。

内容分析

Introduction

循环神经网络:参考文献:IEEE Xplore:Long Short-Term Memory
IEEE Xplore:Long Short-Term Memory就是用循环神经网络去解决上面的建模问题,但是由于序列化的原因,运行速度受限。
也有用卷积网络去解决这个问题的比如VGG-16:Arxiv:Very Deep Convolutional Networks for Large-Scale Image Recognition,google研究人员在VGG-16基础上进一步进行全卷积化得到了Fine-tuned VGG-16:Arxiv:Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs。利用这个文章中所提到的膨胀技术,google研究人员又开发出了ByteNet:Arxiv:Neural Machine Translation in Linear Time。进而针对ByteNet及其他网络中存在的注意力机制的问题,提出全部仅使用注意力机制的网络:Transformer:Arxiv:Attention Is All You Need
从VGG-16变换为Fine-tuned VGG-16如下图所示:
模型结构

BackGround

自注意力机制:参考文献:Arxiv:Long Short-Term Memory-Networks for Machine ReadingArxiv:A Deep Reinforced Model for Abstractive Summarization
本文中使用了自注意力机制,也就是将序列中不同位置相关联。

Model Architecture

自回归:Arxiv:Generating Sequences With Recurrent Neural Networks
自回归的直观表达式就是: y t = f ( y t − 1 , x t ) y_t=f(y_{t-1},x_t) yt=f(yt1,xt)
关键在于attention注意力机制是什么。
模型结构
对比上面基于全卷积的模型,可以发现模型结构变了。

Encoder-Decoder

Residual connection:Arxiv:Deep Residual Learning for Image Recognition
直观表达式就是: y = f ( x ) + x y=f(x)+x y=f(x)+x

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值