Table of Contents
Fetching ...

A Tensor Decomposition Perspective on Second-order RNNs

Maude Lizaire, Michael Rizvi-Martel, Marawan Gamal Abdel Hameed, Guillaume Rabusseau

TL;DR

This work analyzes Second-order RNNs through CP tensor decomposition, introducing CPRNNs as a rank-controlled, parameter-efficient alternative to 2RNNs. It formalizes how CPRNN expressivity depends on CP rank $R$ and hidden size $n$, proving inclusions, saturation at $R_{\max}$, and a typical-rank threshold $R_{\mathrm{typ-max}}$, while showing CPRNNs interpolate between RNNs and 2RNNs and include MIRNN as a special case. Theoretical results are complemented by Penn Treebank experiments demonstrating that, for a fixed parameter budget, CPRNNs can outperform RNNs, 2RNNs, and MIRNNs by choosing appropriate rank and hidden size. The findings illuminate how tensor decompositions control bias-variance tradeoffs in higher-order RNNs and motivate exploring other decompositions and extensions to state-space models. Overall, the rank-driven CPRNN framework provides a principled path to scalable, expressive sequence models that balance capacity and efficiency.

Abstract

Second-order Recurrent Neural Networks (2RNNs) extend RNNs by leveraging second-order interactions for sequence modelling. These models are provably more expressive than their first-order counterparts and have connections to well-studied models from formal language theory. However, their large parameter tensor makes computations intractable. To circumvent this issue, one approach known as MIRNN consists in limiting the type of interactions used by the model. Another is to leverage tensor decomposition to diminish the parameter count. In this work, we study the model resulting from parameterizing 2RNNs using the CP decomposition, which we call CPRNN. Intuitively, the rank of the decomposition should reduce expressivity. We analyze how rank and hidden size affect model capacity and show the relationships between RNNs, 2RNNs, MIRNNs, and CPRNNs based on these parameters. We support these results empirically with experiments on the Penn Treebank dataset which demonstrate that, with a fixed parameter budget, CPRNNs outperforms RNNs, 2RNNs, and MIRNNs with the right choice of rank and hidden size.

A Tensor Decomposition Perspective on Second-order RNNs

TL;DR

This work analyzes Second-order RNNs through CP tensor decomposition, introducing CPRNNs as a rank-controlled, parameter-efficient alternative to 2RNNs. It formalizes how CPRNN expressivity depends on CP rank and hidden size , proving inclusions, saturation at , and a typical-rank threshold , while showing CPRNNs interpolate between RNNs and 2RNNs and include MIRNN as a special case. Theoretical results are complemented by Penn Treebank experiments demonstrating that, for a fixed parameter budget, CPRNNs can outperform RNNs, 2RNNs, and MIRNNs by choosing appropriate rank and hidden size. The findings illuminate how tensor decompositions control bias-variance tradeoffs in higher-order RNNs and motivate exploring other decompositions and extensions to state-space models. Overall, the rank-driven CPRNN framework provides a principled path to scalable, expressive sequence models that balance capacity and efficiency.

Abstract

Second-order Recurrent Neural Networks (2RNNs) extend RNNs by leveraging second-order interactions for sequence modelling. These models are provably more expressive than their first-order counterparts and have connections to well-studied models from formal language theory. However, their large parameter tensor makes computations intractable. To circumvent this issue, one approach known as MIRNN consists in limiting the type of interactions used by the model. Another is to leverage tensor decomposition to diminish the parameter count. In this work, we study the model resulting from parameterizing 2RNNs using the CP decomposition, which we call CPRNN. Intuitively, the rank of the decomposition should reduce expressivity. We analyze how rank and hidden size affect model capacity and show the relationships between RNNs, 2RNNs, MIRNNs, and CPRNNs based on these parameters. We support these results empirically with experiments on the Penn Treebank dataset which demonstrate that, with a fixed parameter budget, CPRNNs outperforms RNNs, 2RNNs, and MIRNNs with the right choice of rank and hidden size.
Paper Structure (35 sections, 13 theorems, 18 equations, 9 figures)

This paper contains 35 sections, 13 theorems, 18 equations, 9 figures.

Key Result

Theorem 1

The following hold for any $n$ and $d$: Moreover, assuming $n\leq d$:

Figures (9)

  • Figure 1: Overview of expressivity relationships among Recurrent Neural Network architectures. 2RNNs (blue) encompasses all other models. BIRNN (purple) and RNN (yellow) are a subclasses of 2RNNs as they only have first-order and second-order interactions respectively. MIRNN (red) includes element wise multiplicative interactions. CPRNNs expressive power varies with the rank $R$, reaching the same capacity as 2RNNs when $R=R_{\text{max}}$.
  • Figure 2: Relations of expressivity between CP(BI)RNNs, 2RNNs and MIRNNs as a function of the rank $R$ of the CP(BI)RNN; $n$ denotes the hidden dimension, $d$ the input dimension and $R_{\mathrm{max}}$ (resp. $R_{\mathrm{typ-max}}$) the maximal CP rank (resp. maximal typical CP rank). Theorems \ref{['thm:rankcprnn']}&\ref{['thm:hiddencprnn']} and Corollaries \ref{['cor:2rnn']}&\ref{['thm:mirnn']} detail these results.
  • Figure 3: Different recurrent models considered in this work with their hidden state computation and the tensor network representation of their second-order term (the diamond shape represents a diagonal matrix).
  • Figure 4: Elements of proof for strict inclusion of CPBIRNNs in Theorem \ref{['thm:rankcprnn']}. Details of the proof can be found in the Appendix.
  • Figure 5: Schematic representation of Lemma \ref{['lemma:diff.ima.dims.compose.linear.form']} and its application in the context of Theorem \ref{['thm:hiddencprnn']}.
  • ...and 4 more figures

Theorems & Definitions (24)

  • Definition 1: RNN
  • Definition 2: 2RNN
  • Definition 3: CPRNN
  • Definition 4: MIRNN
  • Definition 5
  • Theorem 1
  • Theorem 2
  • Lemma 1
  • Corollary 3
  • Corollary 4
  • ...and 14 more