XRFormer: Multiscale Tokenization for XRF Representation Learning
- URL: http://arxiv.org/abs/2607.06424v1
- Date: Tue, 07 Jul 2026 15:51:06 GMT
- Title: XRFormer: Multiscale Tokenization for XRF Representation Learning
- Abstract summary: X-ray fluorescence (XRF) spectroscopy is a key modality for material analysis in cultural heritage.<n>XRF spectra are complex one-dimensional signals composed of sharp elemental peaks, broader structures, and background variations.<n>This paper introduces XRFormer, a transformer architecture tailored to XRF spectra through a multiscale convolutional tokenizer.
- Score: 0.688204255655161
- License: http://creativecommons.org/licenses/by/4.0/
- 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.
Related papers
- Spectral Model eXplainer: a chemically-grounded explainability framework for spectral-based machine learning models [0.6487259764989486]
This study introduces the Spectral Model eXplainer (SMX), a post-hoc, global, model-agnostic XAI framework that explains spectral classifiers through expert-informed spectral zones.<n>SMX summarizes each zone via PCA, defines quantile-based logical predicates, estimates relevance with perturbations, and aggregates bag-wise rankings in a directed weighted graph.
arXiv Detail & Related papers (2026-05-04T15:01:04Z) - FRIGID: Scaling Diffusion-Based Molecular Generation from Mass Spectra at Training and Inference Time [52.735012862324766]
We present FRIGID, a framework with a novel diffusion language model that generates structures conditioned on mass spectra.<n>We show how forward fragmentation models enable inference-time scaling by identifying spectrum-inconsistent fragments.<n>Further empirical analyses show that FRIGID exhibits log-linear performance scaling with increasing inference-time compute.
arXiv Detail & Related papers (2026-04-17T19:11:18Z) - XANE(3): An E(3)-Equivariant Graph Neural Network for Accurate Prediction of XANES Spectra from Atomic Structures [5.177624503826816]
XANE(3) is a physics-based E(3)-equivariant graph neural network for predicting X-ray absorption near-edge structure (XANES) spectra directly from atomic structures.<n>We evaluate the model on a dataset of 5,941 FDMNES simulations of iron oxide surface facets and obtain a spectrum mean squared error of $1.0 times 10-3$ on the test set.
arXiv Detail & Related papers (2026-04-13T23:42:14Z) - Spectral Gating Networks [65.9496901693099]
We introduce Spectral Gating Networks (SGN) to introduce frequency-rich expressivity in feed-forward networks.<n>SGN augments a standard activation pathway with a compact spectral pathway and learnable gates that allow the model to start from a stable base behavior.<n>It consistently improves accuracy-efficiency trade-offs under comparable computational budgets.
arXiv Detail & Related papers (2026-02-07T20:00:49Z) - Spectral Bias Mitigation via xLSTM-PINN: Memory-Gated Representation Refinement for Physics-Informed Learning [6.546212906401042]
We introduce a representation-level spectral remodeling xLSTM-PINN to curb spectral bias and strengthen extrapolation.<n>Across four benchmarks, we integrate gated cross-scale memory, a staged frequency curriculum, and adaptive residual reweighting.<n>Compared with the baseline PINN, we reduce MSE, RMSE, MAE, and MaxAE across all four benchmarks and deliver cleaner boundary transitions.
arXiv Detail & Related papers (2025-11-16T08:55:27Z) - SpectralX: Parameter-efficient Domain Generalization for Spectral Remote Sensing Foundation Models [27.717648142854696]
SpectralX is an innovative parameter-efficient fine-tuning framework that adapt existing RSFMs as backbone.<n>We develop an Attribute-oriented Mixture of Adapter (AoMoA) that dynamically aggregates multi-attribute expert knowledge.<n>By iteratively querying low-level semantic features with high-level representations, the model learns to focus on task-beneficial attributes.
arXiv Detail & Related papers (2025-08-03T12:14:38Z) - SpectrumFM: A Foundation Model for Intelligent Spectrum Management [99.08036558911242]
Existing intelligent spectrum management methods, typically based on small-scale models, suffer from notable limitations in recognition accuracy, convergence speed, and generalization.<n>This paper proposes a novel spectrum foundation model, termed SpectrumFM, establishing a new paradigm for spectrum management.<n>Experiments demonstrate that SpectrumFM achieves superior performance in terms of accuracy, robustness, adaptability, few-shot learning efficiency, and convergence speed.
arXiv Detail & Related papers (2025-05-02T04:06:39Z) - How Learnable Grids Recover Fine Detail in Low Dimensions: A Neural Tangent Kernel Analysis of Multigrid Parametric Encodings [106.3726679697804]
We compare the two most common techniques for mitigating this spectral bias: Fourier feature encodings (FFE) and multigrid parametric encodings (MPE)<n>MPEs are seen as the standard for low dimensional mappings, but MPEs often outperform them and learn representations with higher resolution and finer detail.<n>We prove that MPEs improve a network's performance through the structure of their grid and not their learnable embedding.
arXiv Detail & Related papers (2025-04-18T02:18:08Z) - Towards virtual painting recolouring using Vision Transformer on X-Ray Fluorescence datacubes [80.32085982862151]
We define a pipeline to perform virtual painting recolouring using raw data of X-Ray Fluorescence (XRF) analysis on pictorial artworks.
To circumvent the small dataset size, we generate a synthetic dataset, starting from a database of XRF spectra.
We define a Deep Variational Embedding network to embed the XRF spectra into a lower dimensional, K-Means friendly, metric space.
arXiv Detail & Related papers (2024-10-11T14:05:28Z) - SpectralFormer: Rethinking Hyperspectral Image Classification with
Transformers [91.09957836250209]
Hyperspectral (HS) images are characterized by approximately contiguous spectral information.
CNNs have been proven to be a powerful feature extractor in HS image classification.
We propose a novel backbone network called ulSpectralFormer for HS image classification.
arXiv Detail & Related papers (2021-07-07T02:59:21Z) - Identification of complex mixtures for Raman spectroscopy using a novel
scheme based on a new multi-label deep neural network [0.0]
We propose a new scheme based on a constant wavelet transform (CWT) and a deep network for classifying complex mixture.
A multi-label deep neural network model (MDNN) is then applied for classifying material.
The average detection time obtained from our model is 5.31 s, which is much faster than the detection time of the previously proposed models.
arXiv Detail & Related papers (2020-10-29T14:58:39Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.