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.
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.
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.
The RelationPermuter in the Geometry Layer manages permutation tables:
| Operation | Description |
|---|---|
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.
Relations can have additional properties that affect how they're processed. See the Relations Theory page for details: