Lattice Deduction Transformers

Liam Davis, Leopold Haller, Alberto Alfarano, Mark Paul SantolucitoNeurIPS 2026

TL;DR

What happens if you force a tiny neural network to think like a classical constraint solver—tracking partial knowledge, crossing off impossible choices, and guessing only when it gets stuck? You get the Lattice Deduction Transformer (LDT), an 800,000-parameter model that crushes much larger recurrent reasoners on brutal logic puzzles using less than 2% of their training compute. Even better, because its internal state is explicitly structured around logical possibilities, it almost never hallucinates: it either finds the right answer or knows enough to say "I abstain."

What Problem Does This Paper Address?

Right now, "reasoning" in AI mostly means Chain-of-Thought—models talking to themselves in tokens until an answer pops out. Meanwhile, specialized small recurrent reasoners (like Universal Transformers or Tiny Recursive Models) reason by passing opaque, continuous latent vectors from one loop to the next.

Compare that to how classical automated reasoners (like SAT solvers) work, or how you solve a Sudoku late at night. You don't hallucinate a finished grid; you pencil in tiny candidate numbers in each square and iteratively cross out the impossible ones. If you hit a contradiction, you backtrack. Neural latent spaces are great at fuzzy analogies ("king − man + woman ≈ queen"), but they lack clean logical operations like AND, OR, and contradiction. Because of this, standard neural reasoners can't easily integrate with symbolic search—and when they fail, they tend to confidently guess wrong rather than abstain.

Methods

The authors borrow a page from static program analysis called abstract interpretation, structuring the model’s knowledge as a mathematical lattice.

  • At the top of the lattice ($\top$), anything is possible (every cell in a $9\times9$ Sudoku could be digits 1 through 9).
  • Moving down the lattice means gaining precision by eliminating candidates.
  • Hitting the bottom ($\perp$) means a contradiction—no valid solution remains.

Instead of passing hidden embeddings between outer reasoning steps, LDT projects its state directly onto this interpretable lattice (represented as a multi-hot binary grid of "alive" candidates, plus a dedicated conflict token).

LDT alternates between neural deduction on a lattice of candidate sets and stochastic branching.

Here is how the pieces fit together:

  1. Recurrent Deduction: Inside a single deduction step, a 4-layer transformer unrolls for 16 internal iterations to output probabilities for which candidates are still viable, plus a conflict score. Any candidate falling below a confidence threshold is crossed off.
  2. Search via Branching: If a deduction step doesn't finish the puzzle or trigger a conflict, the solver branches—picking an undecided cell and pinning it to a candidate digit—before running the transformer again. At test time, many parallel chains search simultaneously.
  3. Asymmetric Loss for Soundness: Crossing off a true candidate ruins a solve forever, while keeping a false one just slows you down. The authors use an asymmetric binary cross-entropy loss (penalizing false eliminations $8\times$ more than false retentions) to make the neural network empirically sound.
  4. On-Policy Training & The $\alpha$ Operator: LDT trains on its own partially solved search rollouts, keeping training and test states aligned. What if a puzzle has millions of valid answers (like shortest paths in a maze)? Standard supervised learning arbitrarily punishes the model for picking valid Path B over reference Path A. Using an abstraction operator ($\alpha$), LDT computes the bit-level OR across up to $K$ sampled valid solutions still consistent with the current board, supervising the model against all surviving ground truths simultaneously.
Figure 2: α and γ form a Galois connection with γ ◦α ⊇idC and α ◦γ ⊑idA.

Datasets

  • Sudoku-Extreme: An existing benchmark of notoriously hard $9\times9$ Sudokus with unique solutions (trained on just 1,000 puzzles with symmetry augmentations; tested on 422,786 puzzles).
  • Snowflake Sudoku: Variable-sized puzzles made of $n$ joined hexagons ($6n$ triangular cells) with randomized layouts. The authors generate minimal puzzles that simple "naked/hidden singles" rules cannot solve, testing both in-distribution performance and zero-shot size generalization (e.g., training on orders 6–8, testing on 9–10).
  • Maze-Hard: An existing benchmark of $30\times30$ mazes where shortest paths exceed 110 steps and millions of tied shortest paths exist (1,000 training mazes).

