---
title: 'LSM: LRU-Based Restoration Network'
url: https://www.emergentmind.com/topics/lru-based-restoration-network
type: topic
---

# LSM: LRU-Based Restoration Network

Searching arXiv for the specified paper and key related models to ground the article.
An LRU-based restoration network, in the form introduced as LSM, is a single-image super-resolution architecture that combines a Linear Recurrent Unit (LRU) with a Semantic Modulating Unit (SMU) to balance performance and efficiency on 2D vision tasks. Its design responds to two stated limitations of prior LRU usage in vision—static parameterization and a single-scan method—by preserving a stable linear recurrence while introducing pixel-wise semantic modulation, semantic grouping for one-pass scanning, and prototype-driven feature enhancement. In the reported formulation, LSM quantitatively and qualitatively surpasses recent state-of-the-art methods while maintaining computational complexity on par with existing approaches [2606.19901].

## 1. Architectural definition and system-level organization

The backbone is organized as a shallow feature extractor, a stack of recurrent-attention groups, and a reconstruction head. The input low-resolution image is first mapped by a $3 \times 3$ convolution to a shallow feature tensor $F_0 \in \mathbb{R}^{H \times W \times C}$. This is followed by stacked groups, each group containing $n_{\text{block}}$ pairs of a Window-based Multi-head Self-Attention (WMS) block and a Category-based Modulated LRU (CML) block. After $n_{\text{group}}$ such groups, a pixel-shuffle upsampler produces the high-resolution output [2606.19901].

Within each CML block, the sequence is LayerNorm $\rightarrow$ SMU $\rightarrow$ Modulated LRU $\rightarrow$ gated MLP $\rightarrow$ residual skip. The SMU injects four modulating tokens $M_k$ whose three stated functions are LRU modulation, spatial categorization, and feature enhancement through a learned prototype. The key novelty is the replacement of heavy global attention or multi-scan state-space models by a static linear recurrence that is dynamically modulated by pixel-wise semantics from the SMU.

This organization suggests a division of labor between local windowed attention and global recurrent propagation. WMS provides local token mixing, whereas the CML block augments linear recurrence with semantic routing and feature enhancement, thereby addressing the mismatch between 1D recurrence and 2D image structure.

## 2. Linear recurrent formulation and stability properties

The LRU begins from the standard recurrent form
$$
h_k = \phi(A h_{k-1} + B u_k), \qquad y_k = C h_k + D u_k,
$$
but removes the nonlinearity $\phi$ in the recurrence to obtain a linear update. For scan-parallel computation, $A$ is diagonalized in the complex eigenbasis:
$$
h_k = \operatorname{diag}(\lambda)\, h_{k-1} + \eta \circ (B u_k), \qquad y_k = C h_k + D u_k,
$$
where $\lambda = [\lambda_1 \dots \lambda_N]^\top \in \mathbb{C}^N$ are trainable eigenvalues, $\eta_j = 1 - |\lambda_j|^2$ is a normalization factor, and $B \in \mathbb{C}^{N \times d_{\text{in}}}$, $C \in \mathbb{C}^{d_{\text{out}} \times N}$, $D \in \mathbb{C}^{d_{\text{out}} \times d_{\text{in}}}$. The eigenvalues are parameterized as
$$
\lambda_j = \exp(-\exp(v_j)) \cdot \exp(i \cdot \exp(\theta_j))), \qquad v_j,\theta_j \in \mathbb{R},
$$
with initialization sampling $\lambda_j$ uniformly on an annulus $\{r_{\min} \le |\lambda| \le r_{\max}\}$ and phases in $[0, 2\pi \cdot \alpha]$; the reported example is $r_{\min}=0.9$, $r_{\max}=0.99$, $\alpha=2\pi$ [2606.19901].

Three properties are explicitly attributed to this recurrence: it is globally stable because $|\lambda_j| < 1$, parallelizable, and able to capture long-range dependencies linearly. In the restoration setting, these properties define the LRU as the resource-efficient global propagation mechanism of the network.

## 3. Semantic Modulating Unit and semantic grouping

