【论文笔记】Effective Approaches to Attention-based Neural Machine Translation

论文链接

   本文针对NMT任务使用的attention机制提出两种结构,global attention将attention作用于全部输入序列,local attention每个时间步将attention作用于输入序列的不同子集。前者被称为soft attention,其原理和论文1一样,后者是hard attention和soft attention的结合,该文通过context vector ct和隐向量ht来预测当前输出:

     

两种attention机制不同的是context vector的计算:

Global Attention


在global attention中,将输入序列的各个时间步都考虑进去,每个时间步的attention值由下式计算而得:


文章尝试了多种匹配度计算函数,实验表明第二种函数效果较好:


Local Attention


为了进一步减少计算代价,在解码过程的每一个时间步仅关注输入序列的一个子集,于是在计算每个位置的attention时会固定一个上下文窗口,而不是在全局范围计算attention。根据一个预测函数,先预测当前解码时要对齐的源语言端的位置Pt,然后通过上下文窗口,仅考虑窗口内的词,Pt可以直接等于当前解码的位置或是使用感知机进行预测,S是当前序列的长度,v和W为感知机的参数。


论文1中当前的context vector会参与生成当前的RNN隐向量,由此将每一步的context信息传递下去,这篇文章直接将融合了context信息和上一步隐状态信息的ht hat作为下一时间步的输入以达到这个目的:



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Visual segmentation is one of the most important tasks in computer vision, which involves dividing an image into multiple segments, each of which corresponds to a different object or region of interest in the image. In recent years, transformer-based methods have emerged as a promising approach for visual segmentation, leveraging the self-attention mechanism to capture long-range dependencies in the image. This survey paper provides a comprehensive overview of transformer-based visual segmentation methods, covering their underlying principles, architecture, training strategies, and applications. The paper starts by introducing the basic concepts of visual segmentation and transformer-based models, followed by a discussion of the key challenges and opportunities in applying transformers to visual segmentation. The paper then reviews the state-of-the-art transformer-based segmentation methods, including both fully transformer-based approaches and hybrid approaches that combine transformers with other techniques such as convolutional neural networks (CNNs). For each method, the paper provides a detailed description of its architecture and training strategy, as well as its performance on benchmark datasets. Finally, the paper concludes with a discussion of the future directions of transformer-based visual segmentation, including potential improvements in model design, training methods, and applications. Overall, this survey paper provides a valuable resource for researchers and practitioners interested in the field of transformer-based visual segmentation.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值