Learning Elementary Cellular Automata with Transformers
Not on the map. Why?
Abstract (arXiv)
Large Language Models demonstrate remarkable mathematical capabilities but at the same time struggle with abstract reasoning and planning. In this study, we explore whether Transformers can learn to abstract and generalize the rules governing Elementary Cellular Automata. By training Transformers on state sequences generated with random initial conditions and local rules, we show that they can generalize across different Boolean functions of fixed arity, effectively abstracting the underlying rules. While the models achieve high accuracy in next-state prediction, their performance declines sharply in multi-step planning tasks without intermediate context. Our analysis reveals that including future states or rule prediction in the training loss enhances the models' ability to form internal representations of the rules, leading to improved performance in longer planning horizons and autoregressive generation. Furthermore, we confirm that increasing the model's depth plays a crucial role in extended sequential computations required for complex reasoning tasks. This highlights the potential to improve LLM with inclusion of longer horizons in loss function, as well as incorporating recurrence and adaptive computation time for dynamic control of model depth.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 24 of its 35 references that are in the map. First posted on arXiv 2 Dec 2024.
Builds on
24 of 35 references.
References · 24
- 2017Attention Is All You Needcited by 59,932
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2018Universal Transformerscited by 613
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2019Deep Learning for Symbolic Mathematicscited by 266
- 2022End-to-end symbolic regression with transformerscited by 195
- 2023Representational Strengths and Limitations of Transformerscited by 132
- 2020On the Computational Power of Transformers and its Implications in Sequence Modelingcited by 85
- 2022Deep Symbolic Regression for Recurrent Sequencescited by 53
- 2018Cellular automata as convolutional neural networkscited by 45
- 2021Learning Graph Cellular Automatacited by 33
12 more
- 2022Attention-based Neural Cellular Automatacited by 26
- 2020It's Hard for Neural Networks To Learn the Game of Lifecited by 13
- 2023E(n)-equivariant Graph Neural Cellular Automatacited by 9
- 2024Conditional and Modal Reasoning in Large Language Modelscited by 9
- 2024Liar, Liar, Logical Mire: A Benchmark for Suppositional Reasoning in Large Language Modelscited by 9
- 2023Learning spatio-temporal patterns with Neural Cellular Automatacited by 8
- 2024LifeGPT: Topology-Agnostic Generative Pretrained Transformer Model for Cellular Automatacited by 8
- 2021Generalization over different cellular automata rules learned by a deep feed-forward neural networkcited by 6
- 2020Reconstructing cellular automata rules from observations at nonconsecutive timescited by 5
- 2024Learning Locally Interacting Discrete Dynamical Systems: Towards Data-Efficient and Scalable Predictioncited by 5
- 2024Cellular automata, many-valued logic, and deep neural networkscited by 2
- 2024Data-Centric Approach to Constrained Machine Learning: A Case Study on Conway's Game of Lifecited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.