Methods › Sequential › Recurrent Neural Networks › SRU++

SRU++

2 papers tagged archive 2025-07-28

Introduced by Tao Lei in When Attention Meets Fast Recurrence: Training Language Models with Reduced Compute

archive 2025-07-28 Description, source and code snippet are the archive's method entry.

SRU++ is a self-attentive recurrent unit that combines fast recurrence and attention for sequence modeling, extending the SRU unit. The key modification of SRU++ is to incorporate more expressive non-linear operations into the recurrent network. Specifically, given the input sequence represented as a matrix 𝐗 ∈ℝ^(L ×d), the attention component computes the query, key and value representations using the following multiplications,

𝐐 =𝐖^q 𝐗^⊤

𝐊 =𝐖ᵏ 𝐐

𝐕 =𝐖ᵛ 𝐐

where 𝐖^q ∈ℝ^(d^' ×d), 𝐖ᵏ, 𝐖ᵛ ∈ℝ^(d^' ×d^') are model parameters. d^' is the attention dimension that is typically much smaller than d. Note that the keys 𝐊 and values 𝐕 are computed using 𝐐 instead of 𝐗 such that the weight matrices 𝐖ᵏ and 𝐖ᵛ are significantly smaller.

Next, we compute a weighted average output 𝐀 ∈ℝ^(d^' ×L) using scaled dot-product attention:

𝐀^⊤=softmax((𝐐^⊤ 𝐊)/(√(d^'))) 𝐕^⊤

The final output U required by the elementwise recurrence is obtained by another linear projection,

𝐔^⊤=𝐖ᵒ(𝐐+α·𝐀)

where α∈ℝ is a learned scalar and 𝐖ₒ ∈ℝ^(3 d ×d^') is a parameter matrix. 𝐐+α·𝐀 is a residual connection which improves gradient propagation and stabilizes training. We initialize α to zero and as a result,

𝐔^⊤=𝐖ᵒ 𝐐=(𝐖ᵒ 𝐖^q) 𝐗^⊤

initially falls back to a linear transformation of the input X skipping the attention transformation. Intuitively, skipping attention encourages leveraging recurrence to capture sequential patterns during early stage of training. As |α| grows, the attention mechanism can learn long-range dependencies for the model. In addition, 𝐖ᵒ 𝐖^q can be interpreted as applying a matrix factorization trick with a small inner dimension d^'<d, reducing the total number of parameters. The Figure compares the differences of SRU, SRU with this factorization trick (but without attention), and SRU++.

The last modification is adding layer normalization to each SRU++ layer. We apply normalization after the attention operation and before the matrix multiplication with 𝐖ᵒ

𝐔^⊤=𝐖ᵒ layernorm(𝐐+α·𝐀)

This implementation is post-layer normalization in which the normalization is added after the residual connection.

PaperSource

Papers archive 2025-07-28

2 shown of 2, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.

Tasks archive 2025-07-28

9 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.

TaskPapers
Language Modeling2
Language Modelling2
Machine Translation2
Automatic Speech Recognition1
Automatic Speech Recognition (ASR)1
GPU1
Speech Recognition1
Translation1
speech-recognition1

Usage over time archive 2025-07-28

Papers per year tagged with SRU++: 2021 to 2021, peak 2 2 0 2021: 2 papers 2021
Papers per year the archive tags with this method, by the paper's archive date (2 dated). Bars are counts, not a trend claim.

Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).

Categories archive 2025-07-28

Recurrent Neural Networks

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections