Skipping Domain Shifts: Domain Memory Retention Enhanced Hyperspectral Single-Source Domain Generalization

Taiqin Chen, Hao Sha, Xiaochen Feng, Chunyu Chen, XiangYu Chen, Ke Chen, Yongbing ZhangNeurIPS 2026

TL;DR

Hyperspectral imaging acts like a super-powered eye that identifies materials by their continuous light signatures, yet models trained on one scene often fail miserably on another due to sensor and atmospheric shifts. Instead of trying to guess what unseen data might look like or warping sensitive spectral curves to match, this paper builds a "dictionary" of pure semantic concepts from the training data. At test time, unfamiliar features are simply translated into this known dictionary, effectively side-stepping the domain gap altogether.

What Problem Does This Paper Address?

Standard cameras see the world in three channels: Red, Green, and Blue. Hyperspectral images (HSI), however, capture dozens or hundreds of continuous spectral bands, providing a rich, material-specific fingerprint for every pixel. Because collecting and labeling HSI data is prohibitively expensive, researchers often have to train a model on a single scene (the source domain) and hope it generalizes to completely new scenes (target domains) captured under different weather, lighting, or sensors—a challenge known as Single-Source Domain Generalization (SDG).

Existing solutions usually fall into two traps:

  1. Data Augmentation: Generating synthetic variations during training to broaden decision boundaries. Because you can't see the target domain in advance, you inevitably miss the mark on real-world shifts.
  2. Style Transfer: Borrowed from standard RGB computer vision, these methods align the statistical mean and variance of shallow features at test time (e.g., via AdaIN). In RGB images, channel statistics mostly represent lighting or "style." In HSI, however, the statistical curve across spectral channels is the core discriminative signal! Altering it corrupts the material's identity.
Figure 1: Comparison of existing studies and the proposed method. (a) Data augmentation expands decision boundaries but fails to fully resolve domain shifts. (b) Style transfer relies on shallow statistics (µ, σ) for alignment, risking the corruption of critical spectral discriminative features. (c) The proposed method leverages a domain memory to preserve source semantic structures, enabling robust target feature projection and enhanced generalization.

Methods

To escape this dilemma, the authors propose the Domain Memory Retention Framework (DMRF). They split a standard classification backbone (LeNet) into an encoder and a decoder, placing a learnable domain memory right in the middle.

This memory is structured as a discrete codebook containing $K$ semantic "codewords" (prototypes). When an image passes through the encoder, its spatial features are matched against the codebook via cosine similarity, and reconstructed as a weighted sum of those codewords before hitting the decoder. At test time, noisy target-domain features get snapped onto clean, familiar source-domain building blocks.

Figure 2: Overview of the proposed domain memory retention framework (DMRF). In DMRF, the model decouples into an encoder and a decoder, bridged by a domain memory. Semantic features FS are projected into this memory space to yield domain features FD. To regularize the memory, a semantic richness constraint LSR is proposed to maintain codeword diversity. Furthermore, a spectral perturbation is injected into training samples, while collaborating with a perturbation robustness constraint LPR to drive the encoding of domain-invariant representations.

Training a discrete codebook end-to-end on a single small dataset usually leads to codebook collapse (a few codewords do all the work while others die out) and source overfitting. What is novel here is the trio of custom constraints used to keep the memory healthy:

  • Semantic Richness Constraint ($\mathcal{L}_{\text{SR}}$): Combines an orthogonality loss (forcing codewords to point in different directions) with an entropy objective: maximizing global entropy so all codewords get used across the dataset, while minimizing instance entropy so individual pixels still make sharp, decisive matches.
  • Perturbation Robustness Constraint ($\mathcal{L}_{\text{PR}}$): The authors inject artificial spectral perturbations into training samples and penalize codewords whose assignment weights fluctuate wildly between clean and perturbed versions of the same pixel.
  • Teacher-Guided Semantic Consistency ($\mathcal{L}_{\text{con}}$): Instead of naively forcing projected features to match raw source features, it aligns clean, perturbed, and interpolated samples toward a unified, stop-gradient semantic anchor.

