LESSViT: Robust Hyperspectral Representation Learning
under Spectral Configuration Shift

Haozhe Si1, Yuxuan Wan1, Yuqing Wang1, Minh N. Do1,2, Han Zhao1
1University of Illinois Urbana-Champaign, USA
2VinUniversity, Hanoi, Vietnam

Updated manuscript · Six spectral configurations · Five-seed evaluation

Abstract

Modeling hyperspectral imagery (HSI) across different sensors presents a fundamental challenge due to variations in wavelength coverage, band sampling, and channel dimensionality. As a result, models trained under a fixed spectral configuration often fail to generalize to other sensors. Existing Vision Transformer (ViT) approaches either rely on implicit spectral modeling with fixed channel assumptions or adopt explicit spatial–spectral attention with prohibitive computational cost, leading to a fundamental trade-off between efficiency and expressiveness. In this work, we introduce Low-rank Efficient Spatial–Spectral ViT (LESSViT), a sensor-flexible architecture for cross-spectral generalization. LESSViT is built on LESS Attention, a structured low-rank factorization that models joint spatial–spectral interactions through separable spatial and spectral components, reducing the complexity of full spatial–spectral attention from O(N²C²) to O(rNC), where N is the number of spatial tokens, C is the number of spectral channels, and r is the rank of the low-rank approximation. We further incorporate channel-agnostic patch embedding and wavelength-aware positional encoding to support flexible spectral inputs. To enable efficient and robust pretraining, we introduce a hyperspectral masked autoencoder (HyperMAE) with decoupled spatial–spectral masking and hierarchical channel sampling. Experiments on the SpectralEarth benchmark demonstrate that LESSViT improves robustness under spectral shifts while remaining competitive in-distribution.
Overview of LESSViT for cross-spectral generalization

Figure: Overview of LESSViT. ① Cross-spectral generalization setting: train on a fixed spectral configuration and evaluate across sensors with varying wavelength coverage and channel configurations. ② HyperMAE pretraining with decoupled spatial–spectral masking and hierarchical channel sampling for scalable and robust learning. ③ LESS Attention with SSRoPE for efficient spatial–spectral modeling.

Key Contributions

  • 1
    LESS Attention — a structured low-rank factorization of spatial–spectral attention that reduces complexity from O(N²C²) to O(rNC), enabling explicit and scalable joint spatial–spectral modeling across hundreds of hyperspectral channels.
  • 2
    LESSViT — a channel-agnostic spatial–spectral Vision Transformer with wavelength-aware positional encoding (SSRoPE), enabling consistent and robust modeling under varying spectral configurations across sensors.
  • 3
    Cross-spectral evaluation protocol — a controlled SpectralEarth benchmark covering channel-subset changes and simulated sensor responses, isolating spectral variation while keeping spatial content fixed.

Method

LESSViT satisfies three key requirements for cross-spectral generalization: channel-agnostic tokenization, explicit spatial–spectral modeling, and computational scalability. It integrates four tightly coupled components:

🪐
Tied Patch Embedding
A shared linear projection applied independently per channel converts a C×H×W hyperspectral image into a spatial–spectral token grid of shape (N+1)×(C+1)×D, with spatial, spectral, and global [CLS] tokens for structured aggregation.
⚡
LESS Attention
Decomposes joint spatial–spectral attention into separable spatial and spectral branches. Their Kronecker product captures joint interactions at rank r, reducing complexity from O(N²C²) to O(rNC) — making attention tractable for hundreds of spectral channels.
🌐
SSRoPE
Spatial–Spectral Rotary Position Embedding applies 2D RoPE over spatial coordinates (u, v) and 1D RoPE over spectral wavelengths λ. This encodes physical wavelength information, enabling generalization across varying channel configurations without fixed index assumptions.
🎭
HyperMAE
Decoupled masking independently masks 75% of spatial patches and 75% of spectral channels. Hierarchical channel sampling (HCS) randomly subsets channels per training iteration, reducing reconstruction cost while maintaining diverse spectral exposure.
Spatial-Spectral Tokenization

(a) Spatial-Spectral Tokenization. The tied patch embedding converts a hyperspectral image into a grid of spatial–spectral tokens with spatial, spectral, and global [CLS] tokens.

LESS Attention Block

(b) LESS Attention Block. The LESS block factorizes spatial and spectral attention via structured decomposition, enabling efficient modeling of joint spatial–spectral interactions.

Cross-Spectral Generalization Benchmark

