Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Neural Networks and the Chomsky Hierarchy

About

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\'egoire Del\'etang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein, Li Kevin Wenliang, Elliot Catt, Chris Cundy, Marcus Hutter, Shane Legg, Joel Veness, Pedro A. Ortega• 2022

Related benchmarks

TaskDatasetResultRank
Binary AdditionFormal-language benchmark lengths 41-500 (test)
Accuracy100
6
Binary MultiplicationFormal-language benchmark lengths 41-500 (test)
Accuracy (%)58.5
6
Compute SqrtFormal-language benchmark lengths 41-500 (test)
Accuracy (%)57.8
6
Cycle NavigationFormal-language benchmark lengths 41-500 (test)
Accuracy100
6
Duplicate StringFormal-language benchmark lengths 41-500 (test)
Accuracy100
6
Even PairsFormal-language benchmark lengths 41-500 (test)
Accuracy (%)100
6
Missing DuplicateFormal-language benchmark lengths 41-500 (test)
Accuracy100
6
Modular ArithmeticFormal-language benchmark lengths 41-500 (test)
Accuracy96.1
6
Modular Arithmetic (Simple)Formal-language benchmark lengths 41-500 (test)
Accuracy100
6
Odds FirstFormal-language benchmark lengths 41-500 (test)
Accuracy100
6
Showing 10 of 15 rows

Other info

Follow for update