Biochar is crucial for agricultural output and plays a significant role in effectively eliminating heavy metals (HMs) from the soil, which is essential for maintaining a soil–plant environment. This work aimed to assess machine learning models to analyze the impact of soil parameters on the transformation of HMs in biochar–soil–plant environments, considering the intricate non-linear relationships involved. A total of 211 datasets from pot or field experiments were evaluated. Fourteen factors were taken into account to assess the efficiency and bioavailability of HM–biochar amendment immobilization. Four predictive models, namely linear regression (LR), partial least squares (PLS), support vector regression (SVR), and random forest (RF), were compared to predict the immobilization efficiency of biochar-HM. The findings revealed that the RF model was created using 5-fold cross-validation, which exhibited a more reliable prediction performance. The results indicated that soil features accounted for 79.7% of the absorption of HM by crops, followed by biochar properties at 17.1% and crop properties at 3.2%. The main elements that influenced the result have been determined as the characteristics of the soil (including the presence of different HM species and the amount of clay) and the quantity and attributes of the biochar (such as the temperature at which it was produced by pyrolysis). Furthermore, the RF model was further developed to predict bioaccumulation factors (BAF) and variations in crop uptake (CCU). The R2 values were found to be 0.7338 and 0.6997, respectively. Thus, machine learning (ML) models could be useful in understanding the behavior of HMs in soil–plant ecosystems by employing biochar additions.
Soil pollution with cadmium (Cd) poses serious health and environmental consequences. The study investigated the incubation of several soil samples and conducted quantitative soil characterization to assess the influence of biochar (BC) on Cd adsorption. The aim was to develop predictive models for Cd concentrations using statistical and modeling approaches dependent on soil characteristics. The potential risk linked to the transformation and immobilization of Cd adsorption by BC in the soil could be conservatively assessed by pH, clay, cation exchange capacity, organic carbon, and electrical conductivity. In this study, Long Short-Term Memory (LSTM), Bidirectional Gated Recurrent Unit (BiGRU), and 5-layer CNN Convolutional Neural Networks (CNNs) were applied for risk assessments to establish a framework for evaluating Cd risk in BC amended soils to predict Cd transformation. In the case of control soils (CK), the BiGRU model showed commendable performance, with an value of 0.85, indicating an approximate 85.37% variance in the actual Cd. The LSTM model, which incorporates sequence data, produced less accurate results (, while the 5-layer CNN model had an R2 value of 0.91, indicating that the CNN model could account for over 91% of the variation in actual Cd levels. In the case of BC-applied soils, the BiGRU model demonstrated a strong correlation between predicted and actual values with (0.93), indicating that the model explained 93.21% of the variance in Cd concentrations. Similarly, the LSTM model showed a notable increase in performance with BC-treated soil data. The value for this model stands at a robust , reflecting its enhanced ability to predict Cd levels with BC incorporation. Outperforming both recurrent models, the 5-layer CNN model attained the highest precision with an value of 0.95, suggesting that 95.58% of the variance in the actual Cd data can be explained by the CNN model’s predictions in BC-amended soils. Consequently, this study suggests developing ecological soil remediation strategies that can effectively manage heavy metal pollution in soils for environmental sustainability.