Table of Contents
Fetching ...

A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networks

Sahil Rajesh Dhayalkar

TL;DR

This paper builds a constructive bridge between NFAs and neural networks by encoding NFA states as binary vectors and representing transitions as shared symbolic matrices within time-shared, depth-unrolled feedforward networks (TS-FFNs). It proves that every regular language recognized by an $n$-state NFA can be exactly recognized by a TS-FFN with $O(k n^2)$ parameters, independent of input length, and that the framework is empirically learnable via gradient descent (Proposition 5.1). The construction also yields a bidirectional equivalence: TS-FFNs can simulate NFAs exactly, and any TS-FFN constructed from this symbolic recipe corresponds to an NFA recognizing the same language. These results unify automata theory and neural computation and are validated by experiments showing precise state propagation, epsilon-closure handling, and language equivalence.

Abstract

We present a formal and constructive simulation framework for nondeterministic finite automata (NFAs) using time-shared, depth-unrolled feedforward networks (TS-FFNs), i.e., acyclic unrolled computations with shared parameters that are functionally equivalent to unrolled recurrent or state-space models. Unlike prior approaches that rely on explicit recurrent architectures or post hoc extraction methods, our formulation symbolically encodes automaton states as binary vectors, transitions as sparse matrix transformations, and nondeterministic branching-including $\varepsilon$-closures-as compositions of shared thresholded updates. We prove that every regular language can be recognized exactly by such a shared-parameter unrolled feedforward network, with parameter count independent of input length. Our construction yields a constructive equivalence between NFAs and neural networks and demonstrates \emph{empirical learnability}: these networks can be trained via gradient descent on supervised acceptance data to recover the target automaton behavior. This learnability, formalized in Proposition 5.1, is the crux of this work. Extensive experiments validate the theoretical results, achieving perfect or near-perfect agreement on acceptance, state propagation, and closure dynamics. This work clarifies the correspondence between automata theory and modern neural architectures, showing that unrolled feedforward networks can perform precise, interpretable, and trainable symbolic computation.

A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networks

TL;DR

This paper builds a constructive bridge between NFAs and neural networks by encoding NFA states as binary vectors and representing transitions as shared symbolic matrices within time-shared, depth-unrolled feedforward networks (TS-FFNs). It proves that every regular language recognized by an -state NFA can be exactly recognized by a TS-FFN with parameters, independent of input length, and that the framework is empirically learnable via gradient descent (Proposition 5.1). The construction also yields a bidirectional equivalence: TS-FFNs can simulate NFAs exactly, and any TS-FFN constructed from this symbolic recipe corresponds to an NFA recognizing the same language. These results unify automata theory and neural computation and are validated by experiments showing precise state propagation, epsilon-closure handling, and language equivalence.

Abstract

We present a formal and constructive simulation framework for nondeterministic finite automata (NFAs) using time-shared, depth-unrolled feedforward networks (TS-FFNs), i.e., acyclic unrolled computations with shared parameters that are functionally equivalent to unrolled recurrent or state-space models. Unlike prior approaches that rely on explicit recurrent architectures or post hoc extraction methods, our formulation symbolically encodes automaton states as binary vectors, transitions as sparse matrix transformations, and nondeterministic branching-including -closures-as compositions of shared thresholded updates. We prove that every regular language can be recognized exactly by such a shared-parameter unrolled feedforward network, with parameter count independent of input length. Our construction yields a constructive equivalence between NFAs and neural networks and demonstrates \emph{empirical learnability}: these networks can be trained via gradient descent on supervised acceptance data to recover the target automaton behavior. This learnability, formalized in Proposition 5.1, is the crux of this work. Extensive experiments validate the theoretical results, achieving perfect or near-perfect agreement on acceptance, state propagation, and closure dynamics. This work clarifies the correspondence between automata theory and modern neural architectures, showing that unrolled feedforward networks can perform precise, interpretable, and trainable symbolic computation.

Paper Structure

This paper contains 40 sections, 7 theorems, 31 equations, 8 figures, 2 tables.

Key Result

Proposition 4.1

Let $Q = \{q_1, \ldots, q_n\}$ be the set of states of an NFA. Define the one-hot indicator vector $e_i \in \{0,1\}^n$ such that $[e_i]_j = \mathbf{1}_{[j = i]}$. Then any subset of states $S \subseteq Q$ can be represented as a binary vector $s \in \{0,1\}^n$ defined by: The vector $s$ is called the state vector encoding of $S$. For any such $s$ and symbolic transition matrix $T^{x_t} \in \{0,1\

Figures (8)

  • Figure : Figure 1: Batchwise training and test loss curves for Configuration 1 with Binary Activation across all seeds.
  • Figure : Figure 2: Batchwise training and test loss curves for Configuration 1 with No Activation (Linear) across all seeds.
  • Figure : Figure 3: Batchwise training and test loss curves for Configuration 1 with ReLU Activation across all seeds.
  • Figure : Figure 4: Batchwise training and test loss curves for Configuration 1 with Sigmoid Activation across all seeds.
  • Figure : Figure 5: Batchwise training and test loss curves for Configuration 2 with Binary Activation across all seeds.
  • ...and 3 more figures

Theorems & Definitions (27)

  • Definition 3.1: Non-Deterministic Finite Automaton (NFA)
  • Definition 3.2: Language Accepted by an NFA
  • Definition 3.3: Feedforward Network with Binary Threshold Activation
  • Definition 3.4: Time-Shared, Depth-Unrolled Feedforward Network (TS-FFN)
  • Definition 3.5: $\varepsilon$-Closure
  • Definition 3.6: Symbolic Transition Matrix
  • Definition 3.7: Simulation of an NFA by a TS-FFN
  • Definition 3.8: Equivalence Between TS-FFN and NFA
  • Proposition 4.1: Binary State Vector Representation
  • Remark 4.2: On Binary Thresholding for Interpretability
  • ...and 17 more