arXiv(opens in a new tab)astro-ph.IMSep 2026

Manuscript Offprint

arXiv:2609.07102

AstroSpecLM: A Spectrum-Language Model for Evidence-Grounded Astronomical Spectral Analysis

Jinghang Shi, Yanxia Zhang, Ali Luo, Changhua Li, Xiao Kong

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

Abstract

Astronomical spectra encode rich physical information, but drawing scientific conclusions from spectral features typically requires expert interpretation. This paper presents AstroSpecLM, a spectrum-language model that connects one-dimensional DESI spectra with Qwen3-4B to answer questions and provide explanations grounded in spectral evidence. Instead of generating question-answer pairs directly from templates or raw catalog fields, we first distill each spectrum into a compact set of catalog- and spectrum-derived facts, then use these facts as references to generate instruction-following conversations. The resulting model is competitive with specialist supervised baselines on classification and redshift estimation, while additionally producing natural-language explanations that reference specific spectral features. Our results indicate that grounding a language model in one-dimensional scientific spectra is feasible, and that fact-mediated instruction data yields a model capable of both prediction and explanation.

1 Introduction

Astronomical spectra provide wavelength-resolved measurements that support the inference of object type, redshift, stellar temperature, and other physical properties. A typical astronomical spectrum consists of a one-dimensional (1D) flux array spanning thousands of wavelength pixels. Its interpretation hinges on linking localized spectral features, such as emission and absorption lines, and their wavelength shifts to the physical properties of the astronomical source. This process is inherently evidence-based: conclusions about an object's type or redshift should be supported by specific spectral features. Modern spectroscopic surveys such as DESI produce millions of such spectra (DESI Collaboration et al., 2024, 2026), and automated pipelines can efficiently extract structured measurements from them (Guy et al., 2023). However, the

development of natural-language frameworks that explicitly map this spectral evidence to final conclusions lags behind. Ideally, such a model should process spectral inputs to generate interpretable predictions, accompanied by a clear rationale grounded in the underlying spectral features.

Large language models (LLMs) offer a path toward this form of grounded scientific interaction (Taylor et al., 2022; Zhang et al., 2024). When connected to modality encoders, they can condition generation on non-text inputs and produce flexible natural-language responses (Alayrac et al., 2022; Li et al., 2023). However, most multimodal language models are designed for natural images (Liu et al., 2023; Zhu et al., 2024), videos (Maaz et al., 2024; Lin et al., 2024), or documents (Hu et al., 2025), where the input is two-dimensional and semantically compositional. A 1D astronomical spectrum poses a different grounding problem: its meaning is tied to wavelength, and critical evidence often lies in narrow localized regions that only become meaningful through physical interpretation (Guy et al., 2023; DESI Collaboration et al., 2024; Zhong et al., 2024; Parker et al., 2024). Bridging this gap requires both a spectrum encoder that preserves wavelength-localized information and a training strategy that grounds language-model outputs in observable spectral evidence (He et al., 2022; Parker et al., 2024).

In this work, we present AstroSpecLM, a spectrum-language model that connects real 1D DESI spectra with Qwen3-4B (Yang et al., 2025) for spectrum-grounded question answering. AstroSpecLM uses a spectrum-specific masked autoencoder (He et al., 2022), SpecMAE, to encode the input spectrum, and a lightweight spectral projector to insert spectral representations into the language-model embedding space. To train the model faithfully, we construct DESI-SpecInstruct, an instruction-tuning dataset built through an intermediate fact extraction stage. The resulting model answers spectrum-grounded questions in natural language with explanations that reference specific spectral features as evidence.

References (20)