Permutation binding is the technique AGISystem2 uses to encode relations into vector representations. Each relation has a unique permutation that reorders the dimensions of the object vector before combining it with the subject. This encodes role information without increasing dimensionality.

v(Subject) "Dog" v(Object) "Animal" π_IS_A permute dims π(v(Object)) reordered + Fact vector encode(S, R, O) = v(S) + πR(v(O)) Different relations use different permutations: π_IS_A ≠ π_CAUSES ≠ π_LOCATED_IN

Encoding a fact: The object vector is permuted according to the relation type, then added to the subject vector. Each relation (IS_A, CAUSES, etc.) has its own unique permutation table, encoding role information into the combined vector.

Why Permutations?

The key insight is that permutation preserves vector properties (magnitude, sparsity) while creating a distinguishable representation. When you permute "Animal" with the IS_A permutation and add it to "Dog", you get a different vector than if you permuted "Animal" with CAUSES and added it. This lets the system distinguish "Dog IS_A Animal" from "Dog CAUSES Animal" using the same vector dimensionality.

Permutations are also invertible. Given a fact vector and the subject vector, you can apply the inverse permutation to recover information about the object. This enables bidirectional reasoning: finding what a subject relates to, or finding what relates to a given object.

Implementation

The RelationPermuter in the Geometry Layer manages permutation tables:

OperationDescription
permute(vector, relation) Apply forward permutation for encoding
unpermute(vector, relation) Apply inverse permutation for decoding
getPermutation(relation) Get the permutation table for a relation
registerRelation(name, props) Add a custom relation with generated permutation

Permutations are generated deterministically from the relation name using a seeded PRNG. This ensures reproducibility: the same relation always produces the same permutation across sessions and machines.

Relation Properties

Relations can have additional properties that affect how they're processed. See the Relations Theory page for details:

Related Documentation