Spock AGISystem2 is built on Vector Symbolic Architectures (VSA) — a framework where complex knowledge structures are constructed from just three primitive operations: Add, Bind, and Negate.

The Three Pillars

The VSA Trinity + ADD Superposition "A and B together" BIND Association "A relates to B" NEGATE Opposition "Not A"

+ Add (Superposition / Bundling)

Element-wise addition of two vectors. Creates a blend that is similar to both inputs.

Mathematical: result[i] = a[i] + b[i]
Semantic: "Contains both A and B"
Commutative: Add(A, B) = Add(B, A)
Associative: Add(Add(A,B), C) = Add(A, Add(B,C))
A + B = A+B Result is similar to BOTH inputs
Use Case: Building sets, accumulating evidence, creating prototypes
@mammals Dog Add Cat Add Horse // mammals is similar to all three concepts

Bind (Association / Hadamard Product)

Element-wise multiplication. Creates a result that is dissimilar to both inputs but encodes their relationship.

Mathematical: result[i] = a[i] × b[i]
Semantic: "The relationship between A and B"
Commutative: Bind(A, B) = Bind(B, A)
Self-inverse: Bind(Bind(A, B), B) ≈ A
A (Role) B (Filler) = A⊙B (Dissimilar to both!) Binding creates a NEW vector that encodes the pairing
Key Property: You can "unbind" to recover the original:
Bind(Socrates, Human) = fact Bind(fact, Human) ≈ Socrates // Unbinding!
Use Case: Role-filler bindings, relationships, predicate encoding
@owns John Bind Car // Creates a unique vector representing "John owns Car" @query Bind Car // "Who owns Car?" // Result will be similar to John

Negate (Logical Opposition)

Element-wise sign flip. Creates the opposite direction in conceptual space.

Mathematical: result[i] = -a[i]
Semantic: "The opposite of A"
Involutory: Negate(Negate(A)) = A
Cancellation: Add(A, Negate(A)) = Zero
A -A 180° Negate points in the exact opposite direction
Use Case: Logical NOT, contradiction, removal from sets
@notDog Dog Negate _ // notDog is maximally dissimilar to Dog @mammals Dog Add Cat Add Horse @notCats mammals Add (Cat Negate _) // Removes Cat from the set

Derived Operations

From these three primitives, Spock builds additional operations:

Operation Implementation Semantic
Move Add(state, delta) State transition
Modulate Scale by scalar OR Hadamard with vector Attention gating
Distance Cosine similarity Semantic similarity
Normalise v / ‖v‖ Project to unit sphere
Identity clone(v) Pass-through

Composition Example: Encoding a Fact

Let's encode "John loves Mary":

Encoding: "John loves Mary" John ⊙ AGENT "John is the agent" + loves ⊙ VERB "loves is the verb" + Mary ⊙ PATIENT "Mary is the patient" FACT "John loves Mary" as single vector Query: FACT ⊙ AGENT → similar to John!

The Power of Composition

With just Add, Bind, and Negate you can:

All while maintaining continuous, differentiable, noise-robust computations!

Kernel Verbs in SpockDSL

Verb Parameters Returns Example
Add vector, vector vector @sum A Add B
Bind vector, vector vector @rel X Bind Y
Negate vector, _ vector @notA A Negate _
Distance vector, vector scalar @sim A Distance B
Move vector, vector vector @next state Move delta
Modulate vector, scalar/vector vector @scaled v Modulate 0.5
Normalise vector, _ vector @unit v Normalise _
Identity vector, _ vector @copy v Identity _