Given a token sequence $U \in \mathbb{R}^{T \times C}$ obtained by flattening spatial patches after WMS, and a learned dictionary $D \in \mathbb{R}^{P \times C}$ with $P \ll T$, the SMU first performs cross-attention for feature enhancement:
$$
Q = U W_Q, \qquad K = D W_K, \qquad V = D W_V,
$$
$$
S = Q K^\top / \tau \in \mathbb{R}^{T \times P}, \qquad A = \operatorname{softmax}(S),
$$
$$
Y_{\text{enh}} = A V \in \mathbb{R}^{T \times (C/2)}.
$$
The affinity matrix $A$ is then split into four chunks,
$$
M_\lambda, M_B, M_C^{\text{Re}}, M_C^{\text{Im}} = \operatorname{chunk}(A,4),
$$
each of size $\mathbb{R}^{T \times (C/2)}$, and these are tiled or projected to match the LRU hidden-state size [2606.19901].

For semantic categorization, each spatial token $t$ is assigned via Gumbel-Softmax with temperature $\beta$ to a $P$-way one-hot group $g_t \in \{0,1\}^P$. The input sequence is then reordered or masked so that semantically similar pixels are grouped before a single recurrence scan. This is explicitly described as “multi-scan in one pass,” and it is intended to alleviate the LRU’s 1D spatial ordering limitation.

The SMU therefore has three roles in one module: cross-attentive global feature enhancement, production of modulating tokens for the recurrent dynamics, and semantic pre-categorization for scan order restructuring. A plausible implication is that the learned dictionary acts as a shared latent organizer for both token enhancement and recurrence control, rather than serving only as a memory bank.

## 4. Modulated recurrence and forward propagation

The SMU modifies the basic LRU update by replacing the static recurrence with a token-conditioned version:
$$
h_k = (\operatorname{diag}(\lambda) + \operatorname{diag}(M_{\lambda_k}))\, h_{k-1}
      + [\eta + M_{B_k}] \circ (B u_k),
$$
$$
\hat{y}_k = (C + M_{C_k}^{\text{Re}} + i M_{C_k}^{\text{Im}})\, h_k + D u_k,
$$
where $M_{k_k}$ denotes the row of modulating tokens at step $k$. In implementation, the real and imaginary parts of $C$ are modulated separately [2606.19901].

The layer-wise forward pass is specified as follows. Given a low-resolution image $X$, the network computes $F_0 = \operatorname{Conv}_{3 \times 3}(X)$. For each group $g = 1 \ldots n_{\text{group}}$ and block $b = 1 \ldots n_{\text{block}}$, it applies local window MHSA,
$$
Z = \operatorname{WMS}(\operatorname{LN}(F_{g,b-1})) + F_{g,b-1}.
$$
The SMU on $Z$ then computes: (i) $A = \operatorname{softmax}(QK^\top/\tau)$, (ii) $Y_{\text{enh}} = AV$ and $M_k = \operatorname{chunk}(A)$, and (iii) semantic group assignment
$$
g_t = \arg\max_p (\operatorname{GumbelSoftmax}(A_{t,:})).
$$
The grouped tokens are processed by the modulated LRU recurrence,
$$
H = \operatorname{LRU}_{\text{modulate}}(Z, M_k),
$$
after which global and recurrent outputs are fused as
$$
F_{g,b} = \operatorname{concat}(H, Y_{\text{enh}}) \rightarrow \text{Gated-MLP} \rightarrow +\text{skip}.
$$
The final stage upsamples by PixelShuffle to produce the high-resolution output $\hat{Y}$.

This forward path formalizes the network as a hybrid of local attention, dictionary-conditioned global enhancement, and semantically reordered linear recurrence.

## 5. Training protocol and computational profile

The training setup distinguishes between classic super-resolution and lightweight super-resolution. For classic SR, training uses DIV2K (800 train) plus Flickr2K (2650 train). For lightweight SR, training uses DIV2K only. Validation and testing are reported on Set5, Set14, B100, Urban100, and Manga109. Data augmentation consists of random horizontal and vertical flips and rotations by $90^\circ$, $180^\circ$, and $270^\circ$ [2606.19901].

