Neural Networks as Universal Finite-State Machines: A Constructive Deterministic Finite Automaton Theory

Sahil Rajesh Dhayalkar
5/16/2025
cs.LGcs.AIcs.FL

No confident code implementation found for this paper.

Abstract

We present a complete theoretical and empirical framework establishing feedforward neural networks as universal finite-state machines (N-FSMs). Our results prove that finite-depth ReLU and threshold networks can exactly simulate deterministic finite automata (DFAs) by unrolling state transitions into depth-wise neural layers, with formal characterizations of required depth, width, and state compression. We demonstrate that DFA transitions are linearly separable, binary threshold activations allow exponential compression, and Myhill-Nerode equivalence classes can be embedded into continuous latent spaces while preserving separability. We also formalize the expressivity boundary: fixed-depth feedforward networks cannot recognize non-regular languages requiring unbounded memory. Unlike prior heuristic or probing-based studies, we provide constructive proofs and design explicit DFA-unrolled neural architectures that empirically validate every claim. Our results bridge deep learning, automata theory, and neural-symbolic computation, offering a rigorous blueprint for how discrete symbolic processes can be realized in continuous neural systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{dhayalkar2025neural,
  title  = {Neural Networks as Universal Finite-State Machines: A Constructive Deterministic Finite Automaton Theory},
  author = {Sahil Rajesh Dhayalkar},
  year   = {2025},
  eprint = {2505.11694},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.11694v2}
}

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

Discussion