Background
Based on previous work on the identification of cognitive distortions in language data, we aim to predict patient depression symptoms by identifying cognitive distortions in their psychotherapy transcripts. Further, using explainable AI we want to create a machine learning model that can be used to identify important distortions, allowing us to assess the most important distortions across the whole dataset and for individual patients.
Methods
We identified 14 cognitive distortions by modifying lists of representative n-grams created by Bathina et al. (Nat Hum Behav 5(4):458–466, 2021, https://doi.org/10.1038/s41562-021-01050-7). Based on these n-grams, the relative frequency of the distortions was calculated across 552 transcripts of 124 patients and employed to predict patient depression symptoms. Further, we joined all distortions in an exploratory explainable AI model, combining various machine learning algorithms in a nested cross-validation framework for the prediction of depression symptoms.
Results
Depression severity and occurrence were predicted by the distortions personalizing ($$r=.13)$$
r
=
.
13
)
, dichotomous thinking ($$r=.11)$$
r
=
.
11
)
, and overgeneralizing ($$r=.10)$$
r
=
.
10
)
, while occurrence was additionally predicted by mental filtering. The joined machine learning model achieved a moderate performance of $$r=.29$$
r
=
.
29
. Using explainable AI, we identified the distortions with the highest feature impact in the combined model (i.e., dichotomous reasoning, minimization, personalizing, mindreading, and mental filtering) and were able to explain the prediction for individual transcripts.
Conclusions
This approach illustrates how language-based measures can identify relevant processes that predict depression symptoms. This may improve our understanding of the effects of cognitive distortions and may be utilized to create feedback to therapists. Limitations prevail due to small effect sizes and the exploratory approach of this study.