DEV Community

Flavio Venturini
Flavio Venturini

Posted on

CELN: A CPU-only deterministic reasoning engine using Vector Symbolic Architectures

I wanted to share a project I've been working on: CELN (C. Elegans Learning Network). It's a logical reasoning engine that uses Vector Symbolic Architectures (VSA) instead of neural networks.

I originally built this because I wanted to explore whether formal logical reasoning could be implemented entirely with deterministic vector algebra, rather than learned statistical models.

How it works (briefly):

  • Concepts are encoded as 10,000-dimensional vectors
  • A non-commutative binding operator (Projective Resonance) composes and decomposes logical statements
  • The binding algebra produces a query-key similarity computation mathematically similar to Q·K^T attention, although without learned parameters
  • Deduction happens through deterministic linear algebra, not probability

I evaluated CELN on the ProofWriter benchmark, which tests logical reasoning across three classes: True, False, and Unknown.

Results (Ryzen 2600):

  • ProofWriter: 500/500 (100%)
  • Stress test (5,000 examples): still 100%
  • Latency: ~34.7ms per query
  • RAM: 493MB peak

The "Unknown" class is interesting because CELN returns "no proof possible" whenever no derivation exists — the algebra simply doesn't resolve.

Limitations: CELN is a logic core, not a chatbot. It doesn't generate text fluently yet. Rules are currently hand-crafted; automatic extraction from natural language is the next step.

Background: I designed the architecture and math. The Python implementation was done with the help of AI assistants — I treated them as a compiler for the mathematical blueprint, reviewing and debugging every iteration.

I'm 15, from Brazil. No research lab, no GPU cluster, no advisor. Built this on a home PC.

Try it (no heavy downloads):
git clone https://github.com/Ravi4649/celn && cd celn && python examples/step_by_step_en.py

GitHub: https://github.com/Ravi4649/celn
Paper (DOI): https://doi.org/10.5281/zenodo.20836283

I'm especially interested in where people think this approach will fail. Happy to answer questions.

Top comments (2)

Collapse
 
dipankar_sarkar profile image
Dipankar Sarkar

Impressive, and the honesty about hand-crafted rules is the right place to point. My bet on where it breaks is exactly there: rule acquisition, not inference. ProofWriter hands you clean rules, so the deterministic core shines. The moment you extract rules from natural language you reintroduce the statistical model you removed, and the determinism guarantee stops at that boundary.

Second thing to watch: binding capacity. In a 10k-dim VSA, superposition noise grows as you chain bindings, and cleanup memory has a crossover point where it starts returning the wrong nearest neighbor. 100% on ProofWriter probably reflects shallow proof depth. Worth reporting accuracy bucketed by required derivation depth. That curve is where VSA reasoning usually starts to bend. Strong work for a home PC.

Collapse
 
ravi4649 profile image
Flavio Venturini

Good points. The rule extraction problem is exactly what I'm working on next — Inductive Chainer, algebraic extraction without LLMs. Still early. On binding capacity: honestly still learning the math there, but the non-commutative binding helps. The 5k stress test held 100%, but bucketing by depth is a good idea I'll try.