Abstract
Artificial Neural Networks (ANNs) are valuable tools for predicting soil properties using large datasets. However, a common challenge in soil sciences is the uneven distribution of soil samples, which often results from past sampling projects that heavily sample certain areas while leaving similar yet geographically distant regions under-sampled. One potential solution to this problem is to transfer an already trained model to other similar regions. Robust spatial uncertainty quantification is crucial for this purpose, yet often overlooked in current research. We address this issue by using a Bayesian deep learning technique, Laplace Approximations, to quantify spatial uncertainty. This produces a probability measure encoding where the model’s prediction is deemed reliable, and where a lack of data should lead to a high uncertainty. We train such an ANN on a soil landscape dataset from a specific region in southern Germany and then transfer the trained model to another unseen but to some extend similar region, without any further model training. The model effectively generalized alluvial patterns, demonstrating its ability to recognize repetitive features of river systems. However, the model showed a tendency to favor overrepresented soil units, underscoring the importance of balancing training datasets to reduce overconfidence in dominant classes. Quantifying uncertainty in this way allows stakeholders to better identify regions and settings in need of further data collection, enhancing decision-making and prioritizing efforts in data collection. Our approach is computationally lightweight and can be added post-hoc to existing deep learning solutions for soil prediction, thus offering a practical tool to improve soil property predictions in under-sampled areas, as well as optimizing future sampling strategies, ensuring resources are allocated efficiently for maximum data coverage and accuracy.
Introduction
In digital soil mapping (DSM), researchers often face a significant data imbalance: legacy datasets provide dense information for specific "reference" regions, while vast "target" areas remain data-sparse. A common strategy is to train machine learning models on these data-rich areas and extrapolate predictions to similar, unmapped regions. However, standard Artificial Neural Networks (ANNs) are frequently criticized for being overconfident "black boxes." They may assign a high probability to a prediction even when encountering a soil type entirely absent from their training data. This lack of self-awareness can lead to inaccurate land-use decisions and poorly allocated resources. This research addresses the need for robust spatial uncertainty quantification to make these models "know what they don't know" without requiring massive computational overhead.
Methodology
The study utilized a fully connected ANN (Multi-layer Perceptron) to classify soil units across two geologically similar regions in southern Germany near Tübingen. The Goldersbach area (8.86 km²) served as the reference for training and validation, containing 8 distinct soil units. The Bühlertalbach area (18.5 km²) acted as the target for extrapolation, presenting a more complex landscape with 14 soil units, including several not seen during training. The model utilized 33 environmental covariates at a 10m resolution, including topographic indices, Sentinel-2 spectral data, and geological maps.
To solve the overconfidence problem, the researchers implemented Last-Layer Laplace Approximation (LLLA). Standard ANNs use a Softmax function at the end to produce probabilities, but these are often mathematically skewed toward extreme certainty. LLLA is a Bayesian deep learning technique that approximates the posterior distribution of the weights in the final layer of the network. This approach is computationally lightweight and can be applied post-hoc to existing models, estimating uncertainty based on how far a new data point lies from the training distribution.
Key Insights and Results
The experimental results highlighted a stark contrast between model confidence and actual performance. While the ANN achieved nearly 98% accuracy on the training set, its accuracy dropped to 47.38% when extrapolated to the unseen target area. Crucially, the standard model maintained a mean confidence of over 96% despite this significant drop in accuracy.
Applying LLLA successfully adjusted these confidence levels. The overall mean confidence was reduced from 96.22% to 88.66%, providing a more realistic representation of the model's reliability. Furthermore, LLLA proved effective at error detection: in areas where the model made incorrect predictions, the mean confidence dropped by 9.00% after LLLA, compared to only a 5.97% drop in areas where it was correct. This demonstrates that the method is effective at "doubting" its own mistakes more than its successes.
The model also showed a strong ability to generalize alluvial patterns—repetitive features of river systems—across catchments. However, it struggled with "plausible misclassifications" between physically similar soil units and showed a bias toward overrepresented classes in the training data, emphasizing the importance of dataset balancing.
Discussion and Conclusion
While LLLA is a powerful tool for quantifying spatial uncertainty, it is not a universal solution. It can struggle to detect uncertainty when soil units have closely overlapping environmental characteristics. Additionally, because it only modifies the final layer, it may miss deeper structural uncertainties within the model.
Future work will focus on improving training data balance to prevent class bias. Nevertheless, the ability to generate spatial uncertainty maps offers immediate value to stakeholders. By identifying regions of high uncertainty, soil scientists can prioritize field sampling efforts, ensuring that every new data point collected provides maximum value for improving map accuracy and optimizing resource allocation.
Summary updated