equiv_orthogonal_projection#
- equiv_orthogonal_projection(W, rep_x, rep_y)[source]#
Orthogonally project a linear map onto \(\mathrm{Hom}_{\mathbb{G}}(\rho_{\mathcal{X}},\rho_{\mathcal{Y}})\).
Let \(\rho_{\mathcal{X}}\) and \(\rho_{\mathcal{Y}}\) be two group representations of the group \(\mathbb{G}\), acting on vector spaces \(\mathcal{X}\) and \(\mathcal{Y}\) respectively. Given any linear map between the spaces \(\mathbf{W}: \mathbb{R}^{|\mathcal{X}|\times|\mathcal{Y}|}\), this function returns the orthogonal projection of \(\mathbf{W}\) onto the space of \(\mathbb{G}\)-equivariant linear maps between \(\mathcal{X}\) and \(\mathcal{Y}\), that is onto \(\mathrm{Hom}_{\mathbb{G}}(\rho_{\mathcal{X}},\rho_{\mathcal{Y}})\):
\[\Pi_{\mathrm{Hom}_{\mathbb{G}}}(\mathbf{W}) = \operatorname*{argmin}_{\mathbf{A}\in\mathrm{Hom}_{\mathbb{G}}(\rho_{\mathcal{X}},\rho_{\mathcal{Y}})} \|\mathbf{W}-\mathbf{A}\|_F.\]Implementation uses the isotypic decomposition and projects each common-irrep block independently:
This projection is equivalent to the Reynolds/group-average operator, but more computational and memory efficient when the order of the group is large.
\[\Pi_{\mathrm{Hom}_{\mathbb{G}}}(\mathbf{A}) = \frac{1}{|\mathbb{G}|}\sum_{g\in\mathbb{G}} \rho_{\mathcal{Y}}(g)\,\mathbf{A}\,\rho_{\mathcal{X}}(g^{-1}).\]- Parameters:
W (
Tensor) – Dense map (or batch of maps) of shape \((..., D_y, D_x)\).rep_x (
Representation) – Input representation \(\rho_{\mathcal{X}}\).rep_y (
Representation) – Output representation \(\rho_{\mathcal{Y}}\).
- Returns:
Projected map(s) with same shape, dtype, and device as
W.- Return type:
- Shape:
W: \((..., D_y, D_x)\).
Output: \((..., D_y, D_x)\).