On the (Intuitionistic) Logic of Next-Token Prediction
Paul Tarau
Abstract
We model in intuitionistic implicational logic the key enabler of today's GenerativeAI: the next-token prediction in autoregressive causal neural networks. In our framework, next-token prediction corresponds to modus ponens, and sequence processing becomes constructive proof extension under the Curry-Howard correspondence. Our Prolog-based specialized theorem provers validate fundamental properties of the neural models, among which relations between commutative vs. non-commutative sequencing and single-token vs. multi-token prediction choices. We derive a neural architecture equivalent to multiplicative RNNs that arises naturally from a proof-theoretic interpretation of next-token prediction as nested intuitionistic implication and position the model relative to transformers, state-space models and recursive LLMs.
Create a lesson
Related papers
MightyPPL : Towards model checking MTL
Hsi-Ming Ho, Shankara Narayanan Krishna, Khushraj Madnani et al.
Counting on Nowhere Dense Classes
Steffen van Bergerem, Nicole Schweikardt
Towards a Proof-Theoretic Analysis of Incorrect/Incomplete Proofs
Matthias Baaz, Mariami Gamsakhurdia
Descriptive Complexity in Lean: Completeness by First-Order Reductions
Pierre Senellart, Anton Gnatenko
Predictable Modelling and Analysis of Software-defined Vehicle Implementations
Pavlo Tokariev, Yosri Ayari, Julien Deantoni
Refining Timing Uncertainty from Logical Time Specification to Operation
Pavlo Tokariev, Julien Deantoni