首页 > 其他分享 >什么是 Kernel Smoother ?它与 Self Attention 有什么关系?

什么是 Kernel Smoother ?它与 Self Attention 有什么关系?

时间:2023-06-29 16:01:52浏览次数:38  
标签:Kernel Transformer Smoother Attention https org

[1] 带权滑动平均(Weighted Moving Average, WMA) 是标量场上的滑动窗口内的加权平均,数学上等价于卷积。[1]

[2] Kernel Smoother 是一种特殊的 WMA 方法,特殊在于权重是由核函数决定的,相互之间越接近的点具有越高的权重。[2]

[3] Transformer 中的自注意力机制可以看作一种 Kernel Smoother。[3][4] 其灵活性来自于核函数对距离的编码的灵活性,可以以新的视角重新组合原始的特征。


  1. https://en.wikipedia.org/wiki/Moving_average#Weighted_moving_average ↩︎

  2. https://en.wikipedia.org/wiki/Kernel_smoother ↩︎

  3. Tsai et al., Transformer Dissection: An Unified Understanding for Transformer’s Attention via the Lens of Kernel, EMNLP-IJCNLP, 2019, https://aclanthology.org/D19-1443 ↩︎

  4. Grégoire Mialon, Designing Transformers with Kernel Methods, talk, 2021, https://gregoiremialon.github.io/talk/mila/mila.pdf ↩︎

标签:Kernel,Transformer,Smoother,Attention,https,org
From: https://www.cnblogs.com/hyuyao/p/17514428.html

相关文章

  • Windows NT和Linux,采用了混合内核的设计模式 混合内核(Hybrid Kernel)是一种操作系统内
    混合内核(HybridKernel)是一种操作系统内核设计模式,它结合了微内核和宏内核两种设计理念的特点。混合内核旨在提供高性能和灵活性,同时保持较强的安全性和稳定性。混合内核在内核设计中将一些关键的服务和功能放在内核空间中,同时将其他非关键的服务和功能封装成独立的用户空间进程......
  • "ntoskrnl"代表"NT Operating System Kernel",它是Windows操作系统的主要核心模块之一,
    Windows内核是微软Windows操作系统的核心组件,它负责管理操作系统的核心功能和提供关键的系统服务。Windows内核是运行在计算机硬件上的软件,它与硬件交互并管理资源分配、进程管理、设备驱动程序和系统安全等任务。Windows内核采用了一种称为“混合内核”的设计,结合了传统的单内核......
  • __KERNEL__ 宏的作用
     编译内核代码,会定义宏__KERNEL__  Thekernelincludesasetofheadersthatisexportedtouserspace.Manyheaderscanbeexportedas-isbutotherheadersrequireaminimalpre-processingbeforetheyarereadyforuser-space.Thepre-processingdoes:......
  • 悟空派WuKongPi/香橙派orangepi zero全志H3折腾记录(②kernel移植)
    接上一节,这节开始移植内核。 首先获取一下内核源码,这里仍然使用香橙派的源码gitclonehttps://github.com/orangepi-xunlong/linux-orangepi.git 进入kernel根目录并切换到orangepizero使用的分支gitcheckoutremotes/origin/orange-pi-5.4 然后安装编译内核可......
  • centos6以lvm划分磁盘分区swap/root禁用swap导致重启kernel异常
    目的禁用swap,虚机重启正常envcentos6.9root/swaplvm形式终端kernel异常,导致系统无法正常启动(引导出了问题)步骤正确禁用swap步骤1、sync刷新内存数据到磁盘2、关闭swapswapoff-a(有足够内存,防止内存不够频繁交换空间)3、注释/etc/fstab4、查看grub加载是......
  • Time Interval Aware Self-Attention for Sequential Recommendation
    目录概符号说明MotivationTiSASRec代码LiJ.,WangY.,McAuleyJ.Timeintervalawareself-attentionforsequentialrecommendation.WSDM,2020.概本文介绍了一种更好利用时间戳信息的方式,引入相对位置编码.符号说明Motivation无论是GRU4Rec,还是SASRec等,......
  • attention学习-课程笔记
    attention层计算过程:相似度函数fatt计算输入X和查询向量q之间的相似度e;相似度e经过softmax计算得到权重a。 向量e和a的长度与输入X的第一个维度相同。权重a与输入X相乘,得到输出y。相似度计算可使用点积dotprodecut,由于输入X的维度通常较高,q.X值会很大,因此使用sqrt(Dq)进......
  • centos7 内核 kernel-devel-3.10.0-957.el7.x86_64
    centos7内核kernel-devel-3.10.0-957.el7.x86_64https://people.centos.org/arrfab/shim/results/kernel/20181108233701/3.10.0-957.el7.x86_64/......
  • Attention、Self-Attention 与 Multi-Head Attention
    Corpus语料库与DB数据库WorldKnowledge世界常识库:OALD牛津高阶/Synonyms/Phrases/…,新华字典/成语词典/辞海,行业词典,大英百科,Wikipedia,…全局信息:Corpus语料库、行业通用数据库(例如Springer/GoogleScholar/Academia/…学术数据库)/领域库、用户自定义库;语法信息:输入句......
  • RuntimeError: Error building extension ‘fused‘&FAILED: fused_bias_act_kernel.c
    RuntimeError:Errorbuildingextension‘fused’&FAILED:fused_bias_act_kernel.cuda.o&ninja:buildstopped:subcommandfailed.问题如下:RuntimeError:Errorbuildingextension‘fused’:[1/3]/usr/local/cuda/bin/nvcc-DTORCH_EXTENSION_NAME=fused-DTORCH_......