Although transformers have demonstrated impressive capabilities for in-context learning (ICL) in practice, theoretical understanding of the underlying mechanism that allows transformers to perform ICL is still in its infancy. This work aims to theoretically study the training dynamics of transformers for in-context classification tasks. We demonstrate that, for in-context classification of Gaussian mixtures under certain assumptions, a single-layer transformer trained via gradient descent converges to a globally optimal model at a linear rate. We further quantify the impact of the training and testing prompt lengths on the ICL inference error of the trained transformer. We show that when the lengths of training and testing prompts are sufficiently large, the prediction of the trained transformer approaches the ground truth distribution of the labels. Experimental results corroborate the theoretical findings.
Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures
Shanghai Center for Mathematical Sciences, Fudan University(复旦大学上海数学中心);Department of Statistics and Data Science, School of Management, Fudan University(复旦大学管理学院统计与数据科学系)
Improving Transformers with Probabilistic Attention Keys
FPT Software AI Center(FPT软件人工智能中心);University of California, Los Angeles(加州大学洛杉矶分校);VinUniversity(文大);Deezer Research(Deezer研究院);Rice University(莱斯大学);The University of Texas at Austin(德克萨斯大学奥斯汀分校)
多头注意力是最先进的Transformers背后的驱动力,它在各种自然语言处理(NLP)和计算机视觉任务中实现了卓越的性能。已经观察到,对于许多应用,这些注意力头学习冗余嵌入,并且其中大多数可以在不降低模型性能的情况下被移除。受此启发,我们提出了Transformer与混合高斯密钥(transformer-MGK),一种新的Transformer架构,取代冗余的头在每个头的混合密钥的变压器。这些键的混合遵循高斯混合模型,并允许每个注意力头有效地集中在输入序列的不同部分。与传统的Transformer相比,Transformer-MGK加速了训练和推理,参数更少,需要计算的FLOP更少,同时在任务中实现了相当或更好的准确性。transformer-MGK也可以很容易地扩展到使用线性注意力。我们经验证明了Transformer-MGK在一系列实际应用中的优势,包括语言建模和涉及很长序列的任务。在Wikitext-103和Long Range Arena基准测试中,具有4个头的Transformer-MGK获得了与具有8个头的基线Transformers相当或更好的性能。
Mixture-of-Transformers Learn Faster: A Theoretical Study on Classification Problems
Department of ECE The Ohio State University(电子工程系,俄亥俄州立大学);Department of CSE The Ohio State University(计算机科学与工程系,俄亥俄州立大学);Department of Computer Science University of Houston(计算机科学系,休斯顿大学);Department of ECE Department of CSE The Ohio State University(电子工程系、计算机科学与工程系,俄亥俄州立大学)
Conditional Capacity and Routing in Mixture-of-Experts Particle Transformers
University of California San Diego(加州大学圣迭戈分校);University of Illinois at Chicago(伊利诺伊大学芝加哥分校);Fermi National Accelerator Laboratory(费米国家加速器实验室);University of California Davis(加州大学戴维斯分校)
Mammo-Mamba: A Hybrid State-Space and Transformer Architecture with Sequential Mixture of Experts for Multi-View Mammography
Concordia Institute for Information Systems Engineering (CIISE)(康科德信息系统工程研究所);Concordia University(康科德大学);Thomas Jefferson University Hospital(托马斯·杰斐逊大学医院)
Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models
The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen Institute of Artificial Intelligence and Robotics for Society (AIRS)(深圳市人工智能与机器人研究院);Zhejiang University(浙江大学);Westlake University(西湖大学);SII;Research Center for Industries of the Future, Westlake University(西湖大学未来产业研究中心);Tencent AI Lab(腾讯AI Lab)
NeuroMoE: A Transformer-Based Mixture-of-Experts Framework for Multi-Modal Neurological Disorder Classification
Department of Electrical and Computer Engineering, University of Houston(电气与计算机工程系,休斯顿大学);Department of Information Science Technology, University of Houston(信息科学与技术系,休斯顿大学);Movement Disorders & Neurodegenerative Diseases Division, University of Texas Health Science Center at Houston(运动障碍与神经退行性疾病部门,德克萨斯大学健康科学中心休斯顿分部);Department of Neurology at McGovern Medical School, University of Texas Health Science Center at Houston(神经病学系,麦戈文医学学校,德克萨斯大学健康科学中心休斯顿分部);Department of Psychology, The City College of New York(心理学系,纽约城市大学)
Mixture-of-Experts Operator Transformer for Large-Scale PDE Pre-Training
University of Science and Technology of China(中国科学技术大学);CAS Key Laboratory of Technology in GIPAS, University of Science and Technology of China(中国科学技术大学)