Abstract
In this paper, we unravel a fundamental connection between weighted finite automata (WFAs) and second-order recurrent neural networks (2-RNNs): in the case of sequences of discrete symbols, WFAs and 2-RNNs with linear activation functions are expressively equivalent. Motivated by this result, we build upon a recent extension of the spectral learning algorithm to vector-valued WFAs and propose the first provable learning algorithm for linear 2-RNNs defined over sequences of continuous input vectors. This algorithm relies on estimating low rank sub-blocks of the so-called Hankel tensor, from which the parameters of a linear 2-RNN can be provably recovered. The performances of the proposed method are assessed in a simulation study.
Introduction
Recurrent Neural Networks (RNNs) are the primary tools for sequential data analysis, yet their training via backpropagation through time (BPTT) lacks theoretical guarantees, often suffering from local minima and gradient instability. Conversely, Weighted Finite Automata (WFAs) possess a rigorous theoretical foundation with consistent "spectral learning" algorithms that guarantee convergence to the true model given sufficient data. However, WFAs have traditionally been restricted to discrete symbol sequences. This research bridges the gap by establishing an expressive equivalence between a specific class of RNNs and WFAs, enabling the application of provable learning techniques to continuous sequence modeling.
Theoretical Equivalence
The core theoretical contribution is the proof that second-order RNNs (2-RNNs) with linear activation functions are mathematically equivalent to vector-valued WFAs. In a 2-RNN, the input and the previous hidden state interact multiplicatively, a structure that mirrors the transition dynamics of a WFA. This equivalence implies that a linear 2-RNN can be viewed as a generalization of a WFA designed to process continuous input vectors rather than discrete alphabets.
Spectral Learning via Hankel Tensors
To learn the parameters of these models, the authors utilize the Hankel tensor, a multi-dimensional structure containing the outputs of all possible sequences. Spectral learning involves identifying a low-rank decomposition of this tensor to recover the system's hidden states.
Because the size of the Hankel tensor grows exponentially with sequence length, the authors employ Tensor Train (TT) decomposition. As illustrated in the figure above, this technique represents the massive tensor in a compressed format, allowing for efficient computation and making the spectral learning algorithm (2RNN-SL) scalable for practical applications.
Experimental Evaluation
The proposed method was evaluated on synthetic tasks and real-world wind speed prediction data. In noiseless synthetic environments, the algorithm achieved exact recovery of the target 2-RNN parameters once a sufficient training size was reached.
As shown in the performance plots, the tensor-based recovery method (TIHT) demonstrates superior sample efficiency and robustness to noise compared to standard matrix-based methods and standard LSTMs. On real-world wind speed forecasting, the linear 2-RNN trained with spectral learning outperformed both ARIMA and LSTM models, particularly for longer prediction horizons (3-hour and 6-hour ahead forecasts).
Conclusion
This work provides a theoretical "anchor" for recurrent architectures by formalizing their relationship with WFAs. By introducing a provably consistent, moment-based learning algorithm, it offers a robust alternative to gradient-based optimization for linear recurrent models. Future research aims to extend these guarantees to non-linear architectures and explore the use of spectral learning as a principled initialization strategy for deep RNNs to bypass the challenges of random initialization.
Summary updated