Pith. sign in

REVIEW 3 major objections 5 minor 4 cited by

Teaching LLMs to Speak Spectroscopy

T0 review · 3 major / 5 minor · reviewed 2026-08-05 · deepseek-v4-flash

Pith's one-line read A pre-trained LLM, adapted with only 0.04% of its parameters, can predict galaxy redshifts from raw spectra while keeping most of its language skills.

desk verdict LoRA-adapted LLaMA can handle serialized galaxy spectra at trivial cost; the 0.04 MAE needs a proper held-out test before it is cited. read the letter →

arxiv 2508.10075 v1 pith:24LC3G5J submitted 2025-08-13 astro-ph.IM

classification astro-ph.IM
keywords galaxyredshiftslargelanguagemodelsLow-RankAdaptationspectraltokenizationparameter-efficientfine-tuningastronomicalspectrafoundationLLM
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper claims that a general-purpose large language model, LLaMA-3.1-8B, can be turned into a galaxy-redshift estimator purely by serializing spectra as digit strings and applying Low-Rank Adaptation (LoRA) to a tiny fraction of its weights. The authors report a mean absolute error of 0.043 on SDSS galaxy redshifts after only 16 GPU-hours of training, with less than 15% degradation on astronomy science-QA and about 10% on general QA. The point is not that this beats specialized redshift codes, which still do better; it is that a single model can both read raw spectra and reason about their physical meaning without custom architectures or expensive from-scratch training. If this holds, it opens a cheap route for astronomers to repurpose any new LLM for their own data modalities.

What carries the argument

The method's two load-bearing pieces are digit-serialization tokenization, where each normalized flux value is written out as a string of sign, digits, and separators (e.g., 4.56 becomes "4|5|6") with delimiters between values so the existing BPE tokenizer can ingest spectra without architectural changes, and Low-Rank Adaptation, where weight updates are restricted to low-rank matrices B and A (rank 8, about 3.4M parameters) while the base model stays frozen. Together they make multimodal adaptation as cheap as a standard fine-tuning API call.

What would settle it

Take the fine-tuned model and run it on spectra from a different survey or from galaxies at higher redshift than the 0-0.5 training range; if MAE stays near 0.043 that supports generalization, while a sharp increase indicates the model memorized the training distribution. Alternatively, shuffle the wavelength order of each spectrum while keeping the same flux-value string and check whether predictions change; if they barely change, the model is learning from digit statistics, not spectral features.

Watch

Extended reading notes

Core claim

The central claim is that a frozen pre-trained LLM, augmented by low-rank adapters, can acquire a non-textual scientific skill—estimating galaxy redshifts from optical spectra—without losing its language abilities. The authors achieve this by encoding each flux value as a sign, digits, and a separator into plain text, feeding roughly 3,000 spectra as token strings, and fine-tuning rank-8 LoRA adapters for two epochs. In the fiducial configuration this yields a validation MAE of 0.043, retaining 85.2% of AstroBench scientific QA and 89.4% of general QA performance. The authors frame the result as evidence that text-pretrained transformers harbour transferable sequential-processing strategies,

Load-bearing premise

The reported MAE of 0.043 is computed on a validation set that was also used to choose the learning rate, rank, and epochs, and the paper does not specify the spectral wavelength grid or normalization; the number may not reflect performance on truly unseen spectra.

Editorial extensions

