Show HN: High-Res Neural Cellular Automata (cells2pixels.github.io)

205 points by esychology 4 days ago

54 comments:

by whilenot-dev 4 days ago

The automata just completely destroys the image if I draw too much over the stabilized image with the brush. 5 horizontal swipes are enough to destroy the kitty, is that to be expected?

EDIT: video here: https://imgur.com/a/ItZGd5X

by esychology 4 days ago

The NeuralCA both generates and maintains the pattern. Because the NCA was not exposed to damage or erasure during training, its regeneration capability is a purely emergent phenomenon. However, this ability remains somewhat brittle, particularly when the central regions of the pattern are erased.

by mackenney 4 days ago

I would love to see two seeds competing for space in the grid

by WhiteNoiz3 4 days ago

With the old model (and I suspect this one too) it's trained to generate from a single 'seed' pixel in the center of the image. If you erase the center of the image, that's when it completely collapses.

by oersted 4 days ago

It must be more general than that, otherwise the cells wouldn’t be able to repair their area if the damage came from the wrong direction (repair is not center-out).

The model generally learns to generate each pixel from its surroundings, even if the surroundings are partially missing.

by WhiteNoiz3 4 days ago

There's hidden state in the model which presumably it uses to communicate position, ie there's the 3 colors but then a bunch of other channels that the model can use how it wants.

by cl3misch 4 days ago

Have you actually tried that? If you specifically erase the center, the image does change a lot at first, but rebuilds itself eventually (albeit to a slightly different final state). It's uncanny how "biological" is feels!

by Mithriil 4 days ago

If you hold the eraser for a second at the center, I find that it destroys the image more often than not.

by WhiteNoiz3 4 days ago

I have yes.. You need to erase a larger amount of the center, but it almost always results in a collapse wheras erasing around the center typically regrows.

by WhitneyLand 4 days ago

At a glance it looks like it could be just iterative texture sampling.

The difference is when creating each pixel, there’s no coordinate to look up, instead it’s using only a set of rules like Conway’s game of life.

But the rules come from a neural network trained on the image, so… it’s kind of memorizing enough information to effectively do the same thing as texture sampling, but using only local information.

I’m sure I’m missing something about how it works or what makes it interesting…

by oersted 4 days ago

To me, it is intriguing as a toy model for how cells are able to grow into complex tissue and organisms based only on local information, and how they are able to repair and recover harmed tissue.

Of course, this is as close to cells, as neurons from neural networks are to real neurons. And I have no idea what it could be applied to (inpainting/outpainting?), but it’s interesting as exploratory research.

by menno-sh 4 days ago

Oooh, this made it click for me. Thank you

by esychology 4 days ago

Texture sampling retrieves pixels by coordinate, while NCA grows them from local rules with no global lookup. The weights are actually ~3× smaller than JPEG-compressed texture maps, so it's not just memorizing the image either. The more interesting part is that it's a dynamic process, you can damage the pattern while it forms and it repairs itself.

by zcw100 4 days ago

I've always loved the original work and it's nice to see they're still working on it. I've always wondered if there was a way to connect this back to infrastructure rather than images. Something you could run on a cluster and if portions of it failed it would regenerate the system.

Like a bio inspired Kubernettes.....Bionettes.

by Akimsa3 2 days ago

That's really impressive i've been thinking that we have using technologies cause they were a breakthrough but we actual resources we can implement technollogy that was relegated time ago, like when implementing 3d there were many other until the one who was more consistent is how we visualize 3d today. Cause this looks pretty simillar to metaballs. An idea that is not longer that hard pursued but i just saw the similarity.

by bjourne 4 days ago

I found your previous work here: https://distill.pub/2020/growing-ca/ For someone (like me) who wants to understand the basics its probably better. It's very well written.

by jekude 4 days ago

The abstract implies that strictly local updates are a hinderance to high res, however i would have thought there would be an interesting way to get speed up gains from neighbor-only traffic on GPUs CAM-style. am i making that up?

by esychology 4 days ago

I think performance is not the only issue for scaling to larger grids. CUDA Convolution implementation already utilizes coalescing to improve performance. The main bottleneck is that in larger grids, cells are further apart, and it takes more steps for them to be able to communicate.

by IvanLudvig 3 days ago

incredible work! I love seeing progress in this field. I've recently built a WebGPU implementation of the original growing neural CAs: https://github.com/IvanLudvig/neural-ca-webgpu

by moralestapia 4 days ago

@esychology this is phenomenal work, thank you so much for sharing it. I am working in a similar thing and might reach out about it soon.

Also, what's going on? Why would the community flag and kill this comment[1], from the creator itself. If you're jealous of what the guy built, take it elsewhere. HN will implode with that attitude.

1: https://news.ycombinator.com/item?id=48571171

by bjourne 4 days ago

It's the stupid spam filter going haywire: https://news.ycombinator.com/item?id=48321198

by yorwba 4 days ago

If it says [flagged], a human pressed the "flag" button. Most likely because OP is commenting too much.

by CamperBob2 4 days ago

I don't believe that's the case. HN is running some kind of automated slop detector that classifies any suspected LLM output as "slop" even if it's entirely in-context for the conversation (e.g., a conversation about LLM output.) The comment gets autoflagged the moment it's posted. This has been the case for a while now, I've run afoul of it myself.

