Large Language Models: A Mathematical Formulation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Baptista, Ricardo, Stuart, Andrew, Tran, Son
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918314218881024
author Baptista, Ricardo
Stuart, Andrew
Tran, Son
author_facet Baptista, Ricardo
Stuart, Andrew
Tran, Son
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2601_22170
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Large Language Models: A Mathematical Formulation
Baptista, Ricardo
Stuart, Andrew
Tran, Son
Numerical Analysis
Machine Learning
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.
title Large Language Models: A Mathematical Formulation
topic Numerical Analysis
Machine Learning
url https://arxiv.org/abs/2601.22170