Skip to main content
QUICK REVIEW

[Paper Review] Recurrent Neural Networks as Weighted Language Recognizers

Yining Chen, Sorcha Gilroy|arXiv (Cornell University)|Nov 15, 2017
Natural Language Processing TechniquesComputer Science13 references6 citations
TL;DR

This paper investigates the computational complexity of fundamental problems—consistency, equivalence, minimization, and highest-weighted string identification—for single-layer ReLU-activated, rational-weight RNNs with softmax output, commonly used in NLP. It proves that most problems are undecidable due to the Turing-completeness of RNNs, but under consistency and polynomial-length constraints, the highest-weighted string problem becomes NP-complete and APX-hard, justifying the use of heuristic approximation in practice.

ABSTRACT

We investigate the computational complexity of various problems for simple recurrent neural networks (RNNs) as formal models for recognizing weighted languages. We focus on the single-layer, ReLU-activation, rational-weight RNNs with softmax, which are commonly used in natural language processing applications. We show that most problems for such RNNs are undecidable, including consistency, equivalence, minimization, and the determination of the highest-weighted string. However, for consistent RNNs the last problem becomes decidable, although the solution length can surpass all computable bounds. If additionally the string is limited to polynomial length, the problem becomes NP-complete and APX-hard. In summary, this shows that approximations and heuristic algorithms are necessary in practical applications of those RNNs.

Motivation & Objective

  • To analyze the computational complexity of core problems in RNN-based weighted language recognition.
  • To determine whether fundamental tasks like consistency, equivalence, minimization, and highest-weighted string identification are decidable or tractable for standard RNNs used in NLP.
  • To establish theoretical limits on exact algorithms for RNNs, motivating the use of approximation and heuristic methods in practice.

Proposed method

  • Formalizing a single-layer RNN with ReLU activation, rational weights, and softmax output as a weighted language recognizer.
  • Reducing the halting problem to prove undecidability of consistency, equivalence, and minimization in RNNs.
  • Constructing RNNs that simulate Turing machines to demonstrate undecidability via reductions from undecidable problems.
  • Analyzing the highest-weighted string problem under consistency and polynomial-length constraints to establish NP-completeness and APX-hardness.
  • Using a weighted language model where the RNN assigns real-valued weights to strings, with the total weight computed as the product of token predictions.
  • Applying reductions from known undecidable problems (e.g., halting problem) and complexity classes (e.g., NP-completeness) to establish theoretical bounds.

Experimental results

Research questions

  • RQ1Is the consistency of a weighted language computed by an RNN decidable?
  • RQ2Can the highest-weighted string in a weighted language recognized by an RNN be computed exactly and efficiently?
  • RQ3Is the equivalence of two RNNs—i.e., whether they assign identical weights to all strings—decidable?
  • RQ4Can the number of hidden neurons in an RNN be minimized exactly while preserving its language recognition behavior?
  • RQ5What is the computational complexity of finding the highest-weighted string when the solution length is bounded by a polynomial?

Key findings

  • Consistency of RNN-computed weighted languages is undecidable, meaning there is no algorithm to verify whether the total weight over all strings sums to one.
  • Equivalence between two RNNs is undecidable, as it reduces to the halting problem.
  • Minimization of the number of hidden neurons in an RNN is undecidable, even for rational weights and ReLU activations.
  • For consistent RNNs, the highest-weighted string problem is decidable, but the solution length can exceed any computable bound.
  • When restricted to polynomial-length strings, the highest-weighted string problem becomes NP-complete and APX-hard, indicating inherent intractability.
  • These results justify the widespread use of heuristic and approximation methods such as beam search and greedy decoding in NLP systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.