recurrent neural networks

Implementing sequence models that propagate state across time using architectures such as vanilla RNNs, LSTMs, and GRUs, training via backpropagation-through-time on tasks like time-series forecasting or language modeling, and tuning for issues like vanishing gradients using frameworks like PyTorch or TensorFlow.

recurrentneuralnetworks

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

A Survey on Structured State Space Sequence (S4) Models

Mar 22, 2025
SS
Shriyank Somvanshi
🏛️ Texas State University

Structured State Space Models (SSMs) face a fundamental trade-off between long-range dependency modeling and computational efficiency, limiting their broad adoption across NLP, speech, vision, and time-series domains. This paper provides the first systematic survey of SSMs—from theoretical foundations (continuous-time dynamics, HiPPO projections) to industrial variants (S4, Mamba, S5, Jamba)—unifying analysis of their linear-time complexity, memory-efficient parameterization, and hardware-aware inference acceleration. We identify selectivity mechanisms and low-rank structured matrices as key innovations enabling SSMs to emerge as the third major sequence modeling paradigm—alongside RNNs and Transformers—achieving near-Transformer accuracy on long-sequence tasks while reducing memory footprint by over 70% and significantly improving inference throughput. We further highlight critical open challenges: training instability, hybrid modeling strategies, and interpretability.

Addressing long-range dependency modeling in sequence tasksImproving computational efficiency over RNNs and TransformersOptimizing memory and inference speed in SSM models

This work addresses the lack of systematic benchmarks for deep learning model selection in real-world scenarios. We propose the first unified experimental framework to conduct a horizontal evaluation of six model architectures—CNN, Simple RNN, LSTM, Bi-LSTM, GRU, and Bi-GRU—across three modalities: image classification (Fruit-360), time-series classification (ARAS), and text sentiment analysis (IMDB). Implemented in PyTorch, the evaluation employs multiple metrics: accuracy, F1-score, and training efficiency. Results reveal that Bi-LSTM achieves a 4.2% average accuracy gain on time-series tasks; CNN attains 98.7% accuracy on Fruit-360; and GRU matches LSTM’s performance with ~20% fewer parameters. The study uncovers principled correspondences between architectural characteristics (e.g., gating mechanisms, bidirectionality) and data modality properties, yielding reproducible empirical guidelines and theoretical insights for informed model selection.

Comparative analysis of deep learning models like CNN, RNN, LSTM, GRU.Evaluation of model performance using IMDB, ARAS, and Fruit-360 datasets.Exploration of benefits and limitations of various deep learning architectures.

Must-Read Papers

Most classic and influential ideas
View more

Can Local Representation Alignment RNNs Solve Temporal Tasks?

Apr 18, 2025
NM
Nikolay Manchev
🏛️ King's College London

This paper addresses the gradient explosion/vanishing problem and biological implausibility of backpropagation through time (BPTT) in RNN training. To this end, it proposes a novel training framework based on Local Representation Alignment (LRA). The key contributions are threefold: (i) a theoretical analysis demonstrating that LRA alone cannot mitigate gradient vanishing; (ii) identification of the ineffectiveness of conventional gradient clipping under LRA; and (iii) the design of a dedicated gradient regularization mechanism coupled with normalization strategies to stabilize gradient flow. Experiments on three canonical benchmarks—temporal order, 3-bit temporal order, and random permutation—show that the proposed method significantly outperforms baseline approaches in both convergence speed and final accuracy. It thus enhances the stability and practicality of RNNs for sequential modeling tasks.

Analyzes Local Representation Alignment RNN performance and limitationsIntroduces gradient regularization to improve LRA RNN convergenceProposes target propagation-based RNN training to reduce gradient instability

SequenceLayers: Sequence Processing and Streaming Neural Networks Made Easy

Jul 31, 2025
RS
RJ Skerry-Ryan
🏛️ Google DeepMind

To address the fundamental mismatch between teacher-forced training and autoregressive inference—along with associated complexities in state management and error-proneness in sequence modeling—this paper introduces a unified, streamable neural network layer API. The core innovation is an explicit state interface coupled with a `step()` method, enabling identical numerical behavior under both parallel (training-time) and incremental (inference-time) execution modes within the same layer. By abstracting temporal states—including KV caches, convolutional buffers, and RNN hidden states—the API supports declarative, composable layer design in JAX and TensorFlow 2. An open-source library provides a comprehensive suite of streamable primitive layers and composition utilities. This framework significantly lowers the barrier to developing and deploying streaming models while ensuring production-grade correctness, efficiency, and maintainability.

