arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.01329cs.LGcs.AI
收藏

神经ODE Transformer:分析内部动力学与自适应微调

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(高通越南有限公司)

Anh Tong, Thanh Nguyen-Tang, Dongeun Lee, Duc Nguyen, Toan Tran, David Hall, Cheongwoong Kang, Jaesik Choi

AI总结:

本文提出神经ODE Transformer模型,通过非自治神经常微分方程参数化Transformer权重为连续层索引的函数,经谱分析和李雅普诺夫指数提升可解释性,性能相当或更优且支持灵活微调。

摘要:

基于Transformer架构的大型语言模型(LLMs)的最新进展引发了人们对其内部工作机制的极大兴趣。本文提出了一种使用高度灵活的非自治神经常微分方程(ODEs)对Transformer架构进行建模的新方法。该模型通过神经网络对注意力和前馈块的所有权重进行参数化,将这些权重表示为连续层索引的函数。通过对模型动力学的谱分析,我们发现特征值幅度的增加对现有理论研究中普遍存在的权重共享假设提出了挑战。我们还利用李雅普诺夫指数检查token级敏感性,增强了模型的可解释性。我们的神经ODE Transformer在各种配置和数据集上表现出与普通Transformer相当或更优的性能,同时提供了可适应不同架构约束的灵活微调能力。

英文摘要:

Recent advancements in large language models (LLMs) based on transformer architectures have sparked significant interest in understanding their inner workings. In this paper, we introduce a novel approach to modeling transformer architectures using highly flexible non-autonomous neural ordinary differential equations (ODEs). Our proposed model parameterizes all weights of attention and feed-forward blocks through neural networks, expressing these weights as functions of a continuous layer index. Through spectral analysis of the model's dynamics, we uncover an increase in eigenvalue magnitude that challenges the weight-sharing assumption prevalent in existing theoretical studies. We also leverage the Lyapunov exponent to examine token-level sensitivity, enhancing model interpretability. Our neural ODE transformer demonstrates performance comparable to or better than vanilla transformers across various configurations and datasets, while offering flexible fine-tuning capabilities that can adapt to different architectural constraints.

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

↑