Neural Networks and the Chomsky Hierarchy

Grégoire Delétang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein, Li Kevin Wenliang +6 more
7/5/2022
cs.LGcs.AIcs.CL

No official code found. Best implementation: google-deepmind/neural_networks_chomsky_hierarchy (220 stars, Apache-2.0, last commit 2024-04-12).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Neural Networks and the Chomsky Hierarchy

22025PythonJun 23, 20222 years agoApache-2.0

Similar Papers

Cite this paper

@article{deltang2022neural,
  title  = {Neural Networks and the Chomsky Hierarchy},
  author = {Grégoire Delétang and Anian Ruoss and Jordi Grau-Moya and Tim Genewein and Li Kevin Wenliang and Elliot Catt and Chris Cundy and Marcus Hutter and Shane Legg and Joel Veness and Pedro A. Ortega},
  year   = {2022},
  eprint = {2207.02098},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.02098v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.02098.svg)](https://codeofpaper.com/paper/2207.02098)

Discussion