Machine Learning in the Treatment of Depression

Machine learning is a hot topic that has permeated numerous public and private industries, as well as a diverse spectrum of academic disciplines, extending far beyond its humble computer science origins. Machine learning techniques are generally considered a subset of the broader field of artificial intelligence (AI), although these two terms are sometimes used interchangeably. Health care is one such industry that has attempted to apply machine learning techniques to a multitude of tasks. Machine learning is by far the most prevalent application of AI within the health care industry, including both physical health [1], and mental health [2, 3]. The goals of machine learning applications within healthcare generally strive to enhance clinical understanding and/or improve patient care. More specifically, there is a growing body of research focused on using machine learning to improve patient screening, diagnosis, clinical decision making, and specific treatment outcomes [1, 2, 4].

The application of machine learning to mental health lagged a bit behind its elder sibling physical health, however, we have seen a rapidly growing body of research in recent years applied to various facets of mental health treatment.

Mental health is a large industry in its own right and machine learning research within the mental health domain has been applied to a vast array of topics, including medication treatment [2, 4, 5, 6], clinical diagnosis [4, 7], psychotherapy outcomes [8], and even predicting the onset of severe mental illness [9]. More specifically, the aforementioned applications of machine learning to mental health often focus on a particular diagnostic group, and sometimes even get as granular as a specific treatment modality within that psychiatric disorder. The most prevalent diagnostic group in current machine learning research is unsurprisingly also the most prevalent of mental health disorders, depression. In the United States alone, it is estimated that over 17 million adults had at least one major depressive episode in 2017, a whopping 7% of the population [10].

Although research on machine learning applications in depression is not new, they have only recently started gaining significant traction. A bibliographic analysis of all papers related to the topic of machine learning in depression [3] found that the first paper was published in 1993. The 2nd, however, wasn’t published until 1999, after which slow but steady growth was evident each year. More recently we have seen a relative boom in research on machine learning in depression, with exponential growth particularly evident in the past three years. Given this trajectory, it is safe to assume we are still in the early stages of machine learning research as it applies to depression. It is a promising and exciting field of study with numerous facets of discovery still unfolding before our eyes.

Current Applications

One of the most prominent and pervasive applications of machine learning in depression has focused on medication treatment outcomes [2, 4, 5, 6, 11, 12]. Indeed, a journal search on machine learning in depression will return a majority of papers specifically focused on psychotropic medication treatment. One prominent study combined clinical data from nine previous depression studies and used machine learning to cluster associated symptoms, and subsequently build a machine learning model to evaluate the efficacy of several major antidepressant medications [2]. The results identified three general symptom clusters and found statistically significant differences between the effectiveness of each antidepressant studied, suggesting that the specific cluster of symptoms a patient is experiencing should inform which antidepressant is prescribed.

Specific psychological assessment tools, including cognitive, psychomotor, and emotional tests, have also been used to cluster outcomes [5]. These clusters were then used to predict psychiatric medication response and found that certain biomarkers were linked to success based on the antidepressant medication prescribed.

Machine learning has also been applied to the topic of antidepressant symptom remission after an initial medication protocol [6, 10], which is a prominent, recurring issue in the treatment of depressive disorders (with medication). Machine learning models were trained on clinical assessment data to classify successful remission (after 12 weeks) across three different antidepressant medications [6]. Results indicated that the 164 clinical features analyzed were able to predict remission for two of the three medication protocols with 60% accuracy.

Although less common in the literature, machine learning has also been applied to other forms of treatment outcomes (apart from medication) in depression treatment. There are two other categories of depression treatment data that stand out, psychotherapy outcomes [8] and imaging data (e.g., Magnetic Resonance Imaging (MRI) scans) [10]. The first meta-analysis on the use of machine learning to predict treatment outcomes in unipolar and bipolar depression evaluated all forms of depression treatment data, including psychotherapy [8]. After initial abstract analysis of 639 potential studies, 75 received full-text review, and 26 met criteria for inclusion meaning it utilized machine learning algorithms to predict depression treatment outcomes. Results generally supported the usefulness of machine learning in predicting treatment outcomes with a combined 82% success rate (p < .05), and indicated algorithms using multiple data types were most effective. When decision trees were trained specifically on MRI data to classify the remission rate after 8 weeks of initial antidepressant treatment, it was found that MRI’s could successfully identify a subset of patients that were likely non-responders to initial antidepressant treatment [10].

Another promising application of machine learning in depression, and also more broadly to all mental health diagnoses, involves utilizing statistics and modeling to redefine current symptom clusters and diagnostic groupings [4]. This would be a vast undertaking and likely encounter significant pushback from decades of the status quo, which has always defined diagnostic groupings based on theoretical categories of psychiatric diagnoses that do not always line up to real-world manifestations of mental illness symptoms. Potential benefits include improved disease identification leading to the development of more effective interventions and medications, and a subsequent decrease in the overwhelming economic and societal cost of mental illness.

Considering the likely backlash against a complete revamp of diagnostic categorizations, a compromise approach was suggested that combines data-driven machine learning with theory-driven models [7]. More specifically, in this approach the theoretical models inform the feature selection process, leaning out the number of variables fed into machine learning algorithms. There are examples of this type of methodology improving outcomes in other medical/neurological diseases (e.g., Parkinson’s), and thus applying a similar approach to mental illness could improve both diagnosis and treatment outcomes.

Despite the rapidly growing body of promising research in the application of machine learning to depression, there are some underlying practical and ethical concerns that must be considered.

