Large Language Models: A Mathematical Formulation

Ricardo Baptista, Andrew Stuart, Son Tran
1/21/2026
math.NAcs.LGstat.ML

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

Abstract

Large language models (LLMs) process and predict sequences containing text to answer questions, and address tasks including document summarization, providing recommendations, writing software and solving quantitative problems. We provide a mathematical framework for LLMs by describing the encoding of text sequences into sequences of tokens, defining the architecture for next-token prediction models, explaining how these models are learned from data, and demonstrating how they are deployed to address a variety of tasks. The mathematical sophistication required to understand this material is not high, and relies on straightforward ideas from information theory, probability and optimization. Nonetheless, the combination of ideas resting on these different components from the mathematical sciences yields a complex algorithmic structure; and this algorithmic structure has demonstrated remarkable empirical successes. The mathematical framework established here provides a platform from which it is possible to formulate and address questions concerning the accuracy, efficiency and robustness of the algorithms that constitute LLMs. The framework also suggests directions for development of modified and new methodologies.

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{baptista2026large,
  title  = {Large Language Models: A Mathematical Formulation},
  author = {Ricardo Baptista and Andrew Stuart and Son Tran},
  year   = {2026},
  eprint = {2601.22170},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.22170v1}
}

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/2601.22170.svg)](https://codeofpaper.com/paper/2601.22170)

Discussion