about
Neural Networks and the Chomsky Hierarchy by DeepMind (arxiv.org)
5 points by ashvardanian on Jul 16, 2022 | hide | past | pdf | 1 comment on HN

In plain words: Sorting tasks by how complex their rules are — from simple patterns to nested ones — predicts whether a network will generalize to new inputs. Plain recurrent and attention networks never generalized past simple patterns; only models with a stack or memory tape solved nested-rule tasks.

Abstract · Neural Networks and the Chomsky Hierarchy

Reliable generalization lies at the heart of safe ML and AI. However, understanding when and how neural networks generalize remains one of the most important unsolved problems in the field. In this work, we conduct an extensive empirical study (20'910 models, 15 tasks) to investigate whether insights from the theory of computation can predict the limits of neural network generalization in practice. We demonstrate that grouping tasks according to the Chomsky hierarchy allows us to forecast whether certain architectures will be able to generalize to out-of-distribution inputs. This includes negative results where even extensive amounts of data and training time never lead to any non-trivial generalization, despite models having sufficient capacity to fit the training data perfectly. Our results show that, for our subset of tasks, RNNs and Transformers fail to generalize on non-regular tasks, LSTMs can solve regular and counter-language tasks, and only networks augmented with structured memory (such as a stack or memory tape) can successfully generalize on context-free and context-sensitive tasks.

Grégoire Delétang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein, Li Kevin Wenliang, Elliot Catt, Chris Cundy, Marcus Hutter, Shane Legg, Joel Veness, Pedro A. Ortega
arXiv:2207.02098 · cs.LG, cs.AI, cs.CL, cs.FL · submitted Jul 5, 2022 · updated Feb 28, 2023
abstract · pdf · html

add comment on HN
Also discussed: Jan 2023 (164 points, 79 comments)

DCF Reverse String task is my personal favorite, when evaluating sequnece-processing neural nets. So simple, yet puzzles systems with billions of parameters.

Love the conclusion too:

> In particular, we showed that state-of-the-art architectures, such as LSTMs and Transformers, cannot solve seemingly simple tasks, such as duplicating a string, when evaluated on sequences that are significantly longer than those seen during training. Moreover, we showed that models interacting with an external memory structure, such as a stack or a finite tape, can climb the Chomsky hierarchy, indicating a promising direction for improvements in architecture design.

Which other labs work in this direction?