Some of the predominant practical concerns involve challenges to aggregating data from disparate sources, as well as difficulties conducting measures commonly used in studies (e.g., MRIs) on actual psychiatric patients in the real world, thus limiting the practicality of such research. Ethical considerations include assuring the patient actually wants to know if they are at risk, and the potential adverse impact and stigma associated with labeling someone with a mental illness, such as Major Depressive Disorder [9].


This is an exciting time for both providers and consumers of mental health services. Novel diagnostic and treatment schemas for depressive disorders may be on the horizon as we enter the brave new world of machine learning research and learn how best to apply it to our field. The current exponential growth in research in this area is a testament to the potential impact machine learning could have on mental health care. At the same time, we have only scratched the surface of what is possible. We are starting to see shifts in decades-old mentalities on how best to treat psychiatric disorders, to the extent that even the diagnostic groupings themselves are being put to the test.

In terms of depression treatment specifically, we are seeing machine learning successfully applied to improve antidepressant outcomes, reduce remission rates, and better classify groups that respond to specific medications. Multiple disparate sources of data are being used to improve these treatment outcomes, including psychological and cognitive testing, as well as MRI scans and other imaging techniques. Additionally, machine learning techniques are being applied to specific psychotherapy modalities to treat depression in an attempt to improve outcomes and identify patients and symptom presentations that best respond to particular types of therapy.

Future research will likely continue along this trajectory, as the validity and reliability of this current foundation are tested and subsequently built upon. Considering the relative lack of machine learning research currently applied to psychotherapy, and in light of the fact that therapy is one of the most common and successful longer-term treatments for depression (on par with medication treatment), I suspect we will start to see a surge in machine learning research in this area. Medication outcomes, however, are easier to conceptualize and test, and overlap more with longer-established medical research, and thus will likely continue to receive outsized attention. Overall, there is a bright future for machine learning applications in the treatment of depression.


[1] Abhari, S., Kalhori, S., Ebrahimi, M., Hasannejadasl, H., Garavand, A. “Artificial intelligence applications in type 2 diabetes mellitus care: focus on machine learning methods.” Healthcare Informatics Research, vol. 25, no. 4, p. 248, 2019.

[2] Chekroud, A., Gueorguieva, R., Krumholz, H., Trivedi, M., Krystal, J., McCarthy, G. “Reevaluating the efficacy and predictability of antidepressant treatments: a symptom clustering approach.” JAMA Psychiatry, vol. 74, no. 4, p. 370, 2017.

[3] Tran, B., McIntyre, R., Latkin, C., Phan, H., Vu, G., Nguyen, H., Gwee, K., Ho, C., Ho, R. “The current research landscape on the artificial intelligence application in the management of depressive disorders: a bibliometric analysis.” International Journal of Environmental Research and Public Health, vol. 16, no. 12, p. 2150, 2019.

[4] Bzdok, D., Meyer-Lindenberg, A. “Machine learning for precision psychiatry: opportunities and challenges.” Biological Psychiatry: Cognitive Neuroscience and Neuroimaging, vol. 3, no. 3, p. 223, 2017.

[5] Etkin, A., Patenaude, B., Song, Y., Usherwood, T., Rekshan, W., Schatzberg, A., Rush, A., Williams, L. “A cognitive-emotional biomarker for predicting remission with antidepressant medications: A report from the iSPOT-D trial.” Neuropsychopharmacology, vol. 40, p. 1332, 2015.

[6] Chekroud, A., Zotti, R., Shehzad, Z., Gueorguieva, R., Johnson, M., Trivedi, M., Cannon, T., Krystal, J., Corlett, P. “Cross-trial prediction of treatment outcome in depression: A machine learning approach.” The Lancet Psychiatry, vol. 3, no. 3, p. 243, 2016.

[7] Huys, Q., Maia, T., Frank, M. “Computational psychiatry as a bridge from neuroscience to clinical applications.” Nature Neuroscience, vol. 19, no. 3, p. 404, 2016.

[8] Lee, Y., Ragguett, R., Mansur, R., Boutilier, J., Rosenblat, J., Trevizol, A., Brietzke, E., Lin, K., Pan, Z., Subramaniapillai, M., Chan, T., Fus, D., Park, C., Musial, N., Zuckerman, H., Chen, V., Ho, R., Rong, C., McIntyre, R. “Applications of machine learning algorithms to predict therapeutic outcomes in depression: A meta-analysis and systematic review.” Journal of Affective Disorders, vol. 241, no. 208, p. 519, 2018.

[9] Lawrie, S., Fletcher-Watson, S., Whalley, H., McIntosh, A. “Predicting major mental illness: ethical and practical considerations.” BJPsych Open, vol. 5, no. 2, p. 30, 2019.

[10] National Institute of Mental Health, “Major depression: Prevalence of major depressive episode among adults”, section 2, 2007. [Online]. Available: [Accessed: Apr. 27, 2020].

[11] Korgaonkar, M., Rekshan, W., Gordon, E., Rush, A., Williams, L., Blasey, C., Grieve, S. “Magnetic resonance imaging measures of brain structure to predict antidepressant treatment outcome in major depressive disorder.” EBioMedicine, vol. 2, no. 1, p. 37, 2015.

[12] Mehltretter, J., Rollins, C., Benrimoh, D., Fratila, R., Perlman, K., Israel, S., Miresco, M., Wakid, M., Turecki, G. “Analysis of features selected by a deep learning model for differential treatment selection in depression.” Frontiers in Artificial Intelligence, vol. 2, p. 31, 2020.

Original post:

Leave a Reply

Your email address will not be published. Required fields are marked *