Opposites attract, or so the saying goes. Turns out, that’s not entirely true. In fact, people tend to marry others that are pretty similar to them—or at least in terms of height, weight, income, and IQ. And a massive study of Swedish citizens has recently added another trait to that list: mental health.

Led by research psychiatrist Ashley Nordsletten, the study published in JAMA Psychiatry used Swedish national databases of health and partnership records of 3.7 million individuals to investigate how psychiatric diagnoses affect marriage and partnership patterns.

The study showed that individuals with a psychiatric diagnosis (conditions such as schizophrenia, depression, bipolar disorder, etc.) were less likely to get married in general. But when they did marry, they were two to three times more likely to partner with someone who also has a mental illness compared to someone without a diagnosis. And when a diagnosed person chose a partner who also had a diagnosis, they were likely to be with someone with the same condition. This trend was especially strong among people ADHD, schizophrenia, or autism, and these pairing patterns were not observed for non-psychiatric medical conditions such as diabetes.

“The magnitude of these correlations was often comparable to, or in excess of those observed elsewhere between spouses, features such as personality or height,” Nordsletten said over email. “These results suggested that individuals with psychiatric diagnoses are mating—to a degree greater than would be expected by chance—with other diagnosed individuals.”

Nordsletten is quick to point out the limitations of the study: “It’s important to keep in mind our estimates reflect counts of registered diagnoses—meaning an individual had to seek help and be diagnosed,” Nordsletten says. “Many individuals never seek help for their mental health needs, so the numbers we are seeing here are an estimate.”

But the numbers are compelling, and the implications are worth considering.

Why might this be the case? Do we seek out people who will accept and understand our specific struggles? The reasons aren’t clear. But for people living with a condition like ADHD or autism, that condition is an unextractable part of their personality. So perhaps it’s as simple as the fact that we like people who are personally similar, and compatible with our own quirks and challenges—whether those quirks and challenges are medically diagnosable or not.

If you and your partner are dealing with the same mental wellness challenges, you could be uniquely equipped to support each other. Mental health can be a taboo topic in romance—but here’s some evidence the object of your affection might know more about what’s going on in your head than you think. And of course, it’s worth mentioning that mental health disorders affect 1 in 4 people—it doesn’t make us less lovable, it might even make us more lovable to certain people. In the end, we’re all a bit mental, especially when we fall in love.