Positional embeddings are group representations. This is how you find them, and this is also how you parameterize them to make them differentiable/learnable. To give a few examples:
Rotary positional embeddings are representations of the translation group. The -dimensional translation group is abelian, so its irreducible representations are all one-dimensional , specified by a momentum vector : . You can get a multi-dimensional representation by choosing several , which are your learnable parameters.
If you wanted RoPE embeddings to also preserve rotation (perhaps you have scenes viewed at arbitrary angles), you are looking for representations of the special Euclidean group. The irreducible representations in four dimensions are your familiar particles: electrons, protons, etc., and in general are parameterized by a momentum vector and a discrete spin vector. You would have to do some kind of annealing process to train the spin vector (or you could just make it constant).
If you want to do attention on quadtrees, well, what is the group? Suppose every node in the quadtree has local coordinates scaled to . Moving up/down/to a neighbor in the quadtree requires an affine transformation of the local coordinates, which compose, so we can label every node by its affine transformation to the root , where is the node’s translation in the image and is its depth in the tree. The finite-dimensional irreducible representations are parameterized by momentum vectors as well as a modulus and basis vectors and look like where permutes the basis vectors.
Positional embeddings are group representations. This is how you find them, and this is also how you parameterize them to make them differentiable/learnable. To give a few examples:
Rotary positional embeddings are representations of the translation group. The -dimensional translation group is abelian, so its irreducible representations are all one-dimensional , specified by a momentum vector : . You can get a multi-dimensional representation by choosing several , which are your learnable parameters.
If you wanted RoPE embeddings to also preserve rotation (perhaps you have scenes viewed at arbitrary angles), you are looking for representations of the special Euclidean group. The irreducible representations in four dimensions are your familiar particles: electrons, protons, etc., and in general are parameterized by a momentum vector and a discrete spin vector. You would have to do some kind of annealing process to train the spin vector (or you could just make it constant).
If you want to do attention on quadtrees, well, what is the group? Suppose every node in the quadtree has local coordinates scaled to . Moving up/down/to a neighbor in the quadtree requires an affine transformation of the local coordinates, which compose, so we can label every node by its affine transformation to the root , where is the node’s translation in the image and is its depth in the tree. The finite-dimensional irreducible representations are parameterized by momentum vectors as well as a modulus and basis vectors and look like where permutes the basis vectors.