If this is right

  • If the claim holds, researchers can adapt new LLMs to arbitrary spectral or sequential scientific data with zero architectural changes and a few GPU-hours.
  • A single model can do end-to-end analysis: ingest raw spectra, output physical quantities, and then discuss the result in natural language, removing custom interfaces in agentic scientific workflows.
  • The 0.043 MAE is competitive in a practical sense while retaining 85-89% of language QA, meaning instrument teams could deploy one model for both data reduction and interpretation.
  • Because only 0.04% of parameters are trained, the approach directly transfers to proprietary fine-tuning APIs, giving astronomers access to LLM services for niche scientific tasks.
  • If the result generalizes across surveys and resolutions, it turns pretrained LLMs into quickly re-tunable science adapters for other domains such as stellar spectra or light curves.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • A natural next test is whether the learned adapter actually attends to physical spectral features (e.g., the 4000 Å break or emission lines) or merely to coarse flux statistics; running the same serialized inputs with shuffled wavelength order would separate those cases.
  • The same recipe likely extends beyond redshifts to other spectral regression tasks—chemical abundances, stellar parameters, or even classification—since the tokenization is task-agnostic.
  • One could try more compact digit encodings (e.g., base-64 or floating-point compression) to shorten token sequences; the current ASCII-digit serialization uses roughly 1.6M tokens for 3,000 spectra and may be a bottleneck for larger datasets.
  • If the QA degradation is mostly from a few benchmarks rather than uniform, a hybrid adapter or layer-freezing strategy may push retention above 95% without sacrificing redshift accuracy.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. The paper demonstrates that LLaMA-3.1-8B-Instruct can be adapted with LoRA to predict galaxy redshifts from SDSS DR16 spectra, after serializing normalized flux values into digit tokens. The authors report a validation-set MAE of 0.043 for their fiducial configuration (learning rate 1e-4, rank 8, 2 epochs), using 16 A100 GPU-hours and adapting 0.04% of model parameters, while retaining 85.2% of AstroBench and 89.4% of general QA benchmark performance. They argue this parameter-efficient route lowers barriers for domain scientists and enables integrated agentic workflows where one model handles both spectral analysis and language reasoning. The central claim is that a generic pre-trained LLM can process a non-textual scientific modality with minimal adaptation while preserving language capabilities.

Significance. If the quantitative claims held, the paper would be a useful demonstration that a frozen-base LLM with LoRA can serve as a general scientific modality processor, without custom tokenizers or architectures. The qualitative result — that digit-serialized spectra can be fed to an instruction-tuned LLM and produce physically plausible redshift predictions — is interesting and plausible, and the paper's low-compute, open-toolchain approach is a strength. The paper also benefits from evaluating language retention with established benchmarks (AstroBench, eval-harness), a clear statement of the parameter count, and a public-data setting. However, the headline MAE is not an unbiased generalization estimate: hyperparameters are selected on the same validation set used to report the number, no held-out test set is described, the validation set size is internally inconsistent, and the spectral preprocessing is under-specified. These issues do not invalidate the proof-of-concept, but they prevent the reader from trusting the precise quantitative claims or reproducing the experiment.

major comments (3)
  1. [§4, Table 1; §2; Fig. 1] The reported MAE=0.043 is the minimum over a hyperparameter grid evaluated on the validation set. Section 4 and Table 1 use validation MAE to select the fiducial learning rate, LoRA rank, and number of epochs; no separate test set is described. The abstract and §4 present 0.043 as an accuracy statement, but it is a selected best-of-grid number, not an unbiased estimate of generalization. In addition, the validation set size is inconsistent: §2 says 1,000 galaxies, §4 says 20% of galaxy spectra (which would be 2,000), and the Fig. 1 caption says 2,000 spectra. The authors should fix the size inconsistency, hold out a truly independent test set, and report the MAE on that test set for the final configuration (and ideally for all configurations in Table 1).
  2. [§2, §3.1] The spectral preprocessing is specified too loosely to support the reported accuracy. The text says only that after 'converting from logarithmic to linear wavelength scales and normalizing fluxes' the authors obtain 10,000 samples, and that 'equal-frequency binning' is used to sample 3,000 training galaxies. The wavelength range, the number of wavelength bins, the resampling method, the normalization scheme, the definition of equal-frequency binning, and the final tokenization base/precision are not given. The example in §3.1 uses base=10 and prec=2, but the actual configuration is never stated, so the statement that each spectrum occupies less than 7% of the 8K context cannot be checked. Because the serialization itself is the feature representation, the reported MAE may depend strongly on these choices; the authors should specify the complete preprocessing pipeline and tokenization par
  3. [§4, Conclusion] No non-LLM baseline is run on the same validation data. The paper concedes that specialized spectroscopic redshift estimators reach sub-0.01 MAE, but then claims the approach is 'competitive' without quantifying the comparison on an identical sample. A simple baseline (e.g., linear regression or a random forest on binned, normalized fluxes) would establish whether the LLM adaptation is competitive with standard machine learning or merely functional. Without such a baseline, the central scientific claim—that an LLM can be efficiently repurposed for spectroscopy—is demonstrated only in absolute terms, not relative to existing tools.
