{"id":430872,"date":"2026-05-03T23:07:14","date_gmt":"2026-05-03T23:07:14","guid":{"rendered":"https:\/\/www.newsbeep.com\/ie\/430872\/"},"modified":"2026-05-03T23:07:14","modified_gmt":"2026-05-03T23:07:14","slug":"growing-neural-cellular-automata-by-grigory-sapunov","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/ie\/430872\/","title":{"rendered":"Growing Neural Cellular Automata &#8211; by Grigory Sapunov"},"content":{"rendered":"<p>Authors: Alexander Mordvintsev, Ettore Randazzo, Eyvind Niklasson, Michael Levin<br \/>Interactive paper + code links: <a href=\"https:\/\/distill.pub\/2020\/growing-ca\/\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/distill.pub\/2020\/growing-ca\/<\/a> <br \/>Notebook for experiments: <a href=\"https:\/\/colab.research.google.com\/github\/google-research\/self-organising-systems\/blob\/master\/notebooks\/growing_ca.ipynb\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a><\/p>\n<p>This old topic from 2020 about Neural Cellular Automata (NCA) has been mentioned by us many times, but we never properly covered it. And we should have, especially after the <a href=\"https:\/\/gonzoml.substack.com\/p\/self-replicating-programs-lifes-origin\" rel=\"nofollow noopener\" target=\"_blank\">topic on computational life<\/a>. The authors are wonderful \u2014 you already know Michael Levin, and probably Alexander Mordvintsev too, but if not, I recommend following his work. He has lots of great topics on self-organization, artificial life, and related areas, and in particular, he\u2019s also a co-author of the good old <a href=\"https:\/\/research.google\/blog\/inceptionism-going-deeper-into-neural-networks\/\" rel=\"nofollow noopener\" target=\"_blank\">DeepDream<\/a>. For many people, the current wave of generative art started precisely with him. The previous wave, it seems, was about fractals.<\/p>\n<p>The current work makes a serious foray into the topic of morphogenesis and the development of an organism from a single cell, as well as regeneration. It\u2019s about how somewhere out there, rules exist at the cellular level, each cell makes local decisions based on its surroundings, and together they create a sufficiently complex \u201corganism.\u201d<\/p>\n<p>Everyone\u2019s beloved cellular automata (CA), including the Game of Life (we once discussed one of the recent results with the <a href=\"https:\/\/gonzoml.substack.com\/p\/conways-game-of-life-is-omniperiodic\" rel=\"nofollow noopener\" target=\"_blank\">proof that it\u2019s omniperiodic<\/a>), work simply. There\u2019s a set of cells, for example on a plane. The same rule executes in each one. For the Game of Life, for instance, these are the rules:<\/p>\n<p>Birth: In an empty (dead) cell, life is born (the cell becomes alive) if it has exactly three living neighbors.<\/p>\n<p>Survival: A living cell stays alive if it has two or three living neighbors.<\/p>\n<p>Death (Loneliness\/Overpopulation): A living cell dies if it has fewer than two living neighbors (loneliness) or more than three (overpopulation).<\/p>\n<p>These rather simple rules lead to stunningly beautiful results:<\/p>\n<p>Stable elements appear in this simulation, there are moving gliders, and many other beautiful configurations (see <a href=\"https:\/\/playgameoflife.com\/\" rel=\"nofollow noopener\" target=\"_blank\">this beautiful site<\/a>). Skilled enthusiasts even build computers using gliders:<\/p>\n<p>More details here:<\/p>\n<p>Wolfram wrote an <a href=\"https:\/\/www.wolframscience.com\/nks\/\" rel=\"nofollow noopener\" target=\"_blank\">entire book about cellular automata<\/a> \u2014 you can read, for example, <a href=\"https:\/\/www.wolframscience.com\/nks\/p170--cellular-automata\/\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>. <\/p>\n<p><a target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!a69c!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febd873d7-0f9a-4310-8084-6a31627498a2_650x809.png\" data-component-name=\"Image2ToDOM\" class=\"image-link image2 is-viewable-img can-restack\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2026\/05\/https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/ebd873d7-0f9a-4310-8084-6a31627498a2_650x.png\" width=\"320\" height=\"398.2769230769231\" data-attrs=\"{&quot;src&quot;:&quot;https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/ebd873d7-0f9a-4310-8084-6a31627498a2_650x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:650,&quot;resizeWidth&quot;:320,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}\" alt=\"\"   loading=\"lazy\" class=\"sizing-normal\"\/><\/a><\/p>\n<p>There are also options for transitioning from discrete space to continuous \u2014 I think the most well-known here is <a href=\"https:\/\/www.complex-systems.com\/abstracts\/v28_i03_a01\/\" rel=\"nofollow noopener\" target=\"_blank\">Lenia<\/a>. And the field as such is quite ancient \u2014 <a href=\"https:\/\/www.dna.caltech.edu\/courses\/cs191\/paperscs191\/turing.pdf\" rel=\"nofollow noopener\" target=\"_blank\">Turing himself experimented with morphogenesis patterns<\/a>.<\/p>\n<p>Usually, CAs are played in the mode where you first set the rules and then look at what results they lead to. CAs can also be approached from the opposite side \u2014 set the result (for example, an organism\u2019s phenotype) and find (or learn) a CA that creates it.<\/p>\n<p>To define a CA, you need to decide what states it can have (usually a set of discrete values, but they can also be continuous), and also define a state update function. If you take continuous values and allow the update function to be differentiable, then, as you already understand, this can be learned by gradient descent, like neural networks. So, here come Neural Cellular Automata (NCA).<\/p>\n<p>For example (moving on to the details of the work), the state of each cell can be defined by a set of 16 real numbers (channels in image terminology). The first three define the RGB color components, and one more \u2014 alpha (which equals zero for the background and 1 for the object). <\/p>\n<p><a target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!SVDQ!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf356bfd-b67a-4a94-a000-76e0a1ac9b38_1136x477.png\" data-component-name=\"Image2ToDOM\" class=\"image-link image2 is-viewable-img can-restack\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2026\/05\/https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/af356bfd-b67a-4a94-a000-76e0a1ac9b38_1136.jpeg\" width=\"1136\" height=\"477\" data-attrs=\"{&quot;src&quot;:&quot;https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/af356bfd-b67a-4a94-a000-76e0a1ac9b38_1136x477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:1136,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129613,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image\/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https:\/\/gonzoml.substack.com\/i\/196352453?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf356bfd-b67a-4a94-a000-76e0a1ac9b38_1136x477.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}\" alt=\"\"   loading=\"lazy\" class=\"sizing-normal\"\/><\/a><\/p>\n<p>This alpha will determine the \u201caliveness\u201d of the cell: \u03b1&gt;0.1 means the cell is alive and its neighbors too. All other cells are dead and their state is set to zero. So, cells with \u03b1&gt;0.1 are mature, while their neighbors with \u03b1\u22640.1 are growing (and can become mature when the value exceeds 0.1). The other channels have no predefined meaning \u2014 the update rule itself decides how to use them. They can be interpreted as concentrations of various substances, electrical potentials, or other signaling mechanisms used by cells.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!kQSA!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc2d6187-e15b-4a86-9104-e713db2bd3bd_435x204.png\" data-component-name=\"Image2ToDOM\" class=\"image-link image2 can-restack\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2026\/05\/https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/fc2d6187-e15b-4a86-9104-e713db2bd3bd_435x.jpeg\" width=\"435\" height=\"204\" data-attrs=\"{&quot;src&quot;:&quot;https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/fc2d6187-e15b-4a86-9104-e713db2bd3bd_435x204.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:204,&quot;width&quot;:435,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:26582,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image\/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https:\/\/gonzoml.substack.com\/i\/196352453?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc2d6187-e15b-4a86-9104-e713db2bd3bd_435x204.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}\" alt=\"\"   loading=\"lazy\" class=\"sizing-normal\"\/><\/a><\/p>\n<p>The update rule can be perceived as the cell\u2019s genome, and it will be common to all cells. The rule operates (and the cells live) on a two-dimensional field, effectively on a tensor of dimension [height, width, 16]. We want a cell to be influenced only by its immediate surroundings, so the rule will have a small receptive field, say 3&#215;3, with the cell itself in the middle (as in the Game of Life). This can be defined by a convolution operation.<\/p>\n<p>Each cell \u201clooks\u201d at its nearest surroundings (through a 3&#215;3 convolution). The authors decided not to make this convolution learnable, but chose to use predefined <a href=\"https:\/\/homepages.inf.ed.ac.uk\/rbf\/HIPR2\/sobel.htm\" rel=\"nofollow noopener\" target=\"_blank\">Sobel filters<\/a>, horizontal and vertical. They are used for edge detection, that is, essentially they compute directional derivatives. The authors based this on the logic that inside organisms, cells often orient themselves by chemical gradients to direct the organism\u2019s development. So, 48 numbers are sent to the input of the update rule: 16 numbers of the original state, and two more sets of 16 \u2014 gradients along the horizontal and vertical.<\/p>\n<p>Next is the trainable part, which generates a delta added to the cell\u2019s original state. The trainable part is defined by a two-layer network: dense-128 -&gt; relu -&gt; dense-16 (no relu at the output, since deltas can also be negative). Initialized so that at the start of training it produces zero and does nothing to the original state.<\/p>\n<p>There is also a stochastic update. Regular CAs update all cells simultaneously, as if there\u2019s a global synchronization. In living organisms, there isn\u2019t one, and the authors weaken the synchronization requirement, assuming that cell updates happen at random time intervals. To emulate this process, a binary mask is generated (by random exceeding 0.5) and only cells with the mask set are updated. This can also be viewed as cell-wise dropout.<\/p>\n<p>To model the process of organism growth, only the cells of the organism (not the background) should influence the update, so all channels of empty cells (determined by the alpha channel) are set to zero. A cell is considered empty if it has no mature neighbors (\u03b1&gt;0.1) in the 3&#215;3 surroundings.<\/p>\n<p>Overall, simple rules. Next, to train it for some task, you need to define a loss function.<\/p>\n<p>In the first experiment, a CA is trained to grow, that is, to reach a target image, starting from a single cell (seed). This cell is initialized with ones in all channels except RGB, then the update rule is applied to it many times (the number of applications is sampled from the range [64, 96]). At the end of such a step, the L2 loss between the target image and the RGBA channels is computed; based on the signal from this loss, the two dense layers in the update rule are trained via gradient descent.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!RoF4!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2653e0da-9a69-4a3e-8816-53caeb87b626_932x310.png\" data-component-name=\"Image2ToDOM\" class=\"image-link image2 is-viewable-img can-restack\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2026\/05\/https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/2653e0da-9a69-4a3e-8816-53caeb87b626_932x.jpeg\" width=\"932\" height=\"310\" data-attrs=\"{&quot;src&quot;:&quot;https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/2653e0da-9a69-4a3e-8816-53caeb87b626_932x310.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:310,&quot;width&quot;:932,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:115840,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image\/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https:\/\/gonzoml.substack.com\/i\/196352453?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2653e0da-9a69-4a3e-8816-53caeb87b626_932x310.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}\" alt=\"\"   loading=\"lazy\" class=\"sizing-normal\"\/><\/a><\/p>\n<p>The rules learn to generate the given patterns, but when run longer than during training, they start to spoil the images. We want it so that when an image is created, it stays. To make it a kind of attractor \u2014 the second experiment is about this.<\/p>\n<p>In principle, for this you could train on a larger number of iterations, periodically applying the loss. This requires noticeably more memory and, of course, takes longer. The authors took a different path. They start with a pool of initial states (for example, 1024 of them). A batch is sampled from it for a training step (32 samples), but one sample in the batch is always replaced with the original initial state to prevent catastrophic forgetting. After the training step, the iterated samples replace the originals in the pool. This helps add stability. It also helps to replace not a random sample with the initial value, but the sample with the worst loss.<\/p>\n<p>The third experiment is about regeneration \u2014 if you damage the model\u2019s final state (in five different ways), will the model restore it? The lizard, surprisingly, does this quite well, even though it wasn\u2019t trained for this. But since the model was trained to grow from an initial single-cell state, in general something like this can be expected, as can other developments like uncontrolled growth. To explicitly help the model develop regenerative abilities, you can expand the basin of attraction for the final state, that is, increase the space of configurations from which the model reaches its target state. To do this, at each training step, several selected samples are damaged with a random circle, erasing the area of impact. So, in each selected batch, the example with the worst loss is replaced with the initial state, and the three with the best loss are damaged with random circles. <\/p>\n<p>As a result, you get a model with better regenerative abilities, even to damage that the model hasn\u2019t encountered.<\/p>\n<p>The last, fourth experiment involves rotations of the perceptive field. Rotations by a given angle are applied to the Sobel operators, and this leads to the generation of a rotated image, without any retraining of the model. In pixel models, this is not as trivial and expected as in continuous ones, since a single pixel under rotation can easily overlap several pixels already. But in fact, everything works beyond what the model encountered in training.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/substackcdn.com\/image\/fetch\/$s_!RCPl!,f_auto,q_auto:good,fl_progressive:steep\/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd470dce-b2e7-4b31-905a-8c56965f90e5_896x896.png\" data-component-name=\"Image2ToDOM\" class=\"image-link image2 is-viewable-img can-restack\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2026\/05\/https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/cd470dce-b2e7-4b31-905a-8c56965f90e5_896x.jpeg\" width=\"424\" height=\"424\" data-attrs=\"{&quot;src&quot;:&quot;https:\/\/substack-post-media.s3.amazonaws.com\/public\/images\/cd470dce-b2e7-4b31-905a-8c56965f90e5_896x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:896,&quot;resizeWidth&quot;:424,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}\" alt=\"\"   loading=\"lazy\" class=\"sizing-normal\"\/><\/a><\/p>\n<p>What\u2019s cool, they also trained an NCA for planaria (one of the favorite examples of regeneration, which the same Michael Levin constantly uses). After cutting a digital planarian grown from a single cell into three parts and separating them, a new digital planarian grows from each one. Looks awesome.<\/p>\n<p>Recently, several works have appeared continuing this line \u2014 I\u2019ll try to cover them.<\/p>\n","protected":false},"excerpt":{"rendered":"Authors: Alexander Mordvintsev, Ettore Randazzo, Eyvind Niklasson, Michael LevinInteractive paper + code links: https:\/\/distill.pub\/2020\/growing-ca\/ Notebook for experiments: here&hellip;\n","protected":false},"author":2,"featured_media":430873,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[61,60,80],"class_list":["post-430872","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-ie","tag-ireland","tag-technology"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/430872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/comments?post=430872"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/430872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media\/430873"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media?parent=430872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/categories?post=430872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/tags?post=430872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}