arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.09512cs.LGphysics.optics
收藏

集成电光注意力非线性性用于变换器

Integrated electro-optic attention nonlinearities for transformers

ETH Zurich(苏黎世联邦理工学院);Politecnico di Milano(米兰理工大学)

Luis Mickeler, Kai Lion, Alfonso Nardi, Jost Kellner, Pierre Didier, Bhavin J. Shastri, Niao He, Rachel Grange

AI总结:

本文提出利用电光非线性特性替代传统Softmax,提升变换器在视觉和语言任务中的效率与精度,同时降低计算延迟。

摘要:

Transformer架构已逐渐成为神经网络的主导架构,在语言处理和计算机视觉中实现了最先进的性能。这些模型的核心是注意力机制,其需要使用Softmax函数进行非线性、非负映射。然而,尽管Softmax操作仅占总操作次数的不到1%,但它们却可能成为整体推断延迟的主要瓶颈。本文使用薄膜锂铌酸盐(TFLN)马赫-泽德调制器(MZMs)作为模拟非线性计算元件,显著减少了非线性计算的延迟。我们实现了电光替代的数字Softmax和Sigmoid函数,并在视觉Transformer和大语言模型中评估其性能。我们的系统在极端的4位输入输出量化下仍能保持高度竞争的准确性。我们进一步表征了编码速度高达10GBaud时的系统噪声,并在各种噪声条件下评估了模型的鲁棒性。我们的发现表明,TFLN调制器可以在混合共封装硬件中作为非线性功能单元,实现高速且节能的非线性计算。

英文摘要:

Transformers achieve state-of-the-art performance in language processing and computer vision. Their computation increasingly depends on hardware that can keep pace not only with large matrix multiplications, but also with nonlinear operations like Softmax within the core attention mechanism. On digital accelerators, Softmax accounts for only a small fraction of total operations, yet it can disproportionately impact overall inference latency. Here, we use thin-film lithium niobate Mach-Zehnder modulators (MZM) as analog computing elements for low-latency Transformer attention. Our high-speed nonlinearities based on the intrinsic sinusoidal MZM response achieve performance close to digital baselines in Vision Transformers and GPT-2, even under 4-bit input and output quantization. We experimentally characterize the electro-optic response at symbol rates up to 10 GBaud and assess model robustness under corresponding noise conditions. Accounting for the full signal chain, our analysis indicates more than an order of magnitude lower latency relative to previous custom electronic and photonic Softmax implementations. These results establish analog electro-optic devices as nonlinear function units well suited for integration into emerging co-packaged electronic-photonic hardware, offering a path toward high-speed Transformer inference.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