Skip to content
Conference

XRFormer: Multiscale Tokenization for XRF Representation Learning

Jul 2026 · International Conference on Pattern Recognition · Vol abs/2607.06424 · 0 citations · 30 references
Computer Science

TL;DR

XRFormer is introduced, a transformer architecture tailored to XRF spectra through a multiscale convolutional tokenizer that injects locality and multi-resolution inductive biases before global self-attention before transformer-based XRF modeling under data-limited conditions.

Abstract

X-ray fluorescence (XRF) spectroscopy is a key modality for material analysis in cultural heritage. However, automated learning from XRF spectra remains challenging: XRF spectra are complex one-dimensional signals composed of sharp elemental peaks, broader structures, and background variations that are not taken into account by existing learning-based models. This paper introduces XRFormer, a transformer architecture tailored to XRF spectra through a multiscale convolutional tokenizer that injects locality and multi-resolution inductive biases before global self-attention. The tokenizer progressively reduces spectral resolution while increasing embedding dimensionality, and the resulting token sequence is processed by a standard transformer encoder. We further investigate self-supervised pretraining for XRF representation learning using Masked Spectral modeling (MSM) and a physics-informed Peak Presence Prediction (PPP) objective. Experiments on the Pigments Checker STANDARD v.5 dataset for pigment identification and unmixing show that XRFormer consistently outperforms ViT, SpectralFormer (with and without CAF), and a 1D-CNN baseline for pigment identification. For pigment unmixing, XRFormer achieves robust abundance estimation while maintaining significantly higher parameter efficiency than SpectralFormer, operating at a lower token resolution (128 vs. 512 tokens) and with less than half the number of parameters (1.5M vs. 3.37M). MSM yields consistent gains across both tasks, while PPP further enhances performance for both identification and unmixing when tuned with an appropriate peak prominence. These results highlight multiscale, modality-aware tokenization as an effective and parameter efficient foundation for transformer-based XRF modeling under data-limited conditions. A GitHub repository is provided at https://github.com/sofiane1010/XRFormer.

View source

Similar papers

Open access Jul 2026

Physics-embedded learning for interpretable, generalized, and rapid speckle reconstructive spectroscopy

Speckle reconstructive spectrometers (RSs) leverage the wavelength sensitivity of disordered media for spectral encoding, where the spectral information must be decoded via computational reconstruction algorithms. In recent years, machine learning has emerged as a powerful computational tool and has been applied to spe...

Junrui Liang · 0 citations
Preprint Jul 2026

Uni-XAS: Alignment-Driven Bidirectional Multimodal Learning for X-ray Absorption Spectroscopy

Uni-XAS is presented, a unified benchmark and learning framework that reframes bidirectional XAS modeling as a cross-modal alignment and conditional generation problem, and introduces Permutation-Rectified Flow Matching, which integrates type-wise optimal transport into a continuous generative flow to provide a princip...

Suyang Zhong, Yuhao Zhao, Boying Huang et al. · 0 citations
2026

Self-Supervised Hyperspectral Super-Resolution From RGB With Score-Distilled Spectral Prior

Recovering hyperspectral images (HSIs) from RGB observations is a highly ill-posed problem due to severe spectral information loss. However, current methods either rely on costly paired RGB–HSI datasets that are difficult to obtain or on unpaired RGB–HSI data for spectral guidance, which increases training costs and of...

Ningjia Lv, Feiwang Yuan, Wei He et al. · 0 citations
Preprint Aug 2026

PixRestore: Unified Image Restoration via Pixel Diffusion Transformer

PixRestore is presented, a VAE-free pixel-space Diffusion Transformer (DiT) for UIR, where the diffusion backbone is trained entirely from scratch, without relying on T2I pretraining.

Ling-Chen Sun, Rong-Yuan Wu, Xiang-Tao Kong et al. · 2 citations
2026

SSH-Net: Symplectic-Inspired Discrete Dynamic Evolution for Hyperspectral Image Classification

Hyperspectral image classification (HSIC) relies on effective modeling of coupled spectral–spatial interactions. While recent CNN-, Transformer-, and Mamba-based methods have improved feature extraction, most of them organize token interaction through layerwise aggregation and repeated stacking, leaving cross-layer pro...

Zihang Luo, Xiao-Fei Yang, Fei Yu et al. · 0 citations
Preprint Sep 2026

Learning Spatial-Spectral Refinement and Calibrating Complementary Observations for Hyperspectral Image Super-Resolution

Hyperspectral and multispectral image fusion (HMIF) aims to reconstruct a high-resolution hyperspectral image (HR-HSI) by combining the fine spatial details of a high-resolution multispectral image (HR-MSI) with the rich spectral information of a low-resolution hyperspectral image (LR-HSI). Recent advances in implicit...

Li-Qian Yang, Xing-Chi Chen, Xin-Feng Gui et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.