---
title: 'GPSMamba: Infrared Super-Resolution Framework'
url: https://www.emergentmind.com/topics/gpsmamba
type: topic
---

# GPSMamba: Infrared Super-Resolution Framework

Searching arXiv for GPSMamba and closely related papers to ground the article.
GPSMamba, short for **Global Phase and Spectral Prompt-guided Mamba**, is a Mamba-based framework for **infrared image super-resolution (IRSR)** that targets a specific limitation of state-space image restoration: the tendency of causal 1D scanning to fragment the global context of 2D infrared imagery. The method combines an **Adaptive Semantic-Frequency State Space Module (ASF-SSM)**, which injects fused semantic and frequency-domain prompts into the Mamba block, with **Thermal-Spectral Attention and Phase Consistency (TSAPC) Loss**, which supplies explicit non-causal supervision over spectral magnitude and Fourier phase. In the reported evaluation, the model is trained on **M3FD**, tested on **result-A**, **result-C**, and **CVC10** under \(\times 2\) and \(\times 4\) upscaling, and is reported to achieve state-of-the-art performance, especially in the harder \(\times 4\) regime [2507.18998].

## 1. Problem setting and motivation

IRSR reconstructs a high-resolution infrared image \(I_{SR}\in\mathbb{R}^{H\times W\times C}\) from a low-resolution input \(I_{LR}\in\mathbb{R}^{h\times w\times C}\), with \(h=H/s\), \(w=W/s\), and scaling factor \(s\), under the mapping
\[
I_{SR}=F(I_{LR}).
\]
Within this setting, GPSMamba is designed for infrared data characterized by **low contrast**, **high noise / degradation**, **homogeneous backgrounds**, and **sparse high-frequency textures / details**. These conditions reduce the availability of strong local cues and make long-range consistency unusually important.

The method is motivated by the observation that conventional Mamba-based image restoration inherits a mismatch between sequential modeling and image geometry. Standard Mamba uses a recurrence of the form
\[
h_t=\mathbf{A}h_{t-1}+\mathbf{B}x_t,\qquad y_t=\mathbf{C}h_t,
\]
with selective scan making \(\mathbf{A},\mathbf{B},\mathbf{C}\) input-dependent. For images, however, the usual adaptation is to flatten 2D patches into a 1D sequence and scan them causally. The reported consequence is that the fixed 1D scan path **fragments 2D spatial structure**, separates semantically related pixels in sequence order, and weakens fine-detail restoration. GPSMamba is therefore formulated as an attempt to preserve Mamba’s efficiency while compensating for its weak 2D global modeling in infrared restoration [2507.18998].

## 2. System architecture and design objective

GPSMamba is organized as a **hierarchical restoration network** with four stages. A shallow convolution first extracts low-level features from \(I_{LR}\). The deep body is then composed of stacked **Adaptive Semantic-Frequency State Space Blocks (ASF-SSB)**. A reconstruction module upsamples the refined representation to produce \(I_{SR}\). Training is driven by the proposed **TSAPC loss** \(\mathcal{L}_T\).

The architectural objective is twofold. First, the model introduces **architectural guidance** inside the Mamba block through a fused semantic-frequency prompt. Second, it introduces **non-causal supervision** through frequency- and phase-based losses. This differentiates GPSMamba from restorers that simply flatten image tokens and rely on scan dynamics alone to propagate global context.

A central claim of the framework is that prompt injection and non-causal supervision act in complementary ways. The prompt mechanism reshapes the internal state-space computation, while the loss formulation constrains the final reconstruction using global spectral and structural criteria. The paper explicitly presents this as a systematic strategy for mitigating the limitations of causal modeling in 2D IRSR [2507.18998].

## 3. Adaptive Semantic-Frequency State Space Module