It sucks, and I can only imagine they implemented it because they felt they had no other option to deal with the onslaught of bots that's appeared lately.

One thing they could do to improve the situation is to weight vouching heavily by karma. I have plenty of karma but I don't think I've ever successfully pulled a comment out of the [dead] state by vouching for it. Legitimate comments that get flagged by mistake tend to stay that way for the duration of the discussion.

by yorwba 4 days ago

Comments that get autokilled are just [dead], not [flagged] [dead]. If you cannot vouch comments back to life, it's also possible that your vouching privileges were taken away because the mods disagreed with your vouching decisions. When you see something really great that is [dead] and vouching doesn't help, you can try emailing the mods and mention that vouching didn't work. If it's actually great, maybe they'll let you vouch again. (Happened to me.)

by bjourne 3 days ago

Nope. Many comments from green accounts get flagged and then auto-killed unless vouched for.

by yorwba 3 days ago

This is a green account that got auto-killed: https://news.ycombinator.com/item?id=48304852

This is a green account where someone used the "flag" button to kill it: https://news.ycombinator.com/item?id=48262928

Note how the former only says [dead] while the latter is [flagged] [dead].

by bjourne 3 days ago

The spam filter does both. You can verify for yourself that flagging a comment most of the time is not enough to kill it.

by yorwba 3 days ago

The spam filter influences the number of times a comment needs to be flagged before it becomes [flagged] and gets killed, but if it says [flagged], someone used the "flag" button at least once. Sometimes just downvoting a spam comment is enough to kill it; those just get marked [dead] and not [flagged].

by moralestapia 3 days ago

To you and other commenters who are missing it ...

No green accounts involved here.

by bjourne 3 days ago

That doesn't mean the spam filter isn't culpable here - esychology is still a relatively new account.

by esychology 4 days ago

Thank you for the kind comment! Please reach out, I'm happy to have a chat.

by embedding-shape 4 days ago

Really interesting demo, nicely done :) Would be fun if switching the "Target Image" when using the second brush mode in the Growing Demo didn't erase/reset the existing canvas, so we could "stamp" new things on top of other images. Small thing perhaps but I got sad when it disappeared when I wanted to merge a kitten on top of the chameleon but couldn't :(

by esychology 4 days ago

That's not possible in the current demo but this sounds like an interesting feature to work on and add!

by bfmalky 4 days ago

You can, just enable the 'transition' switch.

by embedding-shape 4 days ago

That seems to be something else? It takes the current image and "transforms" it into the new target.

by hidelooktropic 4 days ago

For the unfamiliar, could someone explain what I'm looking at? The abstract was a little too concrete (heh) for me to follow.

by esychology 4 days ago

If you're familiar with CAs (e.g. Conway's Game of Life), you can think of a NeuralCA as a CA where the update rule is given by a neural network. Here we optimize the neural net weights so that it behaves a certain way (e.g. grow a lizard from a single seed).

by hidelooktropic 4 days ago

Wow. That's fascinating. Thanks for that explanation. So these images come to be consequentially from initial state and weights...

by flir 4 days ago

What are the inputs to the NN? The whole grid, or just nearby cells? What happens if two NNs overlap on the same grid? (Gonna go read the paper).

by esychology 4 days ago

The input to the NN is just the 3x3 neighborhood around a cell. We can overlap two NNs on the same grid (through interpolation). Checkout https://meshnca.github.io to see the effect. When the brush is in graft mode, it basically allows you to paint some regions that will follow a different NN rule.

by flir 4 days ago

> The input to the NN is just the 3x3 neighborhood around a cell.

Well that sounds like black magic. Nice. Thanks for the reply.

by 0xdeadbeefbabe 4 days ago

Is each image a NN or is it one NN for all the images?

by esychology 4 days ago

One NN per pattern/image (instance based training).

by soraki_soladead 4 days ago

The original NCA is probably a helpful intro: https://distill.pub/2020/growing-ca/

by WithinReason 4 days ago

You can make the centipede grow longer, which makes sense given how this works. Or grow a 2nd centipede for extra points.

by esychology 4 days ago

haha yes, also the same with the worm

by _menelaus 3 days ago

Fascinating. A glimpse into the mathematics of life and living tissue. A toy example like this might herald self-healing machines, in the same way that the first perceptrons heralded Fable and nude deepfakes.

by amelius 4 days ago

Why are the images always generated in the same orientation (upright)? Do the cells have awareness of what is "up"?

by WhiteNoiz3 4 days ago

IIRC training starts with the initial state and the end state, and the end state is always oriented the same way. It would be interesting to see what would happen if the end state was rotated randomly though I suspect it wouldn't work so well.

by esychology 4 days ago

Checkout the Isotropic NCA blog from the Google Zurich team: https://google-research.github.io/self-organising-systems/is...

by WhiteNoiz3 20 hours ago

interesting, thanks!

by esychology 4 days ago

yeah normally NCAs have a sense of up and left. There are some isotropic variants that make the perception fully rotation-invariant.

by EstanislaoStan 3 days ago

Managed to get a stable loop with the worm!

by mirekrusin 4 days ago

So the goal is to evaporate it with minimum number of shots?

Data from: Hacker News, provided by Hacker News (unofficial) API