Abstract:Cadmium (Cd) is a highly toxic heavy metal that occurs widely in the environment and poses extensive threats to human health, animals, and plants. In this study, the random forest algorithm was used to quantify the contribution value of each influencing factor to soil Cd accumulation, and the interactive influence of each factors was visually demonstrated by the partial dependence graph. According to the random forest, the main influencing factors were pH (35.7%), Corg (18.8%), elevation (17.2%), distance (11.4%), agriculture (7.3%), population density (6.3%) and factories (3.3%). The interaction effects of pH and Corg on distance and elevation were quantified and visualised. When pH values were greater than 7.02 and Corg contents were higher than 1.53%, both of the two factors had the dominant influence on soil Cd concentration, rather than distance. The maximum contribution of elevation, a single factor, to Cd concentration was about 0.13 mg/kg, and its interactions reached 1.082 mg/kg and 0.83 mg/kg, respectively, when combined with pH and Corg at 194.0 m. However, with the increasing of the elevation, pH and Corg gradually took over the leading roles. This result not only gives us a quantitative understanding of the relationship between the factors that affect soil cadmium accumulation, but also provides an accurate method for source apportionment of heavy metals in soil.