Transformer tends to overallocate attention to irrelevant context. In this work, we introduce Diff Transformer, which amplifies attention to the relevant context while canceling noise. Specifically, the differential attention mechanism calculates attention scores as the difference between two separate softmax attention maps. The subtraction cancels noise, promoting the emergence of sparse attention patterns. Experimental results on language modeling show that Diff Transformer outperforms Transformer in various settings of scaling up model size and training tokens. More intriguingly, it offers notable advantages in practical applications, such as long-context modeling, key information retrieval, hallucination mitigation, in-context learning, and reduction of activation outliers. By being less distracted by irrelevant context, Diff Transformer can mitigate hallucination in question answering and text summarization. For in-context learning, Diff Transformer not only enhances accuracy but is also more robust to order permutation, which was considered as a chronic robustness issue. The results position Diff Transformer as a highly effective and promising architecture to advance large language models.
School of Electrical and Computer Engineering, Ben-Gurion University of the Negev(电气与计算机工程学院,内盖夫本· Gurion大学);IAEC;Tel-Aviv University(特拉维夫大学);IBM Research(IBM研究院)
Sleep Stage Classification across Heterogeneous EEG/EOG Channels with Multi-Channel Differential Transformer
School of Artificial Intelligence and Robotics, Xiamen University Malaysia(厦门大学马来西亚分校人工智能与机器人学院);Department of Biomedical Engineering, Universiti Malaya(马来亚大学生物医学工程系);Department of Biomedical Engineering and Health Sciences, Universiti Teknologi Malaysia(马来西亚理工学院生物医学工程与健康科学系)
HADT: A Heterogeneous Multi-Agent Differential Transformer for Autonomous Earth Observation Satellite Cluster
School of Computer Science and Information Technology, Adelaide University(计算机科学与信息科技学院,阿德莱德大学);School of Electrical Engineering, Computing and Mathematical Sciences (EECMS), Curtin University(电气工程、计算与数学科学学院(EECMS), Curtin大学);Systems Research Institute, Polish Academy of Sciences(波兰科学院系统研究所)
ODE-ViT: Plug & Play Attention Layer from the Generalization of the ViT as an Ordinary Differential Equation
Computer Vision Center (CVC) Universitat Autònoma de Barcelona(计算机视觉中心(CVC)自治大学巴塞罗那);Mathematical Research Center (CRM) Universitat Autònoma de Barcelona(数学研究中心(CRM)自治大学巴塞罗那)
Physics Transformer: Tailoring Transformer for General PDE Prediction
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);School of Mechanics and Engineering Science, Peking University(北京大学力学与工程科学学院)
Physics and Data Driven Transformer-Mamba Framework for Flow Field
National University of Defense Technology(国防科技大学);Nanjing Agricultural University(南京农业大学);National Key Laboratory of Parallel and Distributed Computing(并行与分布式计算国家重点实验室);National SuperComputer Center in Tianjin(国家超级计算天津中心)
Neural ODE Transformers: Analyzing Internal Dynamics and Adaptive Fine-tuning
Korea University(高丽大学);Johns Hopkins University(约翰斯·霍普金斯大学);Texas A&M University-Commerce(德州农工大学 Commerce 分校);Qualcomm AI Research(高通人工智能研究部);Stanford(斯坦福大学);KAIST(韩国科学技术院);Qualcomm Vietnam Company Limited(高通越南有限公司)
在本文中,我们首次将Attention Is All You Need中最先进的Transformer中的自注意力应用于与偏微分方程相关的数据驱动算子学习问题。努力放在一起解释的原理,并提高注意力机制的功效。利用Hilbert空间中的算子逼近理论,首次证明了在标度点积注意力中的softmax归一化是充分的,但不是必要的。在没有softmax的情况下,可以证明线性化的Transformer变体的近似能力与逐层的Petrov-Galerkin投影相当,并且估计与序列长度无关。提出了一种新的层归一化方案,该方案模仿Petrov-Galerkin投影,以允许缩放通过注意层传播,这有助于模型在具有未归一化数据的算子学习任务中实现显着的准确性。最后,我们提出了三个操作学习实验,包括粘性Burgers方程,界面达西流,和反界面系数识别问题。新提出的简单的基于注意力的算子学习器Galerkin Transformer,在训练成本和评估精度方面都比其softmax归一化的同类算法有了显着的改进。
The Asymptotic Behavior of Attention in Transformers
Department of Applied Mathematics, ICAI School of Engineering, Comillas Pontifical University(应用数学系,ICAI工程学院,科利斯大学);Department of Electrical and Computer Engineering, University of California, Los Angeles(电气与计算机工程系,加州大学洛杉矶分校)
Vectorized Conditional Neural Fields: A Framework for Solving Time-dependent Parametric Partial Differential Equations
University of Stuttgart(斯图加特大学);Stuttgart Center for Simulation Science (SimTech)(斯图加特模拟科学中心);International Max Planck Research School for Intelligent Systems (IMPRS-IS)(国际马克斯·普朗克智能系统研究院)
Positional Knowledge is All You Need: Position-induced Transformer (PiT) for Operator Learning
Southern University of Science and Technology(南方科技大学);Shenzhen International Center for Mathematics(深圳国际数学中心);National Center for Applied Mathematics Shenzhen (NCAMS)(深圳国家应用数学中心)
NORCE Norwegian Research Centre(挪威研究中心);Department of Mathematics, Hong Kong Baptist University(香港浸会大学数学系);School of Data Science and Department of Operations and Risk Management, Lingnan University(岭南大学数据科学学院与运营及风险管理系)