minor comments (5)
  1. [§2] Typo: '0 < z <0.50 < z <0.5' appears to be a duplicated interval; it should be '0 < z < 0.5'.
  2. [§3.1] The example's digit serialization is ambiguous: the value 4.56 becomes '4|5|6', which omits the decimal point and could be parsed as 456 or 4.56 depending on the implied precision. The authors should explicitly state how the decimal location is recovered at prediction time.
  3. [§4, example conversation] The model's response in the sample dialogue says 'Photometric redshift: 0.315', but the task is redshift prediction from a spectrum, not photometric redshift estimation. This should say 'Redshift' or 'Spectroscopic redshift' to avoid conflating the two.
  4. [Table 1, Fig. 1] The validation-set inconsistency between 1,000 and 2,000 spectra also affects the stated '20%' figure. Please harmonize these numbers and state the exact number of validation galaxies used for each row of Table 1.
  5. [General] The abstract reports 'MAE = 0.04' but the results report 0.043. Rounding is fine, but the paper should be consistent about which number is being cited.

Circularity Check

1 steps flagged · score 6.0 of 10

Headline MAE is the best validation-grid result reported as an unbiased prediction; the underlying learning demonstration is not circular.

  1. fitted input called prediction [Section 4, Table 1, and Abstract]
    "The validation set comprised 20% of galaxy spectra spanning the full redshift range. We analyze how learning rate, LoRA rank, training epochs, and dataset size affect the trade-off between modality adaptation and knowledge retention. ... Our chosen fiducial configuration—learning rate 10−4, LoRA rank 8, two epochs—achieves MAE = 0.043 while retaining over 85% of original language capabilities."

    The same validation set is used both to select hyperparameters and to report the final MAE. Table 1 lists validation MAE for every grid configuration, and the fiducial point (lr=1e-4, rank=8, epochs=2) is the best-performing combination on that validation set. Therefore the headline 'achieves MAE = 0.043' is the minimum of the explored validation grid, not an independent estimate on data untouched by model selection. This is a fitted selection statistic renamed as an unbiased prediction: the reported accuracy is the objective used to choose the model, so it is statistically forced to look better than true generalization. This does not make the redshift-learning itself circular, but it invalidates the precise quantitative headline.

full rationale

The central demonstration—that a LoRA-adapted LLaMA-3.1-8B can ingest serialized SDSS spectra and produce redshift predictions on held-out galaxies—is not circular: the model is trained on labeled spectra and evaluated on galaxies not used for weight updates. The language-retention numbers come from external benchmarks (eval-harness, AstroBench); the AstroBench citation includes overlapping authors but is a published benchmark with fixed questions, so it is real independent evidence rather than a circular self-citation. The main circularity concern is the evaluation protocol: hyperparameters are tuned on the validation set, and the same validation set's MAE is then reported as the headline result. This is a partial 'fitted input called prediction' pattern—the reported 0.043 MAE is the best of the explored hyperparameter grid, not an unbiased test-set estimate. Additionally, there are internal inconsistencies in the validation-set size (1,000 galaxies in §2, '20% of galaxy spectra' in §4, and 2,000 in the Figure 1 caption) and under-specified preprocessing/tokenization details; these are correctness and reproducibility issues rather than circularity, but they compound the unreliability of the headline number. The paper honestly concedes that specialized estimators reach sub-0.01 MAE, so the qualitative contribution is a proof-of-concept for LLM-based spectroscopy, not a claim of state-of-the-art accuracy. Overall, the learning pipeline is self-contained, but the precise quantitative claim is inflated by validation-set selection, warranting a partial circularity score.

Assumptions & free parameters 6 free parameters · 3 assumptions · 0 invented entities

The central claim rests on a handful of hand-picked hyperparameters and an underspecified preprocessing pipeline. There are no new physical entities. The largest burden is the implicit assumption that the chosen tokenization and normalization are sufficient and consistent.

free parameters (6)
  • Learning rate = 1e-4
    Selected from {1e-5, 1e-4, 1e-3} based on validation MAE and language retention in Table 1.
  • LoRA rank = 8
    Selected from {4, 8, 16} based on validation MAE and language retention.
  • Training epochs = 2
    Selected from {1, 2, 3} based on validation MAE and language retention.
  • Tokenization base and precision = base=10, precision=2
    Chosen by hand; no justification for this representation is provided.
  • Sample selection cuts = 0 < z < 0.5, dereddened i < 18, galaxy type 3
    Defines the dataset and restricts the redshift range and brightness; affects difficulty.
  • Training set size = 3,000 galaxies
    Sampled via equal-frequency binning; no justification for the number.