Datasets

No new datasets are introduced; the authors evaluate cross-scene remote sensing classification across three established HSI benchmarks, aligning spectral channel counts between source and target pairs:

  • Houston and Pavia: Standard benchmarks where source and target scenes share 7 land-cover classes, separated by acquisition time or sensor differences.
  • HyRank: A tougher, satellite-acquired dataset featuring 12 classes and coarser spatial resolution.

Key Insights and Ideas

  • RGB "Style" is HSI "Substance": Techniques that work wonders on natural images fail on hyperspectral data because normalizing channel statistics flattens the exact spectral peaks and valleys needed to tell materials apart (e.g., grass vs. trees).
  • Translation Beats Extrapolation: Rather than forcing a classifier to extrapolate into unknown feature spaces, projecting unseen features back into a well-regularized, closed semantic space allows the decoder to always operate "in-distribution."
  • Goldilocks Codebook Capacity: More memory isn't always better. On Houston, accuracy peaks at $K=64$ codewords (80.37% OA) and drops sharply at $K=512$ (67.41% OA), because excess capacity lets redundant, noisy prototypes creep back in, muddying class boundaries.

Key Results

DMRF achieves state-of-the-art performance across all three benchmarks, beating 10 competing augmentation, style-transfer, and codebook baselines by an average of over 2.0% in Overall Accuracy (OA):

  • Houston: 80.37% OA (vs. 78.60% for the runner-up, SPDDA).
  • Pavia: 85.76% OA (a substantial jump over SPDDA's 83.03%, while RGB style-transfer methods like SPCNet languished at 67.36%).
  • HyRank: 63.03% OA and 0.6134 F1 (vs. 61.63% OA for DDG).

Qualitatively, classification maps on Houston show far fewer isolated pixel misclassifications and cleaner object boundaries than competing methods. Furthermore, when testing target images under artificial contrast shifts, adding $\mathcal{L}_{\text{PR}}$ halved the divergence between clean and perturbed codebook activations (JS-Divergence dropped from 0.164 to 0.075).

Limitations and Future Work

DMRF relies on a foundational assumption: that the source domain has clean, well-separated class boundaries to begin with. The authors note that as label noise increases or the number of categories balloons, source-domain separability weakens, which inevitably triggers codeword redundancy and caps generalization. Future work aims to develop paradigms capable of handling domain shifts under much messier, complex source distributions.

Summary updated

Abstract

Hyperspectral single-source domain generalization aims to train a robust model capable of overcoming domain shifts using only one available source domain for cross-scene hyperspectral image (HSI) analysis. Existing methods typically adopt data augmentation to broaden decision boundaries or utilize style transfer techniques for test-time alignment. However, these studies either fail to completely bridge the domain gap or inadvertently disrupt the discriminative spectral information, leading to suboptimal generalization and degraded classification performance on the target domain. To overcome these limitations, we propose a novel method, termed the domain memory retention framework, which optimizes domain memory during training to explicitly encode the semantic structure of the source domain. During inference, the target features are projected to the source distribution by leveraging this memory, thereby skipping domain shifts and improving generalization performance across unseen scenes. Specifically, the memory is formulated as a codebook, consisting of multiple semantic codewords. We further develop a semantic richness constraint and a perturbation robustness constraint to enhance representation diversity while empowering domain invariance for the memory. Extensive experiments conducted on three remote sensing datasets demonstrate that the proposed method outperforms state-of-the-art methods.
BibTeX
@inproceedings{chen2026skipping,
  author = {Taiqin Chen and Hao Sha and Xiaochen Feng and Chunyu Chen and XiangYu Chen and Ke Chen and Yongbing Zhang},
  title = {{Skipping Domain Shifts: Domain Memory Retention Enhanced Hyperspectral Single-Source Domain Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=z7Qi9Npr3f},
}

Loading related content...

Figure