We evaluate LESSViT on SpectralEarth, a large-scale hyperspectral pretraining dataset and evaluation benchmark built on EnMAP (202 channels, 30 m resolution). Models are pretrained and fine-tuned on a fixed channel set (C120VN+) and evaluated under six spectral configurations that isolate channel-subset changes and simulated sensor responses:

In-Distribution (C120VN+)

120 channels: 80 VNIR + 40 SWIR. Training and in-distribution evaluation configuration.

Spectral Shift (C120SW+)

120 channels: 40 VNIR + 80 SWIR. Same count as training, complementary spectral distribution.

Unseen Wavelengths (C82)

82 complementary channels (20 VNIR + 62 SWIR), interleaved with the training bands. Tests interpolation to unobserved band centers.

Channel Expansion (C202)

All 202 channels. Tests generalization when additional bands beyond the training set are available.

PRISMA-like · 133 bands

Gaussian spectral response functions (SRFs) simulate spectral mixing using published band centers and FWHMs.

EO-1 Hyperion-like · 155 bands

SRF-based observations synthesized from EnMAP. Bands with insufficient source support or strong atmospheric absorption are excluded.

These are simulated sensor responses, not evaluation on independently acquired PRISMA or Hyperion imagery.

Band centers for C120 VNIR+, C120 SWIR+, C82, C202, PRISMA and EO-1 Hyperion

Band-center locations for all six configurations. Each tick is a retained band center; shaded regions indicate excluded spectral regions. View vector PDF.

Downstream Datasets

We evaluate on five geospatial labeling products covering segmentation and multi-label classification across diverse land cover types and geographic regions:

Dataset Region Task Type Metric
CDLUSACrop Type SegmentationmIoU ↑
EuroCropsEuropeCrop Type SegmentationmIoU ↑
CORINEEuropeLand Cover ClassificationmAP ↑
BDFORETFranceForest Type SegmentationmIoU ↑
BNETDCôte d'IvoireLand Cover SegmentationmIoU ↑

Results

We compare LESSViT with SpectralViT, HyperSigma, DOFA, and HyperFree. LESSViT and SpectralViT are pretrained on C120VNIR+ using the same data and protocol; the other baselines use their released pretrained weights. All models are fine-tuned on C120VNIR+ for 20 epochs and evaluated without further adaptation. Results are means over five random seeds.

Best mean performance on all 25 out-of-distribution task–configuration pairs. LESSViT’s average relative drop ranges from 2.0% to 10.7%, compared with 18.0%–34.6% for HyperFree. SpectralViT remains strongest in-distribution.

Average Relative Performance Drop (%) ↓

Unweighted average across five downstream tasks; relative drop = 100 × (1 − OOD / ID). Lower is better. Bold marks the best value in each column.

Model / settingC120SWIR+C82C202PRISMAEO1H
SpectralViT59.155.555.856.262.6
HyperSigma37.442.934.644.161.3
DOFA36.037.141.441.368.2
HyperFree24.633.224.118.034.6
LESSViT4.710.72.03.04.2

Results by Dataset

Expand a dataset to compare all six configurations. Higher is better. Download result data (JSON). Standard deviations and linear-probing results are available in the updated paper.

CDL (mIoU ↑)
Model / settingC120VNIR+ (ID)C120SWIR+C82C202PRISMAEO1H
SpectralViT73.3315.1112.365.5910.847.81
HyperSigma44.4813.9314.5014.5110.0812.86
DOFA40.0618.3818.0812.3913.066.39
HyperFree42.5028.4816.2222.1628.0919.59
LESSViT53.4448.3242.0850.7548.9649.05
EuroCrops (mIoU ↑)
Model / settingC120VNIR+ (ID)C120SWIR+C82C202PRISMAEO1H
SpectralViT71.6926.2741.1446.2842.2329.32
HyperSigma56.5452.1648.4551.5946.3238.84
DOFA55.5936.8532.8331.5250.2850.40
HyperFree52.2246.6332.8736.2545.7120.91
LESSViT57.9155.6955.4757.8157.6357.48
BDFORET (mIoU ↑)
Model / settingC120VNIR+ (ID)C120SWIR+C82C202PRISMAEO1H
SpectralViT77.1748.3148.6848.7346.7744.55
HyperSigma63.7647.9744.1548.9443.689.54
DOFA58.1451.2642.0350.4545.042.36
HyperFree58.4254.4352.6354.1354.4453.93
LESSViT63.8762.4360.5863.3562.0362.60
BNETD (mIoU ↑)
Model / settingC120VNIR+ (ID)C120SWIR+C82C202PRISMAEO1H
SpectralViT44.6916.8617.0616.6618.0016.07
HyperSigma30.3618.7817.6417.6815.317.22
DOFA28.8818.0618.8718.8915.756.29
HyperFree29.5318.5316.8721.4721.9318.97
LESSViT32.3730.7626.3531.2531.8029.62
CORINE (mAP ↑)
Model / settingC120VNIR+ (ID)C120SWIR+C82C202PRISMAEO1H
SpectralViT78.9336.9036.9238.3735.2433.08
HyperSigma69.2136.0527.5647.1138.6039.48
DOFA66.4037.8948.2735.3325.6617.58
HyperFree74.0447.9363.3168.4865.8362.28
LESSViT76.3574.2172.9575.9975.0575.01

