K2

K² · Artificial intelligence

One math trick unifies four ways AI reasons about truth

DS
TM

Daniel Romero Schellhorn, Till Mossakowski, Björn Gehrke

3 authors · cs.AI, cs.LG, cs.LO, math.CT, math.LO, math.PR

arXiv preprintArtificial intelligenceJun 2026 · ~65s read

Like explaining it at the dinner table.

There are at least four different ways to teach a machine to combine hard logic with learned guesses. Classical logic says things are simply true or false. Fuzzy logic allows shades of "mostly true." Probabilistic systems assign odds. Neural systems learn from examples. Each defines "truth" with its own rules, and they don't talk to each other.

This paper, NeSyCat Torch, gives them all one shared definition. The trick is a piece of math called a monad — think of it as a swappable cartridge that tells the system what "a truth value" even means: a yes/no, a probability, a fuzzy score. Write your reasoning once, then snap in a different cartridge to get a different style of logic. Nothing else in your code changes.

The authors plug in neural networks to recognize raw inputs (like handwritten digits), then let the logic layer combine those guesses. To train it without numbers blowing up to zero or infinity, they work in a "log" scale and skip computing branches that can't affect the answer.

On the standard test of adding two handwritten digits, their versions beat two rival systems (LTN and DeepProbLog) on both speed and accuracy, and nearly match a third (DeepStochLog) — while staying general enough to cover many approaches at once. One gap: extending it to continuous probabilities is sketched in theory but not yet built.

Why you should care: Right now, every neurosymbolic AI is a custom build. This makes them interchangeable parts you can swap and compare without rewriting from scratch.

arXiv preprint — these findings haven’t been peer-reviewed yet. Treat them as early results, not settled science.