[Paper Review] Subregular Complexity and Deep Learning
This paper investigates the ability of simple RNNs (s-RNNs) and LSTMs to learn subregular formal languages—Strictly Local (SL) and Strictly Piecewise (SP)—which encode local and long-term dependencies, respectively. Contrary to the prevailing narrative that LSTMs outperform s-RNNs on long-term dependencies, the experiments show s-RNNs often match or exceed LSTM performance on complex SP languages, challenging assumptions about LSTM superiority in sequence learning.
This paper argues that the judicial use of formal language theory and grammatical inference are invaluable tools in understanding how deep neural networks can and cannot represent and learn long-term dependencies in temporal sequences. Learning experiments were conducted with two types of Recurrent Neural Networks (RNNs) on six formal languages drawn from the Strictly Local (SL) and Strictly Piecewise (SP) classes. The networks were Simple RNNs (s-RNNs) and Long Short-Term Memory RNNs (LSTMs) of varying sizes. The SL and SP classes are among the simplest in a mathematically well-understood hierarchy of subregular classes. They encode local and long-term dependencies, respectively. The grammatical inference algorithm Regular Positive and Negative Inference (RPNI) provided a baseline. According to earlier research, the LSTM architecture should be capable of learning long-term dependencies and should outperform s-RNNs. The results of these experiments challenge this narrative. First, the LSTMs' performance was generally worse in the SP experiments than in the SL ones. Second, the s-RNNs out-performed the LSTMs on the most complex SP experiment and performed comparably to them on the others.
Motivation & Objective
- To evaluate whether LSTMs truly outperform s-RNNs in learning long-term dependencies, as claimed in deep learning literature.
- To apply formal language theory and grammatical inference to create controlled, systematic benchmarks for assessing neural network learning capabilities.
- To investigate generalization behavior of RNNs on sequences longer than those in training data, using test sets with controlled word lengths.
- To assess the limitations of the dominant narrative that LSTMs solve the vanishing gradient problem and are inherently better at learning long-term dependencies.
- To explore whether optimization techniques like Adam might mitigate s-RNNs' difficulties with long-term dependencies.
Proposed method
- The study uses six formal languages—three from the Strictly Local (SL) class and three from the Strictly Piecewise (SP) class—representing local and long-term dependencies, respectively.
- Training and test data sets were constructed for each language, with controlled word lengths to evaluate generalization beyond training sequences.
- Two types of RNNs—simple RNNs (s-RNNs) and Long Short-Term Memory networks (LSTMs)—were trained on positive and negative examples across varying hidden layer sizes.
- The Regular Positive and Negative Inference (RPNI) algorithm served as a baseline to evaluate data quality and learning feasibility for regular languages.
- Experiments systematically varied network size and used the Adam optimization algorithm to assess its impact on learning performance.
- Performance was measured using accuracy on test sets, with separate evaluations for generalization to longer sequences (Test1 and Test2).
Experimental results
Research questions
- RQ1Do LSTMs consistently outperform s-RNNs on learning long-term dependencies encoded in Strictly Piecewise (SP) languages?
- RQ2How do s-RNNs and LSTMs generalize to sequences longer than those seen during training in subregular language tasks?
- RQ3To what extent does the grammatical inference algorithm RPNI serve as a reliable baseline for evaluating the learnability of formal languages by neural networks?
- RQ4Can optimization techniques like Adam mitigate the performance gap between s-RNNs and LSTMs on long-term dependency tasks?
- RQ5Are there types of long-term dependencies—beyond the SP class—where LSTMs demonstrably outperform s-RNNs?
Key findings
- On the most complex SP language (SP8), the s-RNN outperformed the LSTM, achieving 0.8160 and 0.7702 accuracy on Test1 and Test2 with 1k hidden units, respectively, while the LSTM achieved only 0.6520 and 0.6201.
- On SP2, the s-RNN achieved 0.8371 and 0.8449 accuracy on Test1 and Test2 with 10k hidden units, outperforming the LSTM’s 0.8400 and 0.8264.
- On SP4, the s-RNN achieved 0.8160 and 0.7702 accuracy with 1k units, while the LSTM achieved 0.7270 and 0.6808, indicating consistent s-RNN superiority on complex SP tasks.
- On SP8 with 100k hidden units, the s-RNN achieved 0.8251 and 0.7505 accuracy, while the LSTM achieved 0.8117 and 0.7645, showing comparable but not superior performance.
- The LSTM performance on SP languages was generally worse than on SL languages, contradicting the expectation that LSTMs would perform comparably or better due to their architecture.
- The RPNI baseline achieved perfect accuracy (1.0000) on all languages, confirming that the data was learnable by regular language learners, suggesting the neural network failures were not due to data quality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.