ASF-SSM is the core module of GPSMamba. It constructs a fused prompt tensor \(P'\) from a **semantic / spatial branch** and a **global frequency-domain branch**, then uses that prompt to guide the Mamba computation.

For the spatial branch, semantic features
\[
X_{\text{semantic}}\in\mathbb{R}^{B\times N\times C}
\]
are passed through an MLP and linear projection to produce routing logits, and **Gumbel-Softmax** yields a discrete routing matrix
\[
L\in\mathbb{R}^{B\times N\times T},
\]
where \(T\) is the prompt pool size. Given a learnable prompt pool \(P\), the spatial prompt is
\[
P_{\text{spatial}}=L\cdot P.
\]
This makes prompt selection content-aware at the token level.

For the global branch, the same semantic sequence is reshaped and transformed with FFT:
\[
F_{\text{freq}}=\mathrm{FFT}(\mathrm{Reshape}(X_{\text{semantic}})).
\]
The frequency representation is projected to
\[
Q,K,V=\mathrm{Linear}_{QKV}(F_{\text{freq}}),
\]
and a self-attention-like operation produces the global prompt
\[
P_{\text{global}}=\mathrm{softmax}\!\left(\frac{QK^T}{\sqrt{d_k}}\right)V.
\]
The final fused prompt is then defined by element-wise addition,
\[
P'=P_{\text{spatial}}+P_{\text{global}}.
\]

The significance of ASF-SSM lies in the division of labor between the two prompt sources. The spatial prompt supplies local semantic routing, while the frequency-domain prompt provides holistic image structure. The reported intent is not merely to add another context branch, but to inject non-local information into the Mamba block itself, so that the scan is informed by both token semantics and global frequency content [2507.18998].

## 4. Prompt injection and semantic-guided selective scan

After prompt generation, GPSMamba injects the fused prompt into the state-space computation. The semantic input is first projected,
\[
X_{\text{in}}=\mathrm{Linear}(X_{\text{semantic}}),
\]
and then split into \(\Delta\), \(B\), and \(C_{\text{raw}}\). The state matrix is parameterized as
\[
A=-\exp(\mathrm{Linear}_{\Delta}(\Delta)).
\]
Prompt injection occurs in the output projection:
\[
C_s(t)=C_{\text{raw}}(t)+P_{\text{fused}}(t),
\]
where \(P_{\text{fused}}(t)\) denotes the time-specific prompt token selected from \(P'\). The resulting recurrence is
\[
h_t=A(t)\odot h_{t-1}+B(t)\odot X_{\text{semantic}}(t),
\]
\[
y_t=C_s(t)\odot h_t.
\]
The output sequence is then normalized and projected back by
\[
Y=\mathrm{Linear}_{\text{out}}(\mathrm{LayerNorm}(Y_{\text{scan}})).
\]

A further modification is the **semantic-guided scan path**. Tokens are sorted by semantic routing through the argmax of the routing matrix \(L\), so the scan order is no longer a fixed raster or simple flatten-and-scan traversal. The paper characterizes this as “breaking the rigid causal chain” more effectively than a standard Mamba implementation.

This component is central to GPSMamba’s interpretation of selective scan. Rather than treating causality as an immutable sequence prior, the method uses semantic routing to reorganize the effective scan trajectory and uses prompt injection to modulate the state-space output. In the reported formulation, this is the primary architectural mechanism for restoring global coherence in 2D infrared reconstruction [2507.18998].

## 5. Thermal-spectral attention and phase-consistency supervision

GPSMamba supplements architectural guidance with a composite objective called **Thermal-Spectral Attention and Phase Consistency Loss**, denoted \(\mathcal{L}_T\). The loss has two terms:
\[
\mathcal{L}_T=\lambda_{\text{phase}}\mathcal{L}_{\text{phase}}+\lambda_{\text{freq}}\mathcal{L}_{\text{freq}}.
\]

The **thermal-spectral attention** term begins with a thermal mask generated from the ground-truth high-resolution image \(I_{HR}\). A pretrained VGG19 feature extractor \(\Phi_{\text{VGG}}\) and a lightweight gating network \(G_{\text{gate}}\) with sigmoid produce
\[
M_{\text{thermal}}=\sigma\!\left(G_{\text{gate}}(\Phi_{\text{VGG}}(I_{HR}))\right).
\]
After resizing to image resolution, the mask is applied to both reconstructed and reference images, and the spectral loss is
\[
\mathcal{L}_{\text{freq}}=
\left\|
\left|F_{FFT}(I_{SR}\odot M_{\text{thermal}})\right|-
\left|F_{FFT}(I_{HR}\odot M_{\text{thermal}})\right|
\right\|_1.
\]
The stated purpose is to focus learning on thermally salient regions and preserve spectral magnitude where infrared structure is most informative.

The **phase consistency** term is defined as
\[
\mathcal{L}_{\text{phase}}=
\left\|
\angle(F_{FFT}(I_{SR}))-\angle(F_{FFT}(I_{HR}))
\right\|_1.
\]
The paper stresses that phase carries structural layout information, including edges, contours, and object geometry. The combined loss therefore enforces both structural fidelity and thermally weighted spectral fidelity. In the reported ablations, the best setting is
\[
\lambda_{\text{freq}}=0.8,\qquad \lambda_{\text{phase}}=0.2.
\]

The significance of TSAPC is that it provides **non-causal supervision**. Instead of relying only on local reconstruction targets or implicit state propagation, it constrains the output using global Fourier-domain structure. This is a defining feature of GPSMamba’s attempt to compensate for causal scan limitations [2507.18998].

## 6. Training protocol, benchmarks, and empirical findings

The reported implementation uses **PyTorch** on an **NVIDIA A6000** with **Adam**, learning rate \(1\times10^{-5}\), and batch size **32**. Training is performed on **M3FD**. Evaluation is carried out on **result-A**, **result-C**, and **CVC10** with bicubic downsampling under \(\times 2\) and \(\times 4\) super-resolution. Full-reference evaluation uses **PSNR** and **SSIM** on the **Y channel** in YCbCr space, while no-reference evaluation uses **DBCNN**, **NIQE**, **BRISQUE**, and **CLIP-IQA** [2507.18998].

| Aspect | Reported setting |
|---|---|
| Training data | M3FD |
| Test sets | result-A, result-C, CVC10 |
| Scaling factors | \(\times 2\), \(\times 4\) |
| Metrics | PSNR, SSIM, DBCNN, NIQE, BRISQUE, CLIP-IQA |
| Optimization | PyTorch, NVIDIA A6000, Adam, \(1\times10^{-5}\), batch 32 |

The comparison set includes EDSR, ESRGAN, FSRCNN, SRGAN, SRCNN, RCAN, SwinIR, PSRGAN, ShuffleMixer, HAT, RGT, MambaIR, ATD, CATANet, MambaOut, VisionMamba, IRSRMamba, and MambaIRv2. The main reported findings are that GPSMamba is **best or second-best across all datasets and metrics at \(\times 2\)** and becomes the **clear leader at \(\times 4\)**, achieving the best performance on all three datasets and across metrics. A concrete example is the **35.4007 dB PSNR** reported on **result-C** at \(\times 4\), which improves over the previous best IRSRMamba by about **0.1 dB**. The paper also reports improved no-reference performance, especially on **CLIP-IQA**, and presents visual evidence of sharper textures, clearer object contours, crisper text and sign details, better-preserved pedestrian silhouettes, and cleaner residual maps [2507.18998].

Ablation studies support the decomposition of the method. Starting from a **pure Mamba** baseline, adding **ASF-SSM** improves PSNR/SSIM, and adding the full **TSAPC loss** yields the best result. Batch sizes **16**, **32**, and **64** are tested, with **32** selected. Increasing the number of ASF-SSB blocks improves performance up to **8 blocks**, which becomes the final configuration. Effective receptive field visualization is reported to expand from a compact localized region to a broader anisotropic one under ASF-SSM, and frequency-domain visualization indicates that TSAPC reduces phase-spectrum artifacts [2507.18998].

## 7. Interpretation, scope, and relation to adjacent Mamba variants

GPSMamba is best understood as a domain-specific adaptation of selective state-space modeling for infrared restoration rather than as a generic Mamba replacement. Its principal claim is that Mamba’s linear-time sequence modeling remains useful, but only if complemented by mechanisms that reintroduce non-local 2D structure through prompt construction, semantic routing, and frequency-domain supervision. A common simplification is to describe it as merely “adding attention” to Mamba; the reported formulation is narrower and more specific, because the decisive operations are prompt injection into the state-space output path and explicit phase/spectral constraints during training [2507.18998].

The term should also be distinguished from other prompt-guided or geometry-guided Mamba variants in computer vision. In semantic segmentation, for example, geometry-guided Mamba modules have been studied as plug-and-play replacements for CNN context heads, where selective scan is modulated by **boundary cues**, **centripetal potential**, and **directional flow**, rather than by global phase and spectral prompting [2606.08866]. The two lines of work share the broader objective of overcoming isotropic or structurally blind context aggregation, but they operate on different tasks, prompts, and supervision signals.

The paper does not present an explicit extended limitations section, but it states enough to support several cautious inferences. It implies that GPSMamba is **more parameter-heavy** than some lightweight baselines, that it relies on **FFT-based global prompting** and an additional **gating network** for thermal masking, and that the reported training protocol is specific to current IRSR datasets. This suggests that broader cross-domain generalization remains an open empirical question rather than an established property. Within the scope of the reported experiments, however, GPSMamba represents a technically explicit attempt to reconcile causal state-space efficiency with the global structural and spectral requirements of infrared super-resolution [2507.18998].

Source: https://www.emergentmind.com/topics/gpsmamba