A one-dimensional lattice of sites with periodic boundary conditions carries spins…

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · High-performance and data-driven computational physics · High-performance and data-driven computational physics

Scientific Computing for Physicists, Ch Neural networks on physical data: backpropagation, convolution and symmetry

Problem

A one-dimensional lattice of N=6N=6 sites with periodic boundary conditions carries spins x0,…,x5=(1,−1,1,1,−1,−1)x_0,\dots,x_5 = (1,-1,1,1,-1,-1) (indices taken modulo 6). A dense layer h(r)=∑r′=05Wr,r′xr′h(r) = \sum_{r'=0}^{5} W_{r,r'}x_{r'} is restricted by weight sharing to Wr,r′=K(r′−r mod 6)W_{r,r'} = K(r'-r \bmod 6), with K(−1)=0.2K(-1)=0.2, K(0)=0.5K(0)=0.5, K(1)=−0.1K(1)=-0.1 and K(δ)=0K(\delta)=0 for every other offset (offsets read as the representative in {−2,−1,0,1,2,3}\{-2,-1,0,1,2,3\}, i.e. the nearest of the two equivalent values modulo 6). ((a)) Show that the weight-shared sum reduces to h(r)=∑δ=−11K(δ) x(r+δ) mod 6h(r) = \sum_{\delta=-1}^{1} K(\delta)\,x_{(r+\delta)\bmod 6}, and identify this as the circular cross-correlation of xx with KK. ((b)) Show that this equals the circular convolution (x∗K~)(r)=∑m=05xm K~((r−m) mod 6)\big(x * \tilde K\big)(r) = \sum_{m=0}^{5} x_m\,\tilde K\big((r-m)\bmod 6\big) of xx with the flipped kernel K~(δ)=K(−δ)\tilde K(\delta) = K(-\delta). ((c)) Compute h(2)h(2) directly from the sum in (a), then check it against the convolution formula in (b).

Browse the problem library