Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Beijing Key Laboratory of Big Data Management and Analysis Methods(大数据管理与分析方法北京市重点实验室);NLP Group, DCST, IAI, BNRIST, Tsinghua University(清华大学计算机科学与技术系、人工智能研究院、北京国家信息科学与技术研究中心自然语言处理组);International Innovation Center of Tsinghua University, Shanghai(清华大学上海国际创新中心);Pattern Recognition Center, WeChat AI, Tencent Inc(腾讯微信人工智能模式识别中心);Quan Cheng Laboratory(泉城实验室)
This work examines the presence of modularity in pre-trained Transformers, a feature commonly found in human brains and thought to be vital for general intelligence. In analogy to human brains, we consider two main characteristics of modularity: (1) functional specialization of neurons: we evaluate whether each neuron is mainly specialized in a certain function, and find that the answer is yes. (2) function-based neuron grouping: we explore finding a structure that groups neurons into modules by function, and each module works for its corresponding function. Given the enormous amount of possible structures, we focus on Mixture-of-Experts as a promising candidate, which partitions neurons into experts and usually activates different experts for different inputs. Experimental results show that there are functional experts, where clustered are the neurons specialized in a certain function. Moreover, perturbing the activations of functional experts significantly affects the corresponding function. Finally, we study how modularity emerges during pre-training, and find that the modular structure is stabilized at the early stage, which is faster than neuron stabilization. It suggests that Transformers first construct the modular structure and then learn fine-grained neuron functions. Our code and data are available at https://github.com/THUNLP/modularity-analysis.
The underlying structures of self-attention: symmetry, directionality, and emergent dynamics in Transformer training
Institute of Neuroinformatics, ETH Zürich and University of Zürich(神经信息学研究所,苏黎世联邦理工学院和苏黎世大学);Centre for Artificial Intelligence, Zürich University of Applied Sciences(人工智能研究中心,应用科学大学);ECLT European Centre for Living Technology, Venice, Italy(欧洲生命科技中心,威尼斯,意大利);ETH AI Center, Zürich, Switzerland(苏黎世联邦理工学院AI中心)
ORIGINS Data Science Lab(ORIGINS数据科学实验室);Technical University Munich(慕尼黑技术大学);Department of Mathematics(数学系);Harvard University(哈佛大学);Departement Mathematik(数学系);ETH Zürich(苏黎世联邦理工学院)
Circuit Compositions: Exploring Modular Structures in Transformer-Based Language Models
MaiNLP, Center for Information and Language Processing, LMU Munich(MaiNLP、信息与语言处理中心、慕尼黑大学);Munich Center for Machine Learning (MCML), Munich(慕尼黑机器学习中心);Language Technology Group, University of Oslo(语言技术组、奥斯陆大学)