The Fine-Grained Complexity of Gradient Computation for Training Large Language Models

Josh Alman, Zhao Song
2/3/2026

No confident code implementation found for this paper. 2 possible matches can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{alman2026finegrained,
  title  = {The Fine-Grained Complexity of Gradient Computation for Training Large Language Models},
  author = {Josh Alman and Zhao Song},
  year   = {2026},
  eprint = {2402.04497},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2402.04497},
  url    = {https://arxiv.org/abs/2402.04497},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.04497.svg)](https://codeofpaper.com/paper/2402.04497)

Discussion