- {
- “cells”: [
- {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“# Implementing New Representations”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“As our solver treats objects very generally, implementing new representations is surprisingly easy. To implement a new [Representation](https://emlp.readthedocs.io/en/latest/package/emlp.solver.reps.html#emlp.reps.Rep) you need to implement a rho(M) which is a mapping from the group elements to the representation matrix, as well as make sure to specify a self.G attribute for the given symmetry group. It’s also a good idea to implement a __str__ function to improve readability. You can optionally specify self.is_permutation=True if the representation acts as a permutation matrix, which enables pointwise Swish nonlinearities in EMLP.n”, “n”, “We will automatically generate implementations of drho(A) using autograd, as well as some bookkeeping functions size() which is the dimension of the representation, __eq__ and __hash__ for distinguishing different representations. In some fringe cases you may want to implement your own __eq__ and __hash__ functions.”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“## Example 1: Irreducible Representations of SO(2) “
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“As a first example, we show one can implement the real irreducible representations of the group SO(2). All of irreducible representations $\psi_n$ of SO(2) are $2$-dimensional (except for $\psi_0$ which is the same as [Scalar](https://emlp.readthedocs.io/en/latest/package/emlp.reps.html#emlp.reps.Scalar) $= \mathbb{R} = \psi_0$). These representations can be written $\psi_n(R_\theta) = \begin{bmatrix}\cos(n\theta) &\sin(n\theta)\\-\sin(n\theta) & \cos(n\theta) \end{bmatrix}$ or simply: $\psi_n(R) = R^n$.”
]
}, {
“cell_type”: “code”, “execution_count”: 1, “metadata”: {}, “outputs”: [], “source”: [
“import jax.numpy as jnpn”, “from emlp.reps import Rep,vis,V,equivariance_errorn”, “from emlp.groups import SO,Sn”, “n”, “class SO2Irreps(Rep):n”, ” """ (Real) Irreducible representations of SO2 """n”, ” def __init__(self,order):n”, ” assert order>0, "Use Scalar for 𝜓₀"n”, ” self.G=SO(2)n”, ” self.order = ordern”, ” def rho(self,M):n”, ” return jnp.linalg.matrix_power(M,self.order)n”, ” def __str__(self):n”, ” number2sub = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉")n”, ” return f"𝜓{self.order}".translate(number2sub)”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“That’s it! Now we can use the SO(2) irreps in the type system, and solve for equivariant bases that contain them.”
]
}, {
“cell_type”: “code”, “execution_count”: 2, “metadata”: {}, “outputs”: [], “source”: [
“psi1 = SO2Irreps(1)n”, “psi2 = SO2Irreps(2)n”, “psi3 = SO2Irreps(3)”
]
}, {
“cell_type”: “code”, “execution_count”: 3, “metadata”: {}, “outputs”: [
- {
- “data”: {
- “text/plain”: [
“𝜓₃+𝜓₂⊗𝜓₁”
]
}, “execution_count”: 3, “metadata”: {}, “output_type”: “execute_result”
}
], “source”: [
“psi1*psi2+psi3”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“We can verify [schur’s lemma](https://en.wikipedia.org/wiki/Schur%27s_lemma), that there are no nontrivial equivariant linear maps from one irrep to another:”
]
}, {
“cell_type”: “code”, “execution_count”: 4, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“[] [] []n”
]
}
], “source”: [
“print((psi1>>psi2).equivariant_basis(),(psi2>>psi3).equivariant_basis(),(psi1>>psi3).equivariant_basis())”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“And we can include non irreducibles in our representation too. For example computing equivariant maps from $T_4 \rightarrow \psi_2$.”
]
}, {
“cell_type”: “code”, “execution_count”: 5, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“V⁴⊗𝜓₂ equivariant maps with r=8 basis elementsn”
]
}, {
- “data”: {
“image/png”: “iVBORw0KGgoAAAANSUhEUgAAAV0AAAA4CAYAAABexivqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAABxUlEQVR4nO3dIWtVcQDG4Xv1grhgWZphzUVZGmhRBoYhi8NqsCyZV4wmERVBWLGZVixrDpNhcdG4wZCZ5nAXQXf8BFt6eR34PPXAy72Hw48TDvzHwzCMAOi48q9/AMD/RHQBikQXoEh0AYpEF6BIdAGKJhddvPPoRfx7ssPl/CdqC+u78c17e9P45vvt5fjm7O3v8c2T6bX45vRnfjNt+DPOj06vxicnP/Kb14/y/33u5Zf45td3S/HNjytv4puL8wfn3lBvugBFogtQJLoARaILUCS6AEWiC1AkugBFogtQJLoARaILUCS6AEWiC1AkugBFogtQJLoARaILUCS6AEWiC1AkugBFogtQNB6G8w+KPPt2K36K5NLGenpy9HsmPjkan+U3jxfyh3I+fvA5vrn9/H5882j1V3wz7cPdzfjmk7dP45unN/MP57OHW/HNV6/X4puT0/jk6MZ+/tnc+bThYEqAy0B0AYpEF6BIdAGKRBegSHQBikQXoEh0AYpEF6BIdAGKRBegSHQBikQXoEh0AYpEF6BIdAGKRBegSHQBikQXoEh0AYouPJgSgCxvugBFogtQJLoARaILUCS6AEWiC1D0F7KgPGdaDJQZAAAAAElFTkSuQmCCn”, “text/plain”: [
“<Figure size 432x288 with 1 Axes>”
]
}, “metadata”: {
“needs_background”: “light”
}, “output_type”: “display_data”
}
], “source”: [
“vis(V(SO(2))**4,psi2,False)n”, “Wrep = V(SO(2))**4>>psi2n”, “Q = Wrep.equivariant_basis()n”, “print("{} equivariant maps with r={} basis elements".format(Wrep,Q.shape[-1]))”
]
}, {
“cell_type”: “code”, “execution_count”: 6, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“With equivariance error 1.56e-07n”
]
}
], “source”: [
“import numpy as npn”, “W = Q@np.random.randn(Q.shape[-1])n”, “print("With equivariance error {:.2e}".format(equivariance_error(W,V(SO(2))**4,psi2,SO(2))))”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“## Example 2: PseudoScalars, PseudoVectors, and PseudoTensors”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“With a slightly more sophisticated example, we’ll now implement the representations known as [PseudoScalars](https://en.wikipedia.org/wiki/Pseudoscalar), [PseudoVectors](https://en.wikipedia.org/wiki/Pseudovector), and other PseudoTensor representations. These representations commonly occur in physics when working with cross products or the Hodge star, and also describe the Fermi statistics of spin 1/2 particles that are antisymmetric under exchange.n”, “n”, “A pseudoscalar is like a scalar Scalar $=\mathbb{R}$, but incurs a $-1$ under orientation reversing transformations: $\rho(M) = \mathrm{sign}(\mathrm{det}(M))$. Similarly, pseudovectors are like ordinary vectors but can pick up this additional $-1$ factor. In fact, we can convert any representation into a pseudorepresentation by multiplying by a pseudoscalar.n”, “n”, “<!– For when the group $G$ is the symmetric group $S_n$, the sign of the determinant of the permutation matrices $\sigma\in G$ is nothing but the parity of the permutation $(-1)^{N(\sigma)}$ –>”
]
}, {
“cell_type”: “code”, “execution_count”: 7, “metadata”: {}, “outputs”: [], “source”: [
“from emlp.reps import Rep,V,T,vis,Scalar”
]
}, {
“cell_type”: “code”, “execution_count”: 8, “metadata”: {}, “outputs”: [], “source”: [
“class PseudoScalar(Rep):n”, ” def __init__(self,G=None):n”, ” self.G=Gn”, ” def __str__(self):n”, ” return "P"n”, ” def rho(self,M):n”, ” sign = jnp.linalg.slogdet(M@jnp.eye(M.shape[0]))[0]n”, ” return sign*jnp.eye(1)n”, ” def __call__(self,G):n”, ” return PseudoScalar(G)”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“Here we implement an additional __call__ method so that we can initialize the representation without specifying the group and instead instantiate it later if we want to. For example, we can work with the representation in the type system before specifying the group.”
]
}, {
“cell_type”: “code”, “execution_count”: 9, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“P+P⊗Vn”
]
}
], “source”: [
“P = PseudoScalar()n”, “print((P+V*P)(S(4)))”
]
}, {
“cell_type”: “code”, “execution_count”: 10, “metadata”: {}, “outputs”: [], “source”: [
“G = S(4)n”, “P = PseudoScalar(G)n”, “W = V(G)”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“We can build up pseudotensors with the tensor product (multiplication). As expected pseudovectors incur a -1 for odd permutations.”
]
}, {
“cell_type”: “code”, “execution_count”: 11, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“Sample g = n”, “[[0. 1. 0. 0.]n”, ” [1. 0. 0. 0.]n”, ” [0. 0. 0. 1.]n”, ” [0. 0. 1. 0.]]n”, “Pseudovector 𝜌 = n”, “[[0. 1. 0. 0.]n”, ” [1. 0. 0. 0.]n”, ” [0. 0. 0. 1.]n”, ” [0. 0. 1. 0.]]n”
]
}
], “source”: [
“pseudovector = P*Wn”, “g = G.sample()n”, “print(f"Sample g = \n{g}")n”, “print(f"Pseudovector 𝜌 = \n{pseudovector.rho_dense(g)}")”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“Again, we can freely mix and match these new representations with existing ones.”
]
}, {
“cell_type”: “code”, “execution_count”: 12, “metadata”: {}, “outputs”: [
- {
- “data”: {
- “text/plain”: [
“P²+V+P⊗V²”
]
}, “execution_count”: 12, “metadata”: {}, “output_type”: “execute_result”
}
], “source”: [
“P*(W**2 +P)+W.T”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“Equivariant maps from matrices to pseodovectors yield a different set of solutions from maps from matrices to vectors.”
]
}, {
“cell_type”: “code”, “execution_count”: 13, “metadata”: {}, “outputs”: [
- {
- “data”: {
“image/png”: “iVBORw0KGgoAAAANSUhEUgAAAV0AAABiCAYAAADz0wB7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAACU0lEQVR4nO3dwWkbURRA0VFIFdqFqAAv04FKcAvZBZM6jMguLbgEd+ClC7DITm1MKogW4f9rxjpnK3h8NJrLXwjebl3XBYDGp/c+AMAtEV2AkOgChEQXICS6ACHRBQh9vvbhl1+P/k92g873v4fPPO7vhs57O30bOm9ZluXw8DJ85oxzzng+X5++D5+5hd/Rssx5Rn9+/Nz96zM3XYCQ6AKERBcgJLoAIdEFCIkuQEh0AUKiCxASXYCQ6AKERBcgJLoAIdEFCIkuQEh0AUKiCxASXYCQ6AKERBcgJLoAoauLKbdixkLB58vr8Jkzlv/NMOWcp7HjpixnXLbxfGYsZzws49+hGd/n+TJjKef4xZTXuOkChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQjliym3slDwuB8+csryv7dTu1Tvf41+7ltZ8jnDjGc+472c8Q5tZXnoNW66ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFC+WLK4/5u+MzzZRvLLqcs5Xwav6Tw8DB+gebo73PGGZ8vr8NnbmWB5pRznsaP/AjcdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChHbrur73GQBuhpsuQEh0AUKiCxASXYCQ6AKERBcg9BdvRELaMdDojQAAAABJRU5ErkJggg==n”, “text/plain”: [
“<Figure size 432x288 with 1 Axes>”
]
}, “metadata”: {
“needs_background”: “light”
}, “output_type”: “display_data”
}
], “source”: [
“vis(W**2,pseudovector,cluster=False)”
]
}, {
“cell_type”: “code”, “execution_count”: 14, “metadata”: {}, “outputs”: [
- {
- “data”: {
“image/png”: “iVBORw0KGgoAAAANSUhEUgAAAV0AAABiCAYAAADz0wB7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAACTklEQVR4nO3dMYoUURRAUasR88ncgoGYqGvQyNjAxMwtuABDUzMRDIyNxh0MOIKBoTsRmXIDdgfy/5VPn5MWvCqqui4VNLxt3/dbADQO//sCAM6J6AKERBcgJLoAIdEFCIkuQOj2qYMPX74d/n+yiw9Xo0cu4/Dg3vCZl5efhs988uzF8Jmjbb9+D5+53zn5OvyTL58/Dp854/mscj9nmPGMDnd/bkePDT8bAEeJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQOrk57uubd8NP+PT78+EzV1mAd3P9Y/jMx69fDZ95cb3A8tBH94ePnLGccRUz3qFzXnZ5ii9dgJDoAoREFyAkugAh0QUIiS5ASHQBQqILEBJdgJDoAoREFyAkugAh0QUIiS5ASHQBQqILEBJdgJDoAoREFyAkugChfMvbOS/A2yYsUzzX5aH7hCWf+/CJ6ywOnfHbXOVdr/nSBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQEl2AkOgChEQXICS6ACHRBQiJLkBIdAFCogsQyhdTzrDKArwZ1znDEvdzwiLFGVZZHHozYdHnDKssD/32/vgxX7oAIdEFCIkuQEh0AUKiCxASXYCQ6AKERBcgJLoAIdEFCIkuQEh0AUKiCxASXYCQ6AKERBcgJLoAIdEFCIkuQEh0AULbvs9Y9QbA3/jSBQiJLkBIdAFCogsQEl2AkOgChP4AsXZNSTwBVPIAAAAASUVORK5CYII=n”, “text/plain”: [
“<Figure size 432x288 with 1 Axes>”
]
}, “metadata”: {
“needs_background”: “light”
}, “output_type”: “display_data”
}
], “source”: [
“vis(W**2,W,cluster=False)”
]
}, {
“cell_type”: “code”, “execution_count”: 15, “metadata”: {}, “outputs”: [
- {
- “data”: {
“image/png”: “iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsT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rK2/4TDvw99qbTr5rbaz7JPHj3VPXNnfe0ETPWqidOT/adgphbWvseJE8PdM4Pfq10zMdGGSnODhesp2ixfT+HJCaHECaHECaHECaHECaHECaHECaHECaHECaHECaHECaHECaHECaFmviuldhVG6WRE5VREa60tK5xwePrhw9Ku+TylM1o4bdNa7QRMa62t+O2j7pnqKZ3KiZvSKZFWu/OktfppltnkyQmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhxAmhZnzxvdV+2367tqH/xfLrt4+Wdo2e3Ns9c+P1n87brtZaW/P997pnxg5tLu1acOCvpblzt493z1Q/j4qJ6lUH40Oz+n3MJ09OCCVOCCVOCCVOCCVOCCVOCCVOCCVOCCVOCCVOCCVOCCVOCCVOCDUwNVU8egLMKU9OCCVOCCVOCCVOCCVOCCVOCPUfhM5AU8nvLAMAAAAASUVORK5CYII=n”, “text/plain”: [
“<Figure size 432x288 with 1 Axes>”
]
}, “metadata”: {
“needs_background”: “light”
}, “output_type”: “display_data”
}
], “source”: [
“vis(P*W**2,W**2,cluster=False)”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“And of course we can verify the equivariance:”
]
}, {
“cell_type”: “code”, “execution_count”: 16, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“With equivariance error 5.94e-08n”
]
}
], “source”: [
“rin = P*W**2n”, “rout = W**2n”, “Q = (rin>>rout).equivariant_basis()n”, “print(f"With equivariance error {equivariance_error(Q,rin,rout,G):.2e}")”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“We can even mix and match with the irreducible representations above.”
]
}, {
“cell_type”: “code”, “execution_count”: 17, “metadata”: {}, “outputs”: [
- {
“name”: “stdout”, “output_type”: “stream”, “text”: [
“P⊗V²⊗𝜓₂n”, “(8, 2)n”
]
}
], “source”: [
“P = PseudoScalar(SO(2))n”, “W = V(SO(2))n”, “rep = psi2>>P*W**2n”, “print(rep)n”, “print(rep.equivariant_basis().shape)”
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“## Additional Information “
]
}, {
“cell_type”: “markdown”, “metadata”: {}, “source”: [
“If you really want to (for performance reasons) you can manually specify the Lie Algebra representation drho(A) instead of the default is calculation from rho using autograd as $d\rho(A) := d\rho(M)|_{M=I}(A) = \frac{d}{dt} \rho(e^{tA})|_{t=0}$. Similarly, you can override the dual representation .T if there is good reason.”
]
}, {
“cell_type”: “code”, “execution_count”: null, “metadata”: {}, “outputs”: [], “source”: []
}
], “metadata”: {
- “interpreter”: {
“hash”: “ec74566b76234e57f2cd5bb0818dcd91369c1a3af290381c3b6efeb6aea6cdd5”
}, “kernelspec”: {
“display_name”: “Python 3”, “language”: “python”, “name”: “python3”
}, “language_info”: {
- “codemirror_mode”: {
“name”: “ipython”, “version”: 3
}, “file_extension”: “.py”, “mimetype”: “text/x-python”, “name”: “python”, “nbconvert_exporter”: “python”, “pygments_lexer”: “ipython3”, “version”: “3.8.5”
}
}, “nbformat”: 4, “nbformat_minor”: 4
}