Live data from Hacker News

Transformer neural net learns to run Conway's Game of Life just from examples

sidsite.com

1–10 of 36 posts

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#3
To be honest an unsurprising result.

But I think the paper fails to answer the most important question. It alleges that this isn't a statistical model: "it is not a statistical model that predicts the most likely next state based on all the examples it has been trained on.

We observe that it learns to use its attention mechanism to compute 3x3 convolutions — 3x3 convolutions are a common way to implement the Game of Life, since it can be used to count the neighbours of a cell, which is used to decide whether the cell lives or dies."

But it is never actually shown that this is the case. It later on isn't even alleged that this is true, rather the metric they use is that it gives the correct answers often enough, as a test for convergence and not that the net has converged to values which give the correct algorithm.

But there is no guarantee that it actually has learned the game. There are still learned parameters and the paper doesn't investigate if these parameters actually have converged to something where the Net is actually just a computation of the algorithm. The most interesting question is left unanswered.

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#5

To be honest an unsurprising result. But I think the paper fails to answer the most important question. It alleges that this isn't a statistical model: "it is not a statistical model that predicts the most likely next state based on all the examples it has been trained on. We observe that it learns to use its attention mechanism to compute 3x3 convolutions — 3x3 convolutions are a common way to implement the Game of…

Reminds me of this great story about a programmer-turned-businessman who tried to learn a game from examples and ended up with an almost-correct brute force solution:

https://www.borrett.id.au/computing/petals-bg.htm

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#6

To be honest an unsurprising result. But I think the paper fails to answer the most important question. It alleges that this isn't a statistical model: "it is not a statistical model that predicts the most likely next state based on all the examples it has been trained on. We observe that it learns to use its attention mechanism to compute 3x3 convolutions — 3x3 convolutions are a common way to implement the Game of…

The diagonal-looking attention matrix shown in the post is mathematically equivalent to 3 by 3 convolution. The model learns how to do that via its attention mechanism - it's not obvious that it would be able to do that via attention.

(This can be shown by comparing that attention matrix to a "manually computed Neighbour Attention matrix", which is known to be equivalent to 3 by 3 conv.)

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#7
post #2

Do I understand correctly that it's brute forcing a small grid rather than learning the algorithm?

> it's brute forcing a small grid

If by small grid you are referring to the attention matrix plot shown, then that is not a correct interpretation. That diagonal-like pattern it learns, is 3x3 convolution, so it can compare the neighbours of a given cell.

Edit: and note that every grid it is trained on / runs inference on is randomly generated and completely unique, so it cannot just memorise examples

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#8
post #2

Do I understand correctly that it's brute forcing a small grid rather than learning the algorithm?

> it's brute forcing a small grid If by small grid you are referring to the attention matrix plot shown, then that is not a correct interpretation. That diagonal-like pattern it learns, is 3x3 convolution, so it can compare the neighbours of a given cell. Edit: and note that every grid it is trained on / runs inference on is randomly generated and completely unique, so it cannot just memorise examples

My interpretation is that while it did learn the exact computation and not just a statistical approximation, it's still limited to a grid of a given size. In that sense the attention matrix is brute forced and the network did not learn a generalization. The article itself says "The largest grid size we successfully trained was 16x16".

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#9
I would like to point out a much more exciting modelling process, whereby neural networks extract the underlying boolean logic from simulation outputs: https://google-research.github.io/self-organising-systems/di...

I firmly believe that differentiable logic CA is the winner, in particular because it extracts the logic directly, and thus leads to generalize-able programs as opposed to staying stuck in matrix multiplication land.

Re: Transformer neural net learns to run Conway's Game of Life just from examples

#10
post #8

Earlier quoted context omitted.

> it's brute forcing a small grid If by small grid you are referring to the attention matrix plot shown, then that is not a correct interpretation. That diagonal-like pattern it learns, is 3x3 convolution, so it can compare the neighbours of a given cell. Edit: and note that every grid it is trained on / runs inference on is randomly generated and completely unique, so it cannot just memorise examples

My interpretation is that while it did learn the exact computation and not just a statistical approximation, it's still limited to a grid of a given size. In that sense the attention matrix is brute forced and the network did not learn a generalization. The article itself says "The largest grid size we successfully trained was 16x16".

They're using learned positional embeddings for each grid cell, so there's no straightforward way to extend a model trained on a small grid to a larger grid. If you go from large to small, I think it would do better than chance, but get the periodic boundary condition wrong, because the period changes with the grid size.

Using 2D RoPE instead would in principle allow scaling up as well, and maybe even period detection if you train it across a range of grids, but would eventually hit the same issues that plague long-context scaling in LLMs.

Post reply on HN