assumptions (3)
  • ad hoc to paper Digit-serialized flux tokens (base 10, precision 2) preserve sufficient information for redshift inference.
    The representation is introduced without analysis of information loss.
  • domain assumption The pre-trained LLaMA tokenizer can meaningfully process digit sequences with delimiters.
    The paper tests this empirically but provides no analysis of tokenization artifacts.
  • domain assumption Flux normalization and linear wavelength conversion are performed consistently across all spectra.
    The exact preprocessing is not described; inconsistent handling could inflate or bias results.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Teaching LLMs to Speak Spectroscopy." pith.science (2026). https://pith.science/paper/24LC3G5J

@misc{pith2026250810075,
  author       = {Pith},
  title        = {Pith review of: Teaching LLMs to Speak Spectroscopy},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/24LC3G5J}},
  note         = {Machine review of arXiv:2508.10075}
}
read the original abstract

Pre-trained Large Language Models (LLMs) have revolutionized text processing, yet adapting Transformer-based neural networks to non-textual scientific modalities typically requires specialized architectures and extensive computational resources. We demonstrate that LLaMA-3.1-8B can be efficiently repurposed to predict galaxy redshifts from spectroscopic data through Low-Rank Adaptation (LoRA), achieving competitive performance while preserving its linguistic capabilities. Using only 16 GPU-hours and adapting 0.04% of model parameters, our approach achieves a mean absolute error of 0.04 in redshift prediction while retaining over 85% of performance on AstroBench and 89% on general QA tasks from eval-harness. This minimal-effort adaptation--requiring only simple standard fine-tuning APIs--lowers barriers to entry for domain scientists and enables integrated agentic workflows where a single model handles both spectroscopic data for quantitative analysis and natural language for reasoning.

Figures

Figures reproduced from arXiv: 2508.10075 by the authors.

Figure 1
Figure 1. Trade-off between spectroscopic accuracy and language benchmark retention across learning rates. Top: Predicted vs. true redshifts for validation galaxies, with contours representing the full validation set of 2,000 spectra and individual points shown for clarity. Learning rate 10−5 (left) preserves language capabilities but yields poor redshift predictions (MAE=0.104), while 10−4 (middle) achieves optimal spectrosc… view at source ↗

Discussion (0). Sign in to comment.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Executable verification through formalized expert reasoning in astronomical spectroscopy

    astro-ph.CO 2026-07 conditional novelty 7.0 of 10

    An LLM-based multi-agent system (FORMA) verifies DESI spectral classifications with 95.5% agreement to expert adjudication by reconstructing expert reasoning into an auditable workflow.

  2. Spectra as Language: Large Language Models for Scalable Stellar Parameter and Abundance Inference

    astro-ph.IM 2026-05 unverdicted novelty 6.0 of 10

    Two-stage LLM framework infers stellar parameters and ~20 elemental abundances from spectra, showing performance gains with increasing data volume.

  3. Spectra as Language: Large Language Models for Scalable Stellar Parameter and Abundance Inference

    astro-ph.IM 2026-05 unverdicted novelty 5.0 of 10

    A two-stage LLM framework infers stellar parameters and ~20 elemental abundances from spectra, with performance improving as training data increases.

  4. Spectra as Language: Large Language Models for Scalable Stellar Parameter and Abundance Inference

    astro-ph.IM 2026-05 unverdicted novelty 5.0 of 10

    A two-stage LLM framework infers stellar parameters and ~20 elemental abundances from spectra, with performance improving systematically as training data volume increases.

Reference graph

Works this paper leans on

