← Latest papers
💬 NLP

Modeling Next-Token Prediction as Left-Nested Intuitionistic Implication

This paper introduces the Arrow Language Model, a neural architecture that reinterprets next-token prediction as constructive proof extension via left-nested intuitionistic implications, thereby deriving a multiplicative RNN structure where sequence processing corresponds to modus ponens and order is preserved through non-commutative composition.

Original authors: Paul Tarau

Published 2026-01-29
📖 5 min read🧠 Deep dive

Original authors: Paul Tarau

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Idea: From "Guessing" to "Building"

Most modern AI models (like the ones you chat with) work a bit like a super-smart guesser. They look at the words you've typed, calculate how similar they are to words they've seen before, and predict what comes next based on statistical patterns. They treat words like ingredients in a soup, mixing them all together to get a flavor.

The author, Paul Tarau, proposes a different way to think about this. He suggests we stop treating words as ingredients to be mixed and start treating them as tools or operators that change the state of a machine.

Instead of asking, "What word usually follows this one?" the model asks, "If I apply this word as a rule to my current situation, what new situation do I create?"

The Core Analogy: The Domino Chain vs. The Mixing Bowl

The Old Way (Transformers): Imagine a mixing bowl. You throw in "The," "cat," and "sat." The AI swirls them all together, looking at how "cat" relates to "sat" and "The" relates to "cat" all at once. It uses a special "positional encoding" (like putting a tiny sticker on each word saying "I am #1," "I am #2") to remember the order.

The New Way (Arrow Model): Imagine a line of dominoes, but these aren't just falling; they are transforming each other.

  1. You start with a blank slate (the initial state).
  2. You place the word "The." This acts like a machine that changes the blank slate into a specific "The-state."
  3. You place "cat." This isn't just added to the pile; it is a machine that takes the "The-state" and transforms it into a "The-cat-state."
  4. You place "sits." This machine takes the "The-cat-state" and transforms it into a "The-cat-sits-state."

In this view, the order matters because you cannot put the "sits" machine before the "The" machine. The machines are "left-nested," meaning each new word wraps around the previous chain. If you swap the order, the machines don't fit together, and the chain breaks. This naturally preserves the order of the sentence without needing any special "sticker" labels.

The Logic: A Game of "If... Then..."

The paper uses a branch of math called Intuitionistic Logic. Think of this as a game of logical deduction.

  • The Setup: You have a list of assumptions (the words you've seen so far).
  • The Goal: You want to prove the next word is true.
  • The Mechanism: The model uses a rule called Modus Ponens. In plain English, this rule says: "If you have a rule that says 'If A, then B,' and you also have 'A,' you can conclude 'B'."

In the Arrow model:

  • The current state of the AI is the "A" (the assumption).
  • The next word is the "B" (the conclusion).
  • The word itself acts as the bridge (the implication) that turns the current state into the next state.

So, predicting the next word is exactly the same as completing a proof. The AI is building a logical argument step-by-step.

The "Arrow" Architecture

The author built a neural network called the Arrow Language Model to test this idea.

  • How it works: Instead of adding numbers together (like standard AI), this model multiplies and transforms numbers. Every word is a unique "operator" that twists and turns the current data.
  • Why it's cool: Because multiplication isn't commutative (meaning A×BA \times B is not the same as B×AB \times A), the order of the words is built into the math itself. You don't need to tell the computer "this word came first"; the math forces it to know.
  • The Result: The model successfully learned to predict the next word by acting like a logical proof engine. It proved that you can build a language model that thinks in terms of "proofs" rather than just "patterns."

The Experiments: Memorizing vs. Understanding

To test if this actually worked, the author did a few things:

  1. The "Overfitting" Test: They gave the model a tiny amount of text and asked it to memorize it perfectly. Standard AI models sometimes struggle with this if they are too complex, but the Arrow model did it easily. This proved the architecture was capable of learning the patterns.
  2. The "Retrieval" Test: They created a database of sentences. When they asked the model a partial sentence (e.g., "The cat..."), the model could look at its internal "proof state" and find the exact sentence it had memorized that started with those words.
  3. The Comparison: They compared this to a standard Prolog (a logic programming language) system. The AI's neural network behaved very similarly to the logical system, suggesting the math was doing what the logic said it should.

What This Means (According to the Paper)

The paper claims that:

  • We can view language generation as constructing a proof rather than just guessing the next word.
  • We can build AI that handles word order naturally through math operations (non-commutative composition) rather than artificial position tags.
  • This approach offers a clear, logical explanation for why the model works, bridging the gap between symbolic logic (like math proofs) and neural networks (like deep learning).

The author provides open-source code so others can try building these "proof-based" language models themselves. The paper stops short of claiming this will immediately replace all AI or solve complex real-world problems, but it successfully demonstrates that a logic-based approach to language modeling is not only possible but effective.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →