This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.
In-context learning for small-sample soil mid-infrared spectroscopy: evaluating TabPFN across an integrated soil-acidity panel
Downloads
Authors
Abstract
Soil acidity diagnosis requires several interdependent laboratory measurements, limiting throughput. Mid-infrared (MIR) spectroscopy can estimate this panel from one scan, but practical use depends on robust calibration. Deep learning has surpassed conventional methods in many data-rich fields; however, adapted deep learning architectures such as convolutional neural networks (CNNs) are data-hungry and can overfit when regional datasets contain only a few hundred labelled soils. Supervised transfer learning and self-supervised learning (SSL) address this scarcity by reusing representations learned from large spectral libraries, whereas TabPFN, a newer deep-learning method designed for small tabular datasets, applies a pretrained in-context prediction rule. We tested whether TabPFN provides a stronger regional calibration strategy than these deep-learning alternatives and standard soil-spectroscopy methods. Partial least squares regression (PLSR), Cubist, 2 CNN architectures trained from scratch (SmallCNN and LargeCNN), supervised transfer, SSL and TabPFN were evaluated for ten acidity-related properties in target-specific cohorts of 418 acidic soils from eastern North America. The Open Soil Spectral Library (OSSL) supported supervised and SSL pretraining and a seven-property large-library benchmark of TabPFN and LargeCNN, with published PCA-Cubist results as an external reference. Regionally, TabPFN achieved the highest mean R² (0.83), followed by Cubist (0.81) and fine-tuned SSL (0.79). It led on nine properties and exceeded PLSR and both from-scratch CNNs on all ten. For the seven regional targets with corresponding or closely related measurements in OSSL, TabPFN and LargeCNN achieved mean R² values of 0.85 and 0.75; on OSSL, the corresponding values were 0.96 and 0.94. TabPFN's advantage over LargeCNN therefore narrowed from 0.11 regionally to 0.02 at library scale, consistent with abundant labels reducing the CNN deficit, while TabPFN remained strongest on six of seven OSSL properties. TabPFN thus offers a sample-efficient route to integrated MIR acidity assessment while retaining strong large-library performance without sample subsampling or spectral compression.
DOI
https://doi.org/10.31223/X55F73
Subjects
Engineering, Life Sciences
Keywords
Soil acidity, Mid-infrared spectroscopy, In-context learning, Tabular foundation model, TabPFN, Transfer learning, Self-supervised learning, Chemometrics
Dates
Published: 2026-09-21 14:42
License
CC BY Attribution 4.0 International
Metrics
Views: 10
Downloads: 2
There are no comments or no comments have been made public for this article.