Optimization uses the $L_1$ pixel loss $\|\hat{Y}-Y\|_1$ and AdamW with $\beta_1=0.9$, $\beta_2=0.9$, and initial learning rate $2 \times 10^{-4}$. For $\times 2$ SR, the schedule has two stages: Stage 1 uses patch size $64 \times 64$ for $300$k iterations, with the learning rate halved at $250$k; Stage 2 uses patch size $96 \times 96$ for LSM-S or $92 \times 92$ for LSM for $200$k iterations, with the learning rate halved mid-way. Fine-tuning for $\times 3$ and $\times 4$ uses $250$k iterations from $\times 2$ weights with no Stage 1.

On $\times 2$ SR with $128 \times 128$ input, the reported model variants and complexity are:

| Variant | Parameters | GFLOPs |
|---|---:|---:|
| LSM-S | 9.7 M | 193.5 |
| LSM | 12.8 M | 255.0 |
| LSM-light | 763 K | 282.2 |

For Urban100 $\times 4$, the reported comparisons are:

| Model | Params / FLOPs | PSNR / SSIM |
|---|---|---|
| MambaIR | 20.6 M / 394.6 G | 27.68 dB / 0.8287 |
| MambaIRv2-S | 9.8 M / 202.9 G | 27.73 dB / 0.8307 |
| LSM-S | 9.9 M / 203.5 G | 27.88 dB / 0.8348 |
| LSM | 12.9 M / 265.0 G | 27.94 dB / 0.8362 |

Compared to SwinIR or CAT-A, LSM is reported to achieve higher PSNR with 40–45 % fewer parameters and FLOPs. This places efficiency and accuracy as co-equal design targets rather than treating recurrence solely as a low-cost substitute for attention.

## 6. Empirical results, ablations, and interpretive insights

Across full tables on Set5, Set14, B100, Urban100, and Manga109 for scales $\times 2$, $\times 3$, and $\times 4$, LSM is reported to outperform all efficient Transformers such as SwinIR, DAT, ART, HAT, and RGT, as well as state-space models such as MambaIR, under 20 M parameters. On $\times 2$ Set14, one example given is LSM-S at 34.66 dB / 0.9264 versus SwinIR at 34.46 dB / 0.9250. For larger models with self-ensemble, LSM+ achieves 40.47 dB / 0.9812 on Urban100 $\times 4$, reported as the best result. Qualitatively, circular and striped textures in img_004 and img_024 are described as sharper with fewer artifacts, while straight architectural lines in img_012 and img_059 and irregular curved shapes in Manga109 dolls and zebra stripes are reconstructed faithfully [2606.19901].

The ablation studies isolate several mechanisms. Varying $\{r_{\min}, r_{\max}, \theta_{\max}\}$ changes the ring shape of $\lambda$ in the complex plane; the best performance is reported at $r_{\min}=0.9$, $r_{\max}=0.99$, $\theta_{\max}=2\pi$, while worse settings drop up to 0.19 dB. For the multi-role SMU, the reported Set14 values are 34.44 dB for the base model without SMU, 34.42 dB with categorization, 34.46 dB with cross-attention, and 34.56 dB with full $M_k$ modulation, leading to the stated conclusion that each role contributes. For modulating-token components, enabling $M_\lambda$, $M_B$, $M_C^{\text{Re}}$, and $M_C^{\text{Im}}$ each adds approximately 0.05–0.10 dB, and the coupled softmax design outperforms separate linear branches by approximately 0.1 dB.

Hidden-state visualization further differentiates the variants: vanilla LRU misses fine details such as flowers and beaks; adding categorization partially restores semantics; adding modulation yields both global consistency and local texture. The key insight stated for the model is that LRU provides a stable, resource-efficient global recurrence, while SMU injects adaptive, semantic-aware modulation without multi-scan overhead. The dictionary-driven gating thereby unifies global attention, grouping, and gating into a single lightweight module, with linear computational scaling.

Source: https://www.emergentmind.com/topics/lru-based-restoration-network