arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.18390cs.CLcs.LG
收藏

预训练Transformer中的涌现模块化

Emergent Modularity in Pre-trained Transformers

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(泉城实验室)

Zhengyan Zhang, Zhiyuan Zeng, Yankai Lin, Chaojun Xiao, Xiaozhi Wang, Xu Han, Zhiyuan Liu, Ruobing Xie, Maosong Sun, Jie Zhou

AI总结:

本文研究预训练Transformer中的模块化现象,发现神经元存在功能特化并能按功能分组为专家模块,且模块结构在预训练早期先于神经元功能稳定,表明Transformer先构建模块化结构再学习细粒度功能。

摘要:

本文研究了预训练Transformer中模块化的存在性,这一特征普遍存在于人类大脑中,并被认为对通用智能至关重要。类比人类大脑,我们考虑了模块化的两个主要特征:(1)神经元的功能特化:我们评估每个神经元是否主要特化于某一特定功能,结果发现答案是肯定的。(2)基于功能的神经元分组:我们探索寻找一种按功能将神经元分组为模块的结构,且每个模块为其对应功能服务。鉴于可能的结构数量极为庞大,我们聚焦于Mixture-of-Experts作为有前景的候选方案,它将神经元划分为专家,并通常针对不同输入激活不同的专家。实验结果表明存在功能专家,其中聚集了特化于某一特定功能的神经元。此外,扰动功能专家的激活会显著影响相应功能。最后,我们研究了模块化在预训练过程中如何涌现,发现模块化结构在早期阶段即趋于稳定,这比神经元稳定更快。这表明Transformer首先构建模块化结构,然后学习细粒度的神经元功能。我们的代码和数据可在https://github.com/THUNLP/modularity-analysis获取。

英文摘要:

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.

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

↑