Deterministic encodings where arithmetic operations become vector operations: no training, no weights—structure by construction.
For a decade we've scaled parameters and tuned attention mechanisms. Models can discuss calculus and explain quantum mechanics, yet they still stumble on multiplication.
It's not a capacity problem; it's representation. Tokenize "1234" into arbitrary symbols and you're asking the model to rediscover—through gradient descent—that those symbols have algebraic structure, again and again.
FluxEM takes the opposite tack: encode numbers so that vector addition is arithmetic addition. The structure is given up front, not learned.
And it doesn't stop at arithmetic: physical units, molecular formulas, musical pitch classes, logical propositions—any domain with algebraic structure can be embedded so its operations become geometric.
Dimensional quantities with unit conversion and dimensional analysis
Molecular formulas with stoichiometric operations and mass balance
DNA sequences with GC content, melting temperature, translation
Complex numbers, matrices, vectors, polynomials, rationals
Propositional and predicate logic with satisfiability detection
Pitch classes, chords, scales, atonal set theory with TnI operations
Shapes with area, centroid, circumcenter, containment tests
Adjacency structures with connectivity, cycles, shortest paths
Finite sets and relations with union, intersection, composition
Prime factorization, modular arithmetic, Euler totient
Arrays, records, and tables as structured embeddings
# Install
pip install fluxem # or: pip install fluxem[jax]
# Use
from fluxem import create_unified_model
model = create_unified_model()
model.compute("12345 + 67890") # → 80235.0
model.compute("144 * 89") # → 12816.0
# Or work with specific domains
from fluxem.domains.music import AtonalSetEncoder, prime_form
from fluxem.domains.chemistry import MoleculeEncoder, Formula
enc = AtonalSetEncoder()
major = enc.encode([0, 4, 7]) # C major triad as pitch-class set
prime_form([0, 4, 7]) # → (0, 3, 7)
mol = MoleculeEncoder()
glucose = mol.encode(Formula.parse('C6H12O6'))