LogicVirtual Mind

Research note / TL—001

Working thesis · Public implementation

Reasoning should have a visible structure.

Tensor Logic studies how facts, relations, constraints, and learned representations can be expressed through tensor equations—so parts of a reasoning process can be composed, scored, and tested outside free-form language generation.

ProgramTensor Logic
ImplementationOpen source
LicenseMIT

Working thesis / 01

Fluent generation is not the same as explicit inference.

01Language models are powerful systems for prediction and synthesis. Yet when a task depends on named relations, multi-step composition, or hard constraints, the structure supporting an answer may remain implicit in generated text.

02Tensor Logic treats tensors as facts and learned relations, and equations as programs over them. The aim is not to replace language models, but to give selected parts of an agent system a representation that can be inspected and evaluated directly.

03Within VMLogic, this makes Tensor Logic a candidate reasoning substrate between durable memory and model inference: memory preserves structured experience; tensor operations compose relevant relations; the language model interprets and communicates the result.

Minimal formalism / 02

Entities become vectors. Relations become transformations.

In the public implementation, a relation can be represented by a learned matrix. Candidate triples are scored through a bilinear operation.

score(s, r, o) = sᵀ Wᵣ o
s subject embeddingWᵣ relation matrixo object embedding
Composition examplefounded(Alice, Acme)develops(Acme, Atlas)
founded ∘ developsAlice → Atlas

The same general system can operate in strict Boolean settings or continuous, learnable settings. The exact guarantees depend on the chosen mode and data, not on the name Tensor Logic alone.

Public implementation / 03

Several reasoning regimes, one tensor vocabulary.

01

Boolean programs

Forward and backward chaining over discrete facts and rules for tasks that require explicit deductions.

02

Embedding-space reasoning

Learn entity embeddings and relation matrices, then rank candidate subjects or objects with relation-aware scores.

03

Learned composition

A gated multi-hop composer can learn useful relation paths from examples rather than requiring every path to be written by hand.

04

Predicate invention

RESCAL factorization is used experimentally to surface latent relational structure in a knowledge base.

Technical boundaries / 04

Adjacent systems solve different parts of the problem.

SystemPrimary roleWhat remains
Vector retrieval

Find context similar to a query.

Composition and constraints live outside retrieval.

Knowledge graph

Store named entities and edges.

Inference needs rules, traversal, or a learned scorer.

Language model

Predict and synthesize flexible language.

The supporting relation path may remain implicit.

Tensor Logic

Compose and score explicit relation operators.

Requires a structured domain, entities, and relations.

Tensor Logic is not an open-ended search engine or a general free-form question-answering system. Structured queries, registered entities, candidate sets, and trained or defined relations remain part of the contract.

Public evidence / 05

A reproducible benchmark, with a bounded claim.

The repository reports filtered link-prediction results for TensorLogic RESCAL on FB15k-237: 14,541 entities, 237 relations, and roughly 310,000 triples.

MRR0.347
H@10.258
H@30.382
H@100.524

These numbers are evidence for this implementation and benchmark protocol. They are not evidence that the same performance transfers to open-domain agent memory, free-form reasoning, or a production workload.

Available now in the public repository

  • Boolean and continuous examples
  • Embedding-space relation scoring
  • Multi-hop composition experiments
  • RESCAL predicate-invention experiments
  • FB15k-237 training and evaluation script

Documented limits

  • Entities and relations must be registered or learned in the working domain.
  • Open-ended web search and free-form QA are outside the library’s current purpose.
  • Typed embedding spaces and a general Datalog solver are not yet implemented.
  • Integration with persistent agent memory remains an active VMLogic research direction.

VMLogic / Tensor Logic

Memory preserves structure. Reasoning composes it.

Return to VMLogic research Explore VMLogic Harness