Neural Isomorphic Fields: A Transformer-based Algebraic Numerical Embedding
Hamidreza Sadeghi, Saeedeh Momtazi, Reza Safabakhsh
TL;DR
Neural Isomorphic Fields (NIF) establish a transformer-based approach to embed rational numbers as fixed-length vectors while preserving key algebraic properties. Numbers are encoded as digit sequences and mapped to embeddings that aim to form an ordered field isomorphic to $Q$, with an Abelian Neural Operator and neural order enforcing addition, multiplication, and ordering constraints through dedicated losses. Empirical results show addition properties are robust (≈95–99% accuracy on core tests) while multiplication remains more challenging (≈53–73% across tests), highlighting both promise and areas for improvement. The work offers a path toward algebraically faithful number embeddings with potential impact on domains requiring precise arithmetic reasoning in neural models.
Abstract
Neural network models often face challenges when processing very small or very large numbers due to issues such as overflow, underflow, and unstable output variations. To mitigate these problems, we propose using embedding vectors for numbers instead of directly using their raw values. These embeddings aim to retain essential algebraic properties while preventing numerical instabilities. In this paper, we introduce, for the first time, a fixed-length number embedding vector that preserves algebraic operations, including addition, multiplication, and comparison, within the field of rational numbers. We propose a novel Neural Isomorphic Field, a neural abstraction of algebraic structures such as groups and fields. The elements of this neural field are embedding vectors that maintain algebraic structure during computations. Our experiments demonstrate that addition performs exceptionally well, achieving over 95 percent accuracy on key algebraic tests such as identity, closure, and associativity. In contrast, multiplication exhibits challenges, with accuracy ranging from 53 percent to 73 percent across various algebraic properties. These findings highlight the model's strengths in preserving algebraic properties under addition while identifying avenues for further improvement in handling multiplication.
