QuACK: Quincuncial Adaptive Closed Kohonen maps for ducks and other odd shapes

&amp;lt;p&amp;gt;A self-organizing Kohonen map is a special type of artificial neural network. The neurons are arranged in a rectangular grid, so each neuron can be identified by two indices i and j. Besides its indices, each neuron carries a float vector. The network learns these vectors from randomly presented sample values. It evolves into a topologically correct two-dimensional map of the input data set.&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;The network is initialized with small random values for each neuron. It is then optimized by repeatedly iterating through the following steps:&amp;lt;/p&amp;gt; &amp;lt;ul&amp;gt; &amp;lt;li class=&amp;quot;li-enumerate&amp;quot;&amp;gt;Randomly choose a vector r from the input data set.&amp;lt;/li&amp;gt; &amp;lt;li class=&amp;quot;li-enumerate&amp;quot;&amp;gt;Find the neuron (i,j) whose vector r&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is closest to r in Euclidean distance r&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt;&amp;amp;#8722;r.&amp;lt;/li&amp;gt; &amp;lt;li class=&amp;quot;li-enumerate&amp;quot;&amp;gt;Move the vector r&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; towards r some fraction &amp;amp;#947;, &amp;amp;#947;&amp;amp;#8804;1, of the distance, so the new value becomes &amp;lt;table class=&amp;quot;display dcenter&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td class=&amp;quot;dcell&amp;quot;&amp;gt;r&amp;amp;#8242;&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt;&amp;amp;#160;=&amp;amp;#160;r&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt;&amp;amp;#160;+&amp;amp;#160;&amp;amp;#947;&amp;amp;#160;(&amp;amp;#160;r&amp;amp;#160;&amp;amp;#8722;&amp;amp;#160;r&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt;&amp;amp;#160;)&amp;amp;#160;. &amp;amp;#160;&amp;amp;#160;&amp;amp;#160;&amp;amp;#160;(1)&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/li&amp;gt; &amp;lt;li class=&amp;quot;li-enumerate&amp;quot;&amp;gt;Also move the vectors r&amp;lt;sub&amp;gt;k,l&amp;lt;/sub&amp;gt; of neurons (k,l) in the vicinity of (i,j) towards r, but weighted with a factor that decreases with the distance from (i,j), where the distance d is measured on the two dimensional map, i.&amp;amp;#160;e., &amp;lt;table class=&amp;quot;display dcenter&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td class=&amp;quot;dcell&amp;quot;&amp;gt;d&amp;amp;#160;=&amp;amp;#160;((k&amp;amp;#8722;i)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;+(l&amp;amp;#8722;j)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&amp;lt;sup&amp;gt;1/2&amp;lt;/sup&amp;gt;. &amp;amp;#160;&amp;amp;#160;&amp;amp;#160;&amp;amp;#160;(2)&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; With a Gaussian for the weighting factors, the updated vectors become &amp;lt;table class=&amp;quot;display dcenter&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td class=&amp;quot;dcell&amp;quot;&amp;gt;r&amp;amp;#8242;&amp;lt;sub&amp;gt;k,l&amp;lt;/sub&amp;gt;&amp;amp;#160;=&amp;amp;#160;r&amp;lt;sub&amp;gt;k,l&amp;lt;/sub&amp;gt;&amp;amp;#160;+&amp;amp;#160;&amp;amp;#947;&amp;amp;#160; exp(&amp;amp;#8722;d&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/&amp;amp;#963;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) &amp;amp;#160;(&amp;amp;#160;r&amp;amp;#160;&amp;amp;#8722;&amp;amp;#160;r&amp;lt;sub&amp;gt;k,l&amp;lt;/sub&amp;gt;&amp;amp;#160;) &amp;amp;#160;&amp;amp;#160;&amp;amp;#160;&amp;amp;#160;(3)&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; with some reach &amp;amp;#963;.&amp;lt;/li&amp;gt; &amp;lt;/ul&amp;gt; &amp;lt;p&amp;gt;Step 4 ensures the formation of a topologically correct map. The parameters &amp;amp;#947; and &amp;amp;#963; have slowly to be turned down to zero towards the end of the optimization, the former to prevent noise introduced by the randomly selected input data, the latter to avoid excessive smoothing.&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;One application of such a self-optimizing Kohonen map is the mapping of the surface of a three-dimensional shape, like comet 67P/Churyumov-Gerasimenko, see Fig.&amp;amp;#160;1.&amp;lt;/p&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;img src=&amp;quot;data:;base64, &amp;quot; /&amp;gt; &amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt; &amp;lt;table class=&amp;quot;cellpading0&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Figure 1: Shape model of comet 67P/Churyumov-Gerasimenko.&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;p&amp;gt;As input data, we use the three-dimensional positions of shape model vertices. The result of fitting a low resolution toy model to 67P is shown in Fig.&amp;amp;#160;2.&amp;lt;/p&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;img src=&amp;quot;data:;base64, &amp;quot; /&amp;gt; &amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt; &amp;lt;table class=&amp;quot;cellpading0&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Figure 2: Fitting a toy model of 21&amp;amp;#215;21 neurons to the shape of comet 67P. This is just for illustration. The real map has much higher resolution.&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;p&amp;gt;The map tries to sample the surface of the shape as evenly as possible. As a consequence, there is a gap between the edges of the map where they fold towards each other. The gap narrows with increasing resolution, however, by fitting a closed surface, see Fig.&amp;amp;#160;3 we can avoid the gap at all. Moreover, the resultant map inherits the tessellation properties of the topologically equivalent Peirce quincuncial projection.&amp;lt;/p&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;img src=&amp;quot;data:;base64, &amp;quot; /&amp;gt; &amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt; &amp;lt;table class=&amp;quot;cellpading0&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Figure 3: We construct a closed surface from two square grids of neurons connected at all four edges. This neural network learns the shape in the same way as the classical Kohonen map, however, it covers the complete surface without any gap. Again the real map has much higher resolution as this toy model.&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;p&amp;gt;The resultant map is a shape model of 67P in its own right, albeit with relatively low resolution (the full scale model has 160,000 plates). But this shape model has the very special property that it can be unfolded to a two dimensional map. The are different possibilities how the closed structure is cut open and unfolded. One is illustrated in Fig.&amp;amp;#160;4.&amp;lt;/p&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;img src=&amp;quot;data:;base64, &amp;quot; /&amp;gt; &amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt; &amp;lt;table class=&amp;quot;cellpading0&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Figure 4: Unfolding of the closed surface into a two dimensional square map in quincuncial layout, which resembles the Peirce quincuncial projection of the world.&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;p&amp;gt;In this way, we obtain the Quincuncial Adaptive Closed Kohonen (QuACK) map of comet&amp;amp;#160;67P.&amp;lt;/p&amp;gt; &amp;lt;p&amp;gt;Any features on the surface of comet 67P can be projected onto the QuACK map. While the QuACK map has limited resolution (although much higher than the toy model illustrations shown here), features can be mapped with subgrid accuracy employing bilinear interpolation. An example of a geological QuACK map is shown in Fig.&amp;amp;#160;5.&amp;lt;/p&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;img src=&amp;quot;data:;base64, &amp;quot; /&amp;gt; &amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt; &amp;lt;table class=&amp;quot;cellpading0&amp;quot;&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Figure 5: Example geological map of 67P in the QuACK map projection, from Leon-Dasi, M., S. Besse, B. Grieger and M. K&amp;amp;#252;ppers (2021).&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;amp;#160;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;