Eases creation of sequence models for layer/step executionEnsures identical results between stateful and stateless invocationsSimplifies streaming and parallel sequence processing while reducing bugs

Learning to (Learn at Test Time): RNNs with Expressive Hidden States

Jul 05, 2024
YS
Yu Sun
🏛️ Stanford University | UC San Diego | UC Berkeley | Meta AI

Traditional RNNs suffer from weak representational capacity of hidden states and difficulty in modeling long-range dependencies. Method: This paper proposes the Test-Time Training (TTT) layer paradigm, which treats RNN hidden states as trainable modules—e.g., linear models or two-layer MLPs—and performs self-supervised updates per token during inference, enabling online adaptation of hidden states. Crucially, this retains linear time complexity while overcoming the fixed-parameter limitation of conventional RNNs. Contribution/Results: Experiments on models ranging from 125M to 1.3B parameters show that TTT-Linear and TTT-MLP achieve consistently decreasing perplexity on ultra-long contexts (>16K tokens), significantly outperforming Mamba and matching Transformer performance. This work is the first to empirically validate that linear-complexity architectures can simultaneously achieve strong expressivity and online learning capability through adaptive hidden-state design.

Existing RNNs lack expressive hidden states for long contextsProposes linear-complexity layers with trainable hidden states (TTT)Self-attention has quadratic complexity in long contexts

This paper addresses poor model reproducibility and insufficient open-source implementations in time-series forecasting by proposing a lightweight, fully reproducible LSTM/GRU modeling paradigm. Methodologically, it constructs univariate sequence samples via sliding windows and evaluates performance using two metrics—RMSE and directional accuracy (DA)—on both synthetic activity data (Activities) and real-world financial data (BSE BANKEX). A key finding is that effective training requires only a single time series exhibiting repetitive patterns, without complex preprocessing or large-scale datasets. Experiments show that the proposed implementation significantly outperforms the “repeat last value” baseline for 1-step and 20-step predictions on Activities, while achieving comparable performance on BSE BANKEX. All code, datasets, and complete experimental configurations are publicly released to ensure full reproducibility and out-of-the-box usability.

Comparing forecasting accuracy against a simple baseline modelEvaluating performance on financial and synthetic activity datasetsImplementing open-source LSTM and GRU for time series forecasting

Unlocking the Power of LSTM for Long Term Time Series Forecasting

Aug 19, 2024
YK
Yaxuan Kong
🏛️ University of Oxford | University of Pennsylvania | Princeton University | Alibaba Group | The Hong Kong University of Science and Technology | Duke Kunshan University | Squirrel AI

To address the limitation of sLSTM—its poor short-term memory retention, which hinders direct application to long-horizon time series forecasting (TSF)—this paper proposes P-sLSTM, the first model to synergistically integrate sequence patching and channel independence. P-sLSTM enhances local pattern modeling via patch-based encoding, while leveraging channel-wise decoupling, exponential gating, and memory mixing to mitigate short-term memory degradation without compromising sLSTM’s inherent capacity for long-range dependency capture. Theoretically interpretable, structurally lightweight, and parameter-efficient, P-sLSTM achieves state-of-the-art performance across multiple standard long-horizon TSF benchmarks, reducing average prediction error by 12.7% compared to prior methods. Moreover, it outperforms mainstream Transformer- and RNN-based variants in inference speed, demonstrating both accuracy and efficiency advantages.

Address short memory in sLSTMEnhance sLSTM for long-term TSFPropose P-sLSTM with patching method

Latest Papers

What's happening recently
View more

Unified Implementations of Recurrent Neural Networks in Multiple Deep Learning Frameworks

Oct 24, 2025
FM
Francesco Martinuzzi
🏛️ Max Planck Institute for the Physics of Complex Systems

Existing RNN variants suffer from fragmented implementations across deep learning frameworks, lacking standardized interfaces and rigorous cross-framework evaluation—leading to poor reproducibility, redundant development, and inefficient experimentation. Method: We introduce the first standardized, multi-framework RNN interface, implemented in open-source libraries: `torchrecurrent` (Python, for PyTorch), `RecurrentLayers.jl`, and `LuxRecurrentLayers.jl` (Julia, for JAX/Flux). These provide unified, semantically consistent implementations of diverse recurrent units—including LSTM, GRU, mGRU, and Delta-RNN—as well as higher-level architectures. Contribution/Results: Our work establishes the first modular, extensible, and framework-agnostic RNN API, enabling flexible customization and seamless model migration across ecosystems. All libraries are MIT-licensed, actively maintained, and rigorously tested. By abstracting framework-specific complexities, they significantly lower implementation overhead and experimental barriers, thereby promoting structural standardization, reproducible research, and collaborative advancement in recurrent modeling.

Addressing time-consuming error-prone RNN reimplementation challengesImplementing recurrent neural networks consistently across frameworksProviding centralized library for diverse RNN variants testing

Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrence

Nov 10, 2025
SM
Sean McLeish
🏛️ University of Maryland | New York University | Lawrence Livermore National Laboratory | University of North Carolina | ELLIS Institute Tübingen | Max Planck Institute for Intelligent Systems | Tübingen AI Center | Columbia University

Pretrained non-recurrent language models suffer from high computational costs and limited scalability in reasoning depth. Method: We propose “recursification fine-tuning”—a novel adaptation framework that progressively increases reasoning steps via recursive curriculum learning, decoupling model parameter count from computational cost during training. Our approach integrates a deep recurrent architecture, stride-based parameter sharing, and dynamic sequence-length expansion to efficiently retrofit existing models without architectural overhaul. Contribution/Results: On mathematical reasoning benchmarks, our method achieves significantly higher accuracy than standard post-training baselines under identical computational budgets—demonstrating superior FLOPs-to-performance efficiency. It enables deeper, more resource-efficient reasoning while preserving model expressivity, establishing a new paradigm for lightweight yet depth-enhanced large language models.

Convert pretrained non-recurrent models to depth-recurrent architecturesImprove mathematical reasoning efficiency within fixed compute budgetsPreserve performance while reducing computational costs through recurrence

This work addresses the fragmentation in current linear recurrent neural network (LRNN) research, which is hindered by scattered implementations, strong framework dependencies, and a lack of standardized interfaces—impeding reproducibility, comparison, and extension. To bridge this gap, we introduce lrnnx, the first unified open-source library that integrates multiple modern LRNN architectures. Built on mainstream deep learning frameworks, lrnnx supports diverse parameterizations and discretization schemes without requiring custom CUDA kernels. The library offers a multi-level modular interface, ranging from low-level components to high-level models, substantially lowering the barrier to both usage and development. This design enables flexible control, facilitates fair benchmarking, and establishes a much-needed standardized toolkit for the LRNN community.

extensibilityimplementation fragmentationLinear RNNs

This work addresses the challenge that existing parallelizable sequence models, such as Transformers and state space models, struggle to simultaneously achieve efficient training and strong long-term memory retention. To overcome this limitation, the authors propose the Memory Recurrent Unit (MRU), which introduces multistable dynamics into a parallelizable RNN architecture for the first time. By eliminating transient responses, MRU enables persistent memory storage while leveraging parallel scan algorithms to ensure training efficiency. An instantiation of this framework, termed BMRU, demonstrates superior performance on long-range dependency tasks. Furthermore, BMRU can be effectively integrated with state space models to yield a hybrid architecture that combines both transient and steady-state memory capabilities, achieving high efficiency without compromising representational power.

multistabilityparallelizationpersistent memory

This work addresses the limitations of traditional recurrent neural network (RNN) training via backpropagation through time (BPTT), which suffers from sequential computation, vanishing or exploding gradients, and poor long-range dependency modeling. The authors propose Supervised Memory Training (SMT), a novel approach that decouples memory content from its update mechanism for the first time. By leveraging a Transformer encoder to generate per-timestep memory state labels, SMT reformulates RNN training as a supervised learning problem over memory transitions. This eliminates the need for unrolling the network, enabling O(1) gradient paths and full temporal parallelism. Experiments on language modeling and pixel sequence tasks demonstrate that diverse RNN architectures pretrained with SMT consistently outperform their BPTT-trained counterparts, achieving substantial gains in both long-range dependency modeling and training efficiency.

backpropagation through timecredit assignmentgradient vanishing

Hot Scholars

CG

Chenjuan Guo

Professor, East China Normal University
Data AnalyticsMachine Learning
YL

Yuxuan Liang

Assistant Professor, Hong Kong University of Science and Technology (Guangzhou)
Spatio-Temporal Data MiningUrban ComputingUrban AIFoundation Models
DT

Dacheng Tao

Nanyang Technological University
artificial intelligencemachine learningcomputer visionimage processing
PS

Philip S. Yu

Professor of Computer Science, University of Illinons at Chicago
Data miningDatabasePrivacy