← Back to learning

Mamba × TTT · IRSTD

A different question: TTA updates and state.

A historical TTA lab for conceptual comparison. Use the replication-plan matrix for the current TTT research.

About 20 min

Course chapters
Progress and notes stay in this browser.

A minimal 2×2: separate architecture and adaptation gains

Frozen inferenceSame adaptation strategy
CNN / current baselineA: baseline performanceB: adaptation of the existing architecture
Mamba IRSTDC: architecture changeD: combined effect

Compare B−A and D−C to discuss whether adaptation gains depend on architecture; C−A addresses the architecture question. Keep splits, resolution, training budgets, and evaluation code consistent, and report parameter and computation differences. Comparing only D with A does not support attribution.

Interactive: choose state resets and output order

Which choices should an unlabeled loop expose?

# Protocol illustration, not a directly runnable training script
source_state = snapshot(model, optimizer, teacher)
for x in target_stream:  # Access only current and past samples
    if episodic:
        restore_all(source_state)
    if predict_then_adapt:
        prediction = infer(model, x)
    loss = unlabeled_objective(x)  # Does not receive y
    if predetermined_update_rule(loss):
        update_selected_parameters(loss)
        update_teacher_then_optional_restore()
    if adapt_then_predict:
        prediction = infer(model, x)
    save_prediction(prediction)
# A separate evaluator uses held-out labels to compute final metrics.
# Do not use test results to select the best checkpoint.

Per-image resets cover weights, optimizer momentum, the teacher, BN statistics, and caches. Reset TTT-layer inner-loop states at the agreed boundaries. Fix and record initialization, output timing, and update frequency.

Metrics: put units and aggregation in the protocol

IoU = Σ TP / Σ(TP+FP+FN)
nIoU = mean_image [TP/(TP+FP+FN)]
Pd = successfully matched ground-truth targets / total ground-truth targets
Fa_pixel = false-positive pixels / total pixels

For nIoU, specify how empty ground truth and empty predictions are scored or excluded. For object-level Pd, fix the threshold, connected-component definition, center-distance or overlap criterion, and an explicit one-to-one matching rule.

Fa_pixel×10⁶ is the number of false-alarm pixels per million pixels, distinct from false-alarm connected components per image. Report Pd/Fa at a fixed operating point and provide threshold-sweep curves separately for offline analysis. Do not choose the best threshold using test labels and then claim unlabeled deployment.

First-round experiment checklist

DimensionPlanRecord
Methodsource-only → norm entropy → teacher consistencySame θ₀
ParametersSeparate normalization and adapter updates; use full-parameter updates as a comparisonParameter names, counts, and gradients
AblationsAdd or remove EMA, restoration, and candidate weighting separatelyIndependent effects
OrderPer-image resets, accumulation within one domain, A→B→A, and multiple permutationsForgetting and sensitivity to order
Failure groupsLow SCR, small area, edges, defective pixels, and empty imagesPd/Fa and stratified results
RepetitionsA fixed list of seeds and multiple runsMean, variance, or confidence intervals
EfficiencyFixed hardware, batch=1, including all adaptation computationp50/p95 latency, GPU memory, and update frequency

Three ground rules

  1. Do not tune with target labels: choose learning rates, thresholds, and stopping rules on the source validation set or a separate development domain.
  2. Do not look into the future: cache only current and past samples; explicitly distinguish offline adaptation over the full batch.
  3. Do not hide failures: report falling Pd despite lower entropy, increasing Fa on empty images, and forgetting when returning to an earlier domain.

Pause and test your intuition

Which comparison isolates adaptation gains?

Connect this unit to your IRSTD work

Progress and notes stay in this browser.