SHAP values are calculated by considering the contribution of each feature to the prediction, averaged over all possible combinations of features. This ensures a fair distribution of the "credit" for the prediction among all features. In toxicology, this could mean understanding how different chemical properties interact to produce a toxic effect.