Isn&#x27;t the key insight -- to replace `w_{i,j}` by turning it into a vector with an inner product structure -- also known as the kernel-trick in machine learning? (here, they seem to use a polynomial kernel: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Polynomial_kernel" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Polynomial_kernel</a>).<p>EDIT: &lt;strike&gt;It&#x27;s&lt;&#x2F;strike&gt; Kernel tricks in general are nice because they also generalise well to an infinite dimensional space (the RBF kernel) and compute the dot-products in that space without actually computing the embedding. RBFs: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Radial_basis_function_kernel" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Radial_basis_function_kernel</a>