The benchmark controls spatial content and varies spectral inputs. Different pretraining sources and patch sizes remain confounding factors in cross-model comparisons.

Effect of Attention Design

Matched HyperMAE pretraining with a ViT-S backbone and 64 × 64 inputs isolates attention design. Full and LESS spatial–spectral attention are substantially more robust than spatial-only attention. Full attention has higher OOD segmentation scores; LESS has higher CORINE mAP in every configuration.

Average segmentation mIoU

Model / settingC120VNIR+ (ID)C120SWIR+C82C202
Spatial Attention56.2922.7616.0829.25
Full Spatial–Spectral Attention49.0546.7046.4944.87
LESS Attention49.1946.0743.9742.88

CORINE mAP

Model / settingC120VNIR+ (ID)C120SWIR+C82C202
Spatial Attention76.9729.3226.3733.51
Full Spatial–Spectral Attention71.2570.1770.7869.47
LESS Attention73.1971.1872.1470.00

Positional Encoding and Channel Sampling

ViT-S models pretrained for 50 epochs. SSRoPE improves dense prediction; a higher retained HCS ratio yields modest changes. The lower retained ratio reduces pretraining time by 17% in this ablation.

Average segmentation mIoU. Default: SSRoPE, retained ratio [0.2, 0.3]; higher HCS: SSRoPE, [0.4, 0.5].

Model / settingC120VNIR+ (ID)C120SWIR+C82C202
Default44.4842.6639.9643.63
Without SSRoPE (SIREN)40.0437.7637.8438.65
Higher HCS ratio45.4444.0940.7043.95

Computational Efficiency

On CORINE in BF16, LESSViT uses approximately 29× less fine-tuning step time, 7× less inference latency, and 11× less inference memory than ChannelViT. The advantage is relative to full spatial–spectral attention; LESSViT remains more expensive to train than channel-collapsing methods.

ModelEncoder params (M)FT step (s)FT peak memory (GB)Inference (ms)Inference memory (GB)
SpectralViT-B87.50.3914.97.10.64
HyperSigma-B203.00.1712.232.01.31
DOFA-B111.80.0351.9313.30.87
HyperFree-B151.50.182.2552.80.94
ChannelViT-B*85.521.0≈230*221.47.73
LESSViT-B83.20.7387.230.50.67

Fine-tuning effective batch size 32; inference batch size 1. *ChannelViT exceeds GPU memory at batch size 32; ≈230 GB is estimated from the OOM error. Its step time uses microbatch size 4 and eight accumulation steps.

Relative inference latency as spectral channel count increases

Latency normalized to each model’s 10-channel setting, measured over 2,000 samples. ChannelViT runs out of memory at 200 channels on the 144 GB GPU used for this benchmark. Near-constant observed latency is specific to these measurements.

Qualitative Segmentation Results

Compare all five models across CDL, EuroCrops, BDFORET, and BNETD, including simulated EO-1 Hyperion and PRISMA responses. LESSViT preserves more stable spatial predictions under spectral reconfiguration. Select the figure to inspect the full-resolution PDF.

Five-model segmentation comparison across four datasets and six spectral configurations

PRGB: pseudo-RGB input; GT: ground truth. Background pixels are masked in predictions. Open full-resolution figure.

Citation

If you find LESSViT useful in your research, please cite our paper:

@misc{si2026lessvitrobusthyperspectralrepresentation, title={LESSViT: Robust Hyperspectral Representation Learning under Spectral Configuration Shift}, author={Haozhe Si and Yuxuan Wan and Yuqing Wang and Minh N. Do and Han Zhao}, year={2026}, eprint={2605.18541}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2605.18541}, }