17 extracted references · 4 canonical work pages · cited by 2 Pith papers

  1. [6]

    doi: 10.1038/s42256-023-00788-1. Kipf, T. N. and Welling, M. Semi-supervised classifica- tion with graph convolutional networks. In International Conference on Learning Representations,

  2. [7]

    Liu, Z., Lin, Y ., Cao, Y ., Hu, H., Wei, Y ., Zhang, Z., Lin, S., and Guo, B

    doi: 10.1093/mnras/stad3015. Liu, Z., Lin, Y ., Cao, Y ., Hu, H., Wei, Y ., Zhang, Z., Lin, S., and Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 10012–10022,

  3. [8]

    ProLLaMA: A Protein Lan- guage Model for Multi-Task Protein Language Process- ing

    5 Teaching LLMs to Speak Spectroscopy Lv, L., Lin, Z., Li, H., Liu, Y ., Cui, J., Yu-Chian Chen, C., Yuan, L., and Tian, Y . ProLLaMA: A Protein Lan- guage Model for Multi-Task Protein Language Process- ing. arXiv e-prints, art. arXiv:2402.16445, February

  4. [9]

    doi: 10.48550/arXiv.2402.16445. Moss, A. The ai cosmologist i: An agentic system for au- tomated data analysis. arXiv preprint arXiv:2504.03424,

  5. [13]

    doi: 10.3847/1538-4357/ ad9b99. Ting, Y . S., Nguyen, T. D., Ghosal, T., Pan, R., Arora, H., Sun, Z., de Haan, T., Ramachandra, N., Wells, A., Madireddy, S., and Accomazzi, A. AstroMLab 1: Who wins astronomy jeopardy!? Astronomy and Comput- ing, 51:100893, April

  6. [14]

    doi: 10.1016/j.ascom.2024. 100893. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Atten- tion is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008,

  7. [16]

    Unigenx: Unified generation of sequence and structure with autoregressive diffusion

    Zhang, G., Li, Y ., Luo, R., Hu, P., Zhao, Z., Li, L., Liu, G., Wang, Z., Bi, R., Gao, K., et al. Unigenx: Unified generation of sequence and structure with autoregressive diffusion. arXiv preprint arXiv:2503.06687,

  8. [17]

    Zhang, J. et al. Llama: Open and efficient foundation lan- guage models. arXiv preprint arXiv:2307.09288,

Show all 17 references
  1. [2012]

    B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al

    Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165,

  2. [2017]

    J., et al

    Yuan, Z., Shang, Y ., Zhou, Y ., Dong, Z., Zhou, Z., Xue, C., Wu, B., Li, Z., Gu, Q., Lee, Y . J., et al. Llm inference unveiled: Survey and roofline model insights. arXiv preprint arXiv:2402.16363,

  3. [2019]

    and Ting, Y .-S

    R´o˙za´nski, T. and Ting, Y .-S. Scaling Laws for Emulation of Stellar Spectra. arXiv e-prints, art. arXiv:2503.18617, March

  4. [2020]

    An image is worth 16x16 words: Transformers for image recognition

    Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al. An image is worth 16x16 words: Transformers for image recognition. arXiv preprint arXiv:2010.11929,

  5. [2021]

    3dmolformer: A dual-channel framework for structure- based drug discovery

    Hu, X., Liu, G., Chen, C., Zhao, Y ., Zhang, H., and Liu, X. 3dmolformer: A dual-channel framework for structure- based drug discovery. arXiv preprint arXiv:2502.05107,

  6. [2022]

    The Scaling Law in Stellar Light Curves

    Pan, J.-S., Ting, Y .-S., Huang, Y ., Yu, J., and Liu, J.-F. The Scaling Law in Stellar Light Curves. arXiv e-prints, art. arXiv:2405.17156, May 2024a. doi: 10.48550/arXiv. 2405.17156. Pan, J.-S., Ting, Y .-S., and Yu, J. Astroconformer: The prospects of analysing stellar ligh...

  7. [2023]

    Gruver, N., Sriram, A., Madotto, A., Wilson, A

    URL https://zenodo.org/records/ 10256836. Gruver, N., Sriram, A., Madotto, A., Wilson, A. G., Zit- nick, C. L., and Ulissi, Z. Fine-Tuned Language Mod- els Generate Stable Inorganic Materials as Text. arXiv e-prints, art. arXiv:2402.04379, February

  8. [2024]

    doi: 10.48550/arXiv.2402.04379. Hu, E. J., Shen, Y ., Wallis, P., Allen-Zhu, Z., Li, Y ., and Wang, P. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685,

  9. [2025]

    R´o˙za´nski, T., Ting, Y .-S., and Jabło´nska, M

    doi: 10.48550/arXiv.2503.18617. R´o˙za´nski, T., Ting, Y .-S., and Jabło´nska, M. Transformer- Payne: Enhancing Spectral Emulation Accuracy and Data Efficiency by Capturing Long-range Correlations. ApJ, 980(1):66, February

Pith tools

Reviewed August 5, 2026 · model on record in the stance chip above.