这篇文章发布2015年,关于Attention的应用。
现在看来可能价值没那么大了,但是由于没读过还是要读一遍。

简介 Introduce

In parallel, the concept of “attention” has gained popularity recently in training neural networks, allowing models to learn alignments between different modalities, e.g., between image objects and agent actions in the dynamic control problem (Mnih et al., 2014), between speech frames and text in the speech recognition task, or between visual features of a picture and its text description in the image caption generation task (Xu et al., 2015). In the context of NMT, Bahdanau et al. (2015) has successfully applied such attentional mechanism to jointly translate and align words.


可以看到,attention机制对于翻译任务其实是他山之石。最早是用在视觉和语音等多模态领域的。

In this work, we design, with simplicity and fectiveness in mind, two novel types of attentionbased models: a global approach in which all source words are attended and a local one whereby only a subset of source words are considered at a time.


提出的两种注意力应用方法,核心目的是运算简单和效率:

  • 全局注意力:所有词都被关注,和原始注意力模型类似,但更简单。
  • 局部注意力:部分词被关注,比较新颖,作者认为这是一种***软硬注意力***的结合。

注意力机制模型 Attention-based Models

While these models differ in how the context vector ct is derived, they share the same subsequent steps.


注意力机制用法的关键在于如何生成Ct,其他步骤都是相同的。

全局注意力机制 Global Attention



h-表示是encoder的隐状态,h表示是decoder的隐状态。
具体做法是把decoder的t时刻隐状态逐个与encoder的所有隐状态做分数计算。
分数计算方法有三种,其中第三种就是前人使用的。
与前人不同的地方在于,前人用的是t-1时刻的隐状态配合注意力生成t时刻的隐状态,本文用的是t时刻的隐状态配合注意力去做预测。(这里写得比较绕,但是认真看原文确实是这样的,两篇文关注的阶段是不同的)这样做的优势是计算更简单

局部注意力 Local Attention

Our local attention mechanism selectively focuses on a small window of context and is differentiable. This approach has an advantage of avoiding the expensive computation incurred in the soft attention and at the same time, is easier to train than the hard attention approach. In concrete details, the model first generates an aligned position
pt for each target word at time t. The context vector ct is then derived as a weighted average over the set of source hidden states within the window [pt−D, pt+D]; D is empirically selected.Unlike the global approach, the local alignment vector at is now fixed-dimensional R=2D+1.


先给t时刻算出一个对齐起点位置Pt,然后假设t时刻的翻译内容仅与第Pt个原文词和周围D个词相关(显然这个假设并不是合理的,那么可以预见效果并不一定特别好)。

两种对齐起点的计算方法

  • 朴素假设:译文中的第t个词和原文中的第t个词对齐(显然这个假设更不合理)
  • 预测对齐:构建模型去预测对齐位置(方法见下,感觉也不太靠谱诶)


预测模型的输入只有decoder的隐状态,然后有两个可学习参数。
在计算比分的最后步骤加入了一个高斯系数,即越靠近对齐起点pt的词,得到的分数越高(感觉这个也很不靠谱诶)。

对齐覆盖问题 Input-feeding Approach

In our proposed global and local approaches, the attentional decisions are made independently, which is suboptimal. Whereas, in standard MT, a coverage set is often maintained during the translation process to keep track of which source words have been translated. Likewise, in attentional NMTs, alignment decisions should be made jointly taking into account past alignment information. To address that, we propose an input-feeding approach in which attentional vectors ˜ht are concatenated with inputs at the next time steps as illustrated in Figure 4.11 The effects of having such connections are two-fold: (a) we hope to make the model fully aware of previous alignment choices and (b) we create a very deep network spanning both horizontally and vertically.


  • 作者这里提到了在传统机器翻译中,会维护一个***覆盖集***用来告诉模型:原文中哪些词已经被翻译过了(像我这种后生晚辈,肯定是从来没听说过这个东西的)。
  • 因此希望在做注意力对齐的时候,注意力模型也能知道哪些词已经被对齐过了。所以提出了一种专门的输入方法,即在解码器计算下一时刻的隐状态时,将上一时刻的隐状态和上一时刻所对齐的输入向量同时输入。

实验

从现在的角度来看,这篇文章的实验结果已经没有多大意义了,这部分我就略过了。

分析 Analysis

同样也没有太多可以讲的。

总结

In this paper, we propose two simple and effective attentional mechanisms for neural machine translation: the global approach which always looks at all source positions and the local one that only attends to a subset of source positions at a time.


在我看来这篇文章直到今天还有价值的主要原因反倒是在于他优化了attention(全局)的计算,至于那个所谓局部注意力和特殊的输入方法可能并不一定多么好。

