Learning Context-Free Languages with Nondeterministic Stack RNNs

Brian DuSell, David Chiang
10/9/2020
cs.CL

Official code: bdusell/nondeterministic-stack-rnn (20 stars, Python, PyTorch, last commit 2024-03-21).

Abstract

We present a differentiable stack data structure that simultaneously and tractably encodes an exponential number of stack configurations, based on Lang's algorithm for simulating nondeterministic pushdown automata. We call the combination of this data structure with a recurrent neural network (RNN) controller a Nondeterministic Stack RNN.

Show full abstract

We compare our model against existing stack RNNs on various formal languages, demonstrating that our model converges more reliably to algorithmic behavior on deterministic tasks, and achieves lower cross-entropy on inherently nondeterministic tasks.

View on arXivView PDF

Code Implementations(1)

PyTorch

Code for the paper "The Surprising Computational Power of Nondeterministic Stack RNNs" (DuSell and Chiang, 2023)

201Python, ShellOct 5, 20202 years ago
conll2020deep-learningiclr2022iclr2023language-model+6 more

Similar Papers

Cite this paper

@article{dusell2020learning,
  title  = {Learning Context-Free Languages with Nondeterministic Stack RNNs},
  author = {Brian DuSell and David Chiang},
  year   = {2020},
  eprint = {2010.04674},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.04674}
}

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/2010.04674.svg)](https://codeofpaper.com/paper/2010.04674)

Discussion