Key Insights and Ideas

  • Training buys shorter searches: Because LDT separates deduction from search, you can literally watch the train/test compute trade-off happen. Training an LDT from 1K to 4K steps shrinks the median number of forward passes needed to solve a Sudoku by $7\times$ (from 1,142 down to 162)—better intuition means less guessing.
  • Empirical soundness unlocks abstention: Neural networks don't come with formal proofs, so LDT isn't guaranteed sound. Yet on Sudoku-Extreme, across 1.27 million puzzle evaluations, it returned a wrong answer only 4 times. Every other failure was a clean timeout (abstention).
  • Multi-solution supervision sharpens reasoning: On Maze-Hard, supervising with $K=512$ sampled shortest paths via the $\alpha$ operator adds only ~4% per-step training overhead over $K=1$, yet substantially boosts accuracy and shortens test-time search. Most of the gain kicks in with just a handful of solutions.

Key Results

  • Sudoku-Extreme: An 800K-parameter LDT trained for 13 minutes on one B200 GPU solves 99.988% of the test set (1,000 search rounds) and 99.999% (10,000 rounds), using $<2\%$ of the training FLOPs of prior recurrent models like HRM (55.4% accuracy) and TRM (79.5%). A portfolio of 15 models requiring 3-way agreement hits 100% accuracy with zero errors.
Sudoku-Extreme accuracy vs. total training and inference compute.
  • Snowflake Sudoku: Solves 100% of in-distribution puzzles (vs. 88.9% for direct cross-entropy prediction on 1K puzzles) and generalizes zero-shot from orders 6–8 to larger orders 9–10 at 99.4% accuracy (vs. 78.4% for direct prediction).
  • Maze-Hard: A 1.8M-parameter LDT reaches 99.0% accuracy at $K=1$ and 99.8% at $K=512$, outperforming TRM (91.9%) and HRM (84.6%) at a fraction of the training FLOPs. (Unlike Sudoku, Maze-Hard is not empirically sound; its rare misses are valid paths that are usually just 2 steps too long).

Limitations and Future Work

LDT shines when a domain has fixed, universal rules that the network can bake into its weights. When tested on ARC-AGI—a programming-by-example benchmark where every puzzle invents its own bespoke rules on the fly—a naive port of LDT plateaus around a 36% pass rate, and test-time search doesn't help because the conflict detector becomes unreliable on unfamiliar rules. To bridge this gap, the authors suggest incorporating deeper cross-step recursive machinery or moving to a more ambitious abstract domain altogether: a lattice over programs that generate solutions, rather than just the solution grids themselves.

Summary updated

Abstract

We introduce the Lattice Deduction Transformer (LDT), a recurrent transformer that approximates logically sound deduction by projecting its latent state through a lattice between forward passes. We train on-policy in a process that mirrors deduction in a search-based constraint solver and supervise training via a domain-agnostic approximation of the set of solution candidates based on abstract interpretation. An $800$K-parameter LDT outperforms prior small recurrent reasoners on Sudoku-Extreme with under $2$% of their estimated training FLOPs, solving $99.999$% of the $422{,}786$ test puzzles. The model is nearly always sound, in that it gives a wrong answer for $4$ of $1.27$M puzzle evaluations, and otherwise returns a correct answer or abstains. A $1.8$M-parameter LDT variant reaches $99.8$% accuracy on Maze-Hard. Our code is available at github.com/lcrh/lattice-deduction-transformers.
BibTeX
@inproceedings{davis2026lattice,
  author = {Liam Davis and Leopold Haller and Alberto Alfarano and Mark Paul Santolucito},
  title = {{Lattice Deduction Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=TToxD2UYY6},
}
Figure