The language of loneliness and depression, revealed in social media

By analyzing Facebook posts, Penn researchers found that words associated with depression are often tied to emotions, whereas those associated with loneliness are linked to cognition.

Person sitting in the dark, leaning on a desk, staring at a cell phone. A coffee cup and pile of papers sit nearby.

Loneliness is a risk factor for depression, but it can also be a symptom. Mental health professionals who treat patients experiencing both must navigate the complex relationship between the two conditions, yet also understand and treat them individually. To shed light on this, a multidisciplinary collaboration between Penn, Purdue, Stanford, and the National Institute on Drug Abuse (NIDA) combined traditional psychological assessments with linguistic methods and machine-learning analysis of Facebook posts.

In the Nature journal npj Mental Health Research, the research team co-led by Penn computer scientist Sharath Guntuku and psychologist Tingting Liu reports that the language associated with depression refers primarily to emotions, whereas the language of loneliness refers more to cognition. The two also share a common thread: frequent use of language referring to sickness, pain, and negative emotions.

“Mental health has this huge spectrum of varying manifestations—often with a lot of commonalities—but there are also these unique pieces,” says Guntuku, a professor of computer and information science in the School of Engineering and Applied Science and senior author on the study.

Because social media users freely choose which words they use to describe their thoughts and emotions, posts on platforms like Facebook offer a wealth of linguistic data, says co-author Lyle Ungar, a professor of computer and information science and psychology in the School of Arts & Sciences. “The language that people use on Facebook reveals a lot about how they feel.”

To explore this regarding loneliness and depression, the researchers received permission to collect 3.4 million Facebook posts from 2,986 individuals. They then administered depression and loneliness surveys to quantify psychological state and feelings of social isolation. Lastly, they linguistically analyzed the Facebook posts to find specific words, phrases, or themes associated with loneliness and depression.

In one technique to do this, called a linguistic inquiry word count or a closed-vocabulary, dictionary-based method, the researchers used a database developed by University of Texas psychologists to categorize words based on their meaning and grammatical function. A second technique, called an open-vocabulary method, used machine learning to extract common words, phrases, and topics frequently found in posts by participants experiencing loneliness or depression.

The researchers found that both depressed and lonely people were more likely to employ language about sickness, pain, and negative emotions, including words like “crappy,” “miserable,” and “tired.” Those who weren’t depressed or lonely more commonly used language about social gatherings, relationships, and positive emotions, like “celebrated,” “date,” and “game.”

This pattern applied to overtly emotive words, such as “bad” or “exciting,” but also to words with more implicit meanings; depressed and lonely people frequently used the singular first-person pronoun “I,” for example, whereas people who weren’t depressed or lonely often used the plural first-person pronoun “we,” which implies a social relationship.

Despite sharing some linguistic indicators, the two also had unique components. “We use ‘head versus heart’ to refer to this difference,” says Liu, lead paper author and a postdoctoral researcher in Ungar’s lab and at NIDA.

Controlling individually for loneliness and depression, the researchers found that the language of depression involved more emotions, the “heart,” and the language of loneliness involved more cognitive processes, the “head.” Lonely people more frequently referred to contemplative activities like reading, writing, and observing the world, whereas depressed people referred to their apathy, pain, and confusion. These patterns also applied to common Internet acronyms and emoticons, with depressed people often using the frowning “=(“ emoticon and acronyms like “idc” (short for “I don’t care”).

These results suggest that loneliness could stem from an internal cognitive component, not just isolation or poor social skills, says Liu. “Loneliness could be driven by people’s perception of the environment and the social threats within,” she says. This view supports previous research, too, which has found that “strategies targeting people’s maladaptive social cognition are more effective than studies focused purely on social skills,” she says.

In addition to informing how therapists address loneliness and depression, the researchers say they hope their work can guide how social media platforms monitor for mental health risks and respond to mental health crises sooner. “You can’t use social media to diagnose someone,” says Guntuku. “But social media can help identify when someone might be feeling low and provide the resources that they need.”

Sharath Guntuku is a professor in the Department of Computer and Information Science in the School of Engineering and Applied Science, a senior fellow at the Leonard Davis Institute of Health Economics, and a member of the Positive Psychology Center in the Department of Psychology in the School of Arts & Sciences at the University of Pennsylvania.

Tingting Liu is a postdoctoral researcher in the Positive Psychology Center in the Department of Psychology in the School of Arts & Sciences at Penn, and at the National Institute on Drug Abuse (NIDA) in the National Institutes of Health (NIH).

Lyle Ungar is a professor in the Department of Computer and Information Science and Bioengineering in the School of Engineering and Applied Science, Department of Genomics and Computational Biology in the Perelman School of Medicine, Department of Operations, Information, and Decisions in the Wharton School, and in the Department of Psychology in the School of Arts & Sciences at Penn.

Other co-authors on the study include Garrick Sherman of the University of Pennsylvania; Brenda Curtis and Kenna Yadeta of NIDA/NIH; Louis Tay of Purdue University; and Johannes C. Eichstaedt of Stanford University.

This research was funded by the Intramural Research Program of the NIH and NIDA