arXiv:2611.06096cs.CVNov 2026

Manuscript Offprint

arXiv:2611.06096

Many Pixels, One Composition: Self-Supervised Spectra for Specimen-Level Prediction

Eleftheria Tetoula-Tsonga, George Arvanitakis, Theodoros Giannakas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Can hyperspectral (HS) imaging be used to predict the elemental composition of physical specimens found on the Earth's surface? We approach this problem as a supervised regression task, using an open dataset of specimens, each comprising a HS cube and elemental characterization. In particular, we train an encoder in a self-supervised fashion that operates on pixel-level; then freeze the encoder and train a lightweight attention-based regression head in a supervised manner, by pairing many representations of a given specimen with its corresponding elemental label. In test specimens, our approach significantly outperforms traditional spectral matching and unmixing baselines. It also outperforms supervised learning models based on the mean spectrum (of similar model capacity), while full model fine-tuning achieves the strongest performance, at substantially higher model capacity.

1 Introduction

Inferring the elemental composition of physical specimens found on the Earth's surface typically relies on techniques, such as X-ray-based sensing, which can be slow and difficult to scale. To circumvent this, non-destructive estimation from hyperspectral short wave infrared (SWIR) imagery could directly exploit surface spectra: a single hyperspectral scan is fast, requires no sample preparation, and can be repeated on the same specimen.

A conventional first step is to match pixel spectra against reference libraries such as the USGS, using either hard assignment or spectral unmixing [Kokaly et al., 2017, Heinz and Chang, 2001, Iordache et al., 2011]. These methods are unsupervised by nature. However, an advantage they have over a supervised learning counterpart is that they can rely on a prior library of well-selected spectral signatures, without requiring paired HS observations and composition labels from target specimens.

In the hyperspectral ML domain, learned encoders have been applied for tasks such as land-cover classification and scene reconstruction on satellite or airborne imagery [Hong et al., 2024, Wang et al., 2025, Zhu et al., 2023], under acquisition conditions (spatial context, illumination, sensor band configuration) that differ substantially from close-range specimen scans. These models, nonetheless, operate on a different pixel scale (in the order of many meters) and solve problems with different supervision signals.

A recently released dataset, “Minerals in the Wild” [Tetoula-Tsonga et al., 2026], is a collection of specimens, each accompanied by a hyperspectral cube and a corresponding XRF measurement providing the elemental composition of the specimen. We treat a specimen as a bag of unordered pixels (spectra) paired with its XRF supervision, essentially casting the problem as a multiple instance regression. To this end, we pretrain a spectrum/pixel-level encoder, freeze it, and sample many pixel embeddings per specimen. Finally, a permutation-invariant gated attention [Zaheer et al., 2017, Ilse et al., 2018] pools these into a specimen-level representation from which a regression head computes the elemental composition of the whole specimen.