SpecLLM: LLM-based VNIR spectral interpretation
Abstract
Visible and near-infrared (VNIR) spectroscopy identifies materials from characteristic spectral bands, and spectroscopists interpret spectra by features such as peak positions and intensities. Recent machine-learning and foundation models for hyperspectral data are highly effective but return numerical outputs or latent representations rather than such feature-level descriptions. Meanwhile, LLM-based spectral approaches have mostly provided raw numerical sequences. We present a method for making spectroscopic data accessible to large language models (LLMs) through compact, feature-based representations. Instead of supplying full spectra as comma-separated values (CSV), JavaScript Object Notation (JSON), or extensible markup language (XML), the proposed approach extracts summary statistics and discriminative extrema. It serialises them as either natural language or structured JSON. We evaluate prototype-based substance classification in two complementary scenes from an open-access VNIR hyperspectral blood dataset. For the selected models, compact feature representations were substantially more effective than raw numerical encodings, but less effective than a Random Forest operating on raw spectra. The natural-language format provides a human-readable, inspectable serialisation of compact spectral evidence and reduces prompt length compared with full-spectrum encodings. We also compared natural language and JSON feature representations and found them broadly comparable.
Related
- Adaptive RGB–VNIR spectral fusion for non-destructive quality assessment of Canadian wild rice kernels
- Validation-Aware VNIR Spectroscopy Reveals Target-Specific Transferability of SOC, SIC, and Gypsum Predictions in Dryland Agricultural Soils
- 3DRISM Solvation for Accurate and Large-Scale Protein Hydration Prediction and Mechanistic Interpretation
- Chemical Constructions, Mechanism and Biological Interpretation of Nitroreductase-Responsive Systems: From Hypoxia-Associated Imaging to Activatable Therapy
- Reply to Cantwell Chater and Shahsavar: Clarifying PDB deposition records and local model interpretation in GlyT2 structures.
BibTeX
@article{romaszewski2026specllm,
title = {{SpecLLM: LLM-based VNIR spectral interpretation}},
author = {Michał Romaszewski and Anna Strzoda and Marzena Halama and Przemysław Głomb and Piotr Masłowski},
journal = {Scientific Reports},
year = {2026},
month = oct,
doi = {10.1038/s41598-026-75562-5},
url = {https://www.nature.com/articles/s41598-026-75562-5},
note = {CC BY 4.0},
}
RIS
TY - JOUR
TI - SpecLLM: LLM-based VNIR spectral interpretation
AU - Michał Romaszewski
AU - Anna Strzoda
AU - Marzena Halama
AU - Przemysław Głomb
AU - Piotr Masłowski
PY - 2026
DA - 2026/10/17
JO - Scientific Reports
DO - 10.1038/s41598-026-75562-5
UR - https://www.nature.com/articles/s41598-026-75562-5
AB - Visible and near-infrared (VNIR) spectroscopy identifies materials from characteristic spectral bands, and spectroscopists interpret spectra by features such as peak positions and intensities. Recent machine-learning and foundation models for hyperspectral data are highly effective but return numerical outputs or latent representations rather than such feature-level descriptions. Meanwhile, LLM-based spectral approaches have mostly provided raw numerical sequences. We present a method for making spectroscopic data accessible to large language models (LLMs) through compact, feature-based representations. Instead of supplying full spectra as comma-separated values (CSV), JavaScript Object Notation (JSON), or extensible markup language (XML), the proposed approach extracts summary statistics and discriminative extrema. It serialises them as either natural language or structured JSON. We evaluate prototype-based substance classification in two complementary scenes from an open-access VNIR hyperspectral blood dataset. For the selected models, compact feature representations were substantially more effective than raw numerical encodings, but less effective than a Random Forest operating on raw spectra. The natural-language format provides a human-readable, inspectable serialisation of compact spectral evidence and reduces prompt length compared with full-spectrum encodings. We also compared natural language and JSON feature representations and found them broadly comparable.
SN - 2045-2322
ER -