Spectral-spatial vision test-time training for hyperspectral image classification
Organizations: College of Mathematical Sciences, Harbin Engineering University, 145 Nantong Street, Nangang District, Harbin 150001, China
Abstract
Hyperspectral image (HSI) classification requires the representation of contiguous spectral signatures and spatial context under limited labeled supervision. Vision test-time training (TTT) offers an alternative to fixed-weight token mixing by performing self-supervised inner-model updates on the input sequence, but its application to center-pixel HSI classification remains insufficiently characterized. We present ViTTT-HSI, a spectral-spatial adaptation of the vision test-time training (ViT3) architecture. A spectral-aware embedding stem extracts ordered-band information using spectral convolution and forms spatial tokens without reducing their spatial resolution. Two ViT3-based TTT encoder blocks perform patch-conditioned token mixing, followed by the fusion of center-pixel and neighborhood-average features for classification. We evaluate the framework on Indian Pines, Pavia University, Salinas, and Houston 2013 using ten random seeds and dataset-specific training fractions of 1% or 5%. The mean overall accuracies are 97.6390%, 98.8753%, 99.3292%, and 98.4283%, respectively. Ablations reveal a substantial contribution from the TTT inner update on Indian Pines and a smaller positive contribution on Pavia University, while the relative benefits of the spectral stem and feature fusion depend on the dataset. The results demonstrate the feasibility of using patch-conditioned vision TTT for spectral--spatial HSI classification and highlight the role of the inner adaptation mechanism.
Figures & tables
| Metric | SFMamba | HyperTransXNet | S 2 Mamba | DSFormer | SSFTT | ViTTT-HSI |
|---|---|---|---|---|---|---|
| Class 01 | 71.19 25.21 | 67.86 20.05 | 0.48 1.00 | 79.05 18.87 | 59.05 28.14 | 96.43 2.31 |
| Class 02 | 91.73 3.88 | 93.68 2.91 | 93.17 2.57 | 92.65 1.91 | 91.76 2.50 | 96.01 2.21 |
| Class 03 | 92.44 3.46 | 93.14 2.97 | 93.14 3.55 | 96.88 2.33 | 94.50 2.23 | 96.74 1.48 |
| Class 04 | 93.00 5.47 | 95.16 4.01 | 91.74 6.72 | 93.80 4.07 | 93.94 7.06 | 98.22 1.71 |
| Class 05 | 92.48 4.78 | 93.52 3.04 | 91.68 3.52 | 93.82 2.58 | 93.36 3.01 | 93.93 3.32 |
| Class 06 | 98.34 1.15 | 97.07 2.22 | 99.59 0.28 | 98.86 1.05 | 98.63 0.96 | 99.60 0.28 |
| Metric | SFMamba | HyperTransXNet | S 2 Mamba | DSFormer | SSFTT | ViTTT-HSI |
|---|---|---|---|---|---|---|
| Class 01 | 98.70 2.79 | 99.36 0.82 | 99.90 0.24 | 97.64 5.07 | 99.84 0.30 | 99.85 0.41 |
| Class 02 | 99.99 0.03 | 99.96 0.11 | 100.00 0.00 | 100.00 0.00 | 99.91 0.16 | 99.99 0.02 |
| Class 03 | 98.69 3.80 | 99.16 1.15 | 99.98 0.04 | 99.78 0.53 | 99.98 0.07 | 99.53 0.50 |
| Class 04 | 98.95 2.13 | 97.56 2.60 | 98.66 1.24 | 99.43 0.33 | 99.02 0.70 | 99.39 1.34 |
| Class 05 | 98.69 1.92 | 98.55 1.02 | 98.64 2.20 | 98.91 1.60 | 99.02 1.23 | 98.01 0.83 |
| Class 06 | 99.89 0.20 | 99.83 0.36 | 99.83 0.53 | 100.00 0.00 | 99.89 0.19 | 99.90 0.23 |
| Dataset | Variant | OA | AA |
|---|---|---|---|
| Indian | Linear, no TTT | 93.76 0.88 | 89.45 3.13 |
| Indian | Spectral, no TTT | 94.19 0.95 | 90.91 2.16 |
| Indian | Linear, TTT | 97.42 0.46 | 94.85 1.89 |
| Indian | Spectral, TTT | 97.64 0.58 | 95.18 1.83 |
| Pavia | Linear, no TTT | 98.42 0.38 | 97.72 0.64 |
| Pavia | Spectral, no TTT | 98.46 0.35 | 97.78 0.69 |
| Dataset | Mixer setting | OA | AA |
|---|---|---|---|
| Indian | No TTT | 94.19 0.95 | 90.91 2.16 |
| Indian | Frozen inner | 94.08 0.65 | 90.18 2.06 |
| Indian | Full | 97.64 0.58 | 95.18 1.83 |
| Pavia | No TTT | 98.46 0.35 | 97.78 0.69 |
| Pavia | Frozen inner | 98.63 0.31 | 98.11 0.52 |
| Pavia | Full | 98.88 0.49 | 98.51 0.72 |
| Dataset | Head | OA |
|---|---|---|
| Indian | Center | 97.43 0.40 |
| Indian | Global | 95.04 0.69 |
| Indian | Center + Global | 97.64 0.58 |
| Pavia | Center | 98.90 0.41 |
| Pavia | Global | 94.71 0.71 |
| Pavia | Center + Global | 98.88 0.49 |
| Dataset | Full TTT | No TTT | Difference | |
|---|---|---|---|---|
| Indian | 11 | 97.34 | 95.30 | +2.04 |
| Indian | 21 | 97.24 | 95.17 | +2.07 |
| Indian | 29 | 97.69 | 94.80 | +2.89 |
| Pavia | 11 | 97.46 | 97.36 | +0.11 |
| Pavia | 21 | 98.74 | 98.21 | +0.53 |
| Pavia | 29 | 98.72 | 98.50 | +0.22 |
| Variant | OA | AA |
|---|---|---|
| Full | 90.16 1.04 | 87.39 2.65 |
| No TTT | 88.76 0.85 | 85.56 6.92 |
| Dataset | Parameters (M) | GFLOPs | Train (s) | Test (s) |
|---|---|---|---|---|
| Indian | 0.0923 | 0.167 | 139.1 | 4.04 |
| Pavia | 0.0914 | 0.165 | 42.2 | 11.15 |
| Salinas | 0.0923 | 0.145 | 93.3 | 20.44 |
| Houston 2013 | 0.0922 | 0.166 | 219.5 | 4.33 |
Hyperspectral Image Classification
Hyperspectral image classification assigns land-cover, material, or biological labels using the spectral and spatial information in image pixels.
See all 58 papers