Methods › Sequential › Recurrent Neural Networks › SRU++
SRU++
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 X ∈ℝ^(L ×d), the attention component computes the query, key and value representations using the following multiplications,
Q =W^q X^⊤
K =Wᵏ Q
V =Wᵛ Q
where W^q ∈ℝ^(d′ ×d), Wᵏ, Wᵛ ∈ℝ^(d′ ×d′) are model parameters. d′ is the attention dimension that is typically much smaller than d. Note that the keys K and values V are computed using Q instead of X such that the weight matrices Wᵏ and Wᵛ are significantly smaller.
Next, we compute a weighted average output A ∈ℝ^(d′ ×L) using scaled dot-product attention:
A^⊤=softmax((Q^⊤ K)/(√(d′))) V^⊤
The final output U required by the elementwise recurrence is obtained by another linear projection,
U^⊤=Wᵒ(Q+α·A)
where α∈ℝ is a learned scalar and Wₒ ∈ℝ^(3 d ×d′) is a parameter matrix. Q+α·A is a residual connection which improves gradient propagation and stabilizes training. We initialize α to zero and as a result,
U^⊤=Wᵒ Q=(Wᵒ W^q) X^⊤
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, Wᵒ W^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 Wᵒ
U^⊤=Wᵒ layernorm(Q+α·A)
This implementation is post-layer normalization in which the normalization is added after the residual connection.
In Syntology repository known, no verified implementation (declared_code; repositories: 1 listed of 1 in the graph, strongest link: official). This answer is about arXiv:2102.12459, the paper the archive credits with this method.
Origin paper of this answer, arXiv:2102.12459 (its page on this site · its page on Syntology).
Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.
Papers archive 2025-07-28
archive papers tagged: 2 · with a code link: 1 · where Syntology ran a sample: 0 (0 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument) Syntology
Show: all tagged papersonly where code ran: none of the 2 tagged papers has a Syntology run on record
Page 1 of 1: papers 1 to 2 of 2, newest first by the archive's date (ties by slug), in archive order.
Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.
-
SRU++: Pioneering Fast Recurrence with Attention for Speech Recognition 11 Oct 2021 · 0 repositories · arXiv:2110.05571
-
When Attention Meets Fast Recurrence: Training Language Models with Reduced Compute 24 Feb 2021 · 1 repository · arXiv:2102.12459
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.
| Task | Papers |
|---|---|
| Language Modeling | 2 |
| Language Modelling | 2 |
| Machine Translation | 2 |
| Automatic Speech Recognition | 1 |
| Automatic Speech Recognition (ASR) | 1 |
| GPU | 1 |
| Speech Recognition | 1 |
| Translation | 1 |
| speech-recognition | 1 |
Usage over time archive 2025-07-28
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
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