Hierarchically Gated Recurrent Neural Network for Sequence Modeling

Zhen Qin, Songlin Yang, Yiran Zhong
2/12/2026

Official code: OpenNLPLab/HGRN (68 stars, last commit 2024-04-24).

Abstract

Transformers have surpassed RNNs in popularity due to their superior abilities in parallel training and long-term dependency modeling. Recently, there has been a renewed interest in using linear RNNs for efficient sequence modeling. These linear RNNs often employ gating mechanisms in the output of the linear recurrence layer while ignoring the significance of using forget gates within the recurrence. In this paper, we propose a gated linear RNN model dubbed Hierarchically Gated Recurrent Neural Network (HGRN), which includes forget gates that are lower bounded by a learnable value. The lower bound increases monotonically when moving up layers. This allows the upper layers to model long-term dependencies and the lower layers to model more local, short-term dependencies. Experiments on language modeling, image classification, and long-range arena benchmarks showcase the efficiency and effectiveness of our proposed model. The source code is available at https://github.com/OpenNLPLab/HGRN.

View on arXivView PDF

Code Implementations(1)

OpenNLPLab/HGRNOfficial100%

[NeurIPS 2023 spotlight] Official implementation of HGRN in our NeurIPS 2023 paper - Hierarchically Gated Recurrent Neural Network for Sequence Modeling

684Shell, PythonOct 1, 20232 years ago

Similar Papers

Cite this paper

@article{qin2026hierarchically,
  title  = {Hierarchically Gated Recurrent Neural Network for Sequence Modeling},
  author = {Zhen Qin and Songlin Yang and Yiran Zhong},
  year   = {2026},
  eprint = {2311.04823},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2311.04823},
  journal = {NEURIPS 2023 2023}
}

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

Discussion