Tensor Logic

A tiny visual companion to the mini paper & Python experiment

1. Idea in One Sentence

Logical relations, vector embeddings and probabilistic inference can all be written as tensor operations. By changing a single parameter – the temperature T – we move from strict symbolic logic to smooth analogical reasoning.

2. Symbolic Relation (Parent)

In the toy example, the world contains the facts Parent(Alice, Bob), Parent(Bob, Charlie), Parent(Charlie, David). As a matrix this becomes:

Figure 1: Boolean adjacency matrix of the Parent relation

3. Temperature & Sigmoid

Scores from the relation tensor are turned into probabilities via a logistic function with baseline and temperature. Low T behaves like hard logic, higher T allows graded analogy.

Figure 2: Two sigmoids for different temperatures (T=0.2 and T=1.5)

4. Toy World Query Results

The Python script prints both logical truth values and tensor scores. Here is a subset of the centred scores from one run:

Query Logic Score (centred)
Parent(Alice, Bob) True +0.54
Parent(Alice, Charlie) False +0.29
Parent(Alice, David) False -0.18

Note: Alice–Charlie is logically false for Parent, but the positive tensor score reveals the latent ancestral connection.

Figure 3: Tensor scores for three different query pairs

5. Systems View in One Diagram

In Tensor Logic, intelligence is not stored in one place. It is an emergent projection of how states, constraints and operations interact:

Embeddings
State vectors
Relations
Constraints / tensors
Operations
Contractions
Emergent reasoning (projection)