Universal Spectral Tokenization via Self-Supervised Panchromatic Representation Learning

Jeff Shen, François Lanusse, Liam Holden Parker, Ollie Liu, Tom Hehir, Leopoldo Sarra, Lucas Meyer, Micah Bowles, Sebastian Wagner-Carena, Helen Qu, Siavash Golkar, Alberto Bietti, Hatim Bourfoune, Nathan Cassereau, Pierre Cornette, Keiya Hirashima, Géraud Krawezik, Ruben Ohana, Nicholas Lourie, Michael McCabe, Rudy Morel, Payel Mukhopadhyay, Mariel Pettee, Bruno Régaldo-Saint Blancard, Kyunghyun Cho, Miles D. Cranmer, Shirley HoarXiv 2025 · DOI

TL;DR

This paper introduces a "universal spectral tokenizer" that learns a unified representation from diverse astronomical spectra without resampling. This self-supervised model can process data from different surveys, wavelengths, and object types, paving the way for more generalizable foundation models in astronomy and potentially other scientific fields with complex sequential data.

What Problem Does This Paper Address?

Astronomical surveys generate vast amounts of spectral data, which are crucial for understanding celestial objects. However, this data is often fragmented. Different surveys cover different wavelength ranges (e.g., optical vs. infrared), use varying resolutions, and observe diverse object types (stars, galaxies, quasars). This heterogeneity leads to siloed analysis pipelines, requiring bespoke preprocessing and specialized machine learning models for each dataset. This fragmentation hinders the ability to pool information across datasets, reuse knowledge, and build comprehensive, generalizable "foundation models" that can tackle a wide range of scientific questions. The paper aims to bridge this gap by creating a single, unified representation for all these diverse spectral data.

Methods

The core of the proposed solution is a "universal spectral tokenizer" based on a Vision Transformer (ViT) architecture adapted for 1D spectral data. Key methodological innovations include:

  • Native Wavelength Grid Processing: The model directly ingests spectra on their original, native wavelength grids, avoiding the need for resampling. This preserves fine details and circumvents interpolation errors and inefficiencies associated with fixed, common grids.
  • Self-Supervised Learning: The model is trained using a self-supervised, loss-aware reconstruction objective. It learns to reconstruct the original spectrum from its internal representation, forcing it to capture essential spectral features without explicit labels.
  • Panchromatic, Multi-Resolution Input: The architecture is designed to handle spectra from various surveys with different wavelength ranges and resolutions simultaneously.
  • Wavelength-Aware Embeddings: Continuous per-pixel sinusoidal embeddings are used to imbue tokens with wavelength information, allowing the model to understand the spectral context.
  • Transformer Architecture: Standard transformer blocks with multi-head self-attention are employed to capture long-range dependencies within spectra, crucial for identifying features that span large wavelength ranges.
  • Lightweight Adaptation: The learned, homogeneous embeddings can be efficiently adapted for downstream tasks (like classification or parameter estimation) by training small, task-specific "adaptation modules" on top of the frozen tokenizer.

Datasets

The model was trained and evaluated on data from four major astronomical surveys:

  • SDSS DR17: Sloan Digital Sky Survey Data Release 17
  • DESI DR1: Dark Energy Spectroscopic Instrument Data Release 1
  • GALAH DR3: Galactic Archaeology with HERMES Data Release 3
  • APOGEE: Apache Point Observatory Galactic Evolution Experiment

The paper emphasizes that the model was trained across all these datasets without homogenization, meaning it directly processed the native wavelength grids and resolutions of each survey. This is a key differentiator from previous approaches that would require extensive preprocessing to align datasets.

Key Insights and Ideas

  • Emergent Structure from Raw Data: The model learns physically meaningful representations and discovers correlations with properties like stellar mass and redshift purely from raw spectral data, without being explicitly told these properties exist. This demonstrates the power of self-supervised learning for uncovering hidden structures in scientific data.
  • Unified Representation is Achievable: The paper provides the first demonstration that a single model can unify spectral data across vastly different resolutions and wavelength domains. This is a significant step towards building truly general-purpose foundation models for astronomy.
  • Flexibility Beyond Spectra: The architecture's design, particularly its ability to handle irregular, sequential data, suggests it can be adapted to other scientific domains like time series analysis in physics, climate science, or healthcare, by simply swapping wavelength embeddings for time-based ones.

Key Results

  • Spectrum Reconstruction: The model successfully reconstructs spectra from all four diverse datasets (SDSS, DESI, GALAH, APOGEE), demonstrating its ability to capture a wide range of physical phenomena and spectral features across different object types and surveys.
  • Latent Space Structure: UMAP visualizations of the learned embeddings show clear correlations with physical properties like stellar mass and redshift, indicating that the representations are physically meaningful.
  • Competitive Downstream Performance: Lightweight adaptation modules trained on top of the universal tokenizer achieved competitive performance on:
  • Object Classification: Outperforming a strong task-specific baseline from Zhong et al. [2024] with 97% average accuracy.
  • Stellar Parameter Estimation: Achieving performance competitive with well-established baselines for estimating effective temperature, surface gravity, and metallicity from APOGEE spectra, and well within the uncertainties of existing pipelines.

Limitations and Future Work

  • Focus on Foundation Building: The authors explicitly state their aim is not to achieve state-of-the-art performance on individual tasks but to demonstrate broad applicability and provide a building block. They leave multi-modal and cross-survey tasks to future foundation models built on their tokenizer.
  • Future Directions: The paper suggests that the model can serve as a powerful building block for foundation models in astronomy and potentially extend to other scientific domains with heterogeneous sequential data. The inherent flexibility of the architecture is highlighted as a key avenue for future exploration.

Summary updated

BibTeX
@misc{shen2025universal,
  author = {Jeff Shen and François Lanusse and Liam Holden Parker and Ollie Liu and Tom Hehir and Leopoldo Sarra and Lucas Meyer and Micah Bowles and Sebastian Wagner-Carena and Helen Qu and Siavash Golkar and Alberto Bietti and Hatim Bourfoune and Nathan Cassereau and Pierre Cornette and Keiya Hirashima and Géraud Krawezik and Ruben Ohana and Nicholas Lourie and Michael McCabe and Rudy Morel and Payel Mukhopadhyay and Mariel Pettee and Bruno Régaldo-Saint Blancard and Kyunghyun Cho and Miles D. Cranmer and Shirley Ho},
  title = {{Universal Spectral Tokenization via Self-Supervised Panchromatic Representation Learning}},
  year = {2025},
  eprint = {2510.17959},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.17959},
}
Figure