# Ternary Gamma Semirings: From Neural Implementation to Categorical Foundations

Source: [Ternary Gamma Semirings: From Neural Implementation to Categorical Foundations](<https://www.sota2.com/research/paper/69c0c9030636e5bf4afc3b6e>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-03-24T05:00:03.763Z

Authors: Ruoqi Sun

Published: 2026-03-15T14:56:33.000Z

## Abstract

This paper establishes a theoretical framework connecting neural network learning with abstract algebraic structures. We first present a minimal counterexample demonstrating that standard neural networks completely fail on compositional generalization tasks (0% accuracy). By introducing a logical constraint -- the Ternary Gamma Semiring -- the same architecture learns a perfectly structured feature space, achieving 100% accuracy on novel combinations. We prove that this learned feature space constitutes a finite commutative ternary $\\Gamma$-semiring, whose ternary operation implements the majority vote rule. Comparing with the recently established classification of Gokavarapu et al., we show that this structure corresponds precisely to the Boolean-type ternary $\\Gamma$-semiring with $\|T\|=4$, $\|\\Gamma\|=1$}, which is unique up to isomorphism in their enumeration. Our findings reveal three profound conclusions: (i) the success of neural networks can be understood as an approximation of mathematically \`\`natural'' structures; (ii) learned representations generalize because they internalize algebraic axioms (symmetry, idempotence, majority property); (iii) logical constraints guide networks to converge to these canonical forms. This work provides a rigorous mathematical framework for understanding neural network generalization and inaugurates the new interdisciplinary direction of Computational $\\Gamma$-Algebra.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Classification on XOR task (test)](<https://www.sota2.com/research/sota/classification-on-xor-task-test.md>): Classification; XOR task (test); Accuracy (XOR Test): 100.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2603.19317>)

[PDF](<https://arxiv.org/pdf/2603.19317.pdf>)
