The Fine-Grained Complexity of Gradient Computation for Training Large Language Models
Josh Alman, Zhao Song
Abstract
Large language models (LLMs) have made fundamental contributions over the last a few years. To train an LLM, one needs to alternatingly run forward' computations and backward' computations. The forward computation can be viewed as attention function evaluation, and the backward computation can be viewed as a gradient computation. In previous work by [Alman and Song, NeurIPS 2023], it was proved that the forward step can be performed in almost-linear time in certain parameter regimes, but that there is no truly sub-quadratic time algorithm in the remaining parameter regimes unless the popular hypothesis SETH is false. In this work, we show nearly identical results for the harder-seeming problem of computing the gradient of loss function of one layer attention network, and thus for the entire process of LLM training. This completely characterizes the fine-grained complexity of every step of LLM training.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4d7b68de-2826-4fd2-ab0b-6c961b70fbd2Cited by top-tier papers16
- The Closeness of In-Context Learning and Weight Shifting for Softmax RegressionShuai Li, Zhao Song, Yu Xia, Tong Yu et al.NeurIPS 2024 · 53 citations
- On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)Jerry Yao-Chieh Hu, Weimin Wu, Zhuoru Li, Sophia Pi et al.NeurIPS 2024 · 49 citations
- On Computational Limits of Modern Hopfield Models: A Fine-Grained Complexity AnalysisJerry Yao-Chieh Hu, Thomas Lin, Zhao Song, Han LiuICML 2024 · 47 citations
- Outlier-Efficient Hopfield Layers for Large Transformer-Based ModelsJerry Yao-Chieh Hu, Pei-Hsuan Chang, Haozheng Luo, Hong-Yu Chen et al.ICML 2024 · 46 citations
- Uniform Memory Retrieval with Larger Capacity for Modern Hopfield ModelsDennis Wu, Jerry Yao-Chieh Hu, Teng-Yun Hsiao, Han LiuICML 2024 · 44 citations
Builds on29
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
- SparseGPT: Massive Language Models Can be Accurately Pruned in One-ShotElias Frantar, Dan AlistarhICML 2023 · 1,240 citations
- A Simple and Effective Pruning Approach for Large Language ModelsMingjie Sun, Zhuang Liu, Anna Bair, J. Zico KolterICLR 2024 · 794 citations
- Fine-Tuning Language Models with Just Forward PassesSadhika Malladi, Tianyu Gao, Eshaan Nichani, Alex Damian et al.NeurIPS 2023 · 495 citations
Related papers
- Subquadratic Algorithms and Hardness for Attention with Any TemperatureShreya Gupta, Boyang Huang, Barna Saha, Yinzhan Xu et al.ICLR 2026 · 5 citations
- Fast Attention Requires Bounded EntriesJosh Alman, Zhao SongNeurIPS 2023 · 115 citations
- How to Protect Copyright Data in Optimization of Large Language Models?Timothy Chu, Zhao Song, Chiwun YangAAAI 2024 · 42 citations
- Algorithm and Hardness for Dynamic Attention Maintenance in Large Language ModelsJan van den Brand, Zhao Song, Tianyi ZhouICML 2024 · 35 citations
- Computational Limits of Low-Rank Adaptation (LoRA) Fine-Tuning for Transformer ModelsJerry Yao-Chieh Hu, Maojiang Su, En-Jui Kuo, Zhao Song et al.ICLR 2025