【论文笔记】Effective Approaches to Attention-based Neural Machine Translation相关推荐

  1. 论文阅读笔记:Frequency-Aware Contrastive Learning for Neural Machine Translation

    论文链接:https://arxiv.org/abs/2112.14484 author={Zhang, Tong and Ye, Wei and Yang, Baosong and Zhang, L ...

  2. 【论文泛读】4. 机器翻译:Neural Machine Translation by Jointly Learning to Align and Translate

    更新进度:■■■■■■■■■■■■■■■■■■■■■■■|100% 理论上一周更一个经典论文 刚刚开始学习,写的不好,有错误麻烦大家留言给我啦 这位博主的笔记短小精炼,爱了爱了:点击跳转 目录 准备 ...

  3. 【论文阅读003】:CURE: Code-Aware Neural Machine Translation for Automatic Program Repair

    论文基本情况: 论文名: CURE: Code-Aware Neural Machine Translation for Automatic Program Repair 作者:Nan Jiang(P ...

  4. 【论文阅读】Prior Knowledge Integration for Neural Machine Translation using Posterior Regularization

    本文在参考一些网上资料的基础上,对该论文的思想和重要步骤作出了总结,也加入了在与身边朋友讨论的过程中对文章更细致深入的理解的内容,同时包含了自己在阅读中发现需要了解的背景知识的简单介绍. 目录 概述 ...

  5. [持续更新] 神经机器翻译论文汇总 Papers on Neural Machine Translation

    [持续更新] 神经机器翻译论文汇总 Papers on Neural Machine Translation 源文地址 :http://polarlion.github.io/nmt/2017/02/ ...

  6. Towards Two-Dimensional Sequence to Sequence Model和Two-Way Neural Machine Translation两篇论文简单分析

    第一篇是:发布于2018年Towards Two-Dimensional Sequence to Sequence Model in NeuralMachine Translation 第二篇是:与第 ...

  7. 《Effective Approaches to Attention-based Neural Machine Translation》—— 基于注意力机制的有效神经机器翻译方法

    目录 <Effective Approaches to Attention-based Neural Machine Translation> 一.论文结构总览 二.论文背景知识 2.1 ...

  8. 【Paper】Effective Approaches to Attention-based Neural Machine Translation

    论文原文:PDF 论文年份:2015 论文被引:4675(2020/11/08) 7232(2022/03/26) 论文作者:Minh-Thang Luong et.al. 文章目录 Abstract ...

  9. 论文笔记2:Deep Attention Recurrent Q-Network

    参考文献:[1512.01693] Deep Attention Recurrent Q-Network (本篇DARQN) [1507.06527v3] Deep Recurrent Q-Learn ...

最新文章

  1. java数组中怎么去重_java数组去重怎么弄???大神来解
  2. Flutter切换tab后保留tab状态
  3. ReactNative ES6简介 及基本语法第一篇
  4. 计算机专业很不稳定,浅谈计算机网络专业教学的创新因素:引起计算机系统不稳定的因素有哪些...
  5. VRRP协议与keepalived原理及功能实例演示
  6. php 保护变量,PHP安全:变量的前世今生
  7. 单片机课程设计:基于STM32智能交通灯的设计
  8. 485通讯协议_终于有人把RS485通讯协议应用及缺点分析清楚了,看完收获多多
  9. 个性推荐①——系统总结个性化推荐系统
  10. c语言链表详解(超详细)
  11. PyCharm 新建 Python Package
  12. ShaderMap Pro(贴图制作转换生成工具)v1.3.1官方版
  13. SAP软件ERP系统简介
  14. RTL8723BU wifi 及 热点移植和测试
  15. 原生js实现放大镜效果
  16. 奥利地公司利用Windows 和 Adobe 0day 攻击欧洲和中美洲实体
  17. 2. 妈呀,Jackson原来是这样写JSON的
  18. 微信小程序连接蓝牙电子秤
  19. 计算机技术中的多媒体是什么,在多媒体计算机技术中,媒体含义一般指()。A中介B介质C信息的载体D存储介质 - 试题答案网问答...
  20. 远程计算机如果关机咋办,远程关机的详细步骤有哪些?向日葵怎么远程关机?...

热门文章

  1. 飞凌OK335xS开发平台软件测试
  2. 通过selenium八爪鱼爬取研招网各专业的初试信息
  3. 在线客服软件海豚客服APP接入方法一:安卓篇
  4. IPP 的FFT测试
  5. 基于安卓APP的二手汽车拍卖APP系统
  6. 用c语言怎么写舞蹈机器人程序,51单片机舞蹈机器人仿真+程序
  7. 可持续能源技术:改变世界的新方案
  8. 计算机毕业设计(84)php小程序毕设作品之维修报修物业小程序系统
  9. OV7670电路+引脚
  10. 监控系统存储服务器和磁盘阵列,监控存储服务器和磁盘阵列的区别