Pretraining Recurrent Networks without Recurrence

Akarsh Kumar, Phillip IsolaarXiv 2026

TL;DR

Supervised Memory Training (SMT) eliminates the need for Backpropagation Through Time (BPTT) when pretraining nonlinear Recurrent Neural Networks (RNNs). By leveraging a Transformer teacher to generate optimal one-step memory transition labels, SMT enables fully time-parallel training with a stable $O(1)$ gradient path length. This approach allows nonlinear RNNs to bypass the vanishing/exploding gradient bottleneck, training faster and capturing long-range dependencies far better than traditional BPTT.

What Problem Does This Paper Address?

Recurrent Neural Networks (RNNs) are theoretically ideal for processing long sequential data because they maintain a fixed-size memory state. However, training them is notoriously difficult due to the credit assignment problem: understanding how an action taken at time step $t$ affects an outcome at time step $t+N$.

The standard approach, Backpropagation Through Time (BPTT), unrolls the network sequentially over the entire sequence. This introduces two major flaws:

  1. No Parallelism: The sequential nature prevents time-parallel training, making it scale poorly on modern parallel hardware (GPUs).
  2. Gradient Instability: Gradients must travel along an $O(T)$ path length, frequently vanishing or exploding, which makes learning long-range associations nearly impossible.

While modern linear RNNs (like Mamba or RWKV) achieve parallel training, their linear transition functions fundamentally limit their expressivity. Nonlinear RNNs are highly expressive but remain trapped by the limitations of BPTT. SMT aims to break this deadlock.

Methods

The core philosophy of SMT is to decouple what to remember (memory representation) from how to update memory (memory dynamics).

Instead of unrolling the RNN and calculating gradients across time, SMT turns RNN training into a standard, one-step supervised learning problem: $(m_t, x_{t+1}) \rightarrow m_{t+1}$. To get the "ground truth" memory labels ($m_t$), the authors train a Transformer encoder-decoder pair:

  • The Encoder ($\mathcal{E}_\phi$): A bidirectional Transformer that compresses the past context into a predictive memory state $m_t$.
  • The Decoder ($\mathcal{D}_\psi$): A causal Transformer that uses $m_t$ to predict the future sequence.

Once the teacher encoder learns to construct these predictive states, the RNN updater network ($f_\theta$) is trained via a simple dynamics loss ($\mathcal{L}^{\text{dyn}}$) to predict the next memory state $\hat{m}_{t+1}$ given the current memory $m_t$ and the next token $x_{t+1}$. A uniformity loss is added to prevent the memory space from collapsing.

Figure 1: BPTT vs SMT. Left: BPTT trains an RNN by recurrently unrolling the “updater” network in time, and backpropagating gradients through the entire graph. Right: Supervised Memory Training (SMT) trains an RNN with supervised learning on one-step memory transition labels, which are generated by a Transformer encoder-decoder model pair trained to produce predictive states. SMT is fully time-parallel. In SMT, the longest gradient path between tokens is O(1) (compared to O(T) in BPTT), which stabilizes gradients, making learning long-range dependencies qualitatively easier.

DAgger Memory Training (DMT)

Because SMT trains the RNN on perfect teacher-generated memories, a train-test mismatch occurs when the RNN is unrolled autoregressively using its own imperfect predictions. This causes "rollout drift." To fix this, the authors introduce DMT, a lightweight fine-tuning phase that uses on-policy imitation learning to teach the RNN to autocorrect its own trajectory errors.

SMT vs DMT Trajectory Drift

Datasets

The authors evaluated SMT across both synthetic and natural benchmarks:

  • Synthetic Tasks: Designed to isolate specific capabilities, including Retrieval (gradient stability), String Copy (memory capacity), Stack Operations (state tracking), Keys-Values (associative recall), and Modular Arithmetic (in-context learning).
  • TinyStories: A character-level language modeling dataset used to test naturalistic long-range memory.
  • MNIST & Sketchy (Pixel Sequence Modeling): Images flattened into 1D sequences via raster-scan order. This creates an extremely difficult long-range dependency task (termed "Attneave's task"), where the network must remember pixels from previous rows hundreds of steps ago to understand the current stroke structure.

Key Insights and Ideas

  • Sequence-to-Set Reframing: By augmenting every token with a timestamp, the past context can be treated as an unordered set rather than a sequence. This allows a permutation-invariant model like a Transformer to compute optimal memory states completely in parallel, bypassing sequential recurrence during representation learning.
  • Credit Amortization: The authors discovered that when the encoder and RNN are trained jointly, credit propagates backward through gradient optimization steps rather than an unrolled computation graph. Information is passed backward step-by-step across optimization iterations, acting similarly to value bootstrapping in Reinforcement Learning.
  • Superior Inductive Bias: Interestingly, when evaluated on sequences longer than those seen during training, the SMT-trained RNN significantly outperformed its own Transformer teacher. This highlights that fixed-state updates provide a much better inductive bias for length generalization than the growing lookup tables inherent to Transformers.

Key Results

  • Synthetic Superiority: SMT $\rightarrow$ DMT consistently outperformed BPTT across all synthetic tasks, demonstrating complete robustness to increasing sequence lengths where BPTT failed entirely.
Figure 3: Synthetic Task Experiments. We evaluate BPTT, SMT, and SMT→DMT using five synthetic tasks with various settings to probe different properties of the algorithms. ∗signifies that the SMT Encoder is the teacher Transformer (not an RNN) and is used only as a reference. Across all tasks and task settings, SMT→DMT outperforms BPTT, signaling that SMT has better gradient properties, memory utilization, state tracking, associative recall, and in-context learning than BPTT.
  • Conquering Attneave's Task: In 1D pixel sequence modeling, BPTT failed to generate coherent images, even when using a gated architecture like a GRU. In contrast, SMT-trained non-gated RNNs successfully captured global stroke structures to generate recognizable digits and sketches.
Figure 4: Attneave’s MNIST Generation. BPTT fails to effectively capture the long-range depen- dencies required for pixel sequence modeling, even with a GRU. SMT→DMT captures these depen- dencies with a non-gated RNN architecture. More samples are in Appendix Figure 17.
  • Compute Efficiency: SMT proved to be significantly more efficient than BPTT in terms of sequential compute (measured in SeqFLOPs), achieving lower test loss with orders of magnitude fewer serial steps due to its time-parallel nature.

Limitations and Future Work

  • Teacher Expressivity Bottleneck: Because the RNN learns from a time-parallel Transformer teacher, it inherits the theoretical limitations of the teacher's sequential depth. For tasks requiring deeply nested sequential reasoning beyond the teacher's capacity, additional BPTT fine-tuning may still be necessary.
  • Architecture Sensitivity: SMT failed when applied to GRU backbones, as the GRU architecture induced memory space collapse during training. Adapting SMT to work seamlessly with gated architectures remains an open problem.
  • Sequential Fine-Tuning: While SMT is fully parallel, the DMT fine-tuning phase requires unrolling the RNN, meaning it is sequential (though computationally lightweight). Future work will explore parallelizing this step using parallel solvers like DEER.

Summary updated

BibTeX
@misc{kumar2026pretraining,
  author = {Akarsh Kumar and Phillip Isola},
  title = {{Pretraining Recurrent Networks without Recurrence}},
  year = {2026},
  eprint = {2606.06479},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.06479},
}
Figure