Neural ODE Transformers: Analyzing Internal Dynamics and Adaptive Fine-tuning
Anh Tong, Thanh Nguyen-Tang, Dongeun Lee, Duc Nguyen, Toan M. Tran, David Leo Wright Hall, Cheongwoong Kang, Jaesik Choi
Abstract
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 feedforward 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 weightsharing 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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Language Models are Few-Shot Learners
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
- Scalable Diffusion Models with Transformers cites Language Models are Few-Shot Learners
Cited by top-tier papers3
- Semantic Tube Prediction: Beating LLM Data Efficiency with JEPAHai Huang, Yann LeCun, Randall BalestrieroICML 2026 · 8 citations
- Recurrent Self-Attention Dynamics: An Energy-Agnostic Perspective from JacobiansAkiyoshi Tomihari, Ryo KarakidaNeurIPS 2025 · 5 citations
- IIET: Efficient Numerical Transformer via Implicit Iterative Euler MethodXinyu Liu, Bei Li, Jiahao Liu, Junhao Ruan et al.EMNLP 2025
Builds on16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 citations
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
Related papers
- Go with the flow: Adaptive control for Neural ODEsMathieu Chalvidal, Matthew Ricci, Rufin VanRullen, Thomas SerreICLR 2021 · 2 citations
- A Solvable Attention for Neural Scaling LawsBochen Lyu, Di Wang, Zhanxing ZhuICLR 2025
- Stateful ODE-Nets using Basis Function ExpansionsAlejandro F. Queiruga, N. Benjamin Erichson, Liam Hodgkinson, Michael W. MahoneyNeurIPS 2021 · 18 citations
- Learning to Encode Position for Transformer with Continuous Dynamical ModelXuanqing Liu, Hsiang-Fu Yu, Inderjit S. Dhillon, Cho-Jui HsiehICML 2020 · 139 citations
- Transformer Block Coupling and its Correlation with Generalization in LLMsMurdock Aubry, Haoming Meng, Anton Sugolov, Vardan PapyanICLR 2025
