Fast-FNet: Accelerating Transformer Encoder Models via Efficient Fourier Layers

Nurullah Sevim, Ege Ozan Özyedek, Furkan Şahinuç, Aykut Koç
{"title":"Fast-FNet: Accelerating Transformer Encoder Models via Efficient Fourier Layers","authors":"Nurullah Sevim, Ege Ozan Özyedek, Furkan Şahinuç, Aykut Koç","doi":"arxiv-2209.12816","DOIUrl":null,"url":null,"abstract":"Transformer-based language models utilize the attention mechanism for\nsubstantial performance improvements in almost all natural language processing\n(NLP) tasks. Similar attention structures are also extensively studied in\nseveral other areas. Although the attention mechanism enhances the model\nperformances significantly, its quadratic complexity prevents efficient\nprocessing of long sequences. Recent works focused on eliminating the\ndisadvantages of computational inefficiency and showed that transformer-based\nmodels can still reach competitive results without the attention layer. A\npioneering study proposed the FNet, which replaces the attention layer with the\nFourier Transform (FT) in the transformer encoder architecture. FNet achieves\ncompetitive performances concerning the original transformer encoder model\nwhile accelerating training process by removing the computational burden of the\nattention mechanism. However, the FNet model ignores essential properties of\nthe FT from the classical signal processing that can be leveraged to increase\nmodel efficiency further. We propose different methods to deploy FT efficiently\nin transformer encoder models. Our proposed architectures have smaller number\nof model parameters, shorter training times, less memory usage, and some\nadditional performance improvements. We demonstrate these improvements through\nextensive experiments on common benchmarks.","PeriodicalId":501533,"journal":{"name":"arXiv - CS - General Literature","volume":"9 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2022-09-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - General Literature","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2209.12816","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Transformer-based language models utilize the attention mechanism for substantial performance improvements in almost all natural language processing (NLP) tasks. Similar attention structures are also extensively studied in several other areas. Although the attention mechanism enhances the model performances significantly, its quadratic complexity prevents efficient processing of long sequences. Recent works focused on eliminating the disadvantages of computational inefficiency and showed that transformer-based models can still reach competitive results without the attention layer. A pioneering study proposed the FNet, which replaces the attention layer with the Fourier Transform (FT) in the transformer encoder architecture. FNet achieves competitive performances concerning the original transformer encoder model while accelerating training process by removing the computational burden of the attention mechanism. However, the FNet model ignores essential properties of the FT from the classical signal processing that can be leveraged to increase model efficiency further. We propose different methods to deploy FT efficiently in transformer encoder models. Our proposed architectures have smaller number of model parameters, shorter training times, less memory usage, and some additional performance improvements. We demonstrate these improvements through extensive experiments on common benchmarks.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Fast-FNet:通过高效傅立叶层加速变压器编码器模型
基于转换器的语言模型利用注意力机制在几乎所有自然语言处理(NLP)任务中大幅提高性能。类似的注意力结构在其他几个领域也得到了广泛的研究。注意机制虽然显著提高了模型的性能,但其二次复杂度阻碍了对长序列的有效处理。最近的研究集中在消除计算效率低下的缺点,并表明基于变压器的模型在没有注意层的情况下仍然可以达到有竞争力的结果。一项开创性的研究提出了FNet,它用傅里叶变换(FT)取代了变压器编码器结构中的注意层。FNet在消除注意力机制的计算负担的同时,在原有的变压器编码器模型上实现了具有竞争力的性能。然而,FNet模型忽略了经典信号处理中FT的基本特性,这些特性可以用来进一步提高模型效率。我们提出了不同的方法来有效地在变压器编码器模型中部署傅立叶变换。我们提出的体系结构具有更少的模型参数,更短的训练时间,更少的内存使用,以及一些额外的性能改进。我们通过在通用基准测试上进行大量实验来演示这些改进。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A guideline for the methodology chapter in computer science dissertations Eternal Sunshine of the Mechanical Mind: The Irreconcilability of Machine Learning and the Right to be Forgotten A Comprehensive Overview of Fish-Eye Camera Distortion Correction Methods The 4+1 Model of Data Science Computational Natural Philosophy: A Thread from Presocratics through Turing to ChatGPT
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1