← Back to learning

Mamba × TTT · IRSTD

First, distinguish: what exactly is learning?

Architecture, inference state, and test-time optimization are three different levels. Separating them clarifies the research questions behind Mamba + TTA/TTT.

About 12 min

Course chapters
Progress and notes stay in this browser.

The same “test time,” four different kinds of change

MechanismWhat changesAre gradients computed at test time?Is it retained across images?
Mamba / VMambaScan hidden state h; network parameters are usually fixedNot required for standard inferenceUsually only within the current image's scan
TTA methods such as Tent / CoTTAModel parameters θ, statistics, or teacher parameters φRequired by these methodsDetermined by the episodic / continual protocol
Original TTT (2020)A self-supervised task updates shared feature parametersYesCan reset for each sample or persist online
TTT layers(2024/2025)Small-model weights W inside a layer, serving as the hidden stateInner-loop gradients are part of the forward computationDetermined by the sequence definition and state boundaries

Original sources: Mamba · COLM 2024 / arXiv 2023 ↗ · Tent · ICLR 2021 ↗ · Original TTT · ICML 2020 (conceptual background) ↗ · TTT layers · ICML 2025 / arXiv 2024 ↗

Mathematical objects for the current task

Training set Dtrain = {(xᵢ,yᵢ)} → outer learning of θ
One image x → spatial tokens → inner updates of W → dense features z
pθ,W(x) ∈ [0,1]H×W → thresholds and connected components → target positions

Training masks supervise the outer task. The inference-time inner objective is built from current image features and receives no test mask. Outer parameters are usually fixed; inner states are initialized and updated at image/layer boundaries. Follow the selected baseline for projections, losses, ordering and reset rules.

A single-frame task does not require state to persist across images. We first study representation computation within each image. Direct cross-dataset testing is a separate generalization evaluation and does not automatically add adaptation updates.

TTT is the project’s starting route

Current focus: TTT as representation

Attach original TTT to a fixed segmentation decoder, compare the prototype variant, then test one IRSTD-specific change. Source training or fine-tuning is needed; focus on tokens, inner models, objectives and dense outputs.

Understand the two loops →

Conceptual comparison: test-domain adaptation

Tent/CoTTA update selected parameters from test inputs. Their mechanisms and failure examples remain in the course, but they are not the project’s default next experimental stage.

See the current experiment matrix →

Prerequisites in four sentences

Gradient: the local rate of change of loss with parameters; a negative-gradient step may reduce loss without improving task correctness. Entropy: prediction uncertainty, not truth or falsehood. State: a compressed memory of inputs already seen. Pseudo-label: supervision generated by the model itself, which may propagate errors.

Pause and test your intuition

If h evolves while VMamba processes a new image, does that alone demonstrate TTA?

Connect this unit to your IRSTD work

Progress and notes stay in this browser.