In the not-too-distant future, a screening assessment for depression could include a quick brain scan to identify the best treatment. Brain imaging combined with machine learning can reveal subtypes of depression and anxiety, according to a new study led by researchers at Stanford Medicine. The study, to be published June 17 in the journal Nature Medicine , sorts depression into six biological subtypes, or "biotypes," and identifies treatments that are more likely or less likely to work for three of these subtypes.

Better methods for matching patients with treatments are desperately needed, said the study's senior author, Leanne Williams, PhD, the Vincent V.C. Woo Professor, a professor of psychiatry and behavioral sciences, and the director of Stanford Medicine's Center for Precision Mental Health and Wellness.

Williams, who lost her partner to depression in 2015, has focused her work on pioneering the field of precision psychiatry. Around 30% of people with depression have what's known as treatment-resistant depression, meaning multiple kinds of medication or therapy have failed to improve their symptoms. And for up to two-thirds of people with depression, treatment fails to fully reverse their symptoms to healthy levels.

That's in part because there's no good way to know which antidepressant or type of therapy could help a given patient. Medications are prescribed through a trial-and-error method, so it can take months or years to land on a drug